Does anyone know what function is called when the teams balance in the pregame lobby?

I'm calling CL_Live_PartyPlay to start the game before it checks for the best host to avoid losing my host to zipper heads in SE Asia with 1gbps lines. Problem is force starting the game like this FUCKS the teambalance and everyone ends up in FFA team. Currently to fix this I can just set party_teambalance 1 when the game starts and change it to private match so players from the pregame click auto assign then change it back to public when everyone spawns in.. this is shit for obvious reasons. Other option is detect how many players are in the game and what client numbers they are, then try balance the teams by writing each client team address that's connected so the teams are within 1 player of each other: problem with this approach is the code's really long, looks like dogshit and I never got it working perfect anyway so I'd rather attempt to call the function before force starting the game to simplify everything and keep it as clean as possible. Had a quick look in ida couldn't find anything xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD