From: dms Date: Fri, 9 Feb 2001 15:02:29 +0000 (+0000) Subject: fixed up ignore code. discovered by debian@OPN X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b8c8a5a2c78931465f9987a5e8173a6b4f88afe2;p=infobot.git fixed up ignore code. discovered by debian@OPN git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@376 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index 70b03a2..ce436df 100644 --- a/src/IRC/IrcHooks.pl +++ b/src/IRC/IrcHooks.pl @@ -761,8 +761,9 @@ sub on_targettoofast { my $nick = $event->nick(); my($me,$chan,$why) = $event->args(); + ### TODO: incomplete. ### .* wait (\d+) second/) { - &status("X1 $msg"); + &status("on_ttf: X1 $msg") if (defined $msg); my $sleep = 5; &status("going to sleep for $sleep..."); sleep $sleep; @@ -1094,14 +1095,13 @@ sub hookMsg { return if ($skipmessage); return unless (&IsParam("minVolunteerLength") or $addressed); - local $ignore = 0; - foreach (@ignore) { s/\*/\\S*/g; - next unless ($nuh =~ /^\Q$_\E$/i); - $ignore++; - last; + next unless (eval { $nuh =~ /^$_$/i }); + + &status("IGNORE <$who> $message"); + return; } if (defined $nuh) { diff --git a/src/Process.pl b/src/Process.pl index e9766cd..abdff26 100644 --- a/src/Process.pl +++ b/src/Process.pl @@ -39,11 +39,6 @@ sub process { } } - # ignore. - if ($ignore) { - return 'IGNORE'; - } - # join, must be done before outsider checking. if ($message =~ /^join(\s+(.*))?\s*$/i) { return 'join: not addr' unless ($addressed); @@ -221,7 +216,6 @@ sub process { $msgType = 'public'; } - # karma. set... if ($message =~ /^(\S+)(--|\+\+)\s*$/ and $addressed) { return '' unless (&hasParam("karma"));