diff options
Diffstat (limited to 'src/game/Chat/Chat.cpp')
-rw-r--r-- | src/game/Chat/Chat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp index 963d95d3d9..220e9685f7 100644 --- a/src/game/Chat/Chat.cpp +++ b/src/game/Chat/Chat.cpp @@ -348,10 +348,10 @@ bool ChatHandler::SetDataForCommandInTable(std::vector<ChatCommand>& table, char while (*text == ' ') ++text; - for (uint32 i = 0; table[i].Name != nullptr; i++) + for (uint32 i = 0; i < table.size(); i++) { // for data fill use full explicit command names - if (table[i].Name != cmd) + if (table[i].Name == nullptr || table[i].Name != cmd) continue; // select subcommand from child commands list (including "") @@ -372,7 +372,7 @@ bool ChatHandler::SetDataForCommandInTable(std::vector<ChatCommand>& table, char } //if (table[i].SecurityLevel != security) - ;//sLog->outDetail("Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security); + // sLog->outDetail("Table `command` overwrite for command '%s' default security (%u) by %u", fullcommand.c_str(), table[i].SecurityLevel, security); table[i].SecurityLevel = security; table[i].Help = help; @@ -383,9 +383,9 @@ bool ChatHandler::SetDataForCommandInTable(std::vector<ChatCommand>& table, char if (!cmd.empty()) { if (&table == &getCommandTable()) - sLog->outError("Table `command` have not existed command '%s', skip.", cmd.c_str()); + sLog->outError("Table `command` have non-existing command '%s', skip.", cmd.c_str()); else - sLog->outError("Table `command` have not existed subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str()); + sLog->outError("Table `command` have non-existing subcommand '%s' in command '%s', skip.", cmd.c_str(), fullcommand.c_str()); } return false; |