Fixed more errors with quelling as well as some other things with updating permissions in general. Resolves Issue 430.
This commit is contained in:
parent
ebdc6cdbd4
commit
7f0d0dd0f8
4 changed files with 21 additions and 11 deletions
|
|
@ -528,8 +528,11 @@ class CmdPerm(MuxCommand):
|
|||
if 'del' in switches:
|
||||
# delete the given permission(s) from object.
|
||||
obj.permissions.remove(self.rhslist)
|
||||
cstring += "\nPermission(s) %s removed from %s (if they existed)." % (", ".join(self.rhslist), obj.name)
|
||||
tstring += "\n%s revokes the permission(s) %s from you." % (caller.name, ", ".join(self.rhslist))
|
||||
if obj.permissions.get(self.rhslist):
|
||||
cstring += "\nPermissions(s) %s could not be removed from %s." % (", ".join(self.rhslist), obj.name)
|
||||
else:
|
||||
cstring += "\nPermission(s) %s removed from %s (if they existed)." % (", ".join(self.rhslist), obj.name)
|
||||
tstring += "\n%s revokes the permission(s) %s from you." % (caller.name, ", ".join(self.rhslist))
|
||||
else:
|
||||
# add a new permission
|
||||
permissions = obj.permissions.all()
|
||||
|
|
|
|||
|
|
@ -633,6 +633,14 @@ class CmdQuell(MuxPlayerCommand):
|
|||
self.msg("Already quelling Player%s permissions." % permstr)
|
||||
return
|
||||
player.attributes.add('_quell', True)
|
||||
self.msg("Quelling Player permissions%s. Use @unquell to get them back." % permstr)
|
||||
puppet = player.get_puppet(self.sessid)
|
||||
if puppet:
|
||||
cpermstr = " (%s)" % ", ".join(puppet.permissions.all())
|
||||
cpermstr = "Quelling to current puppet's permissions%s." % cpermstr
|
||||
cpermstr += "\n(Note: If this is higher than Player permissions%s, the lowest of the two will be used.)" % permstr
|
||||
cpermstr += "\nUse @unquell to return to normal permission usage."
|
||||
self.msg(cpermstr)
|
||||
else:
|
||||
self.msg("Quelling Player permissions%s. Use @unquell to get them back." % permstr)
|
||||
self._recache_locks(player)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue