From a72327f672f148f3ef306105c19bd5903fcd3d02 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 21 Sep 2006 07:27:36 +0000 Subject: New auth framework is now backwards compatible: auth works again to login as owner --- lib/rbot/core/auth.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/rbot/core/auth.rb b/lib/rbot/core/auth.rb index 7feba4da..9c90d9ac 100644 --- a/lib/rbot/core/auth.rb +++ b/lib/rbot/core/auth.rb @@ -188,6 +188,11 @@ class AuthModule < CoreBotModule "welcome, #{get_botusername_for(user)}" end + def auth_auth(m, params) + params[:botuser] = 'owner' + auth_login(m,params) + end + def auth_login(m, params) begin case @bot.auth.login(m.source, params[:botuser], params[:password]) @@ -779,6 +784,11 @@ auth.map "whoami", :action => 'auth_whoami', :auth_path => '!*!' +auth.map "auth :password", + :action => 'auth_auth', + :public => false, + :auth_path => '!login!' + auth.map "login :botuser :password", :action => 'auth_login', :public => false, -- cgit v1.2.3