From eaf332099fb0fc15a26309aac8184307724c6d4f Mon Sep 17 00:00:00 2001 From: Evennia docbuilder action Date: Tue, 22 Feb 2022 22:31:21 +0000 Subject: [PATCH] Updated HTML docs --- docs/0.9.5/.buildinfo | 2 +- docs/0.9.5/Default-Commands.html | 26 +- docs/0.9.5/_sources/Default-Commands.md.txt | 26 +- ...evennia.commands.default.batchprocess.html | 2 +- .../evennia.commands.default.building.html | 6 +- .../api/evennia.commands.default.comms.html | 4 +- .../api/evennia.commands.default.general.html | 2 +- .../api/evennia.commands.default.system.html | 6 +- .../evennia.commands.default.unloggedin.html | 6 +- docs/0.9.5/api/evennia.contrib.barter.html | 2 +- .../api/evennia.contrib.email_login.html | 6 +- ...vennia.contrib.ingame_python.commands.html | 2 +- ...b.tutorial_examples.cmdset_red_button.html | 8 +- ...vennia.contrib.tutorial_world.objects.html | 6 +- .../evennia.contrib.tutorial_world.rooms.html | 4 +- docs/0.9.5/api/evennia.utils.eveditor.html | 2 +- docs/0.9.5/api/evennia.utils.evmore.html | 2 +- docs/1.0-dev/.buildinfo | 2 +- docs/1.0-dev/Coding/Changelog.html | 6 + .../evennia/commands/default/building.html | 15 +- .../evennia/commands/default/tests.html | 16 +- .../_modules/evennia/locks/lockfuncs.html | 18 + .../_modules/evennia/server/portal/amp.html | 44 +- .../evennia/server/portal/portal.html | 8 +- .../_modules/evennia/server/server.html | 10 +- .../_modules/evennia/server/webserver.html | 17 +- .../_modules/evennia/utils/dbserialize.html | 45 ++ .../_modules/evennia/utils/logger.html | 391 +++++------ .../evennia/utils/test_resources.html | 5 +- .../_modules/evennia/utils/text2html.html | 18 +- docs/1.0-dev/_sources/Coding/Changelog.md.txt | 6 + .../api/evennia.commands.default.account.html | 4 +- .../evennia.commands.default.building.html | 8 +- .../api/evennia.commands.default.comms.html | 8 +- .../api/evennia.commands.default.general.html | 24 +- .../api/evennia.commands.default.tests.html | 2 +- .../evennia.commands.default.unloggedin.html | 8 +- ....base_systems.email_login.email_login.html | 8 +- ...b.base_systems.ingame_python.commands.html | 4 +- ...rib.full_systems.evscaperoom.commands.html | 24 +- ...ia.contrib.game_systems.barter.barter.html | 4 +- ...ontrib.game_systems.clothing.clothing.html | 4 +- ...trib.grid.extended_room.extended_room.html | 4 +- .../api/evennia.contrib.rpg.dice.dice.html | 4 +- ...evennia.contrib.rpg.rpsystem.rpsystem.html | 8 +- ...ntrib.tutorials.red_button.red_button.html | 8 +- ...trib.tutorials.tutorial_world.objects.html | 12 +- ...ontrib.tutorials.tutorial_world.rooms.html | 12 +- docs/1.0-dev/api/evennia.locks.lockfuncs.html | 11 + .../api/evennia.server.portal.amp.html | 26 + docs/1.0-dev/api/evennia.utils.eveditor.html | 4 +- docs/1.0-dev/api/evennia.utils.evmenu.html | 4 +- docs/1.0-dev/api/evennia.utils.evmore.html | 4 +- docs/1.0-dev/api/evennia.utils.logger.html | 632 +++++++++++++----- docs/1.0-dev/api/evennia.utils.text2html.html | 18 + docs/1.0-dev/genindex.html | 84 ++- docs/1.0-dev/objects.inv | Bin 138850 -> 138948 bytes docs/1.0-dev/searchindex.js | 2 +- 58 files changed, 1085 insertions(+), 559 deletions(-) diff --git a/docs/0.9.5/.buildinfo b/docs/0.9.5/.buildinfo index 9f84435c72..c0fdf6bcda 100644 --- a/docs/0.9.5/.buildinfo +++ b/docs/0.9.5/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 80e229dffccdf0b7b2a4b313ba562076 +config: b01f355158aa6c74c79cada7b3422d47 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/0.9.5/Default-Commands.html b/docs/0.9.5/Default-Commands.html index dc8bd38d7e..138ee2b978 100644 --- a/docs/0.9.5/Default-Commands.html +++ b/docs/0.9.5/Default-Commands.html @@ -53,21 +53,21 @@ with Batch-Processor’s interactive mode.

