The /auth command will no longer be listed in /help if there's no use of it.
This commit is contained in:
parent
ee5a7dd7b8
commit
deca922653
1 changed files with 8 additions and 4 deletions
|
|
@ -3046,10 +3046,14 @@ namespace TShockAPI
|
||||||
var cmdlist = new List<Command>();
|
var cmdlist = new List<Command>();
|
||||||
for (int j = 0; j < ChatCommands.Count; j++)
|
for (int j = 0; j < ChatCommands.Count; j++)
|
||||||
{
|
{
|
||||||
if (ChatCommands[j].CanRun(args.Player))
|
Command chatCommand = ChatCommands[j];
|
||||||
{
|
if (!chatCommand.CanRun(args.Player))
|
||||||
cmdlist.Add(ChatCommands[j]);
|
continue;
|
||||||
}
|
// Don't list the /auth command if it's currently useless.
|
||||||
|
if (chatCommand.Name == "auth" && TShock.AuthToken == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
cmdlist.Add(ChatCommands[j]);
|
||||||
}
|
}
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
if (cmdlist.Count > (15*(page - 1)))
|
if (cmdlist.Count > (15*(page - 1)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue