From 6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf Mon Sep 17 00:00:00 2001 From: Rorkh <78957156+Rorkh@users.noreply.github.com> Date: Fri, 24 Sep 2021 01:49:34 +0500 Subject: Permission-based player chat message formatting (#5304) + Permissions for chat message format access --- src/ClientHandle.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index bbf018587..b295d9800 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -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); } -- cgit v1.2.3