summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-29 20:54:23 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-29 22:20:38 +0200
commitb6e6d0c78156e3fe16a011007c7f4314e442619a (patch)
treea061f69137afbaaa4c857b052ae7fd9e489e7ec8 /lib
parente445ac2bfcc1a0b9a3720e192becb379fd255772 (diff)
auth core botmodule: advertise and act on mismatched master password
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/auth.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb
index fe781a21..75c59f27 100644
--- a/lib/rbot/core/auth.rb
+++ b/lib/rbot/core/auth.rb
@@ -37,6 +37,13 @@ class AuthModule < CoreBotModule
def load_array(key=:default, forced=false)
debug "loading botusers (#{key}): #{@registry[key].pretty_inspect}"
@bot.auth.load_array(@registry[key], forced) if @registry.has_key?(key)
+ if @bot.auth.botowner.password != @bot.config['auth.password']
+ error "Master password is out of sync!"
+ debug " db password: #{@bot.auth.botowner.password}"
+ debug "conf password: #{@bot.config['auth.password']}"
+ error "Using conf password"
+ @bot.auth.botowner.password = @bot.config['auth.password']
+ end
end
# The permission parameters accept arguments with the following syntax: