If needed, update self.nick when NICK is received #94

Merged
merged 1 commit into from Oct 25, 2012
Jump to file
+4 −0
Split
View
@@ -180,6 +180,10 @@ function Client(server, nick, opt) {
});
break;
case "NICK":
+ if ( message.nick == self.nick )
+ // the user just changed their own nick
+ self.nick = message.args[0];
+
if ( self.opt.debug )
util.log("NICK: " + message.nick + " changes nick to " + message.args[0]);