mirror of
https://github.com/reality/dbot.git
synced 2024-12-27 05:02:36 +01:00
26 lines
664 B
JavaScript
26 lines
664 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.config.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);
|
|
};
|