2011-08-22 19:56:36 +02:00
|
|
|
var puns = function(dbot) {
|
2012-04-15 23:15:10 +02:00
|
|
|
var name = 'puns';
|
2011-08-22 19:56:36 +02:00
|
|
|
var dbot = dbot;
|
|
|
|
|
|
|
|
return {
|
2012-05-23 21:05:23 +02:00
|
|
|
'listener': function(event) {
|
2012-05-25 17:03:36 +02:00
|
|
|
event.user = dbot.cleanNick(event.user);
|
2012-05-25 17:45:47 +02: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(' ');
|
|
|
|
dbot.instance.emit(event)
|
2011-08-22 19:56:36 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2012-04-15 22:43:02 +02:00
|
|
|
'on': 'JOIN',
|
|
|
|
|
2012-04-15 23:04:58 +02:00
|
|
|
'name': name,
|
2012-04-15 22:43:02 +02:00
|
|
|
|
|
|
|
'ignorable': true
|
2011-08-22 19:56:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.fetch = function(dbot) {
|
|
|
|
return puns(dbot);
|
|
|
|
};
|