evennia.commands.default.unloggedin¶
Commands that are available from the connect screen.
- class evennia.commands.default.unloggedin.CmdUnconnectedConnect(**kwargs)[source]¶
Bases:
MuxCommandconnect to the game
- Usage (at login screen):
connect accountname password connect “account name” “pass word”
Use the create command to first create an account before logging in.
If you have spaces in your name, enclose it in double quotes.
- key = 'connect'¶
- aliases = ['conn', 'co', 'con']¶
- locks = 'cmd:all()'¶
- arg_regex = re.compile('\\s.*?|$', re.IGNORECASE)¶
- func()[source]¶
Uses the Django admin api. Note that unlogged-in commands have a unique position in that their func() receives a session object instead of a source_object like all other types of logged-in commands (this is because there is no object yet before the account has logged in)
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': 'conn co con', 'category': 'general', 'key': 'connect', 'no_prefix': ' conn co con', 'tags': '', 'text': '\nconnect to the game\n\nUsage (at login screen):\n connect accountname password\n connect "account name" "pass word"\n\nUse the create command to first create an account before logging in.\n\nIf you have spaces in your name, enclose it in double quotes.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedCreate(**kwargs)[source]¶
Bases:
MuxCommandcreate a new account account
- Usage (at login screen):
create <accountname> <password> create “account name” “pass word”
This creates a new account account.
If you have spaces in your name, enclose it in double quotes.
- key = 'create'¶
- aliases = ['cr', 'cre']¶
- locks = 'cmd:all()'¶
- arg_regex = re.compile('\\s.*?|$', re.IGNORECASE)¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': 'cr cre', 'category': 'general', 'key': 'create', 'no_prefix': ' cr cre', 'tags': '', 'text': '\ncreate a new account account\n\nUsage (at login screen):\n create <accountname> <password>\n create "account name" "pass word"\n\nThis creates a new account account.\n\nIf you have spaces in your name, enclose it in double quotes.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedQuit(**kwargs)[source]¶
Bases:
MuxCommandquit when in unlogged-in state
- Usage:
quit
We maintain a different version of the quit command here for unconnected accounts for the sake of simplicity. The logged in version is a bit more complicated.
- key = 'quit'¶
- aliases = ['q', 'qu']¶
- locks = 'cmd:all()'¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': 'q qu', 'category': 'general', 'key': 'quit', 'no_prefix': ' q qu', 'tags': '', 'text': '\nquit when in unlogged-in state\n\nUsage:\n quit\n\nWe maintain a different version of the quit command\nhere for unconnected accounts for the sake of simplicity. The logged in\nversion is a bit more complicated.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedLook(**kwargs)[source]¶
Bases:
MuxCommandlook when in unlogged-in state
- Usage:
look
This is an unconnected version of the look command for simplicity.
This is called by the server and kicks everything in gear. All it does is display the connect screen.
- key = '__unloggedin_look_command'¶
- aliases = ['l', 'look']¶
- locks = 'cmd:all()'¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': 'l look', 'category': 'general', 'key': '__unloggedin_look_command', 'no_prefix': ' l look', 'tags': '', 'text': '\nlook when in unlogged-in state\n\nUsage:\n look\n\nThis is an unconnected version of the look command for simplicity.\n\nThis is called by the server and kicks everything in gear.\nAll it does is display the connect screen.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedHelp(**kwargs)[source]¶
Bases:
MuxCommandget help when in unconnected-in state
- Usage:
help
This is an unconnected version of the help command, for simplicity. It shows a pane of info.
- key = 'help'¶
- aliases = ['?', 'h']¶
- locks = 'cmd:all()'¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': '? h', 'category': 'general', 'key': 'help', 'no_prefix': ' ? h', 'tags': '', 'text': '\nget help when in unconnected-in state\n\nUsage:\n help\n\nThis is an unconnected version of the help command,\nfor simplicity. It shows a pane of info.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedEncoding(**kwargs)[source]¶
Bases:
MuxCommandset which text encoding to use in unconnected-in state
- Usage:
encoding/switches [<encoding>]
- Switches:
clear - clear your custom encoding
This sets the text encoding for communicating with Evennia. This is mostly an issue only if you want to use non-ASCII characters (i.e. letters/symbols not found in English). If you see that your characters look strange (or you get encoding errors), you should use this command to set the server encoding to be the same used in your client program.
Common encodings are utf-8 (default), latin-1, ISO-8859-1 etc.
If you don’t submit an encoding, the current encoding will be displayed instead.
- key = 'encoding'¶
- aliases = ['encode']¶
- locks = 'cmd:all()'¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': 'encode', 'category': 'general', 'key': 'encoding', 'no_prefix': ' encode', 'tags': '', 'text': "\nset which text encoding to use in unconnected-in state\n\nUsage:\n encoding/switches [<encoding>]\n\nSwitches:\n clear - clear your custom encoding\n\n\nThis sets the text encoding for communicating with Evennia. This is mostly\nan issue only if you want to use non-ASCII characters (i.e. letters/symbols\nnot found in English). If you see that your characters look strange (or you\nget encoding errors), you should use this command to set the server\nencoding to be the same used in your client program.\n\nCommon encodings are utf-8 (default), latin-1, ISO-8859-1 etc.\n\nIf you don't submit an encoding, the current encoding will be displayed\ninstead.\n"}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedInfo(**kwargs)[source]¶
Bases:
MuxCommandProvides MUDINFO output, so that Evennia games can be added to Mudconnector and Mudstats. Sadly, the MUDINFO specification seems to have dropped off the face of the net, but it is still used by some crawlers. This implementation was created by looking at the MUDINFO implementation in MUX2, TinyMUSH, Rhost, and PennMUSH.
- key = 'info'¶
- locks = 'cmd:all()'¶
- 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 = []¶
- help_category = 'general'¶
- lock_storage = 'cmd:all()'¶
- search_index_entry = {'aliases': '', 'category': 'general', 'key': 'info', 'no_prefix': ' ', 'tags': '', 'text': '\nProvides MUDINFO output, so that Evennia games can be added to Mudconnector\nand Mudstats. Sadly, the MUDINFO specification seems to have dropped off the\nface of the net, but it is still used by some crawlers. This implementation\nwas created by looking at the MUDINFO implementation in MUX2, TinyMUSH, Rhost,\nand PennMUSH.\n'}¶
- class evennia.commands.default.unloggedin.CmdUnconnectedScreenreader(**kwargs)[source]¶
Bases:
MuxCommandActivate screenreader mode.
- Usage:
screenreader
Used to flip screenreader mode on and off before logging in (when logged in, use option screenreader on).
- key = 'screenreader'¶
- aliases = []¶
- help_category = 'general'¶
- lock_storage = 'cmd:all();'¶
- search_index_entry = {'aliases': '', 'category': 'general', 'key': 'screenreader', 'no_prefix': ' ', 'tags': '', 'text': '\nActivate screenreader mode.\n\nUsage:\n screenreader\n\nUsed to flip screenreader mode on and off before logging in (when\nlogged in, use option screenreader on).\n'}¶
- evennia.commands.default.unloggedin.COMMAND_DEFAULT_CLASS¶
alias of
MuxCommand
- class evennia.commands.default.unloggedin.ChannelDB(*args, **kwargs)[source]¶
Bases:
TypedObjectThis is the basis of a comm channel, only implementing the very basics of distributing messages.
The Channel class defines the following database fields beyond the ones inherited from TypedObject:
db_account_subscriptions: The Account subscriptions.
db_object_subscriptions: The Object subscriptions.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- db_account_subscriptions¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
**Pizza.toppings** and **Topping.pizzas** are **ManyToManyDescriptor** instances.
Most of the implementation is delegated to a dynamically defined manager class built by **create_forward_many_to_many_manager()** defined below.
- db_attributes¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
**Pizza.toppings** and **Topping.pizzas** are **ManyToManyDescriptor** instances.
Most of the implementation is delegated to a dynamically defined manager class built by **create_forward_many_to_many_manager()** defined below.
- db_date_created¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- db_key¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- db_lock_storage¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- db_object_subscriptions¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
**Pizza.toppings** and **Topping.pizzas** are **ManyToManyDescriptor** instances.
Most of the implementation is delegated to a dynamically defined manager class built by **create_forward_many_to_many_manager()** defined below.
- db_tags¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
**Pizza.toppings** and **Topping.pizzas** are **ManyToManyDescriptor** instances.
Most of the implementation is delegated to a dynamically defined manager class built by **create_forward_many_to_many_manager()** defined below.
- db_typeclass_path¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_db_date_created(*, field=<django.db.models.fields.DateTimeField: db_date_created>, is_next=True, **kwargs)¶
- get_previous_by_db_date_created(*, field=<django.db.models.fields.DateTimeField: db_date_created>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <evennia.comms.managers.ChannelDBManager object>¶
- path = 'evennia.comms.models.ChannelDB'¶
- typename = 'SharedMemoryModelBase'¶
- evennia.commands.default.unloggedin.class_from_module(path, defaultpaths=None, fallback=None)[source]¶
Return a class from a module, given the class’ full python path. This is primarily used to convert db_typeclass_path:s to classes.
- Parameters:
path (str) – Full Python dot-path to module.
defaultpaths (iterable, optional) – If a direct import from path fails, try subsequent imports by prepending those paths to path.
fallback (str) – If all other attempts fail, use this path as a fallback. This is intended as a last-resort. In the example of Evennia loading, this would be a path to a default parent class in the evennia repo itself.
- Returns:
class (Class) – An uninstantiated class recovered from path.
- Raises:
ImportError – If all loading failed.
- evennia.commands.default.unloggedin.codecs_lookup(encoding, /)¶
Looks up a codec tuple in the Python codec registry and returns a CodecInfo object.
- evennia.commands.default.unloggedin.create_guest_account(session)[source]¶
Creates a guest account/character for this session, if one is available.
- Parameters:
session (Session) – the session which will use the guest account/character.
- Returns:
GUEST_ENABLED (boolean), account (Account) – the boolean is whether guest accounts are enabled at all. the Account which was created from an available guest name.
- evennia.commands.default.unloggedin.create_normal_account(session, name, password)[source]¶
Creates an account with the given name and password.
- Parameters:
session (Session) – the session which is requesting to create an account.
name (str) – the name that the account wants to use for login.
password (str) – the password desired by this account, for login.
- Returns:
account (Account) – the account which was created from the name and password.