1
0
Fork 0

Permission-based player chat message formatting (#5304)

+ Permissions for chat message format access
This commit is contained in:
Rorkh 2021-09-24 01:49:34 +05:00 committed by GitHub
parent 7b0872aecc
commit 6bbbc52d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1550,7 +1550,14 @@ void cClientHandle::HandleChat(const AString & a_Message)
Msg.AddTextPart(m_Player->GetName(), Color);
Msg.ParseText(m_Player->GetSuffix());
Msg.AddTextPart("> ");
Msg.ParseText(Message);
if (m_Player->HasPermission("chat.format"))
{
Msg.ParseText(Message);
}
else
{
Msg.AddTextPart(Message);
}
Msg.UnderlineUrls();
cRoot::Get()->BroadcastChat(Msg);
}