Example #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)
Example #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)
Example #3
0
	def render_JSON(self, request):
		return json.dumps({
			'num_clients': sbserver.numClients()
			})
Example #4
0
File: api.py Project: pguenth/xsbs
 def render_JSON(self, request):
     return json.dumps({'num_clients': sbserver.numClients()})