fixed double logout messages
[spider.git] / perl / DXCommandmode.pm
index 96ccc0a494aa872575064fee0a22cee274ad30c9..ff173906bebef9945743b6e5eeb089bca430a886 100644 (file)
@@ -83,6 +83,8 @@ sub start
        $self->{lang} = $user->lang || $main::lang || 'en';
        $self->{pagelth} = $user->pagelth || 20;
        $self->{priv} = 0 if $line =~ /^(ax|te)/; # set the connection priv to 0 - can be upgraded later
+       ($self->{width}) = $line =~ /width=(\d+)/;
+       $self->{width} = 80 unless $self->{width} && $self->{width} > 80;
        $self->{consort} = $line;       # save the connection type
        
        # set some necessary flags on the user if they are connecting
@@ -423,6 +425,9 @@ sub disconnect
 {
        my $self = shift;
        my $call = $self->call;
+
+       return if $self->{disconnecting}++;
+
        delete $self->{senddbg};
 
        my $uref = Route::User::get($call);