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)
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
def onSetMaster(cn, hash): if hash == sbserver.hashPassword(cn, sbserver.adminPassword()): sbserver.setAdmin(cn)
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