From 80b76c9325d6d911cdf49e687eb424d66b341b4a Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 23 Oct 2013 11:46:07 +0000 Subject: [PATCH] fucking idiot --- modules/sstats/sstats.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/sstats/sstats.js b/modules/sstats/sstats.js index eec85b3..c3fec99 100644 --- a/modules/sstats/sstats.js +++ b/modules/sstats/sstats.js @@ -176,12 +176,14 @@ var sstats = function(dbot) { this.api.getUserStats(oldUser.id, function(ouStats) { this.api.getUserStats(newUser.id, function(nuStats) { _.each(ouStats, function(stat, key) { - if(_.isObject(stat) && key != 'creation') { - _.each(ouStats[key], function(stat, sKey) { - nuStats[key][sKey] += stat; - }); - } else { - nuStats[key] += stat; + if(key != 'creation' && key != 'id') { + if(_.isObject(stat)) { + _.each(ouStats[key], function(stat, sKey) { + nuStats[key][sKey] += stat; + }); + } else { + nuStats[key] += stat; + } } }); this.db.del('user_stats', oldUser.id, function() {});