2011-08-22 18:56:36 +01:00
|
|
|
var puns = function(dbot) {
|
2012-04-15 22:15:10 +01:00
|
|
|
var name = 'puns';
|
2011-08-22 18:56:36 +01:00
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
2012-06-05 00:17:51 +01:00
|
|
|
'name': name,
|
|
|
|
'ignorable': true,
|
|
|
|
|
2012-05-23 20:05:23 +01:00
|
|
|
'listener': function(event) {
|
2012-05-25 16:03:36 +01:00
|
|
|
event.user = dbot.cleanNick(event.user);
|
2012-05-25 16:45:47 +01:00
|
|
|
if(dbot.moduleNames.include('quotes') &&
|
|
|
|
dbot.db.quoteArrs.hasOwnProperty(event.user)) {
|
|
|
|
event.message = '~q ' + event.user;
|
|
|
|
event.action = 'PRIVMSG';
|
|
|
|
event.params = event.message.split(' ');
|
2012-06-05 00:17:51 +01:00
|
|
|
dbot.instance.emit(event);
|
2011-08-22 18:56:36 +01:00
|
|
|
}
|
|
|
|
},
|
2012-06-05 00:17:51 +01:00
|
|
|
'on': 'JOIN'
|
2011-08-22 18:56:36 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|