diff --git a/modules/js.js b/modules/js.js index 3a5ee5f..cf08699 100644 --- a/modules/js.js +++ b/modules/js.js @@ -15,8 +15,11 @@ var js = function(dbot) { '~ajs': function(data, params) { var q = data.message.valMatch(/^~ajs (.*)/, 2); - if(dbot.admin.include(data.user)) { - dbot.say(data.channel, eval(q[1])); + if(dbot.admin.include(data.user) ) { + var ret = eval(q[1]); + if(ret != undefined) { + dbot.say(data.channel, ret); + } } } };