summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-04-08 22:10:48 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-04-08 22:10:48 +0000
commitfdab6548b5c7c71e4ce816635f152ad222db0836 (patch)
treeb2dc562445e6687c1ee0d14256183813e8a42b33 /data
parent8312f018d2984b38c6d75e60b0fc56c56994b525 (diff)
* (plugins/ri) allow user to ask for a long entry to be sent to her in msg,
even when asking in channel
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/ri.rb6
1 files changed, 4 insertions, 2 deletions
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)