Fixed group color's.
This commit is contained in:
parent
a5cca16abe
commit
7f9f46c911
@ -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)
|
void cClientHandle::SendChat(const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData)
|
||||||
{
|
{
|
||||||
bool ShouldAppendChatPrefixes = true;
|
cWorld * World = GetPlayer()->GetWorld();
|
||||||
|
if (World == NULL)
|
||||||
if (GetPlayer()->GetWorld() == NULL)
|
|
||||||
{
|
{
|
||||||
cWorld * World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName());
|
World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName());
|
||||||
if (World == NULL)
|
if (World == NULL)
|
||||||
{
|
{
|
||||||
World = cRoot::Get()->GetDefaultWorld();
|
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));
|
m_Protocol->SendChat(Message.append(a_Message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ bool cGroupManager::LoadGroups()
|
|||||||
AString Color = IniFile.GetValue(KeyName, "Color", "-");
|
AString Color = IniFile.GetValue(KeyName, "Color", "-");
|
||||||
if ((Color != "-") && (Color.length() >= 1))
|
if ((Color != "-") && (Color.length() >= 1))
|
||||||
{
|
{
|
||||||
Group->SetColor(cChatColor::Delimiter + Color[0]);
|
Group->SetColor(cChatColor::Delimiter + Color);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user