// TODO: uncomment when using an IrcUser per nick
//'user:*:privmsg': onUserPrivmsg,
+ 'user:*:nick': onUserNick,
'channel:*:part': onUserParts,
'channel:*:quit': onUserParts,
'channel:*:kick': onUserParts
}
+function onUserNick(event) {
+ var user;
+
+ // Only deal with messages targetted to us
+ if (event.nick !== this.nick)
+ return;
+
+ this.nick = event.newnick;
+}
+
+
function onUserParts(event) {
// Only deal with ourselves leaving a channel
if (event.nick !== this.nick)