summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-05-07 23:23:02 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-05-07 23:23:02 +0000
commit624d20706c2a8ff1948b13d794fd88c33b2154fb (patch)
treee2050553453774f3d395301080a5661a4f6ee86d /src
parenta81c08d0672965144d8ccd356cd83f9f7e834a3b (diff)
downloadmana-client-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.gz
mana-client-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.bz2
mana-client-624d20706c2a8ff1948b13d794fd88c33b2154fb.tar.xz
mana-client-624d20706c2a8ff1948b13d794fd88c33b2154fb.zip
Made say messages from being ID 0 display as messages from server.
Diffstat (limited to 'src')
-rw-r--r--src/net/chathandler.cpp10
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: