Fix rpsystem inefficient regex

This commit is contained in:
Griatch 2024-03-17 09:25:04 +01:00
parent 51500ad009
commit 3a0b434e42
5 changed files with 12 additions and 4 deletions

View file

@ -159,7 +159,8 @@ from evennia.commands.command import Command
from evennia.objects.models import ObjectDB
from evennia.objects.objects import DefaultCharacter, DefaultObject
from evennia.utils import ansi, logger
from evennia.utils.utils import iter_to_str, lazy_property, make_iter, variable_from_module
from evennia.utils.utils import (iter_to_str, lazy_property, make_iter,
variable_from_module)
_INFLECT = inflect.engine()
@ -217,7 +218,7 @@ _RE_CHAREND = re.compile(r"\W+$", _RE_FLAGS)
_RE_REF_LANG = re.compile(r"\{+\##([0-9]+)\}+")
# language says in the emote are on the form "..." or langname"..." (no spaces).
# this regex returns in groups (langname, say), where langname can be empty.
_RE_LANGUAGE = re.compile(r"(?:(\w+))*(\".+?\")")
_RE_LANGUAGE = re.compile(r'(\w+)?(".*?")')
# the emote parser works in two steps:

View file

@ -238,7 +238,7 @@ MXP_OUTGOING_ONLY = True
# time depends very much on your game so some experimentation may
# be necessary (use @server to see how many objects are in the idmapper
# cache at any time). Setting this to None disables the cache cap.
IDMAPPER_CACHE_MAXSIZE = 200 # (MB)
IDMAPPER_CACHE_MAXSIZE = 400 # (MB)
# This determines how many connections per second the Portal should
# accept, as a DoS countermeasure. If the rate exceeds this number, incoming
# connections will be queued to this rate, so none will be lost.