From: djk Date: Sun, 20 Jun 1999 20:36:46 +0000 (+0000) Subject: prevent merges to myself X-Git-Tag: R_1_30~14 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8187e68f181966eea2dca949ca13e2cbbaf072e;p=spider.git prevent merges to myself --- diff --git a/Changes b/Changes index 3fd33ec3..af94cb67 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +20Jun99======================================================================= +1. prevented a merge to myself (causes a loop) 18Jun99======================================================================= 1. fixed a problem with DXLogPrint repeating log entries. 2. altered the permissions on disconnnect so that priv 5 users can disconnect diff --git a/cmd/merge.pl b/cmd/merge.pl index 412ddccf..a4370e08 100644 --- a/cmd/merge.pl +++ b/cmd/merge.pl @@ -12,6 +12,7 @@ my @f = split /\s+/, $line; # check for callsign return (1, $self->msg('e5')) if $self->priv < 5; return (1, $self->msg('e12')) if !$f[0]; +return (1, $self->msg('e11')) if $call eq $main::mycall; my $call = uc $f[0]; my $ref = DXCluster->get_exact($call); diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 4cf7db7f..4349b87c 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -545,6 +545,10 @@ sub normal route($field[1], $line); return; } + if ($field[2] eq $main::mycall) { + dbg('chan', "Trying to merge to myself, ignored"); + return; + } Log('DXProt', "Merge request for $field[3] spots and $field[4] WWV from $field[1]"); diff --git a/perl/Messages b/perl/Messages index 956778bf..f1e7a954 100644 --- a/perl/Messages +++ b/perl/Messages @@ -39,6 +39,7 @@ package DXM; e8 => 'Need a callsign and some text', e9 => 'Need at least some text', e10 => '$_[0] not connected locally', + e11 => 'Can\'t use $main:mycall as target', e12 => 'Need a node callsign', e13 => '$_[0] is not a node', emaile1 => 'Please enter your email address, set/email ',