From ecd30eb89646a9079530c06d1e7ddbb5ce191f97 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 25 Aug 2013 16:10:43 +0000 Subject: [PATCH] forgot a bind..... --- modules/users/users.js | 2 +- run.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/users/users.js b/modules/users/users.js index eeda646..78ee8ac 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -138,7 +138,7 @@ var users = function(dbot) { done(user); } } - }); + }.bind(this)); }.bind(this); var checkChannelUsers = function(done) { var needsUpdating = false; diff --git a/run.js b/run.js index c36d68b..bb833e7 100644 --- a/run.js +++ b/run.js @@ -103,6 +103,21 @@ DBot.prototype.t = function(string, formatData) { if(_.has(this.strings[string], lang)) { var module = this.stringMap[string]; + + // TODO: Create per-server support + if(this.config.enableColours) { + var colours = this.config.colours; + _.each(formatData, function(str, key) { + if(_.has(colours, key)) { + if(key == 'channel' && _.has(colours['channel'], key)) { + + } else { + str = colours[key] + str + '\u000f'; + } + } + }); + } + formattedString = this.strings[string][lang].format(formatData); if(this.config.modules[module] && this.config.modules[module].outputPrefix) { formattedString = '[' + this.config.modules[module].outputPrefix + '] ' +