mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
dont print result of ajs if its undefined
This commit is contained in:
parent
d5296b0ea0
commit
28f78373d8
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user