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

21 lines
392 B
JavaScript
Raw Normal View History

2011-10-12 17:42:19 +02:00
var js = function(dbot) {
var dbot = dbot;
var commands = {
'~js': function(data, params) {
2011-10-12 17:45:07 +02:00
var q = data.message.valMatch(/^~js ([\d\w\s]*)/, 2);
2011-10-12 17:46:18 +02:00
dbot.say(data.channel, eval(q[2]));
2011-10-12 17:42:19 +02:00
}
};
2011-10-12 17:43:09 +02:00
return {
'onLoad': function() {
return commands;
}
};
};
exports.fetch = function(dbot) {
return js(dbot);
};