evennia
evennia copied to clipboard
[BUG] MULTISESSION_MODE 3 / Command Locks Bug
Describe the bug
Commands that make use of the is_ooc() lock (and maybe others?) encounter an interesting bug when combined with MULTISESSION_MODE = 2 or 3
.
is_ooc()
uses the state of the first session if there are multiple. Should a second session initialize and disconnect, it no longer has access to any of the commands blocked by the is_ooc()
lockstring because the first session exists and is still IC.
To Reproduce
Steps to reproduce the behavior:
- Set
MULTISESSION_MODE = 3
insettings.py
- Add
locks = "cmd:is_ooc()"
to a command. - Start two sessions: one IC with a puppet and one OOC with none.
- Attempt to puppet an object with the latter session and fail.
Expected behavior
is_ooc()
lock should apply to session, not to account.