Example #1
0
def unspecAll(cn, args):
	'''@description Make all clients players
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	else:
		for s in sbserver.spectators():
			sbserver.unspectate(s)
Example #2
0
File: ctl.py Project: pguenth/xsbs
def unspecAll(cn, args):
	'''@description Make all clients players
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	else:
		for s in sbserver.spectators():
			sbserver.unspectate(s)
Example #3
0
def onReqUnspectate(cn, tcn):
	if tcn != cn:
		if isAtLeastMaster(cn):
			sbserver.unspectate(tcn)
		else:
			insufficientPermissions(cn)
	else:
		if sbserver.masterMode() > 1 and not isAtLeastMaster(cn):
			sbserver.playerMessage(cn, error('Master mode is locked.  You cannot unspectate.'))
		else:
			sbserver.unspectate(tcn)
Example #4
0
def onReqUnspectate(cn, tcn):
    if tcn != cn:
        if isAtLeastMaster(cn):
            sbserver.unspectate(tcn)
        else:
            insufficientPermissions(cn)
    else:
        if sbserver.masterMode() > 1 and not isAtLeastMaster(cn):
            sbserver.playerMessage(
                cn, error('Master mode is locked.  You cannot unspectate.'))
        else:
            sbserver.unspectate(tcn)
Example #5
0
def spectatorHelpler(boolean,cn):
	if boolean:
		sbserver.spectate(cn)
	else:
		sbserver.unspectate(cn)
Example #6
0
	def unspectate(self):
		'''Make client not a spectator'''
		sbserver.unspectate(self.cn)
Example #7
0
 def unspectate(self):
     '''Make client not a spectator'''
     sbserver.unspectate(self.cn)