forgot a bind.....

This commit is contained in:
reality 2013-08-25 16:10:43 +00:00
parent 5cf79312f4
commit ecd30eb896
2 changed files with 16 additions and 1 deletions

View File

@ -138,7 +138,7 @@ var users = function(dbot) {
done(user);
}
}
});
}.bind(this));
}.bind(this);
var checkChannelUsers = function(done) {
var needsUpdating = false;

15
run.js
View File

@ -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 + '] ' +