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,7 +4,9 @@ var js = function(dbot) {
var commands = {
'~js': function(data, params) {
var q = data.message.valMatch(/^~js (.*)/, 2);
dbot.say(data.channel, eval(q[1]));
if(data.user == dbot.admin) {
dbot.say(data.channel, eval(q[1]));
}
}
};