summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorRorkh <78957156+Rorkh@users.noreply.github.com>2021-09-23 22:49:34 +0200
committerGitHub <noreply@github.com>2021-09-23 22:49:34 +0200
commit6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf (patch)
tree3538f87f9f3c2797455902ed229c0d747a890850 /src/ClientHandle.cpp
parentBungeeGuard style proxy security and OnlyAllowBungee config (#5291) (diff)
downloadcuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar.gz
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar.bz2
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar.lz
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar.xz
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.tar.zst
cuberite-6bbbc52d0201493a9bf4c1f5b1d05dd76240c4bf.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp9
1 files changed, 8 insertions, 1 deletions
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);
}