3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00
dbot/modules/puns.js

22 lines
553 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'
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};