]> git.donarmstrong.com Git - infobot.git/commitdiff
<REPLY> see command args
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 6 Dec 2002 22:51:25 +0000 (22:51 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 6 Dec 2002 22:51:25 +0000 (22:51 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@733 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Question.pl

index 04dd157d9d2932a3255a13f9cb0801c9c4cc02f1..74a24163e30f17f2df6072c1b66278bd59bb5047 100644 (file)
@@ -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;
        }