Changed admin system

This commit is contained in:
Ziggeh
2014-08-11 08:28:38 +02:00
parent f78a2672cd
commit c8ab856313
17 changed files with 140 additions and 73 deletions
+1 -4
View File
@@ -9,10 +9,7 @@ def run(core, actor, target, commandString):
arg1 = commandArgs[0]
if len(commandArgs) > 1:
arg2 = commandArgs[1]
if actor.getClient() and actor.getClient().isGM() == False:
return
if not commandString.startswith('object/tangible') and not commandString.startswith('object/weapon'):
return
-10
View File
@@ -36,16 +36,6 @@ def run(core, actor, target, commandString):
if len(commandArgs) > 5:
arg5 = commandArgs[5]
if not command:
return
if actor.getClient().isGM() is False:
return
if playerObject.getGodLevel() == 0:
actor.addAbility("admin")
playerObject.setGodLevel(50)
if command == 'giveExperience' and arg1:
core.playerService.giveExperience(actor, int(arg1))
@@ -34,7 +34,7 @@ def createRadial(core, owner, target, radials):
if owner.getPlayerObject().getCitizenship() != 3 and core.playerCityService.getPlayerCity(owner) == city:
radials.add(RadialOptions(2, 230, 0, '@city/city:revoke_citizenship'))
if owner.getClient().isGM():
if core.adminService.getAccessLevelFromDB(actor.getClient().getAccountId()) is not None:
radials.add(RadialOptions(2, 231, 0, 'Add 10 citizens'))
radials.add(RadialOptions(2, 232, 0, 'Deduct 10 citizens'))