forked from GitHub/dbot
channel with log
This commit is contained in:
parent
a57b123fed
commit
92598b13c2
@ -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));
|
||||
|
@ -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
|
||||
}));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user