Skip to content

Instantly share code, notes, and snippets.

@whutch whutch/
Created Jan 26, 2016

What would you like to do?
Test game module for Atria
# -*- coding: utf-8 -*-
"""A test game for prototyping."""
# Part of Atria MUD Server (
# :copyright: (c) 2008 - 2016 Will Hutcheson
# :license: MIT (
import re
from .. import settings
from ..core.accounts import Account, AccountMenu, AccountName
from import EVENTS
settings.IDLE_TIME_MAX = 0 # Temporary
# Adjust the validation pattern for account names
AccountName._valid_chars = re.compile(".+")
# We don't need the default connect menu.
def _hook_session_started(session):
email = "{}".format(session.address)
account = Account.load(email, default=None)
if not account:
account = Account() = email = session.address
account.options.color = True
session.account = account = AccountMenu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.