Bug 555478 - [Infobot] Infobot can force mozbot into endless /msg'ed discussions with other mozbots that loop infinitely. Patch by Tanner M. Young <mozilla.bugs@alyoung.com>, r=Wolf.

git-svn-id: svn://10.0.0.236/trunk@260456 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
psychoticwolf%carolina.rr.com 2010-06-10 20:37:20 +00:00
parent 71eb4e2f89
commit a39c168ef5
2 changed files with 5 additions and 1 deletions

View File

@ -133,6 +133,8 @@ sub Told {
$self->PerformOnOther($event, 'hug', $1);
} elsif ($message =~ /^\s*(?:useless|die|get\s+a\s+life|kiss\s+my\s+ass|you\s+stupid\s+piece\s+o[f']?\s+code)[!1.\s]*$/osi) {
$self->Perform($event, 'unhappy');
} elsif ($message =~ /^\s*Sorry,\sI've\sno\sidea\swh(?:o|at).+$/osi) {
return 0;
} elsif ($message =~ /^\s*sorry\b/osi) { # note that any trailing text is ignored
$self->Perform($event, 'apology');
} elsif ($message =~ /^\s*(?:how\s+are\s+you|how\s+do\s+you\s+do|how\'?s\s+things|are\s+you\s+ok)(?:[?!1.,\s]+$expandedme)?\s*[?!1.\s]*$/osi) {

View File

@ -170,7 +170,9 @@ sub DoFactoidCheck {
$self->debug("message: '$message'");
$self->debug("shortMessage: '$shortMessage'");
if ($message =~ /^\s*tell\s+(\S+)\s+about\s+me(?:[,\s]+please)?[\s!?.]*$/osi) {
if ($message =~ /^\s*Sorry,\sI've\sno\sidea\swh(?:o|at).+$/osi) {
return 0;
} elsif ($message =~ /^\s*tell\s+(\S+)\s+about\s+me(?:[,\s]+please)?[\s!?.]*$/osi) {
$self->GiveFactoid($event,
undef, # database
$event->{'from'}, # what