diff --git a/modules/command.js b/modules/command.js index df617bf..6f7f289 100644 --- a/modules/command.js +++ b/modules/command.js @@ -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; diff --git a/modules/puns.js b/modules/puns.js index 2b591ed..6f5357d 100644 --- a/modules/puns.js +++ b/modules/puns.js @@ -4,13 +4,11 @@ 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); } - var params = data.message.split(' '); - dbot.commands[params[0]](data, params); } },