3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

fucking idiot

This commit is contained in:
reality 2013-10-23 11:46:07 +00:00
parent b01fce2cc8
commit 80b76c9325

View File

@ -176,12 +176,14 @@ var sstats = function(dbot) {
this.api.getUserStats(oldUser.id, function(ouStats) { this.api.getUserStats(oldUser.id, function(ouStats) {
this.api.getUserStats(newUser.id, function(nuStats) { this.api.getUserStats(newUser.id, function(nuStats) {
_.each(ouStats, function(stat, key) { _.each(ouStats, function(stat, key) {
if(_.isObject(stat) && key != 'creation') { if(key != 'creation' && key != 'id') {
_.each(ouStats[key], function(stat, sKey) { if(_.isObject(stat)) {
nuStats[key][sKey] += stat; _.each(ouStats[key], function(stat, sKey) {
}); nuStats[key][sKey] += stat;
} else { });
nuStats[key] += stat; } else {
nuStats[key] += stat;
}
} }
}); });
this.db.del('user_stats', oldUser.id, function() {}); this.db.del('user_stats', oldUser.id, function() {});