forked from GitHub/dbot
Consolidate puns and quotes modules [#90]
This commit is contained in:
parent
887e854012
commit
ae902e3c21
@ -1,25 +0,0 @@
|
||||
var puns = function(dbot) {
|
||||
var name = 'puns';
|
||||
var dbot = dbot;
|
||||
|
||||
return {
|
||||
'name': name,
|
||||
'ignorable': true,
|
||||
|
||||
'listener': function(event) {
|
||||
event.user = dbot.cleanNick(event.user);
|
||||
if(dbot.config.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);
|
||||
}
|
||||
},
|
||||
'on': 'JOIN'
|
||||
};
|
||||
}
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
return puns(dbot);
|
||||
};
|
@ -265,7 +265,7 @@ var quotes = function(dbot) {
|
||||
'commands': commands,
|
||||
|
||||
'listener': function(event) {
|
||||
// Reality Once listener
|
||||
if(event.action == 'PRIVMSG') {
|
||||
if((dbot.db.ignores.hasOwnProperty(event) &&
|
||||
dbot.db.ignores[event.user].include(name)) == false) {
|
||||
if(event.user == 'reality') {
|
||||
@ -294,9 +294,14 @@ var quotes = function(dbot) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(event.action == 'JOIN') {
|
||||
event.message = '~q ' + event.user;
|
||||
event.action = 'PRIVMSG';
|
||||
event.params = event.message.split(' ');
|
||||
dbot.instance.emit(event);
|
||||
}
|
||||
},
|
||||
|
||||
'on': 'PRIVMSG'
|
||||
'on': ['PRIVMSG', 'JOIN']
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user