From 943dcaea14c7530eecca57af015f1007b3b9630f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 22 Jun 2013 19:08:34 +0000 Subject: Plugins can modify message in the OnChat() hook handler. FS #376 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1622 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ClientHandle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 23a34d7bc..e1ade39e7 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -898,14 +898,15 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, c void cClientHandle::HandleChat(const AString & a_Message) { - if (!cRoot::Get()->GetServer()->Command(*this, a_Message)) + AString Message(a_Message); + if (!cRoot::Get()->GetServer()->Command(*this, Message)) { AString Msg; Printf(Msg, "<%s%s%s> %s", m_Player->GetColor().c_str(), m_Player->GetName().c_str(), cChatColor::White.c_str(), - a_Message.c_str() + Message.c_str() ); m_Player->GetWorld()->BroadcastChat(Msg); } -- cgit v1.2.3