From: timriker Date: Tue, 31 May 2005 05:50:24 +0000 (+0000) Subject: pipes in nicks X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1fc96eac49c9103d4823328363070da21bd6e412;p=infobot.git pipes in nicks git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@1226 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Factoids/Question.pl b/src/Factoids/Question.pl index b3c7e23..c269117 100644 --- a/src/Factoids/Question.pl +++ b/src/Factoids/Question.pl @@ -252,9 +252,14 @@ sub factoidArgs { # end of update stats. $result = $r; + $result =~ s/^\((.*?)\): //; + my $vars = $1; + + # start nasty hack to get partial &getReply() functionality. + $result = &SARit($result); - foreach ( split(',', $1) ) { + foreach ( split(',', $vars) ) { my $val = $vals[$i]; # &DEBUG("val => $val"); @@ -285,8 +290,7 @@ sub factoidArgs { $i++; } - # nasty hack to get partial &getReply() functionality. - $result = &SARit($result); + # rest of nasty hack to get partial &getReply() functionality. $result =~ s/^\s*\s*(.*)/\cAACTION $1\cA/i; $result =~ s/^\s*\s*//i;