3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-24 12:59:34 +01:00
dbot/modules/puns.js

29 lines
759 B
JavaScript
Raw Normal View History

var puns = function(dbot) {
2012-04-15 23:15:10 +02:00
var name = 'puns';
var dbot = dbot;
return {
'listener': function(data) {
if((dbot.db.ignores.hasOwnProperty(data.user) &&
dbot.db.ignores[data.user].include(name)) == false) {
2012-04-16 16:23:19 +02:00
if(dbot.moduleNames.include('quotes') &&
dbot.db.quotes.hasOwnProperty(data.user)) {
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
}
}
},
'on': 'JOIN',
'name': name,
'ignorable': true
};
}
exports.fetch = function(dbot) {
return puns(dbot);
};