evennia.contrib.menu_login

A login menu using EvMenu.

Contribution - Vincent-lg 2016, Griatch 2019 (rework for modern EvMenu)

This changes the Evennia login to ask for the account name and password in sequence instead of requiring you to enter both at once.

To install, add this line to the settings file (mygame/server/conf/settings.py):

CMDSET_UNLOGGEDIN = “evennia.contrib.menu_login.UnloggedinCmdSet”

Reload the server and the new connection method will be active. Note that you must independently change the connection screen to match this login style, by editing mygame/server/conf/connection_screens.py.

This uses Evennia’s menu system EvMenu and is triggered by a command that is called automatically when a new user connects.

evennia.contrib.menu_login.node_enter_username(caller, raw_text, **kwargs)[source]

Start node of menu Start login by displaying the connection screen and ask for a user name.

evennia.contrib.menu_login.node_enter_password(caller, raw_string, **kwargs)[source]

Handle password input.

evennia.contrib.menu_login.node_quit_or_login(caller, raw_text, **kwargs)[source]

Exit menu, either by disconnecting or logging in.

class evennia.contrib.menu_login.UnloggedinCmdSet(cmdsetobj=None, key=None)[source]

Bases: evennia.commands.cmdset.CmdSet

Cmdset for the unloggedin state

key = 'DefaultUnloggedin'
priority = 0
at_cmdset_creation()[source]

Called when cmdset is first created.

path = 'evennia.contrib.menu_login.UnloggedinCmdSet'
class evennia.contrib.menu_login.CmdUnloggedinLook(**kwargs)[source]

Bases: evennia.commands.command.Command

An unloggedin version of the look command. This is called by the server when the account first connects. It sets up the menu before handing off to the menu’s own look command.

key = '__unloggedin_look_command'
locks = 'cmd:all()'
arg_regex = re.compile('^$', re.IGNORECASE)
func()[source]

Run the menu using the nodes in this module.

aliases = []
help_category = 'general'
lock_storage = 'cmd:all()'
search_index_entry = {'aliases': '', 'category': 'general', 'key': '__unloggedin_look_command', 'tags': '', 'text': "\n An unloggedin version of the look command. This is called by the server\n when the account first connects. It sets up the menu before handing off\n to the menu's own look command.\n\n "}