mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 20:22:39 +01:00
add the pm bit
This commit is contained in:
parent
dbccd67b20
commit
3b304bf769
@ -26,10 +26,11 @@ var log = function(dbot) {
|
|||||||
this.onLoad = function() {
|
this.onLoad = function() {
|
||||||
dbot.api.event.addHook('command', function(event) {
|
dbot.api.event.addHook('command', function(event) {
|
||||||
var logChannel = this.config.logChannel[event.server];
|
var logChannel = this.config.logChannel[event.server];
|
||||||
|
channel = event.channel.name || 'PM';
|
||||||
if(logChannel && !_.include(this.ignoredCommands, event.message.split(' ')[0])) {
|
if(logChannel && !_.include(this.ignoredCommands, event.message.split(' ')[0])) {
|
||||||
dbot.say(event.server, logChannel, dbot.t('log_message', {
|
dbot.say(event.server, logChannel, dbot.t('log_message', {
|
||||||
'time': new Date().toUTCString(),
|
'time': new Date().toUTCString(),
|
||||||
'channel': event.channel.name,
|
'channel': channel,
|
||||||
'command': event.message,
|
'command': event.message,
|
||||||
'user': event.user
|
'user': event.user
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user