def unspecAll(cn, args): '''@description Make all clients players @usage @master''' if args != '': raise ExtraArgumentError() else: for s in sbserver.spectators(): sbserver.unspectate(s)
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)
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)
def spectatorHelpler(boolean,cn): if boolean: sbserver.spectate(cn) else: sbserver.unspectate(cn)
def unspectate(self): '''Make client not a spectator''' sbserver.unspectate(self.cn)