channel with log

This commit is contained in:
reality 2016-12-14 22:09:19 +00:00
parent a57b123fed
commit 92598b13c2
2 changed files with 6 additions and 2 deletions

View File

@ -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));

View File

@ -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
}));
},