Permalink
Browse files

when receiving a nick change for the bot, change the Bot instance, no…

…t a User instance
  • Loading branch information...
dominikh committed May 27, 2012
1 parent 9e2a434 commit 63ea62bfadc0a0a57aa421dd46c7b2ac388e73a7
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/cinch/irc.rb
View
@@ -490,11 +490,14 @@ def on_mode(msg, events)
def on_nick(msg, events)
if msg.user == @bot
- @bot.set_nick msg.params.last
+ # @bot.set_nick msg.params.last
+ target = @bot
+ else
+ target = msg.user
end
- msg.user.update_nick(msg.params.last)
- msg.user.online = true
+ target.update_nick(msg.params.last)
+ target.online = true
end
def on_part(msg, events)

0 comments on commit 63ea62b

Please sign in to comment.