mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 12:59:34 +01:00
admin js command so admin can access dbot when running
This commit is contained in:
parent
b34d714364
commit
d72d5f5bdc
@ -7,6 +7,13 @@ var js = function(dbot) {
|
|||||||
'~js': function(data, params) {
|
'~js': function(data, params) {
|
||||||
var q = data.message.valMatch(/^~js (.*)/, 2);
|
var q = data.message.valMatch(/^~js (.*)/, 2);
|
||||||
dbot.say(data.channel, vm.runInNewContext(q[1]));
|
dbot.say(data.channel, vm.runInNewContext(q[1]));
|
||||||
|
},
|
||||||
|
|
||||||
|
'~ajs': function(data, params) {
|
||||||
|
var q = data.message.valMatch(/^~ajs (.*)/, 2);
|
||||||
|
if(data.user == dbot.admin) {
|
||||||
|
dbot.say(data.channel, eval(q[1]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user