from peloid import meta moduleProvides(interfaces.IConfig) # Main main.config.datadir = os.path.expanduser("~/.%s" % meta.library_name) main.config.localfile = "config.ini" main.config.installedfile = os.path.join( main.config.datadir, main.config.localfile) # Database db = Config() db.name = "peloid" db.usercollection = "user-data" db.gamecollection = "game-data" # SSH Server for game ssh.servicename = meta.description ssh.port = 4222 ssh.keydir = os.path.join(main.config.datadir, "ssh") ssh.userdirtemplate = os.path.join(main.config.datadir, "users", "{{USER}}") ssh.userauthkeys = os.path.join(ssh.userdirtemplate, "authorized_keys") ssh.welcome = "Hello, {{NAME}}! You have entered a PeloidMUD Server." ssh.banner = """: : Welcome to : ____ ___ __ __ __ ____ :/\ _`\ /\_ \ __ /\ \ /'\_/`\/\ \/\ \/\ _`\\ :\ \ \L\ \ __\//\ \ ___ /\_\ \_\ \/\ \ \ \ \ \ \ \/\ \\
ssh.keydir = os.path.join(main.config.userdir, "ssh") ssh.localdir = "~/.ssh" ssh.banner = """: : Welcome to {{GAME_BANNER}} : : : You have logged into a Myriad Worlds Server. : {{HELP}} : : Enjoy! : """ game = Config() game.name = "The House II" game.storydir = os.path.abspath("examples/house-adventure-2") game.storyfile = os.path.abspath( os.path.join(game.storydir, "story.yaml")) game.bannerfile = os.path.abspath( os.path.join(game.storydir, "banner.asc")) game.type = const.LOCAL game.helpprompt = "Type 'help' at any time to view a list of commands." game.banner = "" class MyriadConfigurator(Configurator): def __init__(self, main, ssh, game): super(MyriadConfigurator, self).__init__(main, ssh) self.game = game