For team balance there's 2 offsets of CHalfLifeMultiplay object with total spawn points for each team.
That's calculated once at map load. Even if you change info_player_* classnames, you should modify this values.
There's no specific function for team join. There's a "think" call for CHalfLifeMultiplay and for the player then some checks are done regarding current m_iJoiningState (an offset of the player entity) and it last menu opened. Then the program put the player in the team selected.
Best way is to put players as spectators in the correct moment, avoiding them to select team (blocking some commands). Then at spectator make a control to check if it has selected (or joined) a team or not for first time.
You can check offsets at wiki for CBasePlayer. For CHalfLifeMultiplay you can check my CS/CZ Ida Suite at
http://forums.alliedmods.net/showthread.php?t=185936
EDIT:
Maybe there's a simple way, not tested.
- At precache + KeyValue, rename classnames for CT spawnpoints to TT spawnpoints, then you will get that only TT can join.
- After precache, create CT spawnpoints
- During the game, move players from TT to CT as needed
- You have to check what happends with team balance. Maybe everyone will go to TT, not tested of course.
__________________