summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-06 17:36:43 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-06 17:36:43 +0000
commitbf8325c9a59667474940566065590b8da3dec85d (patch)
treeadaf23c4299f882002cfa1790c59a622793bba60 /data/rbot
parentf5abcb7eff07f436904ad5d88c0651e197c5914c (diff)
Enhance Utils tools to get first pars, allowing an option to strip an initial part of the paragraphs extracted
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/dict.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/rbot/plugins/dict.rb b/data/rbot/plugins/dict.rb
index d23df81f..4e1bb721 100644
--- a/data/rbot/plugins/dict.rb
+++ b/data/rbot/plugins/dict.rb
@@ -87,7 +87,8 @@ class DictPlugin < Plugin
return unless first_pars > 0
- Utils.get_first_pars urls, first_pars, :http_util => @bot.httputil, :message => m
+ Utils.get_first_pars urls, first_pars, :http_util => @bot.httputil, :message => m,
+ :strip => /^\S+\s+-\s+/
end
@@ -138,7 +139,7 @@ class DictPlugin < Plugin
return false if justcheck
m.reply "Nothing found for #{word}, but see #{url} for possible suggestions"
else
- return false if justcheck
+ return true if justcheck
m.reply "#{word}: #{url}"
end
end