diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-08-20 22:19:50 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-08-20 22:19:50 +0200 |
commit | cf5ab14ca59904e208bf6cb9d87134f01803eeed (patch) | |
tree | 065899b9622787fd7289795fa7dd6fe5022199e2 /src/Bindings/PluginLua.cpp | |
parent | Added "HOOK_SERVER_PING" call to older protocols (diff) | |
download | cuberite-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/Bindings/PluginLua.cpp')
-rw-r--r-- | src/Bindings/PluginLua.cpp | 5 |
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"; |