From fd0e3885995e2d61b90d3f4cb297991bedfac22a Mon Sep 17 00:00:00 2001 From: dms Date: Thu, 8 Feb 2001 16:02:12 +0000 Subject: [PATCH] this should fix ignores on global channels. found by 'debian'@OPN git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@366 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/IRC/IrcHooks.pl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index 7362033..c76e1b5 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -1064,9 +1064,11 @@ sub hookMsg { $flood{$floodwho}{$message} = time(); } + my @ignore; if ($msgType =~ /public/i) { # public. $talkchannel = $chan; &status("<$orig{who}/$chan> $orig{message}"); + @ignore = keys %{ $ignore{$chan} }; } elsif ($msgType =~ /private/i) { # private. &status("[$orig{who}] $orig{message}"); $talkchannel = undef; @@ -1074,6 +1076,7 @@ sub hookMsg { } else { &DEBUG("unknown msgType => $msgType."); } + push(@ignore, keys %{ $ignore{"*"} }); if ((!$skipmessage or &IsChanConf("seenStoreAll")) and &IsChanConf("seen") and @@ -1091,14 +1094,13 @@ sub hookMsg { return unless (&IsParam("minVolunteerLength") or $addressed); local $ignore = 0; - if (exists $ignore{lc $chan}) { - foreach (keys %{ $ignore{lc $chan} }) { - s/\*/\\S*/g; - next unless ($nuh =~ /^\Q$_\E$/i); - $ignore++; - last; - } + foreach (@ignore) { + s/\*/\\S*/g; + + next unless ($nuh =~ /^\Q$_\E$/i); + $ignore++; + last; } if (defined $nuh) { -- 2.39.5