Esempio n. 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)
Esempio n. 2
0
File: ctl.py Progetto: 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 5
0
def spectatorHelpler(boolean,cn):
	if boolean:
		sbserver.spectate(cn)
	else:
		sbserver.unspectate(cn)
Esempio n. 6
0
	def unspectate(self):
		'''Make client not a spectator'''
		sbserver.unspectate(self.cn)
Esempio n. 7
0
 def unspectate(self):
     '''Make client not a spectator'''
     sbserver.unspectate(self.cn)