]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/messagemapper.rb
test
[user/henk/code/ruby/rbot.git] / lib / rbot / messagemapper.rb
index b079acd617b7b72e85f93de4e3f9fdaa9584968a..ce33c881156fa441a1275b1df3859acb9b3257bf 100644 (file)
@@ -121,7 +121,10 @@ module Irc
           failures << [tmpl, failure]
         else
           action = tmpl.options[:action] ? tmpl.options[:action] : tmpl.items[0]
-          next unless @parent.respond_to?(action)
+          unless @parent.respond_to?(action)
+            failures << [tmpl, "class does not respond to action #{action}"]
+            next
+          end
           auth = tmpl.options[:auth] ? tmpl.options[:auth] : tmpl.items[0]
           debug "checking auth for #{auth}"
           if m.bot.auth.allow?(auth, m.source, m.replyto)
@@ -135,7 +138,9 @@ module Irc
           return false
         end
       end
-      debug failures.inspect
+      failures.each {|f, r|
+        debug "#{f.inspect} => #{r}"
+      }
       debug "no handler found, trying fallback"
       if @fallback != nil && @parent.respond_to?(@fallback)
         if m.bot.auth.allow?(@fallback, m.source, m.replyto)