ColdCore/config.py

52 lines
1.4 KiB
Python
Raw Normal View History

import os
from datetime import datetime
2016-07-09 14:42:07 +00:00
ctf_name = "IceCTF"
#IRC Channel
2016-07-09 14:42:07 +00:00
ctf_chat_channel = "#IceCTF"
2016-07-09 15:07:41 +00:00
ctf_home_url = "https://icec.tf"
2016-07-10 16:15:33 +00:00
eligibility = "In order to be eligible for prizes, all members of your team must be Icelandic residents, and you must not have more than three team members."
tagline = "The Icelandic Hacking Competition"
2016-02-04 01:20:39 +00:00
cdn = True
2015-11-12 03:41:04 +00:00
apisubmit = True
2016-04-17 16:33:42 +00:00
registration = True
2015-11-08 06:10:26 +00:00
proxied_ip_header = "X-Forwarded-For"
2016-05-22 20:10:12 +00:00
flag_rl = 5
2015-11-08 19:04:02 +00:00
teams_on_graph = 10
2015-11-09 02:44:04 +00:00
mail_from = "tjctf@sandbox1431.mailgun.org"
2016-05-27 01:58:31 +00:00
immediate_scoreboard = False
2016-05-15 22:05:42 +00:00
# IPs that are allowed to confirm teams by posting to /teamconfirm/
# Useful for verifying resumes and use with resume server.
confirm_ip = []
2016-07-10 16:15:33 +00:00
static_prefix = "http://127.0.0.1/static/"
static_dir = "{}/static/".format(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
2016-07-10 16:15:33 +00:00
custom_stylesheet = "css/main.css"
2015-11-08 19:04:02 +00:00
competition_begin = datetime(1970, 1, 1, 0, 0)
2016-02-03 22:31:14 +00:00
competition_end = datetime(2018, 1, 1, 0, 0)
2016-05-15 22:05:42 +00:00
# Are you using a resume server?
2016-07-09 15:07:41 +00:00
resumes = False
2016-05-15 22:05:42 +00:00
# If yes, where's it hosted? Otherwise, just put None.
2016-07-09 15:07:41 +00:00
resume_server = None
2016-05-15 22:05:42 +00:00
2016-07-09 20:09:45 +00:00
disallowed_domain = "icec.tf"
2016-05-22 20:16:52 +00:00
2016-05-15 22:05:42 +00:00
def competition_is_running():
return competition_begin < datetime.now() < competition_end
2015-11-08 19:04:02 +00:00
# Don't touch these. Instead, copy secrets.example to secrets and edit that.
import yaml
from collections import namedtuple
with open("secrets") as f:
_secret = yaml.load(f)
secret = namedtuple('SecretsDict', _secret.keys())(**_secret)