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
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'on': 'JOIN'
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|