1
0

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
This commit is contained in:
madmaxoft@gmail.com 2012-07-21 14:33:38 +00:00
parent f2181420d7
commit 588a2619aa

View File

@ -397,6 +397,23 @@ bool cPluginManager::CallHook(PluginHook a_Hook, unsigned int a_NumArgs, ...)
break; 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: default:
{ {
LOGWARNING("cPluginManager: Calling Unknown hook: %i", a_Hook ); LOGWARNING("cPluginManager: Calling Unknown hook: %i", a_Hook );