mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Make INLINEFUNC_STACK_MAXSIZE default visible in settings_default. Resolves #2173.
This commit is contained in:
parent
f615886d24
commit
fa09aeef50
3 changed files with 9 additions and 8 deletions
|
|
@ -67,6 +67,7 @@ without arguments starts a full interactive Python console.
|
|||
- Make CmdGet/Drop/Give give proper error if `obj.move_to` returns `False`.
|
||||
- Make `Object/Room/Exit.create`'s `account` argument optional. If not given, will set perms
|
||||
to that of the object itself (along with normal Admin/Dev permission).
|
||||
- Make `INLINEFUNC_STACK_MAXSIZE` default visible in `settings_default.py`.
|
||||
|
||||
|
||||
## Evennia 0.9 (2018-2019)
|
||||
|
|
|
|||
|
|
@ -583,12 +583,15 @@ TIME_IGNORE_DOWNTIMES = False
|
|||
# session-aware text formatting and manipulation on the fly. If
|
||||
# disabled, such inline functions will not be parsed.
|
||||
INLINEFUNC_ENABLED = False
|
||||
# This defined how deeply nested inlinefuncs can be. Set to <=0 to
|
||||
# disable (not recommended, this is a safeguard against infinite loops).
|
||||
INLINEFUNC_STACK_MAXSIZE = 20
|
||||
# Only functions defined globally (and not starting with '_') in
|
||||
# these modules will be considered valid inlinefuncs. The list
|
||||
# is loaded from left-to-right, same-named functions will overload
|
||||
INLINEFUNC_MODULES = ["evennia.utils.inlinefuncs", "server.conf.inlinefuncs"]
|
||||
# Module holding handlers for OLCFuncs. These allow for embedding
|
||||
# functional code in prototypes
|
||||
# Module holding handlers for ProtFuncs. These allow for embedding
|
||||
# functional code in prototypes and has the same syntax as inlinefuncs.
|
||||
PROTOTYPEFUNC_MODULES = ["evennia.utils.prototypefuncs", "server.conf.prototypefuncs"]
|
||||
|
||||
######################################################################
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ from django.conf import settings
|
|||
|
||||
from evennia.utils import utils, logger
|
||||
|
||||
# The stack size is a security measure. Set to <=0 to disable.
|
||||
_STACK_MAXSIZE = settings.INLINEFUNC_STACK_MAXSIZE
|
||||
|
||||
|
||||
# example/testing inline functions
|
||||
|
||||
|
|
@ -276,12 +279,6 @@ for module in utils.make_iter(settings.INLINEFUNC_MODULES):
|
|||
raise
|
||||
|
||||
|
||||
# The stack size is a security measure. Set to <=0 to disable.
|
||||
try:
|
||||
_STACK_MAXSIZE = settings.INLINEFUNC_STACK_MAXSIZE
|
||||
except AttributeError:
|
||||
_STACK_MAXSIZE = 20
|
||||
|
||||
# regex definitions
|
||||
|
||||
_RE_STARTTOKEN = re.compile(r"(?<!\\)\$(\w+)\(") # unescaped $funcname( (start of function call)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue