summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/chathandler.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 265f59cb1..7199d3b5c 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -42,6 +42,8 @@
#include "debug.h"
+extern unsigned int tmwServerVersion;
+
namespace Ea
{
@@ -287,7 +289,15 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg,
std::string sender_name = ((pos == std::string::npos)
? "" : chatMsg.substr(0, pos));
- if (sender_name != being->getName() && being->getType() == Being::PLAYER)
+ if (tmwServerVersion > 0)
+ {
+ // work around for "new" tmw server
+ sender_name = being->getName();
+ if (sender_name.empty())
+ sender_name = "?";
+ }
+ else if (sender_name != being->getName()
+ && being->getType() == Being::PLAYER)
{
if (!being->getName().empty())
sender_name = being->getName();