mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Make the lock command force-update Exits to handle cmd-type locks without a reload; as per #1142.
This commit is contained in:
parent
b57b807da6
commit
99c4042fbc
1 changed files with 6 additions and 1 deletions
|
|
@ -1820,6 +1820,11 @@ class CmdLock(ObjManipCommand):
|
|||
ok = obj.locks.add(lockdef)
|
||||
except LockException as e:
|
||||
caller.msg(str(e))
|
||||
if "cmd" in lockdef.lower() and \
|
||||
inherits_from(obj, "evennia.objects.objects.DefaultExit"):
|
||||
# special fix to update Exits since "cmd"-type locks won't
|
||||
# update on them unless their cmdsets are rebuilt.
|
||||
obj.at_init()
|
||||
if ok:
|
||||
caller.msg("Added lock '%s' to %s." % (lockdef, obj))
|
||||
return
|
||||
|
|
@ -1915,7 +1920,7 @@ class CmdExamine(ObjManipCommand):
|
|||
string += "\n|wSession id(s)|n: %s" % (", ".join("#%i" % sess.sessid
|
||||
for sess in obj.sessions.all()))
|
||||
if hasattr(obj, "email") and obj.email:
|
||||
string += "\n|wEmail|n: |c%s|n" % obj.email
|
||||
string += "\n|wEmail|n: |c%s|n" % obj.email
|
||||
if hasattr(obj, "has_player") and obj.has_player:
|
||||
string += "\n|wPlayer|n: |c%s|n" % obj.player.name
|
||||
perms = obj.player.permissions.all()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue