Beispiel #1
0
def unsetMaster(cn, args):
	'''@description Force release master from current master
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	else:
		sbserver.setMaster(-1)
Beispiel #2
0
def unsetMaster(cn, args):
	'''@description Force release master from current master
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	else:
		sbserver.setMaster(-1)
Beispiel #3
0
def masterCmd(cn, args):
	'''@description Claim master
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	if currentAdmin() != None:
		raise StateError('Admin is present')
	if sbserver.playerPrivilege(cn) == 0:
		sbserver.setMaster(cn)
Beispiel #4
0
def masterCmd(cn, args):
	'''@description Claim master
	   @usage
	   @master'''
	if args != '':
		raise ExtraArgumentError()
	if currentAdmin() != None:
		raise StateError('Admin is present')
	if sbserver.playerPrivilege(cn) == 0:
		sbserver.setMaster(cn)
Beispiel #5
0
def onGiveMaster(cn, args):
	'''@description Give master to a client
	   @usage cn
	   @master'''
	if args == '':
		raise UsageError()
		return
	try:
		tcn = int(args)
	except TypeError:
		raise UsageError()
		return
	sbserver.playerMessage(cn, info('You have given master to %s') % sbserver.playerName(tcn))
	sbserver.setMaster(tcn)
Beispiel #6
0
def onGiveMaster(cn, args):
	'''@description Give master to a client
	   @usage cn
	   @master'''
	if args == '':
		raise UsageError()
		return
	try:
		tcn = int(args)
	except TypeError:
		raise UsageError()
		return
	sbserver.playerMessage(cn, info('You have given master to %s') % sbserver.playerName(tcn))
	sbserver.setMaster(tcn)
Beispiel #7
0
def setMaster(caller):
        """This command makes the caller the master of the server. This is denoted by the green color of the callers name. Also like with #admin it does not give the caller any powers beyond what the caller had before."""
	if(caller[0]=="ingame"):
		return sbserver.setMaster(caller[1])
	raise ServerError("You are not ingame.")
	return
Beispiel #8
0
def onAuthSuccess(cn, name):
	if currentAdmin() != None:
		sbserver.playerMessage(cn, error('Admin is present'))
		return
	sbserver.setMaster(cn)
Beispiel #9
0
def setMaster(caller):
	"""Makes the caller the master of the server."""
	if(caller[0]=="ingame"):
		return sbserver.setMaster(caller[1])
	raise ServerError("You are not ingame.")
	return
Beispiel #10
0
def onAuthSuccess(cn, name):
    if currentAdmin() != None:
        sbserver.playerMessage(cn, error('Admin is present'))
        return
    sbserver.setMaster(cn)