From 11cf84a26f2e3f1db3a59f24625c2e2f4a1d0259 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Fri, 6 Apr 2007 20:54:13 +0000 Subject: fish plugin: multiline answers are now properly detected --- data/rbot/plugins/fish.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins') diff --git a/data/rbot/plugins/fish.rb b/data/rbot/plugins/fish.rb index 52f30d69..25816024 100644 --- a/data/rbot/plugins/fish.rb +++ b/data/rbot/plugins/fish.rb @@ -72,8 +72,8 @@ class BabelPlugin < Plugin debug "babelfish response: #{l}" case l - when /^\s+
(.*)<\/div>/ - answer = $1 + when /^\s+
(.*)<\/div><\/td>\s*<\/tr>/m + answer = $1.gsub(/\s*[\r\n]+\s*/,' ') # cache the answer if(answer.length > 0) @registry["#{trans_pair}/#{data_text}"] = answer -- cgit v1.2.3