3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-28 06:49:25 +01:00
dbot/modules/puns/puns.js
2012-12-11 16:04:52 +00:00

26 lines
657 B
JavaScript

var puns = function(dbot) {
var name = 'puns';
var dbot = dbot;
return {
'name': name,
'ignorable': true,
'listener': function(event) {
event.user = dbot.cleanNick(event.user);
if(dbot.moduleNames.include('quotes') &&
dbot.db.quoteArrs.hasOwnProperty(event.user)) {
event.message = '~q ' + event.user;
event.action = 'PRIVMSG';
event.params = event.message.split(' ');
dbot.instance.emit(event);
}
},
'on': 'JOIN'
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};