From fdab6548b5c7c71e4ce816635f152ad222db0836 Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Sun, 8 Apr 2007 22:10:48 +0000 Subject: * (plugins/ri) allow user to ask for a long entry to be sent to her in msg, even when asking in channel --- data/rbot/plugins/ri.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/ri.rb b/data/rbot/plugins/ri.rb index 1eed65c0..1c4cc84d 100644 --- a/data/rbot/plugins/ri.rb +++ b/data/rbot/plugins/ri.rb @@ -53,8 +53,10 @@ class RiPlugin < Plugin end ret = ret.gsub(/\t/, " ").split(/\n/).join(" ").gsub(/\s\s+/, ' ') - if ret.length > @bot.config['ri.max_length'] && !m.private? - return m.reply('entry is too long to send to the channel or to some other user, use /msg to ask me about it') + if ret.length > @bot.config['ri.max_length'] + if !m.private? && tgt.to_s != m.sourcenick + return m.reply('entry is too long to send to the channel or to some other user, use /msg to ask me about it') + end end if tgt @bot.say(tgt, ret) -- cgit v1.2.3