mangos/mangos — Issue #23: [chat] ShowHelpForSubCommand don't print command name
Author: MiNDTeamProject
Created: 2011-11-01 22:16:15+00:00
State: open

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

C++

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 :

C++

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