diff --git a/modules/admin.js b/modules/admin.js index d1dfc26..a8a14cd 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -24,11 +24,25 @@ var adminCommands = function(dbot) { }, 'say': function(data, params) { - var c = params[1]; + if (params[1] === "@") { + var c = data.channel; + } else { + var c = params[1]; + } var m = params.slice(2).join(' '); dbot.say(c, m); }, + 'act': function(data, params) { + if (params[1] === "@") { + var c = data.channel; + } else { + var c = params[1]; + } + var m = params.slice(2).join(' '); + dbot.act(c, m); + }, + 'load': function(data, params) { dbot.moduleNames.push(params[1]); dbot.reloadModules(); diff --git a/run.js b/run.js index 1071f15..9f4a2eb 100644 --- a/run.js +++ b/run.js @@ -83,7 +83,7 @@ DBot.prototype.say = function(channel, data) { }; DBot.prototype.act = function(channel, data) { - this.instance.send('PRIVMSG', channel, ':\001ACTION' + data + '\001'); + this.instance.send('PRIVMSG', channel, ':\001ACTION ' + data + '\001'); } // Save the database file