dbot/modules/puns.js

26 lines
606 B
JavaScript
Raw Normal View History

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