evennia icon indicating copy to clipboard operation
evennia copied to clipboard

[BUG] MULTISESSION_MODE 3 / Command Locks Bug

Open jaborsh opened this issue 7 months ago • 3 comments

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:

  1. Set MULTISESSION_MODE = 3 in settings.py
  2. Add locks = "cmd:is_ooc()" to a command.
  3. Start two sessions: one IC with a puppet and one OOC with none.
  4. Attempt to puppet an object with the latter session and fail.

Expected behavior

is_ooc() lock should apply to session, not to account.

jaborsh avatar Jul 07 '24 08:07 jaborsh