onDisconnect alias now returns the clientnumber (-1 for local players)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7142 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -639,6 +639,11 @@ void parsemessages(int cn, playerent *d, ucharbuf &p, bool demo = false)
|
||||
if(!d) break;
|
||||
if(d->name[0]) conoutf(_("player %s disconnected"), colorname(d));
|
||||
zapplayer(players[cn]);
|
||||
if(identexists("onDisconnect"))
|
||||
{
|
||||
defformatstring(ondisconnect)("onDisconnect %d", d->clientnum);
|
||||
execute(ondisconnect);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user