The /auth command will no longer be listed in /help if there's no use of it.

This commit is contained in:
CoderCow 2013-06-29 23:59:22 +02:00
parent ee5a7dd7b8
commit deca922653

View file

@ -3046,10 +3046,14 @@ namespace TShockAPI
var cmdlist = new List<Command>();
for (int j = 0; j < ChatCommands.Count; j++)
{
if (ChatCommands[j].CanRun(args.Player))
{
cmdlist.Add(ChatCommands[j]);
}
Command chatCommand = ChatCommands[j];
if (!chatCommand.CanRun(args.Player))
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();
if (cmdlist.Count > (15*(page - 1)))