diff --git a/docs/1.0-dev/_modules/evennia/commands/default/building.html b/docs/1.0-dev/_modules/evennia/commands/default/building.html index bdcf28ae3f..5ec06cf046 100644 --- a/docs/1.0-dev/_modules/evennia/commands/default/building.html +++ b/docs/1.0-dev/_modules/evennia/commands/default/building.html @@ -2254,11 +2254,22 @@ "Use /force to override." ) else: - update = "update" in self.switches reset = "reset" in self.switches + update = "update" in self.switches or not reset # default to update + hooks = "at_object_creation" if update and not reset else "all" old_typeclass_path = obj.typeclass_path + if reset: + answer = yield("|yNote that this will reset the object back to its typeclass' default state, " + "removing any custom locks/perms/attributes etc that may have been added " + "by an explicit create_object call. Use `update` or type/force instead in order " + "to keep such data. " + "Continue [Y]/N?|n") + if answer.upper() in ("N", "NO"): + caller.msg("Aborted.") + return + # special prompt for the user in cases where we want # to confirm changes. if "prototype" in self.switches: @@ -2304,7 +2315,7 @@ if reset: string += " All old attributes where deleted before the swap." else: - string += " Attributes set before swap were not removed." + string += " Attributes set before swap were not removed\n(use `swap` or `type/reset` to clear all)." if "prototype" in self.switches and prototype_success: string += ( " Prototype '%s' was successfully applied over the object type." diff --git a/docs/1.0-dev/_modules/evennia/commands/default/tests.html b/docs/1.0-dev/_modules/evennia/commands/default/tests.html index 48ba2e3dea..ba69fbb72b 100644 --- a/docs/1.0-dev/_modules/evennia/commands/default/tests.html +++ b/docs/1.0-dev/_modules/evennia/commands/default/tests.html @@ -1316,7 +1316,7 @@ "Obj2 = evennia.objects.objects.DefaultExit", "Obj2 changed typeclass from evennia.objects.objects.DefaultObject " "to evennia.objects.objects.DefaultExit.", - cmdstring="swap", + cmdstring="swap", inputs=["yes"], ) self.call(building.CmdTypeclass(), "/list Obj", "Core typeclasses") self.call( @@ -1344,7 +1344,8 @@ building.CmdTypeclass(), "Obj", "Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\n" - "Only the at_object_creation hook was run (update mode). Attributes set before swap were not removed.", + "Only the at_object_creation hook was run (update mode). Attributes set before swap were not removed\n" + "(use `swap` or `type/reset` to clear all).", cmdstring="update", ) self.call( @@ -1352,6 +1353,7 @@ "/reset/force Obj=evennia.objects.objects.DefaultObject", "Obj updated its existing typeclass (evennia.objects.objects.DefaultObject).\n" "All object creation hooks were run. All old attributes where deleted before the swap.", + inputs=["yes"] ) from evennia.prototypes.prototypes import homogenize_prototype @@ -1374,11 +1376,11 @@ self.call( building.CmdTypeclass(), "/prototype Obj=testkey", - "replaced_obj changed typeclass from " - "evennia.objects.objects.DefaultObject to " - "typeclasses.objects.Object.\nAll object creation hooks were " - "run. Attributes set before swap were not removed. Prototype " - "'replaced_obj' was successfully applied over the object type.", + "replaced_obj changed typeclass from evennia.objects.objects.DefaultObject to " + "typeclasses.objects.Object.\nOnly the at_object_creation hook was run " + "(update mode). Attributes set before swap were not removed\n" + "(use `swap` or `type/reset` to clear all). Prototype 'replaced_obj' was " + "successfully applied over the object type." ) assert self.obj1.db.desc == "protdesc" diff --git a/docs/1.0-dev/_modules/evennia/locks/lockfuncs.html b/docs/1.0-dev/_modules/evennia/locks/lockfuncs.html index e69f76d650..8aa364ccd1 100644 --- a/docs/1.0-dev/_modules/evennia/locks/lockfuncs.html +++ b/docs/1.0-dev/_modules/evennia/locks/lockfuncs.html @@ -515,6 +515,24 @@ category = args[1] if len(args) > 1 else None return bool(accessing_obj.tags.get(tagkey, category=category)) +
[docs]def is_ooc(accessing_obj, accessed_obj, *args, **kwargs): + """ + Usage: + is_ooc() + + This is normally used to lock a Command, so it can be used + only when out of character. + """ + obj = accessed_obj.obj if hasattr(accessed_obj, "obj") else accessed_obj + session = obj.session if hasattr(obj, "session") else obj + try: + return not obj.get_puppet(session) + except AttributeError: + try: + return not obj.account.get_puppet(session) + except AttributeError: + pass + return False
[docs]def objtag(accessing_obj, accessed_obj, *args, **kwargs): """ diff --git a/docs/1.0-dev/_modules/evennia/server/portal/amp.html b/docs/1.0-dev/_modules/evennia/server/portal/amp.html index 6474635518..6e8d80c6b2 100644 --- a/docs/1.0-dev/_modules/evennia/server/portal/amp.html +++ b/docs/1.0-dev/_modules/evennia/server/portal/amp.html @@ -47,8 +47,8 @@ """ -from functools import wraps import time +from functools import wraps from twisted.protocols import amp from collections import defaultdict, namedtuple from io import BytesIO @@ -400,6 +400,48 @@ deferred.addCallback(self._safeEmit) deferred.addErrback(self.unhandledError) +
[docs] def stringReceived(self, string): + """ + Overrides the base stringReceived of twisted in order to handle + the strange error reported in https://github.com/evennia/evennia/issues/2053, + which can lead to the amp connection locking up. + + Args: + string (str): the data coming in. + + Notes: + + To test, add the following code to the beginning of + `evennia.server.amp_client.AMPServerClientProtocol.data_to_portal`, then + run multiple commands until the error trigger: + :: + + import random + from twisted.protocols.amp import AmpBox + always_fail = False + if always_fail or random.random() < 0.05: + breaker = AmpBox() + breaker['_answer'.encode()]='13541'.encode() + self.transport.write(breaker.serialize()) + + """ + try: + pto = "proto_" + self.state + statehandler = getattr(self, pto) + except AttributeError: + log.msg("callback", self.state, "not found") + else: + try: + # make sure to catch a KeyError cleanly here + self.state = statehandler(string) + if self.state == "done": + self.transport.loseConnection() + except KeyError as err: + _get_logger().log_err( + f"AMP error (KeyError: {err}). Discarded data (see " + "https://github.com/evennia/evennia/issues/2053)" + )
+
[docs] def dataReceived(self, data): """ Handle non-AMP messages, such as HTTP communication. diff --git a/docs/1.0-dev/_modules/evennia/server/portal/portal.html b/docs/1.0-dev/_modules/evennia/server/portal/portal.html index c253e0c6af..5d2aa9be31 100644 --- a/docs/1.0-dev/_modules/evennia/server/portal/portal.html +++ b/docs/1.0-dev/_modules/evennia/server/portal/portal.html @@ -57,7 +57,7 @@ from twisted.application import internet, service from twisted.internet.task import LoopingCall from twisted.internet import protocol, reactor -from twisted.python.log import ILogObserver +from twisted.logger import globalLogPublisher import django @@ -287,16 +287,16 @@ # what to execute from. application = service.Application("Portal") -# custom logging -if "--nodaemon" not in sys.argv: +if "--nodaemon" not in sys.argv and "test" not in sys.argv: + # activate logging for interactive/testing mode logfile = logger.WeeklyLogFile( os.path.basename(settings.PORTAL_LOG_FILE), os.path.dirname(settings.PORTAL_LOG_FILE), day_rotation=settings.PORTAL_LOG_DAY_ROTATION, max_size=settings.PORTAL_LOG_MAX_SIZE, ) - application.setComponent(ILogObserver, logger.PortalLogObserver(logfile).emit) + globalLogPublisher.addObserver(logger.GetPortalLogObserver()(logfile)) # The main Portal server program. This sets up the database # and is where we store all the other services. diff --git a/docs/1.0-dev/_modules/evennia/server/server.html b/docs/1.0-dev/_modules/evennia/server/server.html index da5e984db2..b3bab78363 100644 --- a/docs/1.0-dev/_modules/evennia/server/server.html +++ b/docs/1.0-dev/_modules/evennia/server/server.html @@ -58,7 +58,7 @@ from twisted.application import internet, service from twisted.internet import reactor, defer from twisted.internet.task import LoopingCall -from twisted.python.log import ILogObserver +from twisted.logger import globalLogPublisher import django @@ -689,15 +689,17 @@ # what to execute from. application = service.Application("Evennia") -if "--nodaemon" not in sys.argv: - # custom logging, but only if we are not running in interactive mode + +if "--nodaemon" not in sys.argv and "test" not in sys.argv: + # activate logging for interactive/testing mode logfile = logger.WeeklyLogFile( os.path.basename(settings.SERVER_LOG_FILE), os.path.dirname(settings.SERVER_LOG_FILE), day_rotation=settings.SERVER_LOG_DAY_ROTATION, max_size=settings.SERVER_LOG_MAX_SIZE, ) - application.setComponent(ILogObserver, logger.ServerLogObserver(logfile).emit) + globalLogPublisher.addObserver(logger.GetServerLogObserver()(logfile)) + # The main evennia server program. This sets up the database # and is where we store all the other services. diff --git a/docs/1.0-dev/_modules/evennia/server/webserver.html b/docs/1.0-dev/_modules/evennia/server/webserver.html index 7050eec0a5..fa1880eb61 100644 --- a/docs/1.0-dev/_modules/evennia/server/webserver.html +++ b/docs/1.0-dev/_modules/evennia/server/webserver.html @@ -318,16 +318,25 @@ Start the pool after the service starts. """ - super().startService() - self.pool.start()
+ try: + super().startService() + self.pool.start() + except Exception: + logger.log_trace("Webserver did not start correctly. Disabling.") + self.stopService()
[docs] def stopService(self): """ Safely stop the pool after the service stops. """ - super().stopService() - self.pool.stop()
+ try: + super().stopService() + except Exception: + logger.log_trace("Webserver stopService error.") + finally: + if self.pool.started: + self.pool.stop()
[docs]class PrivateStaticRoot(static.File): diff --git a/docs/1.0-dev/_modules/evennia/utils/dbserialize.html b/docs/1.0-dev/_modules/evennia/utils/dbserialize.html index 723a8fc8f2..0c692e0ecd 100644 --- a/docs/1.0-dev/_modules/evennia/utils/dbserialize.html +++ b/docs/1.0-dev/_modules/evennia/utils/dbserialize.html @@ -245,6 +245,10 @@ dat = _SaverDict(_parent=parent) dat._data.update((key, process_tree(val, dat)) for key, val in item.items()) return dat + elif dtype == defaultdict: + dat = _SaverDefaultDict(item.default_factory, _parent=parent) + dat._data.update((key, process_tree(val, dat)) for key, val in item.items()) + return dat elif dtype == set: dat = _SaverSet(_parent=parent) dat._data.update(process_tree(val, dat) for val in item) @@ -351,6 +355,25 @@ self._data.update(*args, **kwargs) +class _SaverDefaultDict(_SaverDict): + """ + A defaultdict that stores changes to an attribute when updated + """ + + def __init__(self, factory, *args, **kwargs): + super().__init__(*args, **kwargs) + self._data = defaultdict(factory) + self.default_factory = factory + + def __getitem__(self, key): + if key not in self._data.keys(): + # detect the case of db.foo['a'] with no immediate assignment + # (important: using `key in self._data` would be always True!) + default_value = self._data[key] + self.__setitem__(key, default_value) + return self._data[key] + + class _SaverSet(_SaverMutable, MutableSet): """ A set that saves to an Attribute when updated @@ -449,6 +472,7 @@ _SaverSet.__name__: set, _SaverOrderedDict.__name__: OrderedDict, _SaverDeque.__name__: deque, + _SaverDefaultDict.__name__: defaultdict, } @@ -460,12 +484,15 @@ """ def _iter(obj): + # breakpoint() typ = type(obj) tname = typ.__name__ if tname in ("_SaverDict", "dict"): return {_iter(key): _iter(val) for key, val in obj.items()} elif tname in ("_SaverOrderedDict", "OrderedDict"): return OrderedDict([(_iter(key), _iter(val)) for key, val in obj.items()]) + elif tname in ("_SaverDefaultDict", "defaultdict"): + return defaultdict(obj.default_factory, {_iter(key): _iter(val) for key, val in obj.items()}) elif tname in _DESERIALIZE_MAPPING: return _DESERIALIZE_MAPPING[tname](_iter(val) for val in obj) elif is_iter(obj): @@ -626,6 +653,8 @@ return [process_item(val) for val in item] elif dtype in (dict, _SaverDict): return dict((process_item(key), process_item(val)) for key, val in item.items()) + elif dtype in (defaultdict, _SaverDefaultDict): + return defaultdict(item.default_factory, ((process_item(key), process_item(val)) for key, val in item.items())) elif dtype in (set, _SaverSet): return set(process_item(val) for val in item) elif dtype in (OrderedDict, _SaverOrderedDict): @@ -677,6 +706,7 @@ def process_item(item): """Recursive processor and identification of data""" + # breakpoint() dtype = type(item) if dtype in (str, int, float, bool, bytes, SafeString): return item @@ -689,6 +719,8 @@ return tuple(process_item(val) for val in item) elif dtype == dict: return dict((process_item(key), process_item(val)) for key, val in item.items()) + elif dtype == defaultdict: + return defaultdict(item.default_factory, ((process_item(key), process_item(val)) for key, val in item.items())) elif dtype == set: return set(process_item(val) for val in item) elif dtype == OrderedDict: @@ -706,6 +738,7 @@ def process_tree(item, parent): """Recursive processor, building a parent-tree from iterable data""" + # breakpoint() dtype = type(item) if dtype in (str, int, float, bool, bytes, SafeString): return item @@ -724,6 +757,12 @@ (process_item(key), process_tree(val, dat)) for key, val in item.items() ) return dat + elif dtype == defaultdict: + dat = _SaverDefaultDict(item.default_factory, _parent=parent) + dat._data.update( + (process_item(key), process_tree(val, dat)) for key, val in item.items() + ) + return dat elif dtype == set: dat = _SaverSet(_parent=parent) dat._data.update(set(process_tree(val, dat) for val in item)) @@ -763,6 +802,12 @@ (process_item(key), process_tree(val, dat)) for key, val in data.items() ) return dat + elif dtype == defaultdict: + dat = _SaverDefaultDict(data.default_factory, _db_obj=db_obj) + dat._data.update( + (process_item(key), process_tree(val, dat)) for key, val in data.items() + ) + return dat elif dtype == set: dat = _SaverSet(_db_obj=db_obj) dat._data.update(process_tree(val, dat) for val in data) diff --git a/docs/1.0-dev/_modules/evennia/utils/logger.html b/docs/1.0-dev/_modules/evennia/utils/logger.html index 0d4d1973c0..7188098ff1 100644 --- a/docs/1.0-dev/_modules/evennia/utils/logger.html +++ b/docs/1.0-dev/_modules/evennia/utils/logger.html @@ -60,16 +60,213 @@ import time from datetime import datetime from traceback import format_exc -from twisted.python import log, logfile +from twisted import logger as twisted_logger +from twisted.python import logfile from twisted.python import util as twisted_util from twisted.internet.threads import deferToThread +log = twisted_logger.Logger() _LOGDIR = None _LOG_ROTATE_SIZE = None _TIMEZONE = None _CHANNEL_LOG_NUM_TAIL_LINES = None +_TIME_FORMAT = "%Y-%m-%d %H:%M:%S" + + +def _log(msg, logfunc, prefix="", **kwargs): + try: + msg = str(msg) + except Exception as err: + msg = str(e) + if kwargs: + logfunc(msg, **kwargs) + else: + try: + for line in msg.splitlines(): + logfunc("{line}", prefix=prefix, line=line) + except Exception as err: + log.error("Log failure: {err}", err=err) + + +# log call functions (each has legacy aliases) + +
[docs]def log_info(msg, **kwargs): + """ + Logs any generic debugging/informative info that should appear in the log. + + Args: + msg: (string) The message to be logged. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + _log(msg, log.info, **kwargs)
+ +info = log_info +log_infomsg = log_info +log_msg = log_info + + +
[docs]def log_warn(msg, **kwargs): + """ + Logs warnings that aren't critical but should be noted. + + Args: + msg (str): The message to be logged. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + _log(msg, log.warn, **kwargs)
+ +warn = log_warn +warning = log_warn +log_warnmsg = log_warn + + +
[docs]def log_err(msg, **kwargs): + """ + Logs an error message to the server log. + + Args: + msg (str): The message to be logged. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + _log(msg, log.error, **kwargs)
+ + +error = log_err +err = log_err +log_errmsg = log_err + + +
[docs]def log_trace(msg=None, **kwargs): + """ + Log a traceback to the log. This should be called from within an + exception. + + Args: + msg (str, optional): Adds an extra line with added info + at the end of the traceback in the log. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + tracestring = format_exc() + if tracestring: + _log(tracestring, log.error, prefix="!!", **kwargs) + if msg: + _log(msg, log.error, prefix="!!", **kwargs)
+ +log_tracemsg = log_trace +exception = log_trace +critical = log_trace +trace = log_trace + + +
[docs]def log_dep(msg, **kwargs): + """ + Prints a deprecation message. + + Args: + msg (str): The deprecation message to log. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + _log(msg, log.warn, prefix="DP", **kwargs)
+ + +dep = log_dep +deprecated = log_dep +log_depmsg = log_dep + + +
[docs]def log_sec(msg, **kwargs): + """ + Prints a security-related message. + + Args: + msg (str): The security message to log. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + + """ + _log(msg, log.info, prefix="SS", **kwargs)
+ +sec = log_sec +security = log_sec +log_secmsg = log_sec + + +
[docs]def log_server(msg, **kwargs): + """ + This is for the Portal to log captured Server stdout messages (it's + usually only used during startup, before Server log is open) + + Args: + msg (str): The message to be logged. + **kwargs: If given, The `msg` is parsed as a format string with `{..}` + formatting markers that should match the keywords. + """ + _log(msg, log.info, prefix="Server", **kwargs)
+ + + +
[docs]class GetLogObserver: + """ + Sets up how the system logs are formatted. + + """ + component_prefix = "" + event_levels = { + twisted_logger.LogLevel.debug: "??", + twisted_logger.LogLevel.info: "..", + twisted_logger.LogLevel.warn: "WW", + twisted_logger.LogLevel.error: "EE", + twisted_logger.LogLevel.critical: "!!", + } + +
[docs] def format_log_event(self, event): + """ + By assigning log_system here, we skip the spammy display of namespace/level + in the default log output. + + [component_prefix] [date] [system/lvl] [msg] + + """ + # setting log_system fills the [..] block after the time stamp + prefix = event.get("prefix", "") + if prefix: + event["log_system"] = prefix + else: + lvl = event.get("log_level", twisted_logger.LogLevel.info) + event["log_system"] = self.event_levels.get(lvl, "-") + event["log_format"] = str(event.get("log_format", "")) + component_prefix = self.component_prefix or "" + log_msg = twisted_logger.formatEventAsClassicLogText( + event, + formatTime=lambda e: twisted_logger.formatTime(e, _TIME_FORMAT) + ) + return f"{component_prefix}{log_msg}"
+ + def __call__(self, outfile): + return twisted_logger.FileLogObserver(outfile, self.format_log_event)
+ + +# Called by server/portal on startup + +
[docs]class GetPortalLogObserver(GetLogObserver): + component_prefix = "|Portal| "
+ +
[docs]class GetServerLogObserver(GetLogObserver): + component_prefix = ""
+ + # logging overrides @@ -79,7 +276,7 @@ This helper function will format the current time in the same way as the twisted logger does, including time zone info. Only difference from official logger is that we only use two digits - for the year and don't show timezone for CET times. + for the year and don't show timezone for GMT times. Args: when (int, optional): This is a time in POSIX seconds on the form @@ -197,196 +394,6 @@ self.lastDate = max(self.lastDate, self.toDate()) self.size += len(data)
- -
[docs]class PortalLogObserver(log.FileLogObserver): - """ - Reformat logging - - """ - - timeFormat = None - prefix = " |Portal| " - -
[docs] def emit(self, eventDict): - """ - Copied from Twisted parent, to change logging output - - """ - text = log.textFromEventDict(eventDict) - if text is None: - return - - # timeStr = self.formatTime(eventDict["time"]) - timeStr = timeformat(eventDict["time"]) - fmtDict = {"text": text.replace("\n", "\n\t")} - - msgStr = log._safeFormat("%(text)s\n", fmtDict) - - twisted_util.untilConcludes(self.write, timeStr + "%s" % self.prefix + msgStr) - twisted_util.untilConcludes(self.flush)
- - -
[docs]class ServerLogObserver(PortalLogObserver): - prefix = " "
- - -
[docs]def log_msg(msg): - """ - Wrapper around log.msg call to catch any exceptions that might - occur in logging. If an exception is raised, we'll print to - stdout instead. - - Args: - msg: The message that was passed to log.msg - - """ - try: - log.msg(msg) - except Exception: - print("Exception raised while writing message to log. Original message: %s" % msg)
- - -
[docs]def log_trace(errmsg=None): - """ - Log a traceback to the log. This should be called from within an - exception. - - Args: - errmsg (str, optional): Adds an extra line with added info - at the end of the traceback in the log. - - """ - tracestring = format_exc() - try: - if tracestring: - for line in tracestring.splitlines(): - log.msg("[::] %s" % line) - if errmsg: - try: - errmsg = str(errmsg) - except Exception as e: - errmsg = str(e) - for line in errmsg.splitlines(): - log_msg("[EE] %s" % line) - except Exception: - log_msg("[EE] %s" % errmsg)
- - -log_tracemsg = log_trace - - -
[docs]def log_err(errmsg): - """ - Prints/logs an error message to the server log. - - Args: - errmsg (str): The message to be logged. - - """ - try: - errmsg = str(errmsg) - except Exception as e: - errmsg = str(e) - for line in errmsg.splitlines(): - log_msg("[EE] %s" % line)
- - # log.err('ERROR: %s' % (errmsg,)) - - -log_errmsg = log_err - - -
[docs]def log_server(servermsg): - """ - This is for the Portal to log captured Server stdout messages (it's - usually only used during startup, before Server log is open) - - """ - try: - servermsg = str(servermsg) - except Exception as e: - servermsg = str(e) - for line in servermsg.splitlines(): - log_msg("[Server] %s" % line)
- - -
[docs]def log_warn(warnmsg): - """ - Prints/logs any warnings that aren't critical but should be noted. - - Args: - warnmsg (str): The message to be logged. - - """ - try: - warnmsg = str(warnmsg) - except Exception as e: - warnmsg = str(e) - for line in warnmsg.splitlines(): - log_msg("[WW] %s" % line)
- - # log.msg('WARNING: %s' % (warnmsg,)) - - -log_warnmsg = log_warn - - -
[docs]def log_info(infomsg): - """ - Prints any generic debugging/informative info that should appear in the log. - - infomsg: (string) The message to be logged. - - """ - try: - infomsg = str(infomsg) - except Exception as e: - infomsg = str(e) - for line in infomsg.splitlines(): - log_msg("[..] %s" % line)
- - -log_infomsg = log_info - - -
[docs]def log_dep(depmsg): - """ - Prints a deprecation message. - - Args: - depmsg (str): The deprecation message to log. - - """ - try: - depmsg = str(depmsg) - except Exception as e: - depmsg = str(e) - for line in depmsg.splitlines(): - log_msg("[DP] %s" % line)
- - -log_depmsg = log_dep - - -
[docs]def log_sec(secmsg): - """ - Prints a security-related message. - - Args: - secmsg (str): The security message to log. - - """ - try: - secmsg = str(secmsg) - except Exception as e: - secmsg = str(e) - for line in secmsg.splitlines(): - log_msg("[SS] %s" % line)
- - -log_secmsg = log_sec - - # Arbitrary file logger diff --git a/docs/1.0-dev/_modules/evennia/utils/test_resources.html b/docs/1.0-dev/_modules/evennia/utils/test_resources.html index f49d42f486..f1483ff468 100644 --- a/docs/1.0-dev/_modules/evennia/utils/test_resources.html +++ b/docs/1.0-dev/_modules/evennia/utils/test_resources.html @@ -138,8 +138,9 @@ "evennia.game_template.server.conf.prototypefuncs", ], BASE_GUEST_TYPECLASS="evennia.accounts.accounts.DefaultGuest", - # a special flag; test with settings._TEST_ENVIRONMENT to see if code runs in a test - _TEST_ENVIRONMENT=True, + + # a special setting boolean _TEST_ENVIRONMENT is set by the test runner + # while the test suite is running. ) DEFAULT_SETTINGS = {**all_from_module(settings_default), **DEFAULT_SETTING_RESETS} diff --git a/docs/1.0-dev/_modules/evennia/utils/text2html.html b/docs/1.0-dev/_modules/evennia/utils/text2html.html index febd201aa8..fd6436d5a5 100644 --- a/docs/1.0-dev/_modules/evennia/utils/text2html.html +++ b/docs/1.0-dev/_modules/evennia/utils/text2html.html @@ -144,6 +144,7 @@ re.S | re.M | re.I, ) re_dblspace = re.compile(r" {2,}", re.M) + re_invisiblespace = re.compile(r"( <.*?>)( )") re_url = re.compile( r'(?<!=")((?:ftp|www|https?)\W+(?:(?!\.(?:\s|$)|&\w+;)[^"\',;$*^\\(){}<>\[\]\s])+)(\.(?:\s|$)|&\w+;|)' ) @@ -313,6 +314,13 @@ """ return self.re_dblspace.sub(self.sub_dblspace, text) +
[docs] def re_invisible_space(self, text): + """ + If two spaces are separated by an invisble html element, they act as a + hidden double-space and the last of them should be replaced by &nbsp; + """ + return self.re_invisiblespace.sub(self.sub_invisiblespace, text)
+ +
[docs] def sub_invisiblespace(self, match): + "clean up invisible spaces" + return match.group(1) + "&nbsp;"
+
[docs] def parse(self, text, strip_ansi=False): """ Main access function, converts a text containing ANSI codes @@ -389,7 +401,10 @@ Returns: text (str): Parsed text. + """ + # print(f"incoming ansi:\n{text}") + # parse everything to ansi first text = parse_ansi(text, strip_ansi=strip_ansi, xterm256=True, mxp=True) # convert all ansi to html @@ -406,8 +421,9 @@ result = self.remove_backspaces(result) result = self.convert_urls(result) result = self.re_double_space(result) + result = self.re_invisible_space(result) # clean out eventual ansi that was missed - # result = parse_ansi(result, strip_ansi=True) + ## result = parse_ansi(result, strip_ansi=True) return result
diff --git a/docs/1.0-dev/_sources/Coding/Changelog.md.txt b/docs/1.0-dev/_sources/Coding/Changelog.md.txt index 50319103bc..75b36c65c7 100644 --- a/docs/1.0-dev/_sources/Coding/Changelog.md.txt +++ b/docs/1.0-dev/_sources/Coding/Changelog.md.txt @@ -153,6 +153,12 @@ Up requirements to Django 4.0+, Twisted 22+, Python 3.9 or 3.10 decouple structures from database without needing separate import. - Add `run_in_main_thread` as a helper for those wanting to code server code from a web view. +- Update `evennia.utils.logger` to use Twisted's new logging API. No change in Evennia API + except more standard aliases logger.error/info/exception/debug etc can now be used. +- Have `type/force` default to `update`-mode rather than `reset`mode and add more verbose + warning when using reset mode. +- Attribute storage support defaultdics (Hendher) +- Add `is_ooc` lockfunc (meant for limiting commands at the OOC level) ## Evennia 0.9.5 diff --git a/docs/1.0-dev/api/evennia.commands.default.account.html b/docs/1.0-dev/api/evennia.commands.default.account.html index f1fc66fbaa..4b41f8be9e 100644 --- a/docs/1.0-dev/api/evennia.commands.default.account.html +++ b/docs/1.0-dev/api/evennia.commands.default.account.html @@ -84,7 +84,7 @@ method. Otherwise all text will be returned to all connected sessions.

-aliases = ['ls', 'l']
+aliases = ['l', 'ls']
@@ -115,7 +115,7 @@ method. Otherwise all text will be returned to all connected sessions.

-search_index_entry = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'no_prefix': ' ls l', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}
+search_index_entry = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'no_prefix': ' l ls', 'tags': '', 'text': '\n look while out-of-character\n\n Usage:\n look\n\n Look in the ooc state.\n '}
diff --git a/docs/1.0-dev/api/evennia.commands.default.building.html b/docs/1.0-dev/api/evennia.commands.default.building.html index 320e883999..ff0e3a80cc 100644 --- a/docs/1.0-dev/api/evennia.commands.default.building.html +++ b/docs/1.0-dev/api/evennia.commands.default.building.html @@ -543,7 +543,7 @@ You can specify the /force switch to bypass this confirmation.

