From 26c3743f76163e21f4db5f32cccbcea7009546dc Mon Sep 17 00:00:00 2001 From: Psychedelic Squid Date: Mon, 12 Mar 2012 13:49:55 +0000 Subject: [PATCH] Oops, stop falling out of the command logic when commands are ignored. --- modules/command.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/command.js b/modules/command.js index 434b2db..7c23cec 100644 --- a/modules/command.js +++ b/modules/command.js @@ -46,11 +46,13 @@ var command = function(dbot) { } } - if(dbot.commands.hasOwnProperty(params[0]) && (!(ignoringCommand))) { + if(dbot.commands.hasOwnProperty(params[0])) { if((dbot.db.bans.hasOwnProperty(params[0]) && dbot.db.bans[params[0]].include(data.user)) || dbot.db.bans['*'].include(data.user)) { dbot.say(data.channel, data.user + ' is banned from using this command. Commence incineration.'); + } else if(ignoringCommand) { + // do nothing, this stops us falling through to the non-command stuff } else { dbot.commands[params[0]](data, params); dbot.save();