From fe978f0d1e01e284b591e1d5a08ebb24161fd587 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 9 Jan 2014 11:39:42 +0100 Subject: Added cClientHandle::SendPluginMessage(). It is not yet exported in the API, though. --- src/Protocol/Protocol125.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Protocol/Protocol125.cpp') diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index e49dd43ff..48c085ae5 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -704,6 +704,20 @@ void cProtocol125::SendPlayerSpawn(const cPlayer & a_Player) +void cProtocol125::SendPluginMessage(const AString & a_Channel, const AString & a_Message) +{ + cCSLock Lock(m_CSPacket); + WriteByte(PACKET_PLUGIN_MESSAGE); + WriteString(a_Channel); + WriteShort((short)a_Message.size()); + SendData(a_Message.data(), a_Message.size()); + Flush(); +} + + + + + void cProtocol125::SendRemoveEntityEffect(const cEntity & a_Entity, int a_EffectID) { cCSLock Lock(m_CSPacket); -- cgit v1.2.3