mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49: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
|
// Update current nick
|
||||||
this.api.resolveUser(event.server, event.user, function(err, user) {
|
this.api.resolveUser(event.server, event.user, function(err, user) {
|
||||||
if(user) {
|
if(user) {
|
||||||
this.internalAPI.updateCurrentNick(user, event.newNick, function(){});
|
|
||||||
this.api.resolveUser(event.server, event.newNick, function(err, eUser) {
|
this.api.resolveUser(event.server, event.newNick, function(err, eUser) {
|
||||||
if(!eUser) {
|
if(!eUser) {
|
||||||
this.internalAPI.createAlias(event.newNick, user, function(){});
|
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));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user