2011-08-22 19:56:36 +02:00
|
|
|
var puns = function(dbot) {
|
2012-04-15 23:15:10 +02:00
|
|
|
var name = 'puns';
|
2011-08-22 19:56:36 +02:00
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
|
|
|
'listener': function(data) {
|
2012-04-15 23:04:58 +02:00
|
|
|
if((dbot.db.ignores.hasOwnProperty(data.user) &&
|
|
|
|
dbot.db.ignores[data.user].include(name)) == false) {
|
|
|
|
if(dbot.moduleNames.include('quotes')) {
|
|
|
|
if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
|
|
|
data.message = '~q ' + data.user.toLowerCase();
|
|
|
|
var params = data.message.split(' ');
|
|
|
|
dbot.commands[params[0]](data, params);
|
|
|
|
}
|
2012-03-14 15:20:59 +01:00
|
|
|
}
|
2011-08-22 19:56:36 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2012-04-15 22:43:02 +02:00
|
|
|
'on': 'JOIN',
|
|
|
|
|
2012-04-15 23:04:58 +02:00
|
|
|
'name': name,
|
2012-04-15 22:43:02 +02:00
|
|
|
|
|
|
|
'ignorable': true
|
2011-08-22 19:56:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|