mirror of
https://github.com/reality/dbot.git
synced 2024-12-27 05:02:36 +01:00
23 lines
445 B
JavaScript
23 lines
445 B
JavaScript
var js = function(dbot) {
|
|
var dbot = dbot;
|
|
|
|
var commands = {
|
|
'~js': function(data, params) {
|
|
var q = data.message.valMatch(/^~js (.*)/, 2);
|
|
if(data.user == dbot.admin) {
|
|
dbot.say(data.channel, eval(q[1]));
|
|
}
|
|
}
|
|
};
|
|
|
|
return {
|
|
'onLoad': function() {
|
|
return commands;
|
|
}
|
|
};
|
|
};
|
|
|
|
exports.fetch = function(dbot) {
|
|
return js(dbot);
|
|
};
|