diff options
author | QAston <qaston@gmail.com> | 2011-08-23 21:01:54 -0700 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-08-23 21:01:54 -0700 |
commit | 9f7a557c05f4bb631c5f358093f2379ac01590a7 (patch) | |
tree | 1c37d327612b0025ce4ff5a644710ce1669a279c /src/server/game/Chat/Chat.cpp | |
parent | 5819cb084f1ccc5db9c0a29684c2da9649cc16d0 (diff) | |
parent | fb2784851099de42c81b10be9820cdb126fc2a56 (diff) |
Merge pull request #2721 from Chaplain/cleanup
Core: Clean up here and there.
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rwxr-xr-x | src/server/game/Chat/Chat.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index 9509302f87b..cecbd223ed9 100755 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -653,7 +653,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co continue; bool match = false; - if (strlen(table[i].Name) > strlen(cmd.c_str())) + if (strlen(table[i].Name) > cmd.length()) { for (uint32 j = 0; table[j].Name != NULL; ++j) { @@ -694,7 +694,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, co SetSentErrorMessage(false); // table[i].Name == "" is special case: send original command to handler - if ((table[i].Handler)(this, strlen(table[i].Name) != 0 ? text : oldtext)) + if ((table[i].Handler)(this, table[i].Name[0] != '\0' ? text : oldtext)) { if (table[i].SecurityLevel > SEC_PLAYER) { |