]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/messagemapper.rb
New Irc Framework: channel add_user was adding users indiscriminately when silent
[user/henk/code/ruby/rbot.git] / lib / rbot / messagemapper.rb
index 8b21ee2efcd4ff79a46928364bdf33e3f19818d9..3d49e918a223a81d06e725e1132240f3b7b088a3 100644 (file)
@@ -267,7 +267,7 @@ module Irc
       else
         reg = nil
       end
-      "<#{self.class.to_s}%s%s%s%s>" % [name, mul, opt, reg]
+      "<%s %s%s%s%s>" % [self.class, name, mul, opt, reg]
     end
   end
 
@@ -417,7 +417,7 @@ module Irc
         debug "Requirements for #{name}: #{has_req.inspect}"
         case has_req
         when nil
-          sub = is_single ? "\\S+" : ".*"
+          sub = is_single ? "\\S+" : ".*?"
         when Regexp
           # Remove captures and the ^ and $ that are sometimes placed in requirement regexps
           sub = has_req.remove_captures.source.sub(/^\^/,'').sub(/\$$/,'')