As it stands servermods (mods launched with -serverMod param which have no client side counterpart) do not have any easy, efficent way to determine when a player spawns.
Currently the easiest way to get this effect is to start looping all playableUnits when onPlayerConnect is triggered and evaluate each unit's UID, returning the object the player spawned in when a match is found. This is a potentially quite heavy process if lots of units are present in the mission and is open to problems if the unit is killed or disconnects before the loop finishes.
An engine-based eventhandler would be the most efficient method of achieving this effect and would work wonders for server-based mods.