X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=d43e257a5aa21d91ff1146aaea4a45ce9e0fc549;hb=cfa6a715412c7c4972ec85034bd2d945751317cb;hp=653e939407a4067141f4da5bad97e11074af859a;hpb=8e6d10121beaa001ea97b8c0225a938d6b189965;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index 653e9394..d43e257a 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -1,21 +1,19 @@ # # the bye command # -# $Id$ # +# + my $self = shift; +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;