X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=be2ba79ccba10390bde6f310b85283cd5993d773;hb=4746cf71bae031c57c24600713d7cfc281d71e20;hp=41d3ee91af35a549d17dcfd57019b4c72ae82b75;hpb=c3505bcfc922cd712bad2c20b3479cf8d1dc54fe;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index 41d3ee91..be2ba79c 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -4,19 +4,16 @@ # # + my $self = shift; -return (1, $self->msg('e5')) if $self->inscript; +return (1, $self->msg('e5')) if $self->inscript || $self->remotecmd; -# log out text -if ($self->is_user && -e "$main::data/logout") { - open(I, "$main::data/logout") or confess; - my @in = ; - close(I); - $self->send_now('D', @in); - sleep(1); -} +my $fn = localdata("logout"); +#dbg("fn: $fn " . (-e $fn ? 'exists' : 'missing')); -#$self->send_now('Z', ""); +if ($self->is_user && -e $fn) { + $self->send_file($fn); +} $self->disconnect;