Beispiel #1
0
type of MUD to another, they could be output types as well.

The "unknown" type is used to strip out all color codes,
and is not valid as an input type.

Finally, there is a TTYPE_MAP which is used to map known
client terminal types (as reported by the client over
TELNET) to one of our supported types.  This is usually
a "best guess", since the underlying terminal can't be
obtained.  ANSI is a pretty good default these days.

"""
from collections import namedtuple
import log_system

logger = log_system.init_logging()

TERMINAL_TYPES = ('unknown', 'pyku', 'rom', 'smaug', 'imc2', 'ansi',
                  'greyscale', 'i3', 'mxp')

ColorToken = namedtuple('ColorToken', TERMINAL_TYPES)

TTYPE_MAP = {
    'tinyfugue': 'ansi',
}

COLOR_MAP = {}

COLOR_MAP['unknown'] = {}

COLOR_MAP['pyku'] = {
Beispiel #2
0
# -*- coding: utf-8 -*- line endings: unix -*-
__author__ = 'quixadhal'

from sqlalchemy import Column, Integer, String, Boolean, DateTime
from datetime import datetime
import log_system
from db_system import DataBase

logger = log_system.init_logging()


class Option(DataBase):
    __tablename__ = 'option'

    date_created = Column(DateTime, primary_key=True, default=datetime.now)
    version = Column(String)
    port = Column(Integer, default=4400)
    wizlock = Column(Boolean, default=False)
    hotboot = Column(Boolean, default=False)