include channel in logs

This commit is contained in:
reality 2013-08-31 13:30:24 +00:00
parent 1675700073
commit d7640f1c20
3 changed files with 6 additions and 3 deletions

View File

@ -20,6 +20,7 @@
"debugMode": false,
"debugLevel": 1,
"redisPort": 6379,
"timezone": "Europe/London",
"repoRoot": "https://github.com/reality/depressionbot/",
"version": "Depressionbot IRC bot 0.5-dev - Lovingly crafted by The DepressionBot Foundation (a charity arm of the Official Aberystwyth Open Source International Development League)."
}

View File

@ -13,6 +13,7 @@ var log = function(dbot) {
dbot.say(server, logChannel, dbot.t('log_message', {
'time': new Date().toUTCString(),
'command': message,
"channel"; 'nochan',
'user': user
}));
},
@ -28,6 +29,7 @@ var log = function(dbot) {
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,
'command': event.message,
'user': event.user
}));

View File

@ -1,7 +1,7 @@
{
"log_message": {
"en": "[{time}] {user}: {command}",
"fr": "[{time}] {user}: {command}",
"it": "[{time}] {user}: {command}"
"en": "[{time}] {user} ({channel}): {command}",
"fr": "[{time}] {user} ({channel}): {command}",
"it": "[{time}] {user} ({channel}): {command}"
}
}