Jump to content

[master][chat] ShowHelpForSubCommand don't print command name


cyberium
 Share

Recommended Posts

If you type command who need subcommand like ".modify" without any subcommand then help not contain command name.

First in ChatHandler::ExecuteCommand(const char* text) :

We use

ChatCommandSearchResult res = FindCommand(getCommandTable(), text, command, &parentCommand);

This command modify "text" pointer so we cannot use it to point on current command.

But after somme line :

case CHAT_COMMAND_UNKNOWN_SUBCOMMAND:
       {
           SendSysMessage(LANG_NO_SUBCMD);
           ShowHelpForCommand(command->ChildCommands,text);
           SetSentErrorMessage(true);
           break;
       }

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use