mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 04:49:25 +01:00
only admin can run js
This commit is contained in:
parent
430d88e5d8
commit
d5d68fcc51
@ -4,8 +4,10 @@ var js = function(dbot) {
|
|||||||
var commands = {
|
var commands = {
|
||||||
'~js': function(data, params) {
|
'~js': function(data, params) {
|
||||||
var q = data.message.valMatch(/^~js (.*)/, 2);
|
var q = data.message.valMatch(/^~js (.*)/, 2);
|
||||||
|
if(data.user == dbot.admin) {
|
||||||
dbot.say(data.channel, eval(q[1]));
|
dbot.say(data.channel, eval(q[1]));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user