evennia.commands.default.system¶
System commands
-
class
evennia.commands.default.system.
CmdAccounts
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
Manage registered accounts
- Usage:
accounts [nr] accounts/delete <name or #id> [: reason]
- Switches:
delete - delete an account from the server
By default, lists statistics about the Accounts registered with the game. It will list the <nr> amount of latest registered accounts If not given, <nr> defaults to 10.
-
key
= '@accounts'¶
-
aliases
= ['@account']¶
-
switch_options
= ('delete',)¶
-
locks
= 'cmd:perm(listaccounts) or perm(Admin)'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:perm(listaccounts) or perm(Admin)'¶
-
search_index_entry
= {'aliases': '@account', 'category': 'system', 'key': '@accounts', 'no_prefix': 'accounts account', 'tags': '', 'text': '\n Manage registered accounts\n\n Usage:\n accounts [nr]\n accounts/delete <name or #id> [: reason]\n\n Switches:\n delete - delete an account from the server\n\n By default, lists statistics about the Accounts registered with the game.\n It will list the <nr> amount of latest registered accounts\n If not given, <nr> defaults to 10.\n '}¶
-
class
evennia.commands.default.system.
CmdReload
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
reload the server
- Usage:
reload [reason]
This restarts the server. The Portal is not affected. Non-persistent scripts will survive a reload (use reset to purge) and at_reload() hooks will be called.
-
key
= '@reload'¶
-
aliases
= ['@restart']¶
-
locks
= 'cmd:perm(reload) or perm(Developer)'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:perm(reload) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '@restart', 'category': 'system', 'key': '@reload', 'no_prefix': 'reload restart', 'tags': '', 'text': '\n reload the server\n\n Usage:\n reload [reason]\n\n This restarts the server. The Portal is not\n affected. Non-persistent scripts will survive a reload (use\n reset to purge) and at_reload() hooks will be called.\n '}¶
-
class
evennia.commands.default.system.
CmdReset
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
reset and reboot the server
- Usage:
reset
Notes
For normal updating you are recommended to use reload rather than this command. Use shutdown for a complete stop of everything.
This emulates a cold reboot of the Server component of Evennia. The difference to shutdown is that the Server will auto-reboot and that it does not affect the Portal, so no users will be disconnected. Contrary to reload however, all shutdown hooks will be called and any non-database saved scripts, ndb-attributes, cmdsets etc will be wiped.
-
key
= '@reset'¶
-
locks
= 'cmd:perm(reload) or perm(Developer)'¶
-
help_category
= 'system'¶
-
aliases
= []¶
-
lock_storage
= 'cmd:perm(reload) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '', 'category': 'system', 'key': '@reset', 'no_prefix': 'reset ', 'tags': '', 'text': '\n reset and reboot the server\n\n Usage:\n reset\n\n Notes:\n For normal updating you are recommended to use reload rather\n than this command. Use shutdown for a complete stop of\n everything.\n\n This emulates a cold reboot of the Server component of Evennia.\n The difference to shutdown is that the Server will auto-reboot\n and that it does not affect the Portal, so no users will be\n disconnected. Contrary to reload however, all shutdown hooks will\n be called and any non-database saved scripts, ndb-attributes,\n cmdsets etc will be wiped.\n\n '}¶
-
class
evennia.commands.default.system.
CmdShutdown
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
stop the server completely
- Usage:
shutdown [announcement]
Gracefully shut down both Server and Portal.
-
key
= '@shutdown'¶
-
locks
= 'cmd:perm(shutdown) or perm(Developer)'¶
-
help_category
= 'system'¶
-
aliases
= []¶
-
lock_storage
= 'cmd:perm(shutdown) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '', 'category': 'system', 'key': '@shutdown', 'no_prefix': 'shutdown ', 'tags': '', 'text': '\n stop the server completely\n\n Usage:\n shutdown [announcement]\n\n Gracefully shut down both Server and Portal.\n '}¶
-
class
evennia.commands.default.system.
CmdPy
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
execute a snippet of python code
- Usage:
py [cmd] py/edit py/time <cmd> py/clientraw <cmd> py/noecho
- Switches:
time - output an approximate execution time for <cmd> edit - open a code editor for multi-line code experimentation clientraw - turn off all client-specific escaping. Note that this may
lead to different output depending on prototocol (such as angular brackets being parsed as HTML in the webclient but not in telnet clients)
- noecho - in Python console mode, turn off the input echo (e.g. if your client
does this for you already)
Without argument, open a Python console in-game. This is a full console, accepting multi-line Python code for testing and debugging. Type exit() to return to the game. If Evennia is reloaded, the console will be closed.
Enter a line of instruction after the ‘py’ command to execute it immediately. Separate multiple commands by ‘;’ or open the code editor using the /edit switch (all lines added in editor will be executed immediately when closing or using the execute command in the editor).
A few variables are made available for convenience in order to offer access to the system (you can import more at execution time).
- Available variables in py environment:
self, me : caller here : caller.location evennia : the evennia API inherits_from(obj, parent) : check object inheritance
You can explore The evennia API from inside the game by calling the __doc__ property on entities:
py evennia.__doc__ py evennia.managers.__doc__
|rNote: In the wrong hands this command is a severe security risk. It should only be accessible by trusted server admins/superusers.|n
-
key
= '@py'¶
-
aliases
= ['@!']¶
-
switch_options
= ('time', 'edit', 'clientraw', 'noecho')¶
-
locks
= 'cmd:perm(py) or perm(Developer)'¶
-
help_category
= 'system'¶
-
arg_regex
= re.compile('', re.IGNORECASE)¶
-
lock_storage
= 'cmd:perm(py) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '@!', 'category': 'system', 'key': '@py', 'no_prefix': 'py !', 'tags': '', 'text': "\n execute a snippet of python code\n\n Usage:\n py [cmd]\n py/edit\n py/time <cmd>\n py/clientraw <cmd>\n py/noecho\n\n Switches:\n time - output an approximate execution time for <cmd>\n edit - open a code editor for multi-line code experimentation\n clientraw - turn off all client-specific escaping. Note that this may\n lead to different output depending on prototocol (such as angular brackets\n being parsed as HTML in the webclient but not in telnet clients)\n noecho - in Python console mode, turn off the input echo (e.g. if your client\n does this for you already)\n\n Without argument, open a Python console in-game. This is a full console,\n accepting multi-line Python code for testing and debugging. Type `exit()` to\n return to the game. If Evennia is reloaded, the console will be closed.\n\n Enter a line of instruction after the 'py' command to execute it\n immediately. Separate multiple commands by ';' or open the code editor\n using the /edit switch (all lines added in editor will be executed\n immediately when closing or using the execute command in the editor).\n\n A few variables are made available for convenience in order to offer access\n to the system (you can import more at execution time).\n\n Available variables in py environment:\n self, me : caller\n here : caller.location\n evennia : the evennia API\n inherits_from(obj, parent) : check object inheritance\n\n You can explore The evennia API from inside the game by calling\n the `__doc__` property on entities:\n py evennia.__doc__\n py evennia.managers.__doc__\n\n |rNote: In the wrong hands this command is a severe security risk. It\n should only be accessible by trusted server admins/superusers.|n\n\n "}¶
-
class
evennia.commands.default.system.
CmdService
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
manage system services
- Usage:
service[/switch] <service>
- Switches:
list - shows all available services (default) start - activates or reactivate a service stop - stops/inactivate a service (can often be restarted) delete - tries to permanently remove a service
Service management system. Allows for the listing, starting, and stopping of services. If no switches are given, services will be listed. Note that to operate on the service you have to supply the full (green or red) name as given in the list.
-
key
= '@service'¶
-
aliases
= ['@services']¶
-
switch_options
= ('list', 'start', 'stop', 'delete')¶
-
locks
= 'cmd:perm(service) or perm(Developer)'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:perm(service) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '@services', 'category': 'system', 'key': '@service', 'no_prefix': 'service services', 'tags': '', 'text': '\n manage system services\n\n Usage:\n service[/switch] <service>\n\n Switches:\n list - shows all available services (default)\n start - activates or reactivate a service\n stop - stops/inactivate a service (can often be restarted)\n delete - tries to permanently remove a service\n\n Service management system. Allows for the listing,\n starting, and stopping of services. If no switches\n are given, services will be listed. Note that to operate on the\n service you have to supply the full (green or red) name as given\n in the list.\n '}¶
-
class
evennia.commands.default.system.
CmdAbout
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
show Evennia info
- Usage:
about
Display info about the game engine.
-
key
= '@about'¶
-
aliases
= ['@version']¶
-
locks
= 'cmd:all()'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:all()'¶
-
search_index_entry
= {'aliases': '@version', 'category': 'system', 'key': '@about', 'no_prefix': 'about version', 'tags': '', 'text': '\n show Evennia info\n\n Usage:\n about\n\n Display info about the game engine.\n '}¶
-
class
evennia.commands.default.system.
CmdTime
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
show server time statistics
- Usage:
time
List Server time statistics such as uptime and the current time stamp.
-
key
= '@time'¶
-
aliases
= ['@uptime']¶
-
locks
= 'cmd:perm(time) or perm(Player)'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:perm(time) or perm(Player)'¶
-
search_index_entry
= {'aliases': '@uptime', 'category': 'system', 'key': '@time', 'no_prefix': 'time uptime', 'tags': '', 'text': '\n show server time statistics\n\n Usage:\n time\n\n List Server time statistics such as uptime\n and the current time stamp.\n '}¶
-
class
evennia.commands.default.system.
CmdServerLoad
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
show server load and memory statistics
- Usage:
server[/mem]
- Switches:
mem - return only a string of the current memory usage flushmem - flush the idmapper cache
This command shows server load statistics and dynamic memory usage. It also allows to flush the cache of accessed database objects.
Some Important statistics in the table:
|wServer load|n is an average of processor usage. It’s usually between 0 (no usage) and 1 (100% usage), but may also be temporarily higher if your computer has multiple CPU cores.
The |wResident/Virtual memory|n displays the total memory used by the server process.
Evennia |wcaches|n all retrieved database entities when they are loaded by use of the idmapper functionality. This allows Evennia to maintain the same instances of an entity and allowing non-persistent storage schemes. The total amount of cached objects are displayed plus a breakdown of database object types.
The |wflushmem|n switch allows to flush the object cache. Please note that due to how Python’s memory management works, releasing caches may not show you a lower Residual/Virtual memory footprint, the released memory will instead be re-used by the program.
-
key
= '@server'¶
-
aliases
= ['@serverload']¶
-
switch_options
= ('mem', 'flushmem')¶
-
locks
= 'cmd:perm(list) or perm(Developer)'¶
-
help_category
= 'system'¶
-
lock_storage
= 'cmd:perm(list) or perm(Developer)'¶
-
search_index_entry
= {'aliases': '@serverload', 'category': 'system', 'key': '@server', 'no_prefix': 'server serverload', 'tags': '', 'text': "\n show server load and memory statistics\n\n Usage:\n server[/mem]\n\n Switches:\n mem - return only a string of the current memory usage\n flushmem - flush the idmapper cache\n\n This command shows server load statistics and dynamic memory\n usage. It also allows to flush the cache of accessed database\n objects.\n\n Some Important statistics in the table:\n\n |wServer load|n is an average of processor usage. It's usually\n between 0 (no usage) and 1 (100% usage), but may also be\n temporarily higher if your computer has multiple CPU cores.\n\n The |wResident/Virtual memory|n displays the total memory used by\n the server process.\n\n Evennia |wcaches|n all retrieved database entities when they are\n loaded by use of the idmapper functionality. This allows Evennia\n to maintain the same instances of an entity and allowing\n non-persistent storage schemes. The total amount of cached objects\n are displayed plus a breakdown of database object types.\n\n The |wflushmem|n switch allows to flush the object cache. Please\n note that due to how Python's memory management works, releasing\n caches may not show you a lower Residual/Virtual memory footprint,\n the released memory will instead be re-used by the program.\n\n "}¶
-
class
evennia.commands.default.system.
CmdTasks
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
Display or terminate active tasks (delays).
- Usage:
tasks[/switch] [task_id or function_name]
- Switches:
pause - Pause the callback of a task. unpause - Process all callbacks made since pause() was called. do_task - Execute the task (call its callback). call - Call the callback of this task. remove - Remove a task without executing it. cancel - Stop a task from automatically executing.
Notes
A task is a single use method of delaying the call of a function. Calls are created in code, using evennia.utils.delay. See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.
By default, tasks that are canceled and never called are cleaned up after one minute.
Examples
- tasks/cancel move_callback - Cancels all movement delays from the slow_exit contrib.
In this example slow exits creates it’s tasks with utils.delay(move_delay, move_callback)
tasks/cancel 2 - Cancel task id 2.
-
key
= '@tasks'¶
-
aliases
= ['@delays', '@task']¶
-
switch_options
= ('pause', 'unpause', 'do_task', 'call', 'remove', 'cancel')¶
-
locks
= 'cmd:all();perm(Developer)'¶
-
help_category
= 'system'¶
-
static
coll_date_func
(task)[source]¶ Replace regex characters in date string and collect deferred function name.
-
do_task_action
(*args, **kwargs)[source]¶ Process the action of a tasks command.
This exists to gain support with yes or no function from EvMenu.
-
func
()[source]¶ This is the hook function that actually does all the work. It is called by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.
-
lock_storage
= 'cmd:all();cmd:perm(Developer)'¶
-
search_index_entry
= {'aliases': '@delays @task', 'category': 'system', 'key': '@tasks', 'no_prefix': 'tasks delays task', 'tags': '', 'text': "\n Display or terminate active tasks (delays).\n\n Usage:\n tasks[/switch] [task_id or function_name]\n\n Switches:\n pause - Pause the callback of a task.\n unpause - Process all callbacks made since pause() was called.\n do_task - Execute the task (call its callback).\n call - Call the callback of this task.\n remove - Remove a task without executing it.\n cancel - Stop a task from automatically executing.\n\n Notes:\n A task is a single use method of delaying the call of a function. Calls are created\n in code, using `evennia.utils.delay`.\n See |luhttps://www.evennia.com/docs/latest/Command-Duration.html|ltthe docs|le for help.\n\n By default, tasks that are canceled and never called are cleaned up after one minute.\n\n Examples:\n - `tasks/cancel move_callback` - Cancels all movement delays from the slow_exit contrib.\n In this example slow exits creates it's tasks with\n `utils.delay(move_delay, move_callback)`\n - `tasks/cancel 2` - Cancel task id 2.\n\n "}¶
-
class
evennia.commands.default.system.
CmdTickers
(**kwargs)[source]¶ Bases:
evennia.commands.default.muxcommand.MuxCommand
View running tickers
- Usage:
tickers
Note: Tickers are created, stopped and manipulated in Python code using the TickerHandler. This is merely a convenience function for inspecting the current status.
-
key
= '@tickers'¶
-
help_category
= 'system'¶
-
locks
= 'cmd:perm(tickers) or perm(Builder)'¶
-
func
()[source]¶ This is the hook function that actually does all the work. It is called by the cmdhandler right after self.parser() finishes, and so has access to all the variables defined therein.
-
aliases
= []¶
-
lock_storage
= 'cmd:perm(tickers) or perm(Builder)'¶
-
search_index_entry
= {'aliases': '', 'category': 'system', 'key': '@tickers', 'no_prefix': 'tickers ', 'tags': '', 'text': '\n View running tickers\n\n Usage:\n tickers\n\n Note: Tickers are created, stopped and manipulated in Python code\n using the TickerHandler. This is merely a convenience function for\n inspecting the current status.\n\n '}¶