mirror of
https://github.com/reality/dbot.git
synced 2024-12-18 08:32:42 +01:00
fix split on undefined message in puns
This commit is contained in:
parent
c22f869d15
commit
8f891835e4
@ -34,7 +34,7 @@ var command = function(dbot) {
|
||||
};
|
||||
},
|
||||
'listener': function(data) {
|
||||
params = data.message.split(' ');
|
||||
var params = data.message.split(' ');
|
||||
if(data.channel == dbot.name) data.channel = data.user;
|
||||
|
||||
var ignoringCommand = false;
|
||||
|
@ -4,14 +4,12 @@ var puns = function(dbot) {
|
||||
return {
|
||||
'listener': function(data) {
|
||||
if(dbot.moduleNames.include('quotes')) {
|
||||
if(data.user == 'reality') {
|
||||
data.message = '~q realityonce';
|
||||
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
||||
if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
||||
data.message = '~q ' + data.user.toLowerCase();
|
||||
}
|
||||
var params = data.message.split(' ');
|
||||
dbot.commands[params[0]](data, params);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'on': 'JOIN'
|
||||
|
Loading…
Reference in New Issue
Block a user