change place of chat target in pc12
authorminima <minima>
Sat, 8 Mar 2003 10:01:32 +0000 (10:01 +0000)
committerminima <minima>
Sat, 8 Mar 2003 10:01:32 +0000 (10:01 +0000)
cmd/chat.pl
perl/DXCommandmode.pm
perl/DXProt.pm

index 4062358cc57279feacbbe1df39e1266da852289c..545c7c78ef6fc2a3e404f3fbde282bf804d698bd 100644 (file)
@@ -38,6 +38,6 @@ if (@bad = BadWords::check($line)) {
 my $msgid = DXProt::nextchatmsgid();
 $text = "#$msgid $text";
 
-DXProt::send_chat($self, DXProt::pc12($from, $text, $target), $from, $target, $text, ' ', $main::mycall, '0');
+DXProt::send_chat($self, DXProt::pc12($from, $text, '*', $target), $from, $target, $text, ' ', $main::mycall, '0');
 
 return (1, ());
index 65d5eb0392d4699fa63672f1de400a46900f0f11..5a53dc6e117fe291216fd36ffc8c350a7ec118d6 100644 (file)
@@ -813,10 +813,10 @@ sub chat
        my $text = shift;
        my ($filter, $hops);
 
-       return unless grep uc $_ eq $target, @{$self->{user}->{group}};
+       return unless grep uc $_ eq $to, @{$self->{user}->{group}};
        
        $text =~ s/^\#\d+ //;
-       my $buf = "$target de $_[0]: $text";
+       my $buf = "$to de $_[0]: $text";
        $buf =~ s/\%5E/^/g;
        $buf .= "\a\a" if $self->{beep};
        $self->local_send('C', $buf);
index 5ddafa5ef6d9ce17730e94dc0ae092d07532a005..26a36548646c8a62a65291051f41703eb758b95d 100644 (file)
@@ -76,7 +76,7 @@ $chatdupeage = 20 * 60 * 60;
 (
  [ qw(c c m bp bc c) ],                        # pc10
  [ qw(f m d t m c c h) ],              # pc11
- [ qw(c m m bp bm p h) ],              # pc12
+ [ qw(c bm m bp bm p h) ],             # pc12
  [ qw(c h) ],                                  # 
  [ qw(c h) ],                                  # 
  [ qw(c m h) ],                                        # 
@@ -626,7 +626,7 @@ sub handle_12
        
                # send it
                $self->send_announce($line, @_[1..6]);
-       } elsif ((($dxchan = DXChannel->get($_[2])) && $dxchan->is_user) || !is_callsign($_[0])){
+       } elsif ((($dxchan = DXChannel->get($_[2])) && $dxchan->is_user) || $_[4] =~ /^[\#\w]+$/){
                $self->send_chat($line, @_[1..6]);
        } else {
                $self->route($_[2], $line);
@@ -1790,7 +1790,7 @@ sub send_chat
        my $line = shift;
        my @dxchan = DXChannel->get_all();
        my $dxchan;
-       my $target = $_[1];
+       my $target = $_[3];
        my $text = unpad($_[2]);
                                
        # obtain country codes etc 
@@ -1836,7 +1836,7 @@ sub send_chat
                next if $dxchan == $main::me;
                next if $dxchan == $self && $self->is_node;
                next if $target eq 'LOCAL' && $dxchan->is_node;
-               $dxchan->chat($line, $self->{isolate}, ' ', $target, $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq);
+               $dxchan->chat($line, $self->{isolate}, $target, $_[1], $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq);
        }
 }