summaryrefslogtreecommitdiff
path: root/lib/rbot/messagemapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/messagemapper.rb')
-rw-r--r--lib/rbot/messagemapper.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index 445b80f5..c8e2b6ba 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -29,15 +29,17 @@ module Irc
else
action = route.options[:action] ? route.options[:action] : route.items[0]
next unless @parent.respond_to?(action)
- auth = route.options[:auth] ? route.options[:auth] : action
+ auth = route.options[:auth] ? route.options[:auth] : route.items[0]
+ debug "checking auth for #{auth}"
if m.bot.auth.allow?(auth, m.source, m.replyto)
debug "route found and auth'd: #{action.inspect} #{options.inspect}"
@parent.send(action, m, options)
return true
end
+ debug "auth failed for #{auth}"
# if it's just an auth failure but otherwise the match is good,
# don't try any more handlers
- break
+ return false
end
end
debug failures.inspect