From bf8325c9a59667474940566065590b8da3dec85d Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 6 Feb 2007 17:36:43 +0000 Subject: Enhance Utils tools to get first pars, allowing an option to strip an initial part of the paragraphs extracted --- data/rbot/plugins/dict.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins') 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 -- cgit v1.2.3