summaryrefslogtreecommitdiffstats
path: root/source/cPluginManager.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-05 22:30:27 +0200
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-05 22:30:27 +0200
commitf94456dd3eccc65a6f304d4b804ca09a67fa6008 (patch)
tree9997e63b9e0152661232aff9c78b78f2b215233e /source/cPluginManager.cpp
parentProtoProxy: Added about 10 new packet types parsed (diff)
downloadcuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar.gz
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar.bz2
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar.lz
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar.xz
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.tar.zst
cuberite-f94456dd3eccc65a6f304d4b804ca09a67fa6008.zip
Diffstat (limited to '')
-rw-r--r--source/cPluginManager.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp
index 13a67ee28..8f52839c8 100644
--- a/source/cPluginManager.cpp
+++ b/source/cPluginManager.cpp
@@ -627,6 +627,26 @@ bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_B
+bool cPluginManager::CallHookHandshake(cClientHandle * a_ClientHandle, const AString & a_Username)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_HANDSHAKE);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnHandshake(a_ClientHandle, a_Username))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
cPlugin* cPluginManager::GetPlugin( const AString & a_Plugin ) const
{