3
0
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:
reality 2013-08-17 16:35:57 +00:00
parent 897b27f31e
commit 06053b9e17

View File

@ -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);
}