From c02500f2bde0cfb185c3acb59163bbc98f20f258 Mon Sep 17 00:00:00 2001
From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Fri, 9 Feb 2001 15:02:29 +0000
Subject: [PATCH] fixed up ignore code. discovered by debian@OPN

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@376 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/IRC/IrcHooks.pl | 12 ++++++------
 blootbot/src/Process.pl      |  6 ------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl
index 70b03a2..ce436df 100644
--- a/blootbot/src/IRC/IrcHooks.pl
+++ b/blootbot/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/blootbot/src/Process.pl b/blootbot/src/Process.pl
index e9766cd..abdff26 100644
--- a/blootbot/src/Process.pl
+++ b/blootbot/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"));
-- 
2.39.5