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) {
|
'listener': function(data) {
|
||||||
params = data.message.split(' ');
|
var params = data.message.split(' ');
|
||||||
if(data.channel == dbot.name) data.channel = data.user;
|
if(data.channel == dbot.name) data.channel = data.user;
|
||||||
|
|
||||||
var ignoringCommand = false;
|
var ignoringCommand = false;
|
||||||
|
@ -4,13 +4,11 @@ var puns = function(dbot) {
|
|||||||
return {
|
return {
|
||||||
'listener': function(data) {
|
'listener': function(data) {
|
||||||
if(dbot.moduleNames.include('quotes')) {
|
if(dbot.moduleNames.include('quotes')) {
|
||||||
if(data.user == 'reality') {
|
if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
||||||
data.message = '~q realityonce';
|
|
||||||
} else if(dbot.db.quoteArrs.hasOwnProperty(data.user.toLowerCase())) {
|
|
||||||
data.message = '~q ' + data.user.toLowerCase();
|
data.message = '~q ' + data.user.toLowerCase();
|
||||||
|
var params = data.message.split(' ');
|
||||||
|
dbot.commands[params[0]](data, params);
|
||||||
}
|
}
|
||||||
var params = data.message.split(' ');
|
|
||||||
dbot.commands[params[0]](data, params);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user