summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-06-29 07:31:39 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-06-29 07:31:39 +0000
commit0f5ef8926b6505263754b7ddb238c5112f64f5a9 (patch)
tree08269a942c1f35a1beca9280f2bf33346c8b751c /data
parentff9fdc310b8bc248422a45a9c6e4c9bbd6c1d02f (diff)
Improve nick management when it was taken
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/nickserv.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/data/rbot/plugins/nickserv.rb b/data/rbot/plugins/nickserv.rb
index ff375d15..4267bc54 100644
--- a/data/rbot/plugins/nickserv.rb
+++ b/data/rbot/plugins/nickserv.rb
@@ -80,9 +80,9 @@ class NickServPlugin < Plugin
end
end
- def do_identify
- if @registry.has_key?(@bot.nick)
- @bot.sendmsg "PRIVMSG", @bot.config['nickserv.name'], "IDENTIFY #{@registry[@bot.nick]}"
+ def do_identify(nick=@bot.nick)
+ if @registry.has_key?(nick)
+ @bot.sendmsg "PRIVMSG", @bot.config['nickserv.name'], "IDENTIFY #{nick} #{@registry[nick]}"
return true
end
return false
@@ -103,6 +103,7 @@ class NickServPlugin < Plugin
def nicktaken(nick)
if @registry.has_key?(nick)
@bot.sendmsg "PRIVMSG", @bot.config['nickserv.name'], "GHOST #{nick} #{@registry[@bot.nick]}"
+ do_identify nick
sleep @bot.config['nickserv.wait']
@bot.nickchg nick
end