diff options
-rw-r--r-- | data/rbot/plugins/nickserv.rb | 11 |
1 files changed, 9 insertions, 2 deletions
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" |