fix console.pl max scroll depth
[spider.git] / cmd / bye.pl
index 1fc73f66648a9251cb327d9c5923902adc20d308..41d3ee91af35a549d17dcfd57019b4c72ae82b75 100644 (file)
@@ -1,9 +1,23 @@
 #
 # the bye command
 #
-# $Id$
+#
 #
 
 my $self = shift;
-$self->state('bye');
+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 = <I>;
+       close(I);
+       $self->send_now('D', @in);
+       sleep(1);
+}
+
+#$self->send_now('Z', "");
+
+$self->disconnect;
+
 return (1);