From: dms Date: Thu, 8 Feb 2001 16:02:12 +0000 (+0000) Subject: this should fix ignores on global channels. found by 'debian'@OPN X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eb1a867e20c198c5e65eaeff941085a4a4cc894e;p=infobot.git this should fix ignores on global channels. found by 'debian'@OPN git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@366 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index 7362033..c76e1b5 100644 --- a/src/IRC/IrcHooks.pl +++ b/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) {