[10251] Clarify error message for one from redundent commamd data case.

This commit is contained in:
VladimirMangos 2010-07-23 19:33:12 +04:00
parent 9350c9990d
commit 50c2e8eca2
6 changed files with 13 additions and 5 deletions

View file

@ -1155,7 +1155,11 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand *commandTable, const char
}
case CHAT_COMMAND_UNKNOWN_SUBCOMMAND:
{
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", cmdName.c_str(), fullcommand.c_str());
// command have subcommands, but not '' subcommand and then any data in `command` useless for it.
if (cmdName.empty())
sLog.outErrorDb("Table `command` have command '%s' that only used with some subcommand selection, it can't have help or overwritten access level, skip.", cmdName.c_str(), fullcommand.c_str());
else
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", cmdName.c_str(), fullcommand.c_str());
return false;
}
case CHAT_COMMAND_UNKNOWN: