From 588a2619aac1ac9db1b721d60bbbd8c83c23ebc3 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 21 Jul 2012 14:33:38 +0000 Subject: Implemented the missing HOOK_PLAYER_SPAWN hook (although its name is not too good, should be PLAYER_AUTH) git-svn-id: http://mc-server.googlecode.com/svn/trunk@687 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cPluginManager.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp index eea9f1c01..64f6442ca 100644 --- a/source/cPluginManager.cpp +++ b/source/cPluginManager.cpp @@ -396,6 +396,23 @@ bool cPluginManager::CallHook(PluginHook a_Hook, unsigned int a_NumArgs, ...) } break; } + + case HOOK_PLAYER_SPAWN: + { + if (a_NumArgs != 1) + { + break; + } + va_list argptr; + va_start( argptr, a_NumArgs); + cPlayer * Player = va_arg(argptr, cPlayer *); + va_end (argptr); + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + (*itr)->OnPlayerSpawn(Player); + } + break; + } default: { -- cgit v1.2.3