3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-18 00:22:35 +01:00
dbot/modules/js.js
2011-10-12 16:55:46 +01:00

21 lines
385 B
JavaScript

var js = function(dbot) {
var dbot = dbot;
var commands = {
'~js': function(data, params) {
var q = data.message.valMatch(/^~js (.*)/, 2);
dbot.say(data.channel, eval(q[1]));
}
};
return {
'onLoad': function() {
return commands;
}
};
};
exports.fetch = function(dbot) {
return js(dbot);
};