3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 04:49:25 +01:00
dbot/modules/puns.js

23 lines
728 B
JavaScript
Raw Normal View History

var puns = function(dbot) {
var dbot = dbot;
return {
'listener': function(data) {
if(data.user == 'reality') {
2011-09-28 15:03:26 +02:00
dbot.instance.say(data.channel, dbot.db.quoteArrs['realityonce'].random());
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
dbot.say(data.channel, data.user + ': ' + dbot.db.quoteArrs[data.user.toLowerCase()].random());
2011-08-22 22:46:43 +02:00
} 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);
};