mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
update currentNick in event pre-emit [close #547]
This commit is contained in:
parent
897b27f31e
commit
06053b9e17
@ -175,8 +175,13 @@ var users = function(dbot) {
|
||||
if(event.user) {
|
||||
this.api.resolveUser(event.server, event.user, function(user) {
|
||||
event.rUser = user;
|
||||
if(event.rUser.currentNick !== event.user) {
|
||||
event.rUser.currentNick = event.user;
|
||||
this.db.save('users', event.rUser.id, event.rUser, callback);
|
||||
} else {
|
||||
callback(false);
|
||||
});
|
||||
}
|
||||
}.bind(this));
|
||||
} else {
|
||||
callback(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user