From: minima Date: Fri, 11 Mar 2005 22:35:43 +0000 (+0000) Subject: send only to commandmode users that are addressed X-Git-Tag: R_1_52~95 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=487b2a304268a9825e071fc76238749a821ea056;p=spider.git send only to commandmode users that are addressed --- diff --git a/perl/Thingy.pm b/perl/Thingy.pm index 24c8b98f..5d7909cc 100644 --- a/perl/Thingy.pm +++ b/perl/Thingy.pm @@ -78,7 +78,7 @@ sub send # function must return true to make the send happen $sub = "before_send_$class"; if ($thing->can($sub)) { - return $thing->$sub($dxchan); + return unless $thing->$sub($dxchan); } # generate the protocol line which may (or not) be cached diff --git a/perl/Thingy/Ping.pm b/perl/Thingy/Ping.pm index d3fa90f4..a1ab4599 100644 --- a/perl/Thingy/Ping.pm +++ b/perl/Thingy/Ping.pm @@ -72,7 +72,10 @@ sub gen_DXCommandmode { my $thing = shift; my $dxchan = shift; - my $buf = $dxchan->msg('pingi', ($thing->{user} || $thing->{origin}), $thing->{ft}, $thing->{fave}); + my $buf; + if ($dxchan->{call} eq $thing->{touser}) { + $buf = $dxchan->msg('pingi', ($thing->{user} || $thing->{origin}), $thing->{ft}, $thing->{fave}); + } return $buf; }