You could try to monitor the attack button and cycle this way through all players and set these variables:
Code:
spectator.spectatorclient = player getEntityNumber();
spectator.psoffsettime = 0;
spectator.archivetime = 0;
However this does not prevent the spectator from pressing the right mouse button, maybe unbind the mouse buttons while spectating and rebind when spawned via clientcmd-method?
Or when all bots are in the same team you could use some parts out of the maps\mp\gametypes\_spectating.gsc?