From d5d68fcc51d0c2268319e6e8f0e9a7c514e8cd80 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 13 Dec 2011 16:03:21 +0000 Subject: [PATCH] only admin can run js --- modules/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/js.js b/modules/js.js index 4634594..b59dfa4 100644 --- a/modules/js.js +++ b/modules/js.js @@ -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])); + } } };