X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=be2ba79ccba10390bde6f310b85283cd5993d773;hb=d5bbb8b5085e57870503e56c79cdebb26122c915;hp=1fc73f66648a9251cb327d9c5923902adc20d308;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index 1fc73f66..be2ba79c 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -1,9 +1,20 @@ # # the bye command # -# $Id$ # +# + my $self = shift; -$self->state('bye'); +return (1, $self->msg('e5')) if $self->inscript || $self->remotecmd; + +my $fn = localdata("logout"); +#dbg("fn: $fn " . (-e $fn ? 'exists' : 'missing')); + +if ($self->is_user && -e $fn) { + $self->send_file($fn); +} + +$self->disconnect; + return (1);