Allow synonyms for localhost
[spider.git] / cmd / bye.pl
index 13195c60ebb3a38820c8f9f77e0e3de841746025..be2ba79ccba10390bde6f310b85283cd5993d773 100644 (file)
@@ -1,18 +1,18 @@
 #
 # the bye command
 #
-# $Id$
 #
+#
+
 
 my $self = shift;
+return (1, $self->msg('e5')) if $self->inscript || $self->remotecmd;
+
+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 = <I>;
-       close(I);
-       $self->send_now('D', @in);
-       sleep(1);
+if ($self->is_user && -e $fn) {
+       $self->send_file($fn);
 }
 
 $self->disconnect;