diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-07-27 13:47:21 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-07-27 13:47:21 +0200 |
commit | 7f9f46c9114837a6edaae53385b7b7970b91abbd (patch) | |
tree | 93064bdd56143572e47910f1967f8b3595645a24 /src | |
parent | Add "Broadcasting" settings to world.ini (diff) | |
download | cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar.gz cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar.bz2 cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar.lz cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar.xz cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.tar.zst cuberite-7f9f46c9114837a6edaae53385b7b7970b91abbd.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 19 | ||||
-rw-r--r-- | src/GroupManager.cpp | 2 |
2 files changed, 5 insertions, 16 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index e4ad218a2..116ea459e 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1973,28 +1973,17 @@ void cClientHandle::SendBlockChanges(int a_ChunkX, int a_ChunkZ, const sSetBlock void cClientHandle::SendChat(const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData) { - bool ShouldAppendChatPrefixes = true; - - if (GetPlayer()->GetWorld() == NULL) + cWorld * World = GetPlayer()->GetWorld(); + if (World == NULL) { - cWorld * World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName()); + World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName()); if (World == NULL) { World = cRoot::Get()->GetDefaultWorld(); } - - if (!World->ShouldUseChatPrefixes()) - { - ShouldAppendChatPrefixes = false; - } - } - else if (!GetPlayer()->GetWorld()->ShouldUseChatPrefixes()) - { - ShouldAppendChatPrefixes = false; } - AString Message = FormatMessageType(ShouldAppendChatPrefixes, a_ChatPrefix, a_AdditionalData); - + AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData); m_Protocol->SendChat(Message.append(a_Message)); } diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp index 32c2f1c97..bc9bb67be 100644 --- a/src/GroupManager.cpp +++ b/src/GroupManager.cpp @@ -153,7 +153,7 @@ bool cGroupManager::LoadGroups() AString Color = IniFile.GetValue(KeyName, "Color", "-"); if ((Color != "-") && (Color.length() >= 1)) { - Group->SetColor(cChatColor::Delimiter + Color[0]); + Group->SetColor(cChatColor::Delimiter + Color); } else { |