Protect against continued nick changes

This commit is contained in:
reality 2012-12-30 23:24:05 +00:00
parent 1ab1ff5319
commit 65ef72f19a

View File

@ -82,10 +82,14 @@ var users = function(dbot) {
}
} else if(event.action == 'NICK') {
var newNick = event.params.substr(1);
if(knownUsers.aliases.hasOwnProperty(event.user)) {
knownUsers.aliases[newNick] = knownUsers.aliases[event.user];
} else {
if(!knownUsers.users.include(newNick)) {
knownUsers.aliases[newNick] = event.user;
}
}
}
},
'on': ['JOIN', 'NICK'],