X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=9288d44264402db471db2c00af3d55c6841c0498;hb=251884b14d385d0e00122a238efc3ba992e9f39a;hp=d6e2d14becc76790295e429a02a093bb15653f54;hpb=586cbb347e7639f5575b48572e75140501a109c0;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index d6e2d14b..9288d442 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -1,19 +1,20 @@ # # the bye command # -# $Id$ # +# + my $self = shift; +return (1, $self->msg('e5')) if $self->inscript; -# 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')); + +if ($self->is_user && -e $fn) { + $self->send_file($fn); } -$self->state('bye'); +$self->disconnect; + return (1);