28Aug00=======================================================================
1. changes DXChannel::get_all_ak1a to get_all_nodes.
+2. ignore PC21s coming in on the interface with that callsign (ie nodes
+trying to disconnect themselves).
+3. output correct PC29 on blank lines and escape ^ characters differently
+(and transparently for spider nodes).
26Aug00=======================================================================
1. make blank origins on messages the node call.
2. added new version of FAQ from Ian G0VGS
if ($pcno == 29) { # incoming text
my $ref = $work{"$f[2]$f[3]"};
if ($ref) {
+ $f[4] =~ s/\%5E/^/g;
push @{$ref->{lines}}, $f[4];
$ref->{count}++;
if ($ref->{count} >= $ref->{linesreq}) {
# send initialisation string
unless ($self->{outbound}) {
- $self->send(pc38()) if DXNode->get_all();
+# $self->send(pc38()) if DXNode->get_all();
$self->send(pc18());
$self->{lastping} = $main::systime;
} else {
if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me!
my $node = DXCluster->get_exact($call);
if ($node) {
+ if ($call eq $self->{call}) {
+ dbg('chan', "LOOP: Trying to disconnect myself with PC21");
+ return;
+ }
if ($node->dxchan != $self) {
dbg('chan', "LOOP: $call come in on wrong channel");
return;
}
my $dxchan;
- if (($dxchan = DXChannel->get($call)) && $dxchan != $self) {
+ if ($dxchan = DXChannel->get($call)) {
dbg('chan', "LOOP: $call connected locally");
return;
}
$user2 = ' ';
$user1 = $to;
}
-# my $user2 = $via ? $to : ' ';
-# my $user1 = $via ? $via : $to;
$text = unpad($text);
- $text = ' ' if !$text;
+ $text = ' ' unless $text && length $text > 0;
return "PC10^$from^$user1^$text^*^$user2^$main::mycall^~";
}
sub pc29
{
my ($fromnode, $tonode, $stream, $text) = @_;
- $text =~ s/\^/:/og; # remove ^
-# $text =~ s/\~/S/og;
+ $text = ' ' unless $text && length $text > 0;
+ $text =~ s/\^/%5E/og; # remove ^
return "PC29^$fromnode^$tonode^$stream^$text^~";
}
while (@lines){
$msg = shift @lines;
- $msg =~ s/%([2-9A-F][0-9A-F])/chr(hex($1))/eg;
+ $msg =~ s/\%([2-9A-F][0-9A-F])/chr(hex($1))/eg;
&{$conn->{rcvd_notification_proc}}($conn, $msg, $!);
$! = 0;
}