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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user