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

32 lines
843 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);
2012-04-19 21:55:15 +02:00
if((dbot.db.ignores.hasOwnProperty(event.user) &&
dbot.db.ignores[event.user].include(name)) == false) {
2012-04-16 16:23:19 +02:00
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)
2012-03-14 15:20:59 +01:00
}
}
},
'on': 'JOIN',
'name': name,
'ignorable': true
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};