Fix for [#165]. Recommend deleting knownUsers db on running instances

This commit is contained in:
reality 2013-01-20 18:44:21 +00:00
parent eb104f157b
commit e048780cfc

View File

@ -54,12 +54,8 @@ 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(_.has(knownUsers.aliases, event.user)) { if(!this.api.isKnownUser(newNick)) {
knownUsers.aliases[newNick] = knownUsers.aliases[event.user]; knownUsers.aliases[newNick] = this.api.resolveUser(event.server, event.user);
} else {
if(!_.include(knownUsers.users, newNick)) {
knownUsers.aliases[newNick] = event.user;
}
} }
} }
}.bind(this); }.bind(this);