]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/message.rb
allow multi-line (artificial) messages be delegated and handled
[user/henk/code/ruby/rbot.git] / lib / rbot / message.rb
index 97e3673a9e5aa9320fb1ba33cc2aa42377aa68a8..1fb68e2003a47b5235ba2c0093ad55449a9f40cc 100644 (file)
@@ -328,7 +328,8 @@ module Irc
 
       # free splitting for plugins
       @params = @message.dup
-      if @params.gsub!(/^\s*(\S+)[\s$]*/, "")
+      # Created messges (such as by fake_message) can contain multiple lines
+      if @params.gsub!(/\A\s*(\S+)[\s$]*/m, "")
         @plugin = $1.downcase
         @params = nil unless @params.length > 0
       end