def presetRotate(): try: map = getSuccessor(sbserver.gameMode(), sbserver.mapName()) except KeyError: logging.warning('No map list specified for current mode. Defaulting to user-specified rotation.') clientReloadRotate() except ValueError: logging.info('Maps list for current mode is empty. Defaulting to user-specified rotation.') clientReloadRotate() else: sbserver.setMap(map, sbserver.gameMode()) if sbserver.numClients() == 0: rotate_on_join[0] = True sbserver.setPaused(True)
def presetRotate(): try: map = getSuccessor(sbserver.gameMode(), sbserver.mapName()) except KeyError: logging.warning( 'No map list specified for current mode. Defaulting to user-specified rotation.' ) clientReloadRotate() except ValueError: logging.info( 'Maps list for current mode is empty. Defaulting to user-specified rotation.' ) clientReloadRotate() else: sbserver.setMap(map, sbserver.gameMode()) if sbserver.numClients() == 0: rotate_on_join[0] = True sbserver.setPaused(True)
def render_JSON(self, request): return json.dumps({ 'num_clients': sbserver.numClients() })
def render_JSON(self, request): return json.dumps({'num_clients': sbserver.numClients()})