]> git.donarmstrong.com Git - infobot.git/commitdiff
this should fix ignores on global channels. found by 'debian'@OPN
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Feb 2001 16:02:12 +0000 (16:02 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 8 Feb 2001 16:02:12 +0000 (16:02 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@366 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/IrcHooks.pl

index 7362033ac5fa37ede17a96fdaa9fbe6107d20053..c76e1b514b78ec26f843e2ee02a833b838916856 100644 (file)
@@ -1064,9 +1064,11 @@ sub hookMsg {
        $flood{$floodwho}{$message} = time();
     }
 
        $flood{$floodwho}{$message} = time();
     }
 
+    my @ignore;
     if ($msgType =~ /public/i) {                   # public.
        $talkchannel    = $chan;
        &status("<$orig{who}/$chan> $orig{message}");
     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;
     } elsif ($msgType =~ /private/i) {            # private.
        &status("[$orig{who}] $orig{message}");
        $talkchannel    = undef;
@@ -1074,6 +1076,7 @@ sub hookMsg {
     } else {
        &DEBUG("unknown msgType => $msgType.");
     }
     } else {
        &DEBUG("unknown msgType => $msgType.");
     }
+    push(@ignore, keys %{ $ignore{"*"} });
 
     if ((!$skipmessage or &IsChanConf("seenStoreAll")) and
        &IsChanConf("seen") and
 
     if ((!$skipmessage or &IsChanConf("seenStoreAll")) and
        &IsChanConf("seen") and
@@ -1091,14 +1094,13 @@ sub hookMsg {
     return unless (&IsParam("minVolunteerLength") or $addressed);
 
     local $ignore      = 0;
     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) {
     }
 
     if (defined $nuh) {