Made 'idle' a default in the inputfuncs since this is sent by the webclient. settings.IDLE_CMD will still work but will work alongside idle, the latter will always work like a no-op.
This commit is contained in:
parent
fc08fc0970
commit
2e692cc639
2 changed files with 20 additions and 18 deletions
|
|
@ -26,7 +26,9 @@ from evennia.utils.logger import log_err
|
|||
from evennia.utils.utils import to_str, to_unicode
|
||||
|
||||
|
||||
# always let "idle" work since we use this in the webclient
|
||||
_IDLE_COMMAND = settings.IDLE_COMMAND
|
||||
_IDLE_COMMAND = (_IDLE_COMMAND, ) if _IDLE_COMMAND == "idle" else (_IDLE_COMMAND, "idle")
|
||||
_GA = object.__getattribute__
|
||||
_SA = object.__setattr__
|
||||
_NA = lambda o: "N/A"
|
||||
|
|
@ -56,7 +58,7 @@ def text(session, *args, **kwargs):
|
|||
return
|
||||
# this is treated as a command input
|
||||
# handle the 'idle' command
|
||||
if text.strip() == _IDLE_COMMAND:
|
||||
if text.strip() in _IDLE_COMMAND:
|
||||
session.update_session_counters(idle=True)
|
||||
return
|
||||
if session.player:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue