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:
parent
f2181420d7
commit
588a2619aa
@ -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 );
|
||||||
|
Loading…
Reference in New Issue
Block a user