Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
	def render_JSON(self, request):
		return json.dumps({
			'num_clients': sbserver.numClients()
			})
Exemple #4
0
 def render_JSON(self, request):
     return json.dumps({'num_clients': sbserver.numClients()})