This is meant to be a drop in replacement for the classrestrict plugin.
I did not implement the sm_classrestrict_(flags|immunity) convars, as
no use to us.

The existing classrestrict allows the player to pick any class and then
will check to see if there are too many of that class.  If this occurs
the plugin force changes the player to another (previous) class and
then does a respawn.  This force change/respawn is whats been causing
the crashes.

This plugin take a different approach in that it will block the class
change (joinclass <class>) if it will cause there to be to many of
that <class>.

A check is also done on death to see if there are excessive players for
the players current class.  If there is the plugin will pick a valid
random class and spoof a joinclass <class> command for them to force
them off the limited class.  If this happens the player will also
receive a warning message in chat to the effect of

WARNING: Number of <class> over allowed limit (<limit>), forcing you to random class <new class>

This check should only come into play if class limits are changed mid
round.