3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

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,8 +82,12 @@ var users = function(dbot) {
}
} else if(event.action == 'NICK') {
var newNick = event.params.substr(1);
if(!knownUsers.users.include(newNick)) {
knownUsers.aliases[newNick] = event.user;
if(knownUsers.aliases.hasOwnProperty(event.user)) {
knownUsers.aliases[newNick] = knownUsers.aliases[event.user];
} else {
if(!knownUsers.users.include(newNick)) {
knownUsers.aliases[newNick] = event.user;
}
}
}
},