mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
fix nickstealing
This commit is contained in:
parent
402c8e80f4
commit
77d9997009
@ -107,10 +107,12 @@ var users = function(dbot) {
|
||||
// Update current nick
|
||||
this.api.resolveUser(event.server, event.user, function(err, user) {
|
||||
if(user) {
|
||||
this.internalAPI.updateCurrentNick(user, event.newNick, function(){});
|
||||
this.api.resolveUser(event.server, event.newNick, function(err, eUser) {
|
||||
if(!eUser) {
|
||||
this.internalAPI.createAlias(event.newNick, user, function(){});
|
||||
this.internalAPI.updateCurrentNick(user, event.newNick, function(){});
|
||||
} else if(user.id === eUser.id) {
|
||||
this.internalAPI.updateCurrentNick(user, event.newNick, function(){});
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user