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-01-15 16:43:02 +01:00
|
|
|
if(key && key[2] != "" && Number.prototype.chanceIn(1, 100) && event.user != 'aisbot') {
|
|
|
|
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
|
|
|
};
|