mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 22:39:26 +01:00
Protect against continued nick changes
This commit is contained in:
parent
1ab1ff5319
commit
65ef72f19a
@ -82,8 +82,12 @@ var users = function(dbot) {
|
|||||||
}
|
}
|
||||||
} else if(event.action == 'NICK') {
|
} else if(event.action == 'NICK') {
|
||||||
var newNick = event.params.substr(1);
|
var newNick = event.params.substr(1);
|
||||||
if(!knownUsers.users.include(newNick)) {
|
if(knownUsers.aliases.hasOwnProperty(event.user)) {
|
||||||
knownUsers.aliases[newNick] = event.user;
|
knownUsers.aliases[newNick] = knownUsers.aliases[event.user];
|
||||||
|
} else {
|
||||||
|
if(!knownUsers.users.include(newNick)) {
|
||||||
|
knownUsers.aliases[newNick] = event.user;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user