3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 12:59:34 +01:00
dbot/modules/puns.js
2012-03-07 22:13:31 +00:00

23 lines
720 B
JavaScript

var puns = function(dbot) {
var dbot = dbot;
return {
'listener': function(data) {
if(data.user == 'reality') {
dbot.instance.say(data.channel, dbot.interpolatedQuote('realityonce'));
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
dbot.say(data.channel, data.user + ': ' + dbot.interpolatedQuote(data.user.toLowerCase()));
} else if(dbot.instance.inChannel(data.channel)) {
dbot.instance.say('aisbot', '.karma ' + data.user);
dbot.waitingForKarma = data.channel;
}
},
'on': 'JOIN'
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};