From b6e6d0c78156e3fe16a011007c7f4314e442619a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 29 Jul 2008 20:54:23 +0200 Subject: auth core botmodule: advertise and act on mismatched master password --- lib/rbot/core/auth.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') 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: -- cgit v1.2.3