]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
Urban can now grab the first page of definitions.
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index 3cd0cae844d2584a5d8647edba4e309937993fac..932cc3b7322fb8ac73ebdcdcb61b581f15bd2c87 100644 (file)
@@ -914,6 +914,12 @@ class Bot
     end
 
     multi_line = original_message.to_s.gsub(/[\r\n]+/, "\n")
+
+    # if target is a channel with +c or +C modes, strip colours
+    if where.kind_of?(Channel) and where.mode.any?('c', 'C')
+      multi_line.replace(BasicUserMessage.stripcolour(multi_line).gsub(AttributeRx,''))
+    end
+
     messages = Array.new
     case opts[:newlines]
     when :join