2011-08-25 14:14:08 +01:00
|
|
|
var youAre = function(dbot) {
|
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
|
|
|
'listener': function(data) {
|
|
|
|
var num = Math.floor(Math.random()*11);
|
2011-08-25 14:19:17 +01:00
|
|
|
var key = data.message.match(/ is|are ([\d\w\s']*),?\.?and?/);
|
2011-08-25 14:17:51 +01:00
|
|
|
|
|
|
|
if(num == 1 && key != undefined) {
|
2011-08-25 14:14:08 +01:00
|
|
|
dbot.say(data.channel, data.user + ': You\'re ' + key[1]);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'on': 'PRIVMSG'
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return youAre(dbot);
|
|
|
|
};
|