From 6b4751c8b6e99dcff80cfe5e66c746cf9106dc6a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 31 Aug 2006 14:25:17 +0000 Subject: nickserv password now tries to inform the nickserv of the password change; it can also be called without the bot nick to change the password of the current nick --- data/rbot/plugins/nickserv.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/nickserv.rb b/data/rbot/plugins/nickserv.rb index a630a4be..5c2e068f 100644 --- a/data/rbot/plugins/nickserv.rb +++ b/data/rbot/plugins/nickserv.rb @@ -63,7 +63,14 @@ class NickServPlugin < Plugin end def password(m, params) - @registry[params[:nick]] = params[:passwd] + nick = params[:nick] || @bot.nick + passwd = params[:passwd] + if nick == @bot.nick + @bot.say @bot.config['nickserv.name'], "SET PASSWORD #{passwd}" + else + m.reply "I'm only changing this in my database, I won't inform #{@bot.config['nickserv.name']} of the change" + end + @registry[nick] = passwd m.okay end @@ -142,7 +149,7 @@ class NickServPlugin < Plugin end plugin = NickServPlugin.new -plugin.map 'nickserv password :nick :passwd', :action => "password" +plugin.map 'nickserv password [:nick] :passwd', :action => "password" plugin.map 'nickserv register :passwd :email', :action => 'nick_register', :defaults => {:passwd => false, :email => false} plugin.map 'nickserv listnicks', :action => "listnicks" -- cgit v1.2.3