3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00
dbot/modules/getajob.js
2011-08-25 13:39:44 +01:00

20 lines
445 B
JavaScript

var getAJob = function(dbot) {
var dbot = dbot;
return {
'listener': function(data) {
var num = Math.floor(Math.random()*101);
console.log(num);
if(num == 50 || data.message.indexOf('bored') !== -1) {
dbot.say(data.channel, data.user + ': Get a job!');
}
},
'on': 'PRIVMSG'
};
};
exports.fetch = function(dbot) {
return getAJob(dbot);
};