summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-20 22:19:50 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-20 22:19:50 +0200
commitcf5ab14ca59904e208bf6cb9d87134f01803eeed (patch)
tree065899b9622787fd7289795fa7dd6fe5022199e2 /src/Protocol
parentAdded "HOOK_SERVER_PING" call to older protocols (diff)
downloadcuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar.gz
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar.bz2
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar.lz
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar.xz
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.tar.zst
cuberite-cf5ab14ca59904e208bf6cb9d87134f01803eeed.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp4
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp3
2 files changed, 5 insertions, 2 deletions
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())
{