X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fbye.pl;h=f38f93f8a0d72cdee32e66c23d1187ad47ceeb7c;hb=7505989c04f2d3ff01ca126407c1dcd17e4bc62b;hp=1fc73f66648a9251cb327d9c5923902adc20d308;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/bye.pl b/cmd/bye.pl index 1fc73f66..f38f93f8 100644 --- a/cmd/bye.pl +++ b/cmd/bye.pl @@ -5,5 +5,18 @@ # my $self = shift; -$self->state('bye'); + +# 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); +} + +$self->send_now('Z', ""); + +$self->disconnect; + return (1);