3
0
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:
Luke Slater 2011-12-13 16:03:21 +00:00
parent 430d88e5d8
commit d5d68fcc51

View File

@ -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 {