Core/Commands: Change way we handle optional args. Fixes #43

This commit is contained in:
hondacrx
2022-08-20 18:43:31 -04:00
parent 135760cbed
commit 56d9dc6190
4 changed files with 75 additions and 19 deletions
+3 -3
View File
@@ -733,10 +733,10 @@ namespace Game.Chat
}
[CommandNonGroup("help", RBACPermissions.CommandHelp, true)]
static bool HandleHelpCommand(CommandHandler handler, string cmd)
static bool HandleHelpCommand(CommandHandler handler, OptionalArg<string> cmd)
{
ChatCommandNode.SendCommandHelpFor(handler, cmd);
if (cmd.IsEmpty())
ChatCommandNode.SendCommandHelpFor(handler, cmd.ValueOr(""));
if (!cmd.HasValue)
ChatCommandNode.SendCommandHelpFor(handler, "help");
return true;