diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-09-21 07:27:36 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2006-09-21 07:27:36 +0000 |
commit | a72327f672f148f3ef306105c19bd5903fcd3d02 (patch) | |
tree | cceebc123bed0808c755d3f18612222870d4c05f /lib/rbot | |
parent | 4aa585349ca0305bd512c18111a43c86fd5c5533 (diff) |
New auth framework is now backwards compatible: auth <masterpassword> works again to login as owner
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/auth.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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,
|