From 3b304bf76923589237558ae05f0996aa677124bd Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 31 Aug 2013 13:33:10 +0000 Subject: [PATCH] add the pm bit --- modules/log/log.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/log/log.js b/modules/log/log.js index 6732536..5f9b07a 100644 --- a/modules/log/log.js +++ b/modules/log/log.js @@ -26,10 +26,11 @@ var log = function(dbot) { this.onLoad = function() { dbot.api.event.addHook('command', function(event) { var logChannel = this.config.logChannel[event.server]; + channel = event.channel.name || 'PM'; if(logChannel && !_.include(this.ignoredCommands, event.message.split(' ')[0])) { dbot.say(event.server, logChannel, dbot.t('log_message', { 'time': new Date().toUTCString(), - 'channel': event.channel.name, + 'channel': channel, 'command': event.message, 'user': event.user }));