diff options
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 07e91f59a..a61d26503 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -453,14 +453,16 @@ void cClientHandle::HandlePing(void) { // Somebody tries to retrieve information about the server AString Reply; + cServer * Server = cRoot::Get()->GetServer(); + Printf(Reply, "%s%s%i%s%i", - cRoot::Get()->GetServer()->GetDescription().c_str(), + Server->GetDescription().c_str(), cChatColor::Delimiter.c_str(), - cRoot::Get()->GetServer()->GetNumPlayers(), + Server->GetNumPlayers(), cChatColor::Delimiter.c_str(), - cRoot::Get()->GetServer()->GetMaxPlayers() + Server->GetMaxPlayers() ); - Kick(Reply.c_str()); + Kick(Reply); } @@ -1212,12 +1214,12 @@ void cClientHandle::HandleChat(const AString & a_Message) cCompositeChat Msg; AString Color = m_Player->GetColor(); if (Color.length() == 3) - { + { Color = AString("@") + Color[2]; } else - { - Color.empty(); + { + Color.clear(); } Msg.AddTextPart(AString("<") + m_Player->GetName() + "> ", Color); Msg.ParseText(a_Message); |