diff --git a/src/lib/command.js b/src/lib/command.js index 463c7f7..fc533a6 100644 --- a/src/lib/command.js +++ b/src/lib/command.js @@ -7,7 +7,7 @@ class Command { this.parentBase = (this.parent && this.parent.base && this.parent.base + ' ') || ''; this.base = this.parentBase + (this.params.base || ''); - this.updateHistory(); + if(this.params.base) this.updateHistory(); } find(command) { diff --git a/src/lib/plugins/commands.js b/src/lib/plugins/commands.js index 7491424..769136b 100644 --- a/src/lib/plugins/commands.js +++ b/src/lib/plugins/commands.js @@ -43,7 +43,7 @@ module.exports.player=function(player, serv) { player.chat('Help -=-=-=-=-=-=-=-=-'); } for (var i = PAGE_LENGTH*page; i < Math.min(PAGE_LENGTH*(page + 1), found.length); i++) { - if (i == search) continue; + if (found[i] === search) continue; var cmd = hash[found[i]]; var usage = (cmd.params && cmd.params.usage) || cmd.base; var info = (cmd.params && cmd.params.info) || 'No info';