diff --git a/modules/karma/karma.js b/modules/karma/karma.js index 354fc69..9853c54 100644 --- a/modules/karma/karma.js +++ b/modules/karma/karma.js @@ -140,7 +140,7 @@ var karma = function(dbot) { 'value': karma.karma })); if(_.has(dbot.modules, 'log')) { - dbot.api.log.log(event.server, event.rUser.primaryNick, event.message); + dbot.api.log.logWithChannel(event.server, event.channel, event.rUser.primaryNick, event.message); } }.bind(this)); }.bind(this)); diff --git a/modules/log/log.js b/modules/log/log.js index a8f1a1e..492952c 100644 --- a/modules/log/log.js +++ b/modules/log/log.js @@ -10,11 +10,15 @@ var log = function(dbot) { this.api = { 'log': function(server, user, message) { + this.api.logWithChannel(server, user, 'nochan', message); + }, + + 'logWithChannel': function(server, user, channel, message) { // muh legacy var logChannel = this.config.logChannel[server]; dbot.say(server, logChannel, dbot.t('log_message', { 'time': new Date().toUTCString(), 'command': message, - "channel": 'nochan', + 'channel': channel, 'user': user })); },