aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Chat.cpp
diff options
context:
space:
mode:
authorChaplain <aionthefirst@gmail.com>2011-08-23 18:05:01 +0300
committerChaplain <aionthefirst@gmail.com>2011-08-23 18:09:08 +0300
commitfb2784851099de42c81b10be9820cdb126fc2a56 (patch)
tree1d5cba64a4b7d21ad5d3fc7fdc72af1b5019f083 /src/server/game/Chat/Chat.cpp
parent7e1f3ceb4435e89a8757e4824700def4b8ecbc12 (diff)
Core: Clean up here and there.
*replase postfix iterator increment\decrement with prefix in cycles *replase strlen(*char) != 0 with *char[0] != '\0' *replase strlen(rStr.c_str()) with rStr.length()
Diffstat (limited to 'src/server/game/Chat/Chat.cpp')
-rwxr-xr-xsrc/server/game/Chat/Chat.cpp4
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)
{