mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
Merge pull request #22 from psquid/master
admin 'act' command, and fix to action syntax
This commit is contained in:
commit
4e338c2475
@ -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();
|
||||
|
2
run.js
2
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
|
||||
|
Loading…
Reference in New Issue
Block a user