2011-08-22 19:56:36 +02:00
|
|
|
var puns = function(dbot) {
|
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
|
|
|
'listener': function(data) {
|
2012-03-14 15:20:59 +01:00
|
|
|
if(dbot.moduleNames.include('quotes')) {
|
2012-03-14 16:47:00 +01:00
|
|
|
if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
2012-03-14 15:20:59 +01:00
|
|
|
data.message = '~q ' + data.user.toLowerCase();
|
2012-03-14 16:47:00 +01:00
|
|
|
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',
|
|
|
|
|
|
|
|
'name': 'puns',
|
|
|
|
|
|
|
|
'ignorable': true
|
2011-08-22 19:56:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|