From 16a3d5ce73bbeec4f40e639eb1a398e4a53a7692 Mon Sep 17 00:00:00 2001 From: timriker Date: Fri, 6 Dec 2002 22:51:25 +0000 Subject: [PATCH] see command args git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@733 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Factoids/Question.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; } -- 2.39.2