fix pc93 -> pc12 conversions
authorDirk Koopman <djk@tobit.co.uk>
Fri, 6 Jul 2007 20:18:13 +0000 (21:18 +0100)
committerDirk Koopman <djk@tobit.co.uk>
Fri, 6 Jul 2007 20:18:13 +0000 (21:18 +0100)
This should stop pc93 conversions which are sent out a) being redisplayed
and b) as SYSOP. It may also stop all these strange chat messages to
unlikely chat group names.

Also rewritten chat import routines for new regime.

Changes
perl/DXProt.pm
perl/DXProtHandle.pm
perl/Version.pm

diff --git a/Changes b/Changes
index 86432dd566e3e43331699ea67cbde513fba0b79b..fd9ab1029e079d36854fdf4972fb1823f39cbed4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,8 @@ causing nodes to time out.
 2. Make sure that the 'over midnight' distance calculation actually does what
 is required!
 3. Tart up version number reporting in sh/node.
+4. Pass the correct number of parameters in pc93 -> pc12 conversions which
+should stop returning PC12s coming out as SYSOP announces.
 05Jul07=======================================================================
 1. Try to make sure that the node config broadcasts are actually sent...
 03Jul07=======================================================================
index 3e33ec33d3096f67284f5a214963acecaaf50696..53695e51846a0bf140f75efe0ff3bf6cd42af065 100644 (file)
@@ -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');
+                               $main::me->send_chats($target, $text);
                        }
                }
        }
index a42ba33e871de8496d1f138414140ca37470d479..9a4104e5c8ad70d4d4f81bacef83fc4ea3a8e746 100644 (file)
@@ -1764,7 +1764,7 @@ sub handle_93
                my $wx = uc $to eq 'WX' ? '1' : '0';
                my $local = $via eq 'LOCAL' ? '*' : $via;
 
-               $self->send_announce(1, pc12($from, $text, $local, $via, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef);
+               $self->send_announce(1, pc12($from, $text, $local, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef);
                return if $via eq 'LOCAL';
        } else {
                # chat messages to non-pc9x nodes
index 7011a104e923243f17ebbca85913909a934a7454..82018c146ef08bd17e6f810727c87009680db0d9 100644 (file)
@@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
 
 $version = '1.54';
 $subversion = '0';
-$build = '105';
+$build = '106';
 
 1;