diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-06 17:36:43 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-06 17:36:43 +0000 |
commit | bf8325c9a59667474940566065590b8da3dec85d (patch) | |
tree | adaf23c4299f882002cfa1790c59a622793bba60 /data/rbot/plugins | |
parent | f5abcb7eff07f436904ad5d88c0651e197c5914c (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/plugins')
-rw-r--r-- | data/rbot/plugins/dict.rb | 5 |
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
|