2012-12-11 17:04:52 +01:00
|
|
|
var youAre = function(dbot) {
|
2013-01-15 16:43:02 +01:00
|
|
|
this.listener = function(event) {
|
|
|
|
var key = event.message.valMatch(/(\bis\b|\bare\b)\s+([\w\s\d]*?)(\s+)?(,|\.|\band\b|$)/, 5);
|
2012-12-11 17:04:52 +01:00
|
|
|
|
2013-05-17 19:04:19 +02:00
|
|
|
if(key && key[2] != "" && (Math.floor(Math.random() * (101)) / 1) == 1) {
|
2013-01-15 16:43:02 +01:00
|
|
|
event.reply(event.user + ': You\'re ' + key[2] + '.');
|
|
|
|
}
|
|
|
|
}.bind(this);
|
|
|
|
this.on = 'PRIVMSG';
|
2012-12-11 17:04:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
2013-01-15 16:43:02 +01:00
|
|
|
return new youAre(dbot);
|
2012-12-11 17:04:52 +01:00
|
|
|
};
|