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 | |
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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/net/chathandler.cpp | 10 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2008-05-08 Philipp Sehmisch <tmw@crushnet.org> + + * src/net/chathandler.cpp: Made say messages from being ID 0 display as + messages from server. + 2008-05-05 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/gui/chat.h, src/gui/chat.cpp: Only update the size of chat 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: |