From ff66fa52d15fa577949d7cbf4e79d475b491b5eb Mon Sep 17 00:00:00 2001 From: dms Date: Tue, 20 Feb 2001 13:01:29 +0000 Subject: [PATCH] - recursive factoid linking added. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@412 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/src/Factoids/Question.pl | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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"); } -- 2.39.5