2011-08-22 19:56:36 +02:00
|
|
|
var puns = function(dbot) {
|
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
|
|
|
'listener': function(data) {
|
2011-08-30 17:13:47 +02:00
|
|
|
if(data.user == 'reality') {
|
2012-03-07 23:13:31 +01:00
|
|
|
dbot.instance.say(data.channel, dbot.interpolatedQuote('realityonce'));
|
2011-08-30 17:13:47 +02:00
|
|
|
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
2012-03-07 23:13:31 +01:00
|
|
|
dbot.say(data.channel, data.user + ': ' + dbot.interpolatedQuote(data.user.toLowerCase()));
|
2011-08-22 19:56:36 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'on': 'JOIN'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|