X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=af28b19244877fabde913352b2da767bbb51ceac;hb=0ae2756b512f3783efe7f7e3c124b0a074227e81;hp=3e33ec33d3096f67284f5a214963acecaaf50696;hpb=40178a4be6f9dc1e1a409b96fc087cf971886fd0;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 3e33ec33..af28b192 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -41,7 +41,7 @@ use vars qw($pc11_max_age $pc23_max_age $last_pc50 $eph_restime $eph_info_restim $last_hour $last10 %eph %pings %rcmds $ann_to_talk $pingint $obscount %pc19list $chatdupeage $chatimportfn $investigation_int $pc19_version $myprot_version - %nodehops $baddx $badspotter $badnode $censorpc $rspfcheck + %nodehops $baddx $badspotter $badnode $censorpc $allowzero $decode_dk0wcy $send_opernam @checklist $eph_pc15_restime $pc92_update_period $pc92_obs_timeout %pc92_find $pc92_find_timeout $pc92_short_update_period @@ -63,8 +63,7 @@ $badspotter = new DXHash "badspotter"; $badnode = new DXHash "badnode"; $last10 = $last_pc50 = time; $ann_to_talk = 1; -$rspfcheck = 1; -$eph_restime = 180; +$eph_restime = 60; $eph_info_restime = 60*60; $eph_pc15_restime = 6*60; $eph_pc34_restime = 30; @@ -659,7 +658,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 +1533,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'); + DXCommandmode::send_chats($main::me, $target, $text); } } }