X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=9288d44264402db471db2c00af3d55c6841c0498;hb=62a87def961821679e455f333a58bc8c357e0457;hp=13195c60ebb3a38820c8f9f77e0e3de841746025;hpb=b735ad9a0325fae9ca0c2324794b99288a737802;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index 13195c60..9288d442 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -1,18 +1,18 @@ # # the bye command # -# $Id$ # +# + my $self = shift; +return (1, $self->msg('e5')) if $self->inscript; + +my $fn = localdata("logout"); +dbg("fn: $fn " . (-e $fn ? 'exists' : 'missing')); -# 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); +if ($self->is_user && -e $fn) { + $self->send_file($fn); } $self->disconnect;