diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-05-07 23:23:02 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-05-07 23:23:02 +0000 |
commit | 624d20706c2a8ff1948b13d794fd88c33b2154fb (patch) | |
tree | e2050553453774f3d395301080a5661a4f6ee86d /src/net/chathandler.cpp | |
parent | a81c08d0672965144d8ccd356cd83f9f7e834a3b (diff) | |
download | mana-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.gz mana-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.bz2 mana-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.xz mana-624d20706c2a8ff1948b13d794fd88c33b2154fb.zip |
Made say messages from being ID 0 display as messages from server.
Diffstat (limited to 'src/net/chathandler.cpp')
-rw-r--r-- | src/net/chathandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index d3dcd2b1..e1d68f22 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -75,8 +75,14 @@ void ChatHandler::handleMessage(MessageIn &msg) switch (msg.getId()) { case GPMSG_SAY: - being = beingManager->findBeing(msg.readInt16()); + int id = msg.readInt16(); chatMsg = msg.readString(); + if (id == 0) + { + chatWindow->chatLog(chatMsg, BY_SERVER); + break; + } + being = beingManager->findBeing(id); if (being) { chatWindow->chatLog(being->getName() + " : " + chatMsg, being == player_node ? BY_PLAYER : BY_OTHER); @@ -84,7 +90,7 @@ void ChatHandler::handleMessage(MessageIn &msg) } else { - chatWindow->chatLog("John Doe : " + chatMsg, BY_OTHER); + chatWindow->chatLog("Unknown : " + chatMsg, BY_OTHER); } break; case CPMSG_REGISTER_CHANNEL_RESPONSE: |