From: timriker Date: Fri, 6 Dec 2002 22:51:25 +0000 (+0000) Subject: see command args X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=16a3d5ce73bbeec4f40e639eb1a398e4a53a7692;p=infobot.git see command args git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@733 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Factoids/Question.pl b/blootbot/src/Factoids/Question.pl index 04dd157..74a2416 100644 --- a/blootbot/src/Factoids/Question.pl +++ b/blootbot/src/Factoids/Question.pl @@ -126,6 +126,19 @@ sub doQuestion { push(@link, $link); my $newr = &getReply($link); + + # no such factoid. try commands + if (!defined $newr || $newr =~ /^0?$/) { + # support command redirection. + # recursive cmdHooks aswell :) + my $done = 0; + $done++ if &parseCmdHook("main", $link); + $done++ if &parseCmdHook("extra", $link); + $message = $link; + $done++ unless (&Modules()); + + return; + } last if (!defined $newr or $newr eq ""); $result = $newr; }