1
0

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
This commit is contained in:
madmaxoft@gmail.com
2013-06-22 19:08:34 +00:00
parent 9dd0486faf
commit 943dcaea14
10 changed files with 27 additions and 13 deletions

View File

@@ -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);
}