fix first page of help

This commit is contained in:
Romain Beaumont 2015-12-11 00:59:31 +01:00
parent f3a543dffc
commit fcce925032
2 changed files with 2 additions and 2 deletions

View file

@ -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) {

View file

@ -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';