summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginLua.cpp
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/Bindings/PluginLua.cpp
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 '')
-rw-r--r--src/Bindings/PluginLua.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index dbe2e7a0d..343164ec7 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -1193,14 +1193,14 @@ bool cPluginLua::OnProjectileHitEntity(cProjectileEntity & a_Projectile, cEntity
-bool cPluginLua::OnServerPing(AString & a_Motd, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon)
+bool cPluginLua::OnServerPing(cClientHandle & a_ClientHandle, AString & a_Motd, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon)
{
cCSLock Lock(m_CriticalSection);
bool res = false;
cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_SERVER_PING];
for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
{
- m_LuaState.Call((int)(**itr), a_Motd, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon, cLuaState::Return, res, a_Motd, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon);
+ m_LuaState.Call((int)(**itr), &a_ClientHandle, a_Motd, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon, cLuaState::Return, res, a_Motd, a_OnlinePlayersCount, a_MaxPlayersCount, a_Favicon);
if (res)
{
return true;
@@ -1590,6 +1590,7 @@ const char * cPluginLua::GetHookFnName(int a_HookType)
case cPluginManager::HOOK_PLUGINS_LOADED: return "OnPluginsLoaded";
case cPluginManager::HOOK_POST_CRAFTING: return "OnPostCrafting";
case cPluginManager::HOOK_PRE_CRAFTING: return "OnPreCrafting";
+ case cPluginManager::HOOK_SERVER_PING: return "OnServerPing";
case cPluginManager::HOOK_SPAWNED_ENTITY: return "OnSpawnedEntity";
case cPluginManager::HOOK_SPAWNED_MONSTER: return "OnSpawnedMonster";
case cPluginManager::HOOK_SPAWNING_ENTITY: return "OnSpawningEntity";