-aliases = ['@delete', '@del']
+aliases = ['@del', '@delete']
@@ -584,7 +584,7 @@ You can specify the /force switch to bypass this confirmation.

-search_index_entry = {'aliases': '@delete @del', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy delete del', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}
+search_index_entry = {'aliases': '@del @delete', 'category': 'building', 'key': '@destroy', 'no_prefix': 'destroy del delete', 'tags': '', 'text': '\n permanently delete objects\n\n Usage:\n destroy[/switches] [obj, obj2, obj3, [dbref-dbref], ...]\n\n Switches:\n override - The destroy command will usually avoid accidentally\n destroying account objects. This switch overrides this safety.\n force - destroy without confirmation.\n Examples:\n destroy house, roof, door, 44-78\n destroy 5-10, flower, 45\n destroy/force north\n\n Destroys one or many objects. If dbrefs are used, a range to delete can be\n given, e.g. 4-10. Also the end points will be deleted. This command\n displays a confirmation before destroying, to make sure of your choice.\n You can specify the /force switch to bypass this confirmation.\n '}
@@ -1296,7 +1296,7 @@ server settings.

-aliases = ['@swap', '@parent', '@typeclasses', '@update', '@type']
+aliases = ['@typeclasses', '@swap', '@update', '@type', '@parent']
@@ -1327,7 +1327,7 @@ server settings.

-search_index_entry = {'aliases': '@swap @parent @typeclasses @update @type', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass swap parent typeclasses update type', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}
+search_index_entry = {'aliases': '@typeclasses @swap @update @type @parent', 'category': 'building', 'key': '@typeclass', 'no_prefix': 'typeclass typeclasses swap update type parent', 'tags': '', 'text': "\n set or change an object's typeclass\n\n Usage:\n typeclass[/switch] <object> [= typeclass.path]\n typeclass/prototype <object> = prototype_key\n\n typeclasses or typeclass/list/show [typeclass.path]\n swap - this is a shorthand for using /force/reset flags.\n update - this is a shorthand for using the /force/reload flag.\n\n Switch:\n show, examine - display the current typeclass of object (default) or, if\n given a typeclass path, show the docstring of that typeclass.\n update - *only* re-run at_object_creation on this object\n meaning locks or other properties set later may remain.\n reset - clean out *all* the attributes and properties on the\n object - basically making this a new clean object. This will also\n reset cmdsets!\n force - change to the typeclass also if the object\n already has a typeclass of the same name.\n list - show available typeclasses. Only typeclasses in modules actually\n imported or used from somewhere in the code will show up here\n (those typeclasses are still available if you know the path)\n prototype - clean and overwrite the object with the specified\n prototype key - effectively making a whole new object.\n\n Example:\n type button = examples.red_button.RedButton\n type/prototype button=a red button\n\n If the typeclass_path is not given, the current object's typeclass is\n assumed.\n\n View or set an object's typeclass. If setting, the creation hooks of the\n new typeclass will be run on the object. If you have clashing properties on\n the old class, use /reset. By default you are protected from changing to a\n typeclass of the same name as the one you already have - use /force to\n override this protection.\n\n The given typeclass must be identified by its location using python\n dot-notation pointing to the correct module and class. If no typeclass is\n given (or a wrong typeclass is given). Errors in the path or new typeclass\n will lead to the old typeclass being kept. The location of the typeclass\n module is searched from the default typeclass directory, as defined in the\n server settings.\n\n "}
diff --git a/docs/1.0-dev/api/evennia.commands.default.comms.html b/docs/1.0-dev/api/evennia.commands.default.comms.html index ff10724b0c..83ac570173 100644 --- a/docs/1.0-dev/api/evennia.commands.default.comms.html +++ b/docs/1.0-dev/api/evennia.commands.default.comms.html @@ -207,7 +207,7 @@ ban mychannel1,mychannel2= EvilUser : Was banned for spamming.

-aliases = ['@chan', '@channels']
+aliases = ['@channels', '@chan']
@@ -733,7 +733,7 @@ don’t actually sub to yet.

-search_index_entry = {'aliases': '@chan @channels', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel chan channels', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
+search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
@@ -886,7 +886,7 @@ ban mychannel1,mychannel2= EvilUser : Was banned for spamming.

-aliases = ['@chan', '@channels']
+aliases = ['@channels', '@chan']
@@ -906,7 +906,7 @@ ban mychannel1,mychannel2= EvilUser : Was banned for spamming.

-search_index_entry = {'aliases': '@chan @channels', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel chan channels', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
+search_index_entry = {'aliases': '@channels @chan', 'category': 'comms', 'key': '@channel', 'no_prefix': 'channel channels chan', 'tags': '', 'text': "\n Use and manage in-game channels.\n\n Usage:\n channel channelname <msg>\n channel channel name = <msg>\n channel (show all subscription)\n channel/all (show available channels)\n channel/alias channelname = alias[;alias...]\n channel/unalias alias\n channel/who channelname\n channel/history channelname [= index]\n channel/sub channelname [= alias[;alias...]]\n channel/unsub channelname[,channelname, ...]\n channel/mute channelname[,channelname,...]\n channel/unmute channelname[,channelname,...]\n\n channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n channel/desc channelname = description\n channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n channel/ban channelname (list bans)\n channel/ban[/quiet] channelname[, channelname, ...] = subscribername [: reason]\n channel/unban[/quiet] channelname[, channelname, ...] = subscribername\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n\n # subtopics\n\n ## sending\n\n Usage: channel channelname msg\n channel channel name = msg (with space in channel name)\n\n This sends a message to the channel. Note that you will rarely use this\n command like this; instead you can use the alias\n\n channelname <msg>\n channelalias <msg>\n\n For example\n\n public Hello World\n pub Hello World\n\n (this shortcut doesn't work for aliases containing spaces)\n\n See channel/alias for help on setting channel aliases.\n\n ## alias and unalias\n\n Usage: channel/alias channel = alias[;alias[;alias...]]\n channel/unalias alias\n channel - this will list your subs and aliases to each channel\n\n Set one or more personal aliases for referencing a channel. For example:\n\n channel/alias warrior's guild = warrior;wguild;warchannel;warrior guild\n\n You can now send to the channel using all of these:\n\n warrior's guild Hello\n warrior Hello\n wguild Hello\n warchannel Hello\n\n Note that this will not work if the alias has a space in it. So the\n 'warrior guild' alias must be used with the `channel` command:\n\n channel warrior guild = Hello\n\n Channel-aliases can be removed one at a time, using the '/unalias' switch.\n\n ## who\n\n Usage: channel/who channelname\n\n List the channel's subscribers. Shows who are currently offline or are\n muting the channel. Subscribers who are 'muting' will not see messages sent\n to the channel (use channel/mute to mute a channel).\n\n ## history\n\n Usage: channel/history channel [= index]\n\n This will display the last |c20|n lines of channel history. By supplying an\n index number, you will step that many lines back before viewing those 20 lines.\n\n For example:\n\n channel/history public = 35\n\n will go back 35 lines and show the previous 20 lines from that point (so\n lines -35 to -55).\n\n ## sub and unsub\n\n Usage: channel/sub channel [=alias[;alias;...]]\n channel/unsub channel\n\n This subscribes you to a channel and optionally assigns personal shortcuts\n for you to use to send to that channel (see aliases). When you unsub, all\n your personal aliases will also be removed.\n\n ## mute and unmute\n\n Usage: channel/mute channelname\n channel/unmute channelname\n\n Muting silences all output from the channel without actually\n un-subscribing. Other channel members will see that you are muted in the /who\n list. Sending a message to the channel will automatically unmute you.\n\n ## create and destroy\n\n Usage: channel/create channelname[;alias;alias[:typeclass]] [= description]\n channel/destroy channelname [= reason]\n\n Creates a new channel (or destroys one you control). You will automatically\n join the channel you create and everyone will be kicked and loose all aliases\n to a destroyed channel.\n\n ## lock and unlock\n\n Usage: channel/lock channelname = lockstring\n channel/unlock channelname = lockstring\n\n Note: this is an admin command.\n\n A lockstring is on the form locktype:lockfunc(). Channels understand three\n locktypes:\n listen - who may listen or join the channel.\n send - who may send messages to the channel\n control - who controls the channel. This is usually the one creating\n the channel.\n\n Common lockfuncs are all() and perm(). To make a channel everyone can\n listen to but only builders can talk on, use this:\n\n listen:all()\n send: perm(Builders)\n\n ## boot and ban\n\n Usage:\n channel/boot[/quiet] channelname[,channelname,...] = subscribername [: reason]\n channel/ban channelname[, channelname, ...] = subscribername [: reason]\n channel/unban channelname[, channelname, ...] = subscribername\n channel/unban channelname\n channel/ban channelname (list bans)\n\n Booting will kick a named subscriber from channel(s) temporarily. The\n 'reason' will be passed to the booted user. Unless the /quiet switch is\n used, the channel will also be informed of the action. A booted user is\n still able to re-connect, but they'll have to set up their aliases again.\n\n Banning will blacklist a user from (re)joining the provided channels. It\n will then proceed to boot them from those channels if they were connected.\n The 'reason' and `/quiet` works the same as for booting.\n\n Example:\n boot mychannel1 = EvilUser : Kicking you to cool down a bit.\n ban mychannel1,mychannel2= EvilUser : Was banned for spamming.\n\n "}
diff --git a/docs/1.0-dev/api/evennia.commands.default.general.html b/docs/1.0-dev/api/evennia.commands.default.general.html index 1373df54de..55f5deb07e 100644 --- a/docs/1.0-dev/api/evennia.commands.default.general.html +++ b/docs/1.0-dev/api/evennia.commands.default.general.html @@ -126,7 +126,7 @@ look *<account&g
-aliases = ['ls', 'l']
+aliases = ['l', 'ls']
@@ -157,7 +157,7 @@ look *<account&g
-search_index_entry = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'no_prefix': ' ls l', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}
+search_index_entry = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'no_prefix': ' l ls', 'tags': '', 'text': '\n look at location or object\n\n Usage:\n look\n look <obj>\n look *<account>\n\n Observes your location or objects in your vicinity.\n '}
@@ -219,7 +219,7 @@ for everyone to use, you need build privileges and the alias command.

-aliases = ['nicks', 'nickname']
+aliases = ['nickname', 'nicks']
@@ -251,7 +251,7 @@ for everyone to use, you need build privileges and the alias command.

-search_index_entry = {'aliases': 'nicks nickname', 'category': 'general', 'key': 'nick', 'no_prefix': ' nicks nickname', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}
+search_index_entry = {'aliases': 'nickname nicks', 'category': 'general', 'key': 'nick', 'no_prefix': ' nickname nicks', 'tags': '', 'text': '\n define a personal alias/nick by defining a string to\n match and replace it with another on the fly\n\n Usage:\n nick[/switches] <string> [= [replacement_string]]\n nick[/switches] <template> = <replacement_template>\n nick/delete <string> or number\n nicks\n\n Switches:\n inputline - replace on the inputline (default)\n object - replace on object-lookup\n account - replace on account-lookup\n list - show all defined aliases (also "nicks" works)\n delete - remove nick by index in /list\n clearall - clear all nicks\n\n Examples:\n nick hi = say Hello, I\'m Sarah!\n nick/object tom = the tall man\n nick build $1 $2 = create/drop $1;$2\n nick tell $1 $2=page $1=$2\n nick tm?$1=page tallman=$1\n nick tm\\=$1=page tallman=$1\n\n A \'nick\' is a personal string replacement. Use $1, $2, ... to catch arguments.\n Put the last $-marker without an ending space to catch all remaining text. You\n can also use unix-glob matching for the left-hand side <string>:\n\n * - matches everything\n ? - matches 0 or 1 single characters\n [abcd] - matches these chars in any order\n [!abcd] - matches everything not among these chars\n \\= - escape literal \'=\' you want in your <string>\n\n Note that no objects are actually renamed or changed by this command - your nicks\n are only available to you. If you want to permanently add keywords to an object\n for everyone to use, you need build privileges and the alias command.\n\n '}
@@ -274,7 +274,7 @@ inv

-aliases = ['i', 'inv']
+aliases = ['inv', 'i']
@@ -305,7 +305,7 @@ inv

-search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
+search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
@@ -549,7 +549,7 @@ placing it in their inventory.

-aliases = ["'", '"']
+aliases = ['"', "'"]
@@ -580,7 +580,7 @@ placing it in their inventory.

-search_index_entry = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'no_prefix': ' \' "', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}
+search_index_entry = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'no_prefix': ' " \'', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}
@@ -660,7 +660,7 @@ automatically begin with your name.

