]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/ri.rb
autoop plugin: make the "add" command add arguments to existing settings
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / ri.rb
index 472c08e3c1d7c77c57fe76cb1ce8cd6b59234fed..1c4cc84d4edb9b0336d33c32cf0fecf012c40820 100644 (file)
@@ -53,11 +53,14 @@ 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)
+      m.okay
     else
       m.reply(ret)
     end