From 37f5583d3159e960983d53a114865df79d2a34ce Mon Sep 17 00:00:00 2001 From: reality Date: Thu, 24 Jan 2013 18:55:28 +0000 Subject: [PATCH] event in users for nick rename --- modules/users/config.json | 1 + modules/users/users.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/users/config.json b/modules/users/config.json index 0e947cb..866deb7 100644 --- a/modules/users/config.json +++ b/modules/users/config.json @@ -1,5 +1,6 @@ { "ignorable": false, + "dependencies": [ "command", "event" ], "dbKeys": [ "knownUsers" ], "help": "https://github.com/reality/depressionbot/blob/master/modules/users/README.md" } diff --git a/modules/users/users.js b/modules/users/users.js index d4ad44a..8e934b7 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -57,7 +57,7 @@ var users = function(dbot) { var newNick = event.params.substr(1); if(!this.api.isKnownUser(newNick)) { knownUsers.aliases[newNick] = this.api.resolveUser(event.server, event.user); - if(_.has(dbot.modules, 'stats')) dbot.api.stats.renameStats(event.server, newNick); + dbot.api.event.emit('nick_change', [ event.server, newNick ]); } } }.bind(this);