-aliases = ['emote', ':']
+aliases = [':', 'emote']
@@ -701,7 +701,7 @@ space.

-search_index_entry = {'aliases': 'emote :', 'category': 'general', 'key': 'pose', 'no_prefix': ' emote :', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}
+search_index_entry = {'aliases': ': emote', 'category': 'general', 'key': 'pose', 'no_prefix': ' : emote', 'tags': '', 'text': "\n strike a pose\n\n Usage:\n pose <pose text>\n pose's <pose text>\n\n Example:\n pose is standing by the wall, smiling.\n -> others will see:\n Tom is standing by the wall, smiling.\n\n Describe an action being taken. The pose text will\n automatically begin with your name.\n "}
@@ -724,7 +724,7 @@ which permission groups you are a member of.

-aliases = ['hierarchy', 'groups']
+aliases = ['groups', 'hierarchy']
@@ -755,7 +755,7 @@ which permission groups you are a member of.

-search_index_entry = {'aliases': 'hierarchy groups', 'category': 'general', 'key': 'access', 'no_prefix': ' hierarchy groups', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}
+search_index_entry = {'aliases': 'groups hierarchy', 'category': 'general', 'key': 'access', 'no_prefix': ' groups hierarchy', 'tags': '', 'text': '\n show your current game access\n\n Usage:\n access\n\n This command shows you the permission hierarchy and\n which permission groups you are a member of.\n '}
diff --git a/docs/1.0-dev/api/evennia.commands.default.tests.html b/docs/1.0-dev/api/evennia.commands.default.tests.html index 83d4831cc2..0434a08c5f 100644 --- a/docs/1.0-dev/api/evennia.commands.default.tests.html +++ b/docs/1.0-dev/api/evennia.commands.default.tests.html @@ -747,7 +747,7 @@ main test suite started with

