From cf5ab14ca59904e208bf6cb9d87134f01803eeed Mon Sep 17 00:00:00 2001 From: Howaner Date: Wed, 20 Aug 2014 22:19:50 +0200 Subject: Added a_ClientHandle to the HOOK_SERVER_PING hook. --- src/Protocol/Protocol17x.cpp | 4 ++-- src/Protocol/ProtocolRecognizer.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Protocol') diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 0a9d70bcc..565532913 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1721,7 +1721,7 @@ void cProtocol172::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) int NumPlayers = Server->GetNumPlayers(); int MaxPlayers = Server->GetMaxPlayers(); AString Favicon = Server->GetFaviconData(); - cRoot::Get()->GetPluginManager()->CallHookServerPing(Motd, NumPlayers, MaxPlayers, Favicon); + cRoot::Get()->GetPluginManager()->CallHookServerPing(*m_Client, Motd, NumPlayers, MaxPlayers, Favicon); // Version: Json::Value Version; @@ -3091,7 +3091,7 @@ void cProtocol176::HandlePacketStatusRequest(cByteBuffer & a_ByteBuffer) int NumPlayers = Server->GetNumPlayers(); int MaxPlayers = Server->GetMaxPlayers(); AString Favicon = Server->GetFaviconData(); - cRoot::Get()->GetPluginManager()->CallHookServerPing(Motd, NumPlayers, MaxPlayers, Favicon); + cRoot::Get()->GetPluginManager()->CallHookServerPing(*m_Client, Motd, NumPlayers, MaxPlayers, Favicon); // Version: Json::Value Version; diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp index b197cd384..af5a8a416 100644 --- a/src/Protocol/ProtocolRecognizer.cpp +++ b/src/Protocol/ProtocolRecognizer.cpp @@ -18,6 +18,7 @@ #include "../Server.h" #include "../World.h" #include "../ChatColor.h" +#include "Bindings/PluginManager.h" @@ -1017,6 +1018,8 @@ void cProtocolRecognizer::SendLengthlessServerPing(void) AString Motd = Server->GetDescription(); int NumPlayers = Server->GetNumPlayers(); int MaxPlayers = Server->GetMaxPlayers(); + AString Favicon = Server->GetFaviconData(); + cRoot::Get()->GetPluginManager()->CallHookServerPing(*m_Client, Motd, NumPlayers, MaxPlayers, Favicon); switch (cRoot::Get()->GetPrimaryServerVersion()) { -- cgit v1.2.3