From: dms Date: Tue, 20 Feb 2001 13:01:29 +0000 (+0000) Subject: - recursive factoid linking added. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ff66fa52d15fa577949d7cbf4e79d475b491b5eb;p=infobot.git - recursive factoid linking added. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@412 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Factoids/Question.pl b/blootbot/src/Factoids/Question.pl index 03962f1..e6b0818 100644 --- a/blootbot/src/Factoids/Question.pl +++ b/blootbot/src/Factoids/Question.pl @@ -81,17 +81,36 @@ sub doQuestion { $questionWord = "where"; } + my @link; for (my$i=0; $i= 5) { + &status("recursive link limit reached."); + last; + } + + push(@link, $link); + my $newr = &getReply($link); $result = $newr if ($newr ne ""); } + if (@link) { + &status("'$query' linked to: ".join(" => ", @link) ); + } + if ($i != 0) { &DEBUG("Question: '$query[0]' did not exist; '$query[$i]' ($i) did"); }