diff --git a/modules/sstats/sstats.js b/modules/sstats/sstats.js index efd3fc7..fbb5bfc 100644 --- a/modules/sstats/sstats.js +++ b/modules/sstats/sstats.js @@ -186,8 +186,8 @@ var sstats = function(dbot) { }); this.db.del('user_stats', oldUser.id, function() {}); this.db.save('user_stats', newUser.id, function() {}); - }); - }); + }.bind(this)); + }.bind(this)); this.db.scan('tracked_words', function(tWord) { if(_.has(tWord.users, oldUser.id)) { @@ -199,7 +199,7 @@ var sstats = function(dbot) { delete tWord.users[oldUser.id]; this.db.save('tracked_words', tWord.word, tWord, function() {}); } - }); + }.bind(this)); }.bind(this)); }.bind(this); };