예제 #1
0
파일: ctl.py 프로젝트: GunioRobot/xsbs
def adminCmd(cn, args):
	'''@description Claim master
	   @usage
	   @admin'''
	if args != '':
		raise ExtraArgumentError()
	if sbserver.playerPrivilege(cn) == 0 or sbserver.playerPrivilege(cn) == 1:
		sbserver.setAdmin(cn)
예제 #2
0
파일: ctl.py 프로젝트: pguenth/xsbs
def adminCmd(cn, args):
	'''@description Claim master
	   @usage
	   @admin'''
	if args != '':
		raise ExtraArgumentError()
	if sbserver.playerPrivilege(cn) == 0 or sbserver.playerPrivilege(cn) == 1:
		sbserver.setAdmin(cn)
예제 #3
0
def setAdmin(caller):
        """Makes the caller the admin of the server. This is denoted by the gold color of their name. Note that this is just for show because it does not give the user any more powers."""
	if(caller[0]=="ingame"):
		return sbserver.setAdmin(caller[1])
	raise ServerError("You are not ingame.")
	return
예제 #4
0
파일: privilege.py 프로젝트: pguenth/xsbs
def onSetMaster(cn, hash):
    if hash == sbserver.hashPassword(cn, sbserver.adminPassword()):
        sbserver.setAdmin(cn)
예제 #5
0
def onSetMaster(cn, hash):
	if hash == sbserver.hashPassword(cn, sbserver.adminPassword()):
		sbserver.setAdmin(cn)
예제 #6
0
def setAdmin(caller):
	"""Makes the caller the admin of the server."""
	if(caller[0]=="ingame"):
		return sbserver.setAdmin(caller[1])
	raise ServerError("You are not ingame.")
	return