X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FFactoids%2FQuestion.pl;h=37d89dcc6161b6f5b825f0893a7113284e3ad51b;hb=f0a00b56d1497c3b3f0d33e0d57e5d31a0161a55;hp=4642dd27839c98e698a98d42d81a5a975fe25e24;hpb=0a241de1cc04678cd76aaff8a55d449afb99e2f1;p=infobot.git diff --git a/src/Factoids/Question.pl b/src/Factoids/Question.pl index 4642dd2..37d89dc 100644 --- a/src/Factoids/Question.pl +++ b/src/Factoids/Question.pl @@ -1,4 +1,6 @@ -# infobot :: Kevin Lenzo (c) 1997 +### +### Question.pl: Kevin Lenzo (c) 1997 +### ## doQuestion -- ## if ($query == query) { @@ -12,7 +14,7 @@ if (&IsParam("useStrict")) { use strict; } use vars qw($query $reply $finalQMark $nuh $result $talkok $who $nuh); -use vars qw(%infobots %forked); +use vars qw(%bots %forked); sub doQuestion { # my doesn't allow variables to be inherinted, local does. @@ -46,7 +48,7 @@ sub doQuestion { # dangerous; common preambles should be stripped before here if ($query =~ /^forget /i or $query =~ /^no, /) { - return 'NOREPLY' if (exists $infobots{$nuh}); + return $noreply if (exists $bots{$nuh}); } # convert to canonical reference form @@ -85,7 +87,7 @@ sub doQuestion { if (&IsParam("freshmeatForFactoid")) { &loadMyModule($myModules{'freshmeat'}); $result = &Freshmeat::showPackage($query); - return $result unless ($result eq 'NOREPLY'); + return $result unless ($result eq $noreply); } &DEBUG("Question: hrm... result => '$result'.");