Test the batch processor.

-red_button = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmpy36fbtw0/1d2de8bf6249ec7a9aea4a7b7457ff5f2ebba60d/evennia/contrib/tutorials/red_button/red_button.py'>
+red_button = <module 'evennia.contrib.tutorials.red_button.red_button' from '/tmp/tmprjjqyyjm/4473aab19d8efefacfd6598666fcaa09ef222ec5/evennia/contrib/tutorials/red_button/red_button.py'>
diff --git a/docs/1.0-dev/api/evennia.commands.default.unloggedin.html b/docs/1.0-dev/api/evennia.commands.default.unloggedin.html index bdc529221b..737db5b96a 100644 --- a/docs/1.0-dev/api/evennia.commands.default.unloggedin.html +++ b/docs/1.0-dev/api/evennia.commands.default.unloggedin.html @@ -73,7 +73,7 @@ connect “account name” “pass word”

-aliases = ['con', 'conn', 'co']
+aliases = ['conn', 'con', 'co']
@@ -108,7 +108,7 @@ there is no object yet before the account has logged in)

-search_index_entry = {'aliases': 'con conn co', 'category': 'general', 'key': 'connect', 'no_prefix': ' con conn co', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
+search_index_entry = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn con co', 'tags': '', 'text': '\n connect to the game\n\n Usage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\n Use the create command to first create an account before logging in.\n\n If you have spaces in your name, enclose it in double quotes.\n '}
@@ -286,7 +286,7 @@ for simplicity. It shows a pane of info.

-aliases = ['?', 'h']
+aliases = ['h', '?']
@@ -312,7 +312,7 @@ for simplicity. It shows a pane of info.

-search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
+search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n get help when in unconnected-in state\n\n Usage:\n help\n\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.base_systems.email_login.email_login.html b/docs/1.0-dev/api/evennia.contrib.base_systems.email_login.email_login.html index ce59e625d1..e12d5de533 100644 --- a/docs/1.0-dev/api/evennia.contrib.base_systems.email_login.email_login.html +++ b/docs/1.0-dev/api/evennia.contrib.base_systems.email_login.email_login.html @@ -90,7 +90,7 @@ the module given by settings.CONNECTION_SCREEN_MODULE.

-aliases = ['con', 'conn', 'co']
+aliases = ['conn', 'con', 'co']
@@ -120,7 +120,7 @@ there is no object yet before the account has logged in)

-search_index_entry = {'aliases': 'con conn co', 'category': 'general', 'key': 'connect', 'no_prefix': ' con conn co', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}
+search_index_entry = {'aliases': 'conn con co', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn con co', 'tags': '', 'text': '\n Connect to the game.\n\n Usage (at login screen):\n connect <email> <password>\n\n Use the create command to first create an account before logging in.\n '}
@@ -286,7 +286,7 @@ for simplicity. It shows a pane of info.

-aliases = ['?', 'h']
+aliases = ['h', '?']
@@ -312,7 +312,7 @@ for simplicity. It shows a pane of info.

-search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
+search_index_entry = {'aliases': 'h ?', 'category': 'general', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n This is an unconnected version of the help command,\n for simplicity. It shows a pane of info.\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.base_systems.ingame_python.commands.html b/docs/1.0-dev/api/evennia.contrib.base_systems.ingame_python.commands.html index f7befa7b2d..9a3c68aeb8 100644 --- a/docs/1.0-dev/api/evennia.contrib.base_systems.ingame_python.commands.html +++ b/docs/1.0-dev/api/evennia.contrib.base_systems.ingame_python.commands.html @@ -67,7 +67,7 @@
-aliases = ['@callback', '@calls', '@callbacks']
+aliases = ['@callback', '@callbacks', '@calls']
@@ -148,7 +148,7 @@ on user permission.

-search_index_entry = {'aliases': '@callback @calls @callbacks', 'category': 'building', 'key': '@call', 'no_prefix': 'call callback calls callbacks', 'tags': '', 'text': '\n Command to edit callbacks.\n '}
+search_index_entry = {'aliases': '@callback @callbacks @calls', 'category': 'building', 'key': '@call', 'no_prefix': 'call callback callbacks calls', 'tags': '', 'text': '\n Command to edit callbacks.\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.full_systems.evscaperoom.commands.html b/docs/1.0-dev/api/evennia.contrib.full_systems.evscaperoom.commands.html index 3e9a2dd28d..b4820045c5 100644 --- a/docs/1.0-dev/api/evennia.contrib.full_systems.evscaperoom.commands.html +++ b/docs/1.0-dev/api/evennia.contrib.full_systems.evscaperoom.commands.html @@ -162,7 +162,7 @@ the operation will be general or on the room.

-aliases = ['chicken out', 'q', 'quit', 'abort']
+aliases = ['q', 'quit', 'abort', 'chicken out']
@@ -186,7 +186,7 @@ set in self.parse())

-search_index_entry = {'aliases': 'chicken out q quit abort', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' chicken out q quit abort', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}
+search_index_entry = {'aliases': 'q quit abort chicken out', 'category': 'evscaperoom', 'key': 'give up', 'no_prefix': ' q quit abort chicken out', 'tags': '', 'text': '\n Give up\n\n Usage:\n give up\n\n Abandons your attempts at escaping and of ever winning the pie-eating contest.\n\n '}
@@ -207,7 +207,7 @@ set in self.parse())

-aliases = ['ls', 'l']
+aliases = ['l', 'ls']
@@ -241,7 +241,7 @@ set in self.parse())

-search_index_entry = {'aliases': 'ls l', 'category': 'evscaperoom', 'key': 'look', 'no_prefix': ' ls l', 'tags': '', 'text': '\n Look at the room, an object or the currently focused object\n\n Usage:\n look [obj]\n\n '}
+search_index_entry = {'aliases': 'l ls', 'category': 'evscaperoom', 'key': 'look', 'no_prefix': ' l ls', 'tags': '', 'text': '\n Look at the room, an object or the currently focused object\n\n Usage:\n look [obj]\n\n '}
@@ -322,7 +322,7 @@ shout

-aliases = [';', 'shout', 'whisper']
+aliases = ['whisper', 'shout', ';']
@@ -351,7 +351,7 @@ set in self.parse())

-search_index_entry = {'aliases': '; shout whisper', 'category': 'general', 'key': 'say', 'no_prefix': ' ; shout whisper', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}
+search_index_entry = {'aliases': 'whisper shout ;', 'category': 'general', 'key': 'say', 'no_prefix': ' whisper shout ;', 'tags': '', 'text': '\n Perform an communication action.\n\n Usage:\n say <text>\n whisper\n shout\n\n '}
@@ -441,7 +441,7 @@ looks and what actions is available.

-aliases = ['unfocus', 'ex', 'examine', 'e']
+aliases = ['examine', 'ex', 'e', 'unfocus']
@@ -470,7 +470,7 @@ set in self.parse())

-search_index_entry = {'aliases': 'unfocus ex examine e', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' unfocus ex examine e', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}
+search_index_entry = {'aliases': 'examine ex e unfocus', 'category': 'evscaperoom', 'key': 'focus', 'no_prefix': ' examine ex e unfocus', 'tags': '', 'text': '\n Focus your attention on a target.\n\n Usage:\n focus <obj>\n\n Once focusing on an object, use look to get more information about how it\n looks and what actions is available.\n\n '}
@@ -532,7 +532,7 @@ set in self.parse())

-aliases = ['i', 'give', 'inventory', 'inv']
+aliases = ['inv', 'inventory', 'i', 'give']
@@ -556,7 +556,7 @@ set in self.parse())

-search_index_entry = {'aliases': 'i give inventory inv', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' i give inventory inv', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}
+search_index_entry = {'aliases': 'inv inventory i give', 'category': 'evscaperoom', 'key': 'get', 'no_prefix': ' inv inventory i give', 'tags': '', 'text': '\n Use focus / examine instead.\n\n '}
@@ -577,7 +577,7 @@ set in self.parse())

-aliases = ['@open', '@dig']
+aliases = ['@dig', '@open']
@@ -600,7 +600,7 @@ to all the variables defined therein.

