Beispiel #1
0
:   \ \_\ \____\/\____\ \____/\ \_\ \___,_\ \_\\\\ \_\ \_____\ \____/
:    \/_/\/____/\/____/\/___/  \/_/\/__,_ /\/_/ \/_/\/_____/\/___/
:
: {{WELCOME}}
: {{HELP}}
:
: Enjoy!
:
"""

# Telnet server for account creation
telnet = Config()
telnet.servicename = "Telnet Server"
telnet.ip = ssh.ip
telnet.port = ssh.port - 1
telnet.banner = """
Welcome to
  ____        ___                   __           __  __  ____
 /\  _`\     /\_ \           __    /\ \  /'\_/`\/\ \/\ \/\  _`\\
 \ \ \L\ \ __\//\ \     ___ /\_\   \_\ \/\      \ \ \ \ \ \ \/\ \\
  \ \ ,__/'__`\\\\ \ \   / __`\/\ \  /'_` \ \ \__\ \ \ \ \ \ \ \ \ \\
   \ \ \/\  __/ \_\ \_/\ \L\ \ \ \/\ \L\ \ \ \_/\ \ \ \_\ \ \ \_\ \\
    \ \_\ \____\/\____\ \____/\ \_\ \___,_\ \_\\\\ \_\ \_____\ \____/
     \/_/\/____/\/____/\/___/  \/_/\/__,_ /\/_/ \/_/\/_____/\/___/

You have connected to a Peloid registration server.

"""
telnet.registration = """
------------------------------------------------------------------------------
  "register <email@address> <SSH keys URL>" sets up an ssh account for you.
Beispiel #2
0
: {{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
        with open(game.bannerfile) as banner_file:
            self.banner = util.renderBanner(
                self.ssh.banner, banner_file.read(), game.helpprompt)

    def buildDefaults(self):
        config = super(MyriadConfigurator, self).buildDefaults()
        config.add_section("Game")
        config.set("Game", "name", self.game.name)