]> dxcluster.net Git - spider.git/commitdiff
add not here message
authorminima <minima>
Mon, 25 Jun 2001 17:56:11 +0000 (17:56 +0000)
committerminima <minima>
Mon, 25 Jun 2001 17:56:11 +0000 (17:56 +0000)
fix a few things

perl/DXCommandmode.pm
perl/DXProt.pm
perl/DXUser.pm
perl/Messages

index 32b1f86c4cade33ca79f84a633b43d2f5f2aec99..c7ce8c3c7f6699e8313740a7d95afd4766ba6eaa 100644 (file)
@@ -644,6 +644,15 @@ sub talk
        $line =~ s/\\5E/\^/g;
        $self->send("$to de $from: $line") if $self->{talk};
        Log('talk', $to, $from, $main::mycall, $line);
+       # send a 'not here' message if required
+       unless ($self->{here} && $from ne $to) {
+               my ($ref, $dxchan);
+               if (($ref = Route::get($from)) && ($dxchan = $ref->dxchan)) {
+                       my $name = $self->user->name || $to;
+                       my $s = $self->user->nothere || $dxchan->msg('nothere', $name);
+                       $dxchan->talk($to, $from, undef, $s);
+               }
+       }
 }
 
 # send an announce
index 152a5fe05bdb84510ae764028d57ce59106d0524..8bfd6c3e43d4525d01fbe7109577db14c11ae2d1 100644 (file)
@@ -275,10 +275,8 @@ sub normal
        
 #      print join(',', @field), "\n";
                                                
-       # ignore any lines that don't start with PC
-       return if !$field[0] =~ /^PC/;
        
-       # process PC frames
+       # process PC frames, this will fail unless the frame starts PCnn
        my ($pcno) = $field[0] =~ /^PC(\d\d)/; # just get the number
        return unless $pcno;
        return if $pcno < 10 || $pcno > 99;
@@ -785,16 +783,21 @@ sub normal
                
                if ($pcno == 24) {              # set here status
                        my $call = uc $field[1];
-                       my $ref = Route::Node::get($call);
-                       $ref->here($field[2]) if $ref;
-                       $ref = Route::User::get($call);
-                       $ref->here($field[2]) if $ref;
-                       $ref ||= Route->new($call);
+                       my ($nref, $uref);
+                       $nref = Route::Node::get($call) && $nref->here($field[2]);
+                       $uref = Route::User::get($call) && $uref->here($field[2]);
+                       return unless $nref || $uref;   # if we don't know where they are, it's pointless sending it on
                        
-                       # input filter if required
-                       return unless $self->in_filter_route($ref);
-
-                       $self->route_pc24($ref, $field[3]) if $ref && !eph_dup($line);
+                       unless (eph_dup($line)) {
+                               if ($nref) {
+                                       return unless $self->in_filter_route($nref);
+                                       $self->route_pc24($nref, $field[3])
+                               }
+                               if ($uref) {
+                                       return unless $self->in_filter_route($uref);
+                                       $self->route_pc24($uref, $field[3]);
+                               }
+                       }
                        return;
                }
                
index 23996b0700d99ce3e18f719081a29c32bb037edf..52b7819d4ace901067280cd6396f164281621c7e 100644 (file)
@@ -63,8 +63,9 @@ $lasttime = 0;
                  pingint => '9,Node Ping interval',
                  nopings => '9,Ping Obs Count',
                  wantlogininfo => '9,Login info req,yesno',
-                 wantgrid => '0,DX Grid Info,yesno',
+          wantgrid => '0,DX Grid Info,yesno',
                  lastoper => '9,Last for/oper,cldatetime',
+                 nothere => '0,Not Here Text',
                 );
 
 no strict;
index a9a1be91d2e9e97c1d25921f82174874ddd60a71..98cf96db9899204e65fd8960741e10dd037aaab9 100644 (file)
@@ -172,6 +172,7 @@ package DXM;
                                nodeu => '$_[0] set back as a User',
                                nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line',
                                notdone => 'NOT Done',
+                               nothere => 'Sorry, but $_[0] isn\'t here at the moment, please try later', 
                                obscount => 'Ping obsolescence count on $_[0] set to $_[1]',
                                ok => 'Operation successful',
                                outconn => 'Outstanding connect to $_[0]',