import logging try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict dgl_mode = True bind_nonsecure = True # Set to false to only use SSL bind_address = "0.0.0.0" bind_port = 8080 bind_pairs = ( ("0.0.0.0", 8080), ) logging_config = { "filename": "%%CHROOT_WEBDIR%%/run/webtiles.log", "level": logging.INFO, "format": "%(asctime)s %(levelname)s: %(message)s" } password_db = "%%CHROOT_LOGIN_DB%%" static_path = "%%CHROOT_WEBDIR%%/static" template_path = "%%CHROOT_WEBDIR%%/templates/" # Path for server-side unix sockets (to be used to communicate with crawl) server_socket_path = None # Uses global temp dir # Server name, so far only used in the ttyrec metadata server_id = "ctvo" # Disable caching of game data files game_data_no_cache = False # Watch socket dirs for games not started by the server watch_socket_dirs = True # Game configs # %n in paths is replaced by the current username games = OrderedDict([ ("dcss-git", dict( name = "DCSS trunk", crawl_binary = "/bin/crawl-git-launcher.sh", send_json_options = True, rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-git/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets")), ("spr-git", dict( name = "Sprint trunk", crawl_binary = "/bin/crawl-git-launcher.sh", send_json_options = True, rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-git-sprint/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-sprint"])), ("tut-git", dict( name = "Tutorial trunk", crawl_binary = "/bin/crawl-git-launcher.sh", send_json_options = True, rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-git/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-git-tut/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-tutorial"])), ("dcss-0.23", dict( name = "DCSS 0.23", crawl_binary = "/bin/crawl-stable-launcher.sh", send_json_options = True, pre_options = [ "0.23" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/crawl/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-0.23/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets")), ("spr-0.23", dict( name = "Sprint 0.23", crawl_binary = "/bin/crawl-stable-launcher.sh", send_json_options = True, pre_options = [ "0.23" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-23-sprint/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-sprint"])), ("tut-0.23", dict( name = "Tutorial 0.23", crawl_binary = "/bin/crawl-git-launcher.sh", send_json_options = True, pre_options = [ "0.23" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.23/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-0.23-tut/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-tutorial"])), ("dcss-0.22", dict( name = "DCSS 0.22", crawl_binary = "/bin/crawl-stable-launcher.sh", send_json_options = True, pre_options = [ "0.22" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-0.22/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets")), ("spr-0.22", dict( name = "Sprint 0.22", crawl_binary = "/bin/crawl-stable-launcher.sh", send_json_options = True, pre_options = [ "0.22" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-22-sprint/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-sprint"])), ("tut-0.22", dict( name = "Tutorial 0.22", crawl_binary = "/bin/crawl-git-launcher.sh", send_json_options = True, pre_options = [ "0.22" ], rcfile_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", macro_path = "%%CHROOT_RCFILESDIR%%/crawl-0.22/", morgue_path = "%%CHROOT_MORGUEDIR%%/%n/", morgue_url = "https://crawl.tildeverse.org/morgue/%n/", inprogress_path = "%%CHROOT_INPROGRESSDIR%%/crawl-0.22-tut/", ttyrec_path = "%%CHROOT_TTYRECDIR%%/%n/", socket_path = "%%CHROOT_WEBDIR%%/sockets", options = ["-tutorial"])), ]) dgl_status_file = "%%CHROOT_WEBDIR%%/run/status" # Set to None not to read milestones milestone_file = [ "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.23/saves/milestones", "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.23/saves/milestones-tutorial", "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.23/saves/milestones-sprint", "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.22/saves/milestones", "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.22/saves/milestones-tutorial", "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.22/saves/milestones-sprint", "%%CHROOT_CRAWL_BASEDIR%%/crawl-git/saves/milestones", "%%CHROOT_CRAWL_BASEDIR%%/crawl-git/saves/milestones-tutorial", "%%CHROOT_CRAWL_BASEDIR%%/crawl-git/saves/milestones-sprint", "%%CHROOT_CRAWL_GAMEDIR%%/saves/milestones", "%%CHROOT_CRAWL_GAMEDIR%%/saves/milestones-tutorial", "%%CHROOT_CRAWL_GAMEDIR%%/saves/milestones-sprint" ] status_file_update_rate = 5 recording_term_size = (80, 24) max_connections = 500 # Script to initialize a user, e.g. make sure the paths # and the rc file exist. This is not done by the server # at the moment. init_player_program = "/bin/init-webtiles.sh" #ssl_options = None # No SSL ssl_options = { "certfile": "/etc/ssl/crawl.tildeverse.org.pem", "keyfile": "/etc/ssl/private/crawl.tildeverse.org.pem", "ca_certs": "/etc/ssl/certs/ca-certificates.crt" } ssl_address = "0.0.0.0" ssl_port = 8081 ssl_bind_pairs = ( ("0.0.0.0", 8081), ) connection_timeout = 600 max_idle_time = 5 * 60 * 60 # Seconds until stale HTTP connections are closed # This needs a patch currently not in mainline tornado. http_connection_timeout = 600 kill_timeout = 10 # Seconds until crawl is killed after HUP is sent nick_regex = r"^[a-zA-Z0-9]{3,20}$" max_passwd_length = 20 # crypt() algorithm, e.g. "1" for MD5 or "6" for SHA-512; see crypt(3). # If false, use traditional DES (but then only the first eight characters # are significant). crypt_algorithm = "6" # If crypt_algorithm is true, the length of the salt string to use. If # crypt_algorithm is false, a two-character salt is used. crypt_salt_length = 16 login_token_lifetime = 7 # Days uid = 1001 # If this is not None, the server will setuid to that (numeric) id gid = 1001 # after binding its sockets. umask = None # e.g. 0077 chroot = "%%DGL_CHROOT%%" pidfile = "%%CHROOT_WEBDIR%%/run/webtiles.pid" daemon = True # If true, the server will detach from the session after startup player_url = "http://crawl.akrasiac.org/scoring/players/%s.html"