summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-12-08 10:47:26 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-12-08 10:47:26 +0100
commitef12f7fe7723a789d0a79be14853166ea64ffc83 (patch)
tree9ab79f658c218d128db818f7b0e41eda25f34db8 /lib
parent73740ee220ea83d8191221a9adb312465b4e6b35 (diff)
auth module: update for messagemapper changes
Since commit a993d1c358e24ab85621568c10411c5496e2dea8, the message mappers have a more rational way of reporting failures, but the auth module was not using it, resulting in the wrong permissions being granted/revoked whenever allow/deny was being used.
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/auth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb
index c156ce1a..30f99ecf 100644
--- a/lib/rbot/core/auth.rb
+++ b/lib/rbot/core/auth.rb
@@ -220,8 +220,8 @@ class AuthModule < CoreBotModule
auth = nil
if cmds.has_key?(k)
cmds[k][:botmodule].handler.each do |tmpl|
- options, failure = tmpl.recognize(pseudo)
- next if options.nil?
+ options = tmpl.recognize(pseudo)
+ next if options.kind_of? MessageMapper::Failure
auth = tmpl.options[:full_auth_path]
break
end