summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-06 20:54:13 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-06 20:54:13 +0000
commit11cf84a26f2e3f1db3a59f24625c2e2f4a1d0259 (patch)
treedaaed81f08d141791cd047717976c1de4ab3355e /data/rbot
parentfdb2d8d9f1fb0262324f10985aabc99d911797c2 (diff)
fish plugin: multiline answers are now properly detected
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/fish.rb4
1 files changed, 2 insertions, 2 deletions
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+<td bgcolor=white class=s><div style=padding:10px;>(.*)<\/div>/
- answer = $1
+ when /^\s+<td bgcolor=white class=s><div style=padding:10px;>(.*)<\/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