*really* changed the DX Spot to "the way it was"
[spider.git] / perl / DXCommandmode.pm
index b10149ec6bcbd9bcf75b27e8839898878c21dd41..a5ae268b34c2b601eb176482453057e17e4c6e75 100644 (file)
@@ -156,8 +156,9 @@ sub start
        }
 
        # establish slug queue, if required
-       $self->{sluggedpc11s} = [];
-       $self->{isslugged} = $DXProt::pc92_slug_changes + $main::systime if $DXProt::pc92_slug_changes;
+       $self->{sluggedpcs} = [];
+       $self->{isslugged} = $DXProt::pc92_slug_changes + $DXProt::last_pc92_slug + 5 if $DXProt::pc92_slug_changes;
+       $self->{isslugged} = 0 if $self->{priv} > 0 || $user->registered || $user->homenode eq $main::mycall;
 
        # send the relevant MOTD
        $self->send_motd;
@@ -613,11 +614,17 @@ sub process
                }
                ++$users;
                $maxusers = $users if $users > $maxusers;
-       }
 
-       while (my ($k, $v) = each %nothereslug) {
-               if ($main::systime >= $v + 300) {
-                       delete $nothereslug{$k};
+               if ($dxchan->{isslugged} && $main::systime > $dxchan->{isslugged}) {
+                       foreach my $ref (@{$dxchan->{sluggedpcs}}) {
+                               if ($ref->[0] == 61) {
+                                       Spot::add(@{$ref->[2]});
+                                       DXProt::send_dx_spot($dxchan, $ref->[1], @{$ref->[2]});
+                               }
+                       }
+
+                       $dxchan->{isslugged} = 0;
+                       $dxchan->{sluggedpcs} = [];
                }
        }
 
@@ -1000,7 +1007,7 @@ sub format_dx_spot
 
        my $t = ztime($_[2]);
        my $loc = '';
-       my $clth = 31 + $self->{width} - 80;    # allow comment to grow according the screen width 
+       my $clth = 30 + $self->{width} - 80;    # allow comment to grow according the screen width 
        #       --$clth if $self->{consort} eq 'local';
        
        my $comment = substr (($_[3] || ''), 0, $clth);
@@ -1032,9 +1039,10 @@ sub format_dx_spot
                $comment = substr($comment, 0,  $clth-3) . ' ' . $_[12] if $_[12]; 
        }
 
-       return sprintf "DX de %-9.9s%10.1f %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
+       return sprintf "DX de %-9.9s%9.1f  %-12.12s %-s $t$loc", "$_[4]:", $_[0], $_[1], $comment;
 }
 
+
 # send a dx spot
 sub dx_spot
 {