dbot/modules/puns.js

28 lines
658 B
JavaScript
Raw Normal View History

var puns = function(dbot) {
2012-04-15 23:15:10 +02:00
var name = 'puns';
var dbot = dbot;
return {
'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',
'name': name,
'ignorable': true
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};