mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 22:47:16 +02:00
Better (and correct) output from the 'groups' command.
This commit is contained in:
parent
39e66dbc34
commit
7d8edf0235
1 changed files with 6 additions and 5 deletions
|
|
@ -672,13 +672,14 @@ class CmdGroup(MuxCommand):
|
|||
string += "\n This is a SUPERUSER account! Group membership does not matter."
|
||||
else:
|
||||
# get permissions and determine if they are groups
|
||||
perms = [perm.strip().lower() for perm in caller.player.permissions
|
||||
if perm.strip()]
|
||||
perms = list(set(caller.permissions + caller.player.permissions))
|
||||
|
||||
for group in [group for group in PermissionGroup.objects.all()
|
||||
if group.key.lower() in perms]:
|
||||
string += "\n %s\t\t%s" % (group.key, [str(perm) for perm in group.group_permissions])
|
||||
if group.key in perms]:
|
||||
string += "\n {w%s{n\n%s" % (group.key, ", ".join(group.group_permissions))
|
||||
if string:
|
||||
string = "\nYour (%s's) group memberships: %s" % (caller.name, string)
|
||||
string = "\nGroup memberships for you (Player %s + Character %s): %s" % (caller.player.name,
|
||||
caller.name, string)
|
||||
else:
|
||||
string = "\nYou are not not a member of any groups."
|
||||
caller.msg(string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue