Which sadly is not the case, so when a player connects and his init.sqf is executed, it should send a flag to the server so the server publishes again any global variables that might be needed by the new client connecting.
Which actually
IS the case (at least to my findings). Every variable that has been publicVariabled, will be synced to JIP players. But only the value of the variable as it was at the moment it was publicVariabled. So basicly if you always use publicVariable after you update the value, the right value will always end up at JIP players, even without onPlayerConnected. This has been tested in Multiplayer ServerClient and Dedicated Server, v1.08 and v1.09beta. Coop missions, respawn as seagull.
Just because im reading for the 2nd time that others claim otherwise, I will test it yet again, but I think that's the 5th time im trying to be sure
update I just told someone to enter: test5 = 1; publicVariable "test5"; in a console, after I joined and tested the varialbe "test5", it's value was 1. Again confirming my earlier claim
And this leads us to the next question: the server receives onPlayerConnected signal even before the player client has started the execution of the corresponding init.sqf script. In you publish the variables at this time, and the common init.sqf initializes them, there will be an overwrite situation where the client might overwrite what the server broadcasts.
IMHO unnecessary, imo the proper solution would be to use: if (isNil "variableName") then { variableName = (default value) }; in the common.sqf