put dx.pl into an explicit handle sub
[spider.git] / cmd / bye.pl
index f38f93f8a0d72cdee32e66c23d1187ad47ceeb7c..513b3055af6fa4bca41f5b1d8bddef23de27f874 100644 (file)
@@ -1,21 +1,22 @@
 #
 # 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;
+if ($self->is_user && -e localdata("logout")) {
+       open(I, localdata("logout")) or confess;
        my @in = <I>;
        close(I);
        $self->send_now('D', @in);
        sleep(1);
 }
 
-$self->send_now('Z', "");
+#$self->send_now('Z', "");
 
 $self->disconnect;