X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=5e967fd228c83bfcf21c106b9314ca909f300ce4;hb=7f0e53a059144b444ef04ea7609ce0049a4ae268;hp=3e33ec33d3096f67284f5a214963acecaaf50696;hpb=40178a4be6f9dc1e1a409b96fc087cf971886fd0;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3e33ec33..5e967fd2 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -659,7 +659,8 @@ sub send_announce } } - if (AnnTalk::dup($from, $target, $_[2])) { + # the sysop ('*') thing is an attempt to minimise the damage caused by non-updated PC93 generators + if (AnnTalk::dup($from, $target, $_[2]) || ($_[3] eq '*' && AnnTalk::dup($from, 'ALL', $_[2]))) { my $dxchan = DXChannel::get($from); if ($self == $main::me && $dxchan && $dxchan->is_user) { if ($dxchan->priv < 5) { @@ -1533,18 +1534,15 @@ sub import_chat foreach my $text (@msg) { next unless $text && $text !~ /^\s*#/; - if ($target eq 'ALL' || $target eq 'LOCAL' || $target eq 'SYSOP') { - my $sysopflag = $target eq 'SYSOP' ? '*' : ' '; - if ($target ne 'LOCAL') { - send_announce($main::me, pc12($main::mycall, $text, '*', $sysopflag), $main::mycall, '*', $text, $sysopflag, $main::mycall, '0'); - } else { - Log('ann', 'LOCAL', $main::mycall, $text); - DXChannel::broadcast_list("To LOCAL de ${main::mycall}: $text\a", 'ann', undef, DXCommandmode->get_all()); - } + if ($target eq 'ALL' || $target eq 'LOCAL' || $target eq 'SYSOP' || $target eq 'WX') { + my $sysop = uc $target eq 'SYSOP' ? '*' : ' '; + my $wx = uc $target eq 'WX' ? '1' : '0'; + my $via = $target; + $via = '*' if $target eq 'ALL' || $target eq 'SYSOP'; + Log('ann', $target, $main::mycall, $text); + $main::me->normal(DXProt::pc93($target, $main::mycall, $via, $text)); } else { - my $msgid = nextchatmsgid(); - $text = "#$msgid $text"; - send_chat($main::me, pc12($main::mycall, $text, '*', $target), $main::mycall, '*', $text, $target, $main::mycall, '0'); + $main::me->send_chats($target, $text); } } }