-search_index_entry = {'aliases': '@open @dig', 'category': 'general', 'key': 'open', 'no_prefix': ' open dig', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}
+search_index_entry = {'aliases': '@dig @open', 'category': 'general', 'key': 'open', 'no_prefix': ' dig open', 'tags': '', 'text': '\n Interact with an object in focus.\n\n Usage:\n <action> [arg]\n\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.game_systems.barter.barter.html b/docs/1.0-dev/api/evennia.contrib.game_systems.barter.barter.html index 86c44920d2..1da1e06dc1 100644 --- a/docs/1.0-dev/api/evennia.contrib.game_systems.barter.barter.html +++ b/docs/1.0-dev/api/evennia.contrib.game_systems.barter.barter.html @@ -696,7 +696,7 @@ try to influence the other part in the deal.

-aliases = ['offers', 'deal']
+aliases = ['deal', 'offers']
@@ -722,7 +722,7 @@ try to influence the other part in the deal.

-search_index_entry = {'aliases': 'offers deal', 'category': 'trading', 'key': 'status', 'no_prefix': ' offers deal', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}
+search_index_entry = {'aliases': 'deal offers', 'category': 'trading', 'key': 'status', 'no_prefix': ' deal offers', 'tags': '', 'text': "\n show a list of the current deal\n\n Usage:\n status\n deal\n offers\n\n Shows the currently suggested offers on each sides of the deal. To\n accept the current deal, use the 'accept' command. Use 'offer' to\n change your deal. You might also want to use 'say', 'emote' etc to\n try to influence the other part in the deal.\n "}
diff --git a/docs/1.0-dev/api/evennia.contrib.game_systems.clothing.clothing.html b/docs/1.0-dev/api/evennia.contrib.game_systems.clothing.clothing.html index 735d68fcf6..3304dc8c6d 100644 --- a/docs/1.0-dev/api/evennia.contrib.game_systems.clothing.clothing.html +++ b/docs/1.0-dev/api/evennia.contrib.game_systems.clothing.clothing.html @@ -643,7 +643,7 @@ inv

-aliases = ['i', 'inv']
+aliases = ['inv', 'i']
@@ -674,7 +674,7 @@ inv

-search_index_entry = {'aliases': 'i inv', 'category': 'general', 'key': 'inventory', 'no_prefix': ' i inv', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
+search_index_entry = {'aliases': 'inv i', 'category': 'general', 'key': 'inventory', 'no_prefix': ' inv i', 'tags': '', 'text': '\n view inventory\n\n Usage:\n inventory\n inv\n\n Shows your inventory.\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.grid.extended_room.extended_room.html b/docs/1.0-dev/api/evennia.contrib.grid.extended_room.extended_room.html index d284ddea0f..e97c9c1631 100644 --- a/docs/1.0-dev/api/evennia.contrib.grid.extended_room.extended_room.html +++ b/docs/1.0-dev/api/evennia.contrib.grid.extended_room.extended_room.html @@ -291,7 +291,7 @@ look *<account&g
-aliases = ['ls', 'l']
+aliases = ['l', 'ls']
@@ -311,7 +311,7 @@ look *<account&g
-search_index_entry = {'aliases': 'ls l', 'category': 'general', 'key': 'look', 'no_prefix': ' ls l', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}
+search_index_entry = {'aliases': 'l ls', 'category': 'general', 'key': 'look', 'no_prefix': ' l ls', 'tags': '', 'text': '\n look\n\n Usage:\n look\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects in your vicinity.\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.rpg.dice.dice.html b/docs/1.0-dev/api/evennia.contrib.rpg.dice.dice.html index 113012046b..426cf798dd 100644 --- a/docs/1.0-dev/api/evennia.contrib.rpg.dice.dice.html +++ b/docs/1.0-dev/api/evennia.contrib.rpg.dice.dice.html @@ -246,7 +246,7 @@ everyone but the person rolling.

-aliases = ['roll', '@dice']
+aliases = ['@dice', 'roll']
@@ -272,7 +272,7 @@ everyone but the person rolling.

-search_index_entry = {'aliases': 'roll @dice', 'category': 'general', 'key': 'dice', 'no_prefix': ' roll dice', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}
+search_index_entry = {'aliases': '@dice roll', 'category': 'general', 'key': 'dice', 'no_prefix': ' dice roll', 'tags': '', 'text': "\n roll dice\n\n Usage:\n dice[/switch] <nr>d<sides> [modifier] [success condition]\n\n Switch:\n hidden - tell the room the roll is being done, but don't show the result\n secret - don't inform the room about neither roll nor result\n\n Examples:\n dice 3d6 + 4\n dice 1d100 - 2 < 50\n\n This will roll the given number of dice with given sides and modifiers.\n So e.g. 2d6 + 3 means to 'roll a 6-sided die 2 times and add the result,\n then add 3 to the total'.\n Accepted modifiers are +, -, * and /.\n A success condition is given as normal Python conditionals\n (<,>,<=,>=,==,!=). So e.g. 2d6 + 3 > 10 means that the roll will succeed\n only if the final result is above 8. If a success condition is given, the\n outcome (pass/fail) will be echoed along with how much it succeeded/failed\n with. The hidden/secret switches will hide all or parts of the roll from\n everyone but the person rolling.\n "}
diff --git a/docs/1.0-dev/api/evennia.contrib.rpg.rpsystem.rpsystem.html b/docs/1.0-dev/api/evennia.contrib.rpg.rpsystem.rpsystem.html index d4a16c37c2..92a1269bf9 100644 --- a/docs/1.0-dev/api/evennia.contrib.rpg.rpsystem.rpsystem.html +++ b/docs/1.0-dev/api/evennia.contrib.rpg.rpsystem.rpsystem.html @@ -712,7 +712,7 @@ a different language.

-aliases = ["'", '"']
+aliases = ['"', "'"]
@@ -743,7 +743,7 @@ a different language.

-search_index_entry = {'aliases': '\' "', 'category': 'general', 'key': 'say', 'no_prefix': ' \' "', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}
+search_index_entry = {'aliases': '" \'', 'category': 'general', 'key': 'say', 'no_prefix': ' " \'', 'tags': '', 'text': '\n speak as your character\n\n Usage:\n say <message>\n\n Talk to those in your current location.\n '}
@@ -882,7 +882,7 @@ Using the command without arguments will list all current recogs.

-aliases = ['recognize', 'forget']
+aliases = ['forget', 'recognize']
@@ -909,7 +909,7 @@ Using the command without arguments will list all current recogs.

-search_index_entry = {'aliases': 'recognize forget', 'category': 'general', 'key': 'recog', 'no_prefix': ' recognize forget', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}
+search_index_entry = {'aliases': 'forget recognize', 'category': 'general', 'key': 'recog', 'no_prefix': ' forget recognize', 'tags': '', 'text': '\n Recognize another person in the same room.\n\n Usage:\n recog\n recog sdesc as alias\n forget alias\n\n Example:\n recog tall man as Griatch\n forget griatch\n\n This will assign a personal alias for a person, or forget said alias.\n Using the command without arguments will list all current recogs.\n\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.tutorials.red_button.red_button.html b/docs/1.0-dev/api/evennia.contrib.tutorials.red_button.red_button.html index 3441bd30a3..116dc042c6 100644 --- a/docs/1.0-dev/api/evennia.contrib.tutorials.red_button.red_button.html +++ b/docs/1.0-dev/api/evennia.contrib.tutorials.red_button.red_button.html @@ -195,7 +195,7 @@ check if the lid is open or closed.

-aliases = ['break lid', 'smash', 'smash lid']
+aliases = ['smash', 'break lid', 'smash lid']
@@ -222,7 +222,7 @@ break.

-search_index_entry = {'aliases': 'break lid smash smash lid', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' break lid smash smash lid', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}
+search_index_entry = {'aliases': 'smash break lid smash lid', 'category': 'general', 'key': 'smash glass', 'no_prefix': ' smash break lid smash lid', 'tags': '', 'text': '\n Smash the protective glass.\n\n Usage:\n smash glass\n\n Try to smash the glass of the button.\n\n '}
@@ -449,7 +449,7 @@ be mutually exclusive.

-aliases = ['listen', 'feel', 'ex', 'examine', 'get', 'l']
+aliases = ['l', 'ex', 'listen', 'feel', 'examine', 'get']
@@ -475,7 +475,7 @@ be mutually exclusive.

-search_index_entry = {'aliases': 'listen feel ex examine get l', 'category': 'general', 'key': 'look', 'no_prefix': ' listen feel ex examine get l', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}
+search_index_entry = {'aliases': 'l ex listen feel examine get', 'category': 'general', 'key': 'look', 'no_prefix': ' l ex listen feel examine get', 'tags': '', 'text': "\n Looking around in darkness\n\n Usage:\n look <obj>\n\n ... not that there's much to see in the dark.\n\n "}
diff --git a/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.objects.html b/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.objects.html index e173345212..aed5468a07 100644 --- a/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.objects.html +++ b/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.objects.html @@ -376,7 +376,7 @@ of the object. We overload it with our own version.

-aliases = ['burn', 'light']
+aliases = ['light', 'burn']
@@ -403,7 +403,7 @@ to sit on a “lightable” object, we operate only on self.obj.

-search_index_entry = {'aliases': 'burn light', 'category': 'tutorialworld', 'key': 'on', 'no_prefix': ' burn light', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}
+search_index_entry = {'aliases': 'light burn', 'category': 'tutorialworld', 'key': 'on', 'no_prefix': ' light burn', 'tags': '', 'text': '\n Creates light where there was none. Something to burn.\n '}
@@ -560,7 +560,7 @@ yellow/green - horizontal roots

-aliases = ['button', 'push button', 'press button']
+aliases = ['press button', 'push button', 'button']
@@ -586,7 +586,7 @@ yellow/green - horizontal roots

-search_index_entry = {'aliases': 'button push button press button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' button push button press button', 'tags': '', 'text': '\n Presses a button.\n '}
+search_index_entry = {'aliases': 'press button push button button', 'category': 'tutorialworld', 'key': 'press', 'no_prefix': ' press button push button button', 'tags': '', 'text': '\n Presses a button.\n '}
@@ -730,7 +730,7 @@ parry - forgoes your attack but will make you harder to hit on next

-aliases = ['bash', 'slash', 'pierce', 'parry', 'thrust', 'fight', 'stab', 'defend', 'kill', 'hit', 'chop']
+aliases = ['fight', 'bash', 'slash', 'stab', 'thrust', 'parry', 'pierce', 'chop', 'kill', 'defend', 'hit']
@@ -756,7 +756,7 @@ parry - forgoes your attack but will make you harder to hit on next

-search_index_entry = {'aliases': 'bash slash pierce parry thrust fight stab defend kill hit chop', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' bash slash pierce parry thrust fight stab defend kill hit chop', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}
+search_index_entry = {'aliases': 'fight bash slash stab thrust parry pierce chop kill defend hit', 'category': 'tutorialworld', 'key': 'attack', 'no_prefix': ' fight bash slash stab thrust parry pierce chop kill defend hit', 'tags': '', 'text': '\n Attack the enemy. Commands:\n\n stab <enemy>\n slash <enemy>\n parry\n\n stab - (thrust) makes a lot of damage but is harder to hit with.\n slash - is easier to land, but does not make as much damage.\n parry - forgoes your attack but will make you harder to hit on next\n enemy attack.\n\n '}
diff --git a/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.rooms.html b/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.rooms.html index 567dcae75e..10cfb97172 100644 --- a/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.rooms.html +++ b/docs/1.0-dev/api/evennia.contrib.tutorials.tutorial_world.rooms.html @@ -199,7 +199,7 @@ code except for adding in the details.

-aliases = ['ls', 'l']
+aliases = ['l', 'ls']
@@ -214,7 +214,7 @@ code except for adding in the details.

-search_index_entry = {'aliases': 'ls l', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' ls l', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}
+search_index_entry = {'aliases': 'l ls', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' l ls', 'tags': '', 'text': '\n looks at the room and on details\n\n Usage:\n look <obj>\n look <room detail>\n look *<account>\n\n Observes your location, details at your location or objects\n in your vicinity.\n\n Tutorial: This is a child of the default Look command, that also\n allows us to look at "details" in the room. These details are\n things to examine and offers some extra description without\n actually having to be actual database objects. It uses the\n return_detail() hook on TutorialRooms for this.\n '}
@@ -767,7 +767,7 @@ if they fall off the bridge.

-aliases = ['?', 'h']
+aliases = ['h', '?']
@@ -793,7 +793,7 @@ if they fall off the bridge.

-search_index_entry = {'aliases': '? h', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}
+search_index_entry = {'aliases': 'h ?', 'category': 'tutorial world', 'key': 'help', 'no_prefix': ' h ?', 'tags': '', 'text': '\n Overwritten help command while on the bridge.\n '}
@@ -919,7 +919,7 @@ to find something.

-aliases = ['fiddle', 'feel', 'feel around', 'l', 'search']
+aliases = ['l', 'feel around', 'feel', 'search', 'fiddle']
@@ -947,7 +947,7 @@ random chance of eventually finding a light source.

-search_index_entry = {'aliases': 'fiddle feel feel around l search', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' fiddle feel feel around l search', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}
+search_index_entry = {'aliases': 'l feel around feel search fiddle', 'category': 'tutorialworld', 'key': 'look', 'no_prefix': ' l feel around feel search fiddle', 'tags': '', 'text': '\n Look around in darkness\n\n Usage:\n look\n\n Look around in the darkness, trying\n to find something.\n '}
diff --git a/docs/1.0-dev/api/evennia.locks.lockfuncs.html b/docs/1.0-dev/api/evennia.locks.lockfuncs.html index 40251c50f2..d6db0a540f 100644 --- a/docs/1.0-dev/api/evennia.locks.lockfuncs.html +++ b/docs/1.0-dev/api/evennia.locks.lockfuncs.html @@ -324,6 +324,17 @@ If accessing_obj has the “.obj” property (such as is the case for a command), then accessing_obj.obj is used instead.

+
+
+evennia.locks.lockfuncs.is_ooc(accessing_obj, accessed_obj, *args, **kwargs)[source]
+
+
Usage:

is_ooc()

+
+
+

This is normally used to lock a Command, so it can be used +only when out of character.

+
+
evennia.locks.lockfuncs.objtag(accessing_obj, accessed_obj, *args, **kwargs)[source]
diff --git a/docs/1.0-dev/api/evennia.server.portal.amp.html b/docs/1.0-dev/api/evennia.server.portal.amp.html index e9fb00db0a..66f472ed77 100644 --- a/docs/1.0-dev/api/evennia.server.portal.amp.html +++ b/docs/1.0-dev/api/evennia.server.portal.amp.html @@ -417,6 +417,32 @@ erroneous HTTP requests on the port and return a HTTP error response.

already before connecting both on portal and server.

+
+
+stringReceived(string)[source]
+

Overrides the base stringReceived of twisted in order to handle +the strange error reported in https://github.com/evennia/evennia/issues/2053, +which can lead to the amp connection locking up.

+
+
Parameters
+

string (str) – the data coming in.

+
+
+

Notes

+

To test, add the following code to the beginning of +evennia.server.amp_client.AMPServerClientProtocol.data_to_portal, then +run multiple commands until the error trigger:

+
import random
+from twisted.protocols.amp import AmpBox
+always_fail = False
+if always_fail or random.random() < 0.05:
+    breaker = AmpBox()
+    breaker['_answer'.encode()]='13541'.encode()
+    self.transport.write(breaker.serialize())
+
+
+
+
dataReceived(data)[source]
diff --git a/docs/1.0-dev/api/evennia.utils.eveditor.html b/docs/1.0-dev/api/evennia.utils.eveditor.html index c4a0b351b6..09d9c67e8d 100644 --- a/docs/1.0-dev/api/evennia.utils.eveditor.html +++ b/docs/1.0-dev/api/evennia.utils.eveditor.html @@ -287,7 +287,7 @@ indentation.

-aliases = [':wq', ':y', ':p', ':!', ':A', ':w', ':i', ':x', ':=', '::', ':::', ':<', ':q', ':echo', ':j', ':', ':dw', ':fi', ':r', ':I', ':f', ':>', ':dd', ':h', ':uu', ':DD', ':u', ':q!', ':UU', ':fd', ':s', ':S']
+aliases = [':x', '::', ':fi', ':>', ':::', ':j', ':dw', ':S', ':', ':u', ':<', ':f', ':w', ':=', ':r', ':!', ':DD', ':A', ':echo', ':s', ':UU', ':wq', ':h', ':fd', ':i', ':q', ':p', ':I', ':uu', ':y', ':q!', ':dd']
@@ -315,7 +315,7 @@ efficient presentation.

-search_index_entry = {'aliases': ':wq :y :p :! :A :w :i :x := :: ::: :< :q :echo :j : :dw :fi :r :I :f :> :dd :h :uu :DD :u :q! :UU :fd :s :S', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :wq :y :p :! :A :w :i :x := :: ::: :< :q :echo :j : :dw :fi :r :I :f :> :dd :h :uu :DD :u :q! :UU :fd :s :S', 'tags': '', 'text': '\n Commands for the editor\n '}
+search_index_entry = {'aliases': ':x :: :fi :> ::: :j :dw :S : :u :< :f :w := :r :! :DD :A :echo :s :UU :wq :h :fd :i :q :p :I :uu :y :q! :dd', 'category': 'general', 'key': ':editor_command_group', 'no_prefix': ' :x :: :fi :> ::: :j :dw :S : :u :< :f :w := :r :! :DD :A :echo :s :UU :wq :h :fd :i :q :p :I :uu :y :q! :dd', 'tags': '', 'text': '\n Commands for the editor\n '}
diff --git a/docs/1.0-dev/api/evennia.utils.evmenu.html b/docs/1.0-dev/api/evennia.utils.evmenu.html index 2bfee36777..56723c5a23 100644 --- a/docs/1.0-dev/api/evennia.utils.evmenu.html +++ b/docs/1.0-dev/api/evennia.utils.evmenu.html @@ -957,7 +957,7 @@ single question.

-aliases = ['y', 'yes', 'no', '__nomatch_command', 'n', 'a', 'abort']
+aliases = ['y', '__nomatch_command', 'no', 'yes', 'a', 'abort', 'n']
@@ -983,7 +983,7 @@ single question.

-search_index_entry = {'aliases': 'y yes no __nomatch_command n a abort', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' y yes no __nomatch_command n a abort', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}
+search_index_entry = {'aliases': 'y __nomatch_command no yes a abort n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' y __nomatch_command no yes a abort n', 'tags': '', 'text': '\n Handle a prompt for yes or no. Press [return] for the default choice.\n\n '}
diff --git a/docs/1.0-dev/api/evennia.utils.evmore.html b/docs/1.0-dev/api/evennia.utils.evmore.html index ce65e770bf..6f8bff86b7 100644 --- a/docs/1.0-dev/api/evennia.utils.evmore.html +++ b/docs/1.0-dev/api/evennia.utils.evmore.html @@ -88,7 +88,7 @@ the caller.msg() construct every time the page is updated.

-aliases = ['t', 'next', 'end', 'q', 'previous', 'top', 'quit', 'n', 'a', 'p', 'e', 'abort']
+aliases = ['previous', 'top', 'end', 'quit', 'a', 'e', 'q', 'next', 'abort', 'p', 't', 'n']
@@ -114,7 +114,7 @@ the caller.msg() construct every time the page is updated.

-search_index_entry = {'aliases': 't next end q previous top quit n a p e abort', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' t next end q previous top quit n a p e abort', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
+search_index_entry = {'aliases': 'previous top end quit a e q next abort p t n', 'category': 'general', 'key': '__noinput_command', 'no_prefix': ' previous top end quit a e q next abort p t n', 'tags': '', 'text': '\n Manipulate the text paging. Catch no-input with aliases.\n '}
diff --git a/docs/1.0-dev/api/evennia.utils.logger.html b/docs/1.0-dev/api/evennia.utils.logger.html index f2a2454783..55aa3fc992 100644 --- a/docs/1.0-dev/api/evennia.utils.logger.html +++ b/docs/1.0-dev/api/evennia.utils.logger.html @@ -60,13 +60,461 @@ interactive mode) or to $GAME_DIR/server/logs.

arbitrary files in $GAME_DIR/server/logs.

Note: All logging functions have two aliases, log_type() and log_typemsg(). This is for historical, back-compatible reasons.

+
+
+evennia.utils.logger.log_info(msg, **kwargs)[source]
+

Logs any generic debugging/informative info that should appear in the log.

+
+
Parameters
+
    +
  • msg – (string) The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.info(msg, **kwargs)
+

Logs any generic debugging/informative info that should appear in the log.

+
+
Parameters
+
    +
  • msg – (string) The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_infomsg(msg, **kwargs)
+

Logs any generic debugging/informative info that should appear in the log.

+
+
Parameters
+
    +
  • msg – (string) The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_msg(msg, **kwargs)
+

Logs any generic debugging/informative info that should appear in the log.

+
+
Parameters
+
    +
  • msg – (string) The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_warn(msg, **kwargs)[source]
+

Logs warnings that aren’t critical but should be noted.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.warn(msg, **kwargs)
+

Logs warnings that aren’t critical but should be noted.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.warning(msg, **kwargs)
+

Logs warnings that aren’t critical but should be noted.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_warnmsg(msg, **kwargs)
+

Logs warnings that aren’t critical but should be noted.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_err(msg, **kwargs)[source]
+

Logs an error message to the server log.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.error(msg, **kwargs)
+

Logs an error message to the server log.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.err(msg, **kwargs)
+

Logs an error message to the server log.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_errmsg(msg, **kwargs)
+

Logs an error message to the server log.

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_trace(msg=None, **kwargs)[source]
+

Log a traceback to the log. This should be called from within an +exception.

+
+
Parameters
+
    +
  • msg (str, optional) – Adds an extra line with added info +at the end of the traceback in the log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_tracemsg(msg=None, **kwargs)
+

Log a traceback to the log. This should be called from within an +exception.

+
+
Parameters
+
    +
  • msg (str, optional) – Adds an extra line with added info +at the end of the traceback in the log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.exception(msg=None, **kwargs)
+

Log a traceback to the log. This should be called from within an +exception.

+
+
Parameters
+
    +
  • msg (str, optional) – Adds an extra line with added info +at the end of the traceback in the log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.critical(msg=None, **kwargs)
+

Log a traceback to the log. This should be called from within an +exception.

+
+
Parameters
+
    +
  • msg (str, optional) – Adds an extra line with added info +at the end of the traceback in the log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.trace(msg=None, **kwargs)
+

Log a traceback to the log. This should be called from within an +exception.

+
+
Parameters
+
    +
  • msg (str, optional) – Adds an extra line with added info +at the end of the traceback in the log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_dep(msg, **kwargs)[source]
+

Prints a deprecation message.

+
+
Parameters
+
    +
  • msg (str) – The deprecation message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.dep(msg, **kwargs)
+

Prints a deprecation message.

+
+
Parameters
+
    +
  • msg (str) – The deprecation message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.deprecated(msg, **kwargs)
+

Prints a deprecation message.

+
+
Parameters
+
    +
  • msg (str) – The deprecation message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_depmsg(msg, **kwargs)
+

Prints a deprecation message.

+
+
Parameters
+
    +
  • msg (str) – The deprecation message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_sec(msg, **kwargs)[source]
+

Prints a security-related message.

+
+
Parameters
+
    +
  • msg (str) – The security message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.sec(msg, **kwargs)
+

Prints a security-related message.

+
+
Parameters
+
    +
  • msg (str) – The security message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.security(msg, **kwargs)
+

Prints a security-related message.

+
+
Parameters
+
    +
  • msg (str) – The security message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_secmsg(msg, **kwargs)
+

Prints a security-related message.

+
+
Parameters
+
    +
  • msg (str) – The security message to log.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+evennia.utils.logger.log_server(msg, **kwargs)[source]
+

This is for the Portal to log captured Server stdout messages (it’s +usually only used during startup, before Server log is open)

+
+
Parameters
+
    +
  • msg (str) – The message to be logged.

  • +
  • **kwargs – If given, The msg is parsed as a format string with {..} +formatting markers that should match the keywords.

  • +
+
+
+
+ +
+
+class evennia.utils.logger.GetLogObserver[source]
+

Bases: object

+

Sets up how the system logs are formatted.

+
+
+component_prefix = ''
+
+ +
+
+event_levels = {<LogLevel=debug>: '??', <LogLevel=info>: '..', <LogLevel=warn>: 'WW', <LogLevel=error>: 'EE', <LogLevel=critical>: '!!'}
+
+ +
+
+format_log_event(event)[source]
+

By assigning log_system here, we skip the spammy display of namespace/level +in the default log output.

+

[component_prefix] [date] [system/lvl] [msg]

+
+ +
+ +
+
+class evennia.utils.logger.GetPortalLogObserver[source]
+

Bases: evennia.utils.logger.GetLogObserver

+
+
+component_prefix = '|Portal| '
+
+ +
+ +
+
+class evennia.utils.logger.GetServerLogObserver[source]
+

Bases: evennia.utils.logger.GetLogObserver

+
+
+component_prefix = ''
+
+ +
+
evennia.utils.logger.timeformat(when=None)[source]

This helper function will format the current time in the same way as the twisted logger does, including time zone info. Only difference from official logger is that we only use two digits -for the year and don’t show timezone for CET times.

+for the year and don’t show timezone for GMT times.

Parameters

when (int, optional) – This is a time in POSIX seconds on the form @@ -130,188 +578,6 @@ server.log.2020_01_29__2

-
-
-class evennia.utils.logger.PortalLogObserver(f)[source]
-

Bases: twisted.python.log.FileLogObserver

-

Reformat logging

-
-
-timeFormat: Optional[str] = None
-
- -
-
-prefix = ' |Portal| '
-
- -
-
-emit(eventDict)[source]
-

Copied from Twisted parent, to change logging output

-
- -
- -
-
-class evennia.utils.logger.ServerLogObserver(f)[source]
-

Bases: evennia.utils.logger.PortalLogObserver

-
-
-prefix = ' '
-
- -
- -
-
-evennia.utils.logger.log_msg(msg)[source]
-

Wrapper around log.msg call to catch any exceptions that might -occur in logging. If an exception is raised, we’ll print to -stdout instead.

-
-
Parameters
-

msg – The message that was passed to log.msg

-
-
-
- -
-
-evennia.utils.logger.log_trace(errmsg=None)[source]
-

Log a traceback to the log. This should be called from within an -exception.

-
-
Parameters
-

errmsg (str, optional) – Adds an extra line with added info -at the end of the traceback in the log.

-
-
-
- -
-
-evennia.utils.logger.log_tracemsg(errmsg=None)
-

Log a traceback to the log. This should be called from within an -exception.

-
-
Parameters
-

errmsg (str, optional) – Adds an extra line with added info -at the end of the traceback in the log.

-
-
-
- -
-
-evennia.utils.logger.log_err(errmsg)[source]
-

Prints/logs an error message to the server log.

-
-
Parameters
-

errmsg (str) – The message to be logged.

-
-
-
- -
-
-evennia.utils.logger.log_errmsg(errmsg)
-

Prints/logs an error message to the server log.

-
-
Parameters
-

errmsg (str) – The message to be logged.

-
-
-
- -
-
-evennia.utils.logger.log_server(servermsg)[source]
-

This is for the Portal to log captured Server stdout messages (it’s -usually only used during startup, before Server log is open)

-
- -
-
-evennia.utils.logger.log_warn(warnmsg)[source]
-

Prints/logs any warnings that aren’t critical but should be noted.

-
-
Parameters
-

warnmsg (str) – The message to be logged.

-
-
-
- -
-
-evennia.utils.logger.log_warnmsg(warnmsg)
-

Prints/logs any warnings that aren’t critical but should be noted.

-
-
Parameters
-

warnmsg (str) – The message to be logged.

-
-
-
- -
-
-evennia.utils.logger.log_info(infomsg)[source]
-

Prints any generic debugging/informative info that should appear in the log.

-

infomsg: (string) The message to be logged.

-
- -
-
-evennia.utils.logger.log_infomsg(infomsg)
-

Prints any generic debugging/informative info that should appear in the log.

-

infomsg: (string) The message to be logged.

-
- -
-
-evennia.utils.logger.log_dep(depmsg)[source]
-

Prints a deprecation message.

-
-
Parameters
-

depmsg (str) – The deprecation message to log.

-
-
-
- -
-
-evennia.utils.logger.log_depmsg(depmsg)
-

Prints a deprecation message.

-
-
Parameters
-

depmsg (str) – The deprecation message to log.

-
-
-
- -
-
-evennia.utils.logger.log_sec(secmsg)[source]
-

Prints a security-related message.

-
-
Parameters
-

secmsg (str) – The security message to log.

-
-
-
- -
-
-evennia.utils.logger.log_secmsg(secmsg)
-

Prints a security-related message.

-
-
Parameters
-

secmsg (str) – The security message to log.

-
-
-
-
class evennia.utils.logger.EvenniaLogFile(name, directory, rotateLength=1000000, defaultMode=None, maxRotatedFiles=None)[source]
diff --git a/docs/1.0-dev/api/evennia.utils.text2html.html b/docs/1.0-dev/api/evennia.utils.text2html.html index 4522a1d8da..1971bd2922 100644 --- a/docs/1.0-dev/api/evennia.utils.text2html.html +++ b/docs/1.0-dev/api/evennia.utils.text2html.html @@ -202,6 +202,11 @@ snippet #577349 on re_dblspace = re.compile(' {2,}', re.MULTILINE)
+
+
+re_invisiblespace = re.compile('( <.*?>)( )')
+
+
re_url = re.compile('(?<!=")((?:ftp|www|https?)\\W+(?:(?!\\.(?:\\s|$)|&\\w+;)[^"\\\',;$*^\\\\(){}<>\\[\\]\\s])+)(\\.(?:\\s|$)|&\\w+;|)')
@@ -352,6 +357,13 @@ it match the look of telnet.

through we must make sure to replace them with ” &nbsp;”

+
+
+re_invisible_space(text)[source]
+

If two spaces are separated by an invisble html element, they act as a +hidden double-space and the last of them should be replaced by &nbsp;

+
+
@@ -402,6 +414,12 @@ for handling all substitutions.

clean up double-spaces

+
+
+sub_invisiblespace(match)[source]
+

clean up invisible spaces

+
+
parse(text, strip_ansi=False)[source]
diff --git a/docs/1.0-dev/genindex.html b/docs/1.0-dev/genindex.html index a6f61934b1..d84cf33b84 100644 --- a/docs/1.0-dev/genindex.html +++ b/docs/1.0-dev/genindex.html @@ -3315,12 +3315,12 @@
  • CmdMultiDesc (class in evennia.contrib.game_systems.multidescer.multidescer)
  • - - + - +
  • getKeyPair() (in module evennia.server.portal.ssh) +
  • +
  • GetLogObserver (class in evennia.utils.logger) +
  • +
  • GetPortalLogObserver (class in evennia.utils.logger) +
  • +
  • GetServerLogObserver (class in evennia.utils.logger)
  • getSSLContext() (in module evennia.server.portal.ssl) @@ -9934,6 +9964,8 @@
  • IndexTest (class in evennia.web.website.tests)
  • infinitely_locked (evennia.contrib.full_systems.evscaperoom.objects.CodeInput attribute) +
  • +
  • info() (in module evennia.utils.logger)
  • info1() (in module evennia.contrib.tutorials.talking_npc.talking_npc)
  • @@ -10122,6 +10154,8 @@
  • is_in_combat() (evennia.contrib.game_systems.turnbattle.tb_basic.BasicCombatRules method)
  • is_iter() (in module evennia.utils.utils) +
  • +
  • is_ooc() (in module evennia.locks.lockfuncs)
  • is_staff (evennia.accounts.models.AccountDB attribute)
  • @@ -14573,8 +14607,6 @@
  • portal_shutdown() (evennia.server.sessionhandler.ServerSessionHandler method)
  • portal_uptime() (in module evennia.utils.gametime) -
  • -
  • PortalLogObserver (class in evennia.utils.logger)
  • PortalSessionHandler (class in evennia.server.portal.portalsessionhandler)
  • @@ -14622,12 +14654,6 @@
  • pre_send_message() (evennia.comms.comms.DefaultChannel method)
  • -
  • prefix (evennia.utils.logger.PortalLogObserver attribute) - -
  • print_debug_info() (evennia.utils.evmenu.EvMenu method)
  • print_help() (evennia.contrib.base_systems.unixcommand.unixcommand.UnixCommandParser method) @@ -14897,6 +14923,10 @@
  • re_inverse (evennia.utils.text2html.TextToHTMLparser attribute)
  • re_inversing() (evennia.utils.text2html.TextToHTMLparser method) +
  • +
  • re_invisible_space() (evennia.utils.text2html.TextToHTMLparser method) +
  • +
  • re_invisiblespace (evennia.utils.text2html.TextToHTMLparser attribute)
  • re_mxplink (evennia.utils.text2html.TextToHTMLparser attribute)
  • @@ -15177,11 +15207,11 @@
  • replace_data() (evennia.utils.evtable.EvCell method) -
  • -
  • replace_timeslots() (evennia.contrib.grid.extended_room.extended_room.ExtendedRoom method)
  • wait_for_status_reply() (in module evennia.server.evennia_launcher) +
  • +
  • warn() (in module evennia.utils.logger) +
  • +
  • warning() (in module evennia.utils.logger)
  • WeakSharedMemoryModel (class in evennia.utils.idmapper.models)
  • @@ -20286,10 +20326,10 @@
  • (evennia.typeclasses.models.TypedObject method)
  • -
  • webclient() (in module evennia.web.webclient.views) -