Reworked config structure

This commit is contained in:
Sunpy
2018-10-09 10:54:35 +02:00
parent 5111b6b05f
commit 848dacf621
8 changed files with 54 additions and 30 deletions

View File

@@ -51,9 +51,9 @@ def instantRestart(fro, chan, message):
def faq(fro, chan, message):
key = message[0].lower()
if key not in glob.conf.extra["faq"]:
if key not in glob.conf.extra["pep.py"]["faq"]:
return False
return glob.conf.extra["faq"][key]
return glob.conf.extra["pep.py"]["faq"][key]
def roll(fro, chan, message):
maxPoints = 100

View File

@@ -16,12 +16,12 @@ def forceUpdate():
def loginBanned():
packets = packetHelper.buildPacket(packetIDs.server_userID, [[-1, dataTypes.SINT32]])
packets += notification("You are banned. You can appeal after one month since your ban by sending an email to {} from the email address you've used to sign up.".format(glob.conf.extra["support-email"]))
packets += notification("You are banned. You can appeal after one month since your ban by sending an email to {} from the email address you've used to sign up.".format(glob.conf.extra["pep.py"]["support-email"]))
return packets
def loginLocked():
packets = packetHelper.buildPacket(packetIDs.server_userID, [[-1, dataTypes.SINT32]])
packets += notification("Your account is locked. You can't log in, but your profile and scores are still visible from the website. If you want to unlock your account, send an email to {} from the email address you've used to sign up.".format(glob.conf.extra["support-email"]))
packets += notification("Your account is locked. You can't log in, but your profile and scores are still visible from the website. If you want to unlock your account, send an email to {} from the email address you've used to sign up.".format(glob.conf.extra["pep.py"]["support-email"]))
return packets
def loginError():