summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 12:35:09 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 12:35:09 +0100
commit05e753294c1a603252d2eed4b1731c3f50543a7e (patch)
tree82d8c04a55df7a689fd15b69e8e6917c91e165d0 /src/net/ea/chathandler.cpp
parent38674a7732d2224e07e80c0c4224e3468e4ddfb0 (diff)
downloadmana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.gz
mana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.bz2
mana-05e753294c1a603252d2eed4b1731c3f50543a7e.tar.xz
mana-05e753294c1a603252d2eed4b1731c3f50543a7e.zip
Fixed some compiler warnings
Fixed a faulty == statement that should have been an assignment and a mismatched 'else' block.
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 2e7be21f..14432b28 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -35,7 +35,6 @@
#include "utils/gettext.h"
#include "utils/stringutils.h"
-#include <SDL_types.h>
#include <string>
extern Being *player_node;
@@ -93,10 +92,14 @@ void ChatHandler::handleMessage(MessageIn &msg)
chatMsg = msg.readString(chatMsgLength);
if (nick != SERVER_NAME)
+ {
if (player_relations.hasPermission(nick, PlayerRelation::WHISPER))
chatWindow->whisper(nick, chatMsg);
+ }
else
+ {
localChatTab->chatLog(chatMsg, BY_SERVER);
+ }
break;
@@ -106,9 +109,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
being = beingManager->findBeing(msg.readInt32());
if (!being || chatMsgLength <= 0)
- {
break;
- }
chatMsg = msg.readString(chatMsgLength);
@@ -135,9 +136,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
chatMsgLength = msg.readInt16() - 4;
if (chatMsgLength <= 0)
- {
break;
- }
chatMsg = msg.readString(chatMsgLength);
std::string::size_type pos = chatMsg.find(" : ", 0);