3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

add the pm bit

This commit is contained in:
reality 2013-08-31 13:33:10 +00:00
parent dbccd67b20
commit 3b304bf769

View File

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