Additional configuration

This commit is contained in:
Sunpy committed 2018-02-14 19:59:43 +01:00
1 parent 956aa8161f
commit f0fa00b181
3 files changed
+26 -2

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
{
"support-email": "[email protected]",
"faq":
{
"rules": "Please make sure to check (Ripple's rules)[http://ripple.moe/?p=23].",
"swearing": "Please don't abuse swearing",
"spam": "Please don't spam",
"offend": "Please don't offend other players",
"github": "(Ripple's Github page!)[https://github.com/osuripple/ripple]",
"discord": "(Join Ripple's Discord!)[https://discord.gg/0rJcZruIsA6rXuIx]",
"blog": "You can find the latest Ripple news on the (blog)[https://ripple.moe/blog/]!",
"changelog": "Check the (changelog)[https://ripple.moe/index.php?p=17] !",
"status": "Check the server status (here!)[https://ripple.moe/index.php?p=27]",
"english": "Please keep this channel in english.",
"topic": "Can you please drop the topic and talk about something else?",
"lines": "Please try to keep your sentences on a single line to avoid getting silenced."
}
}
+2 -2
View File
@@ -16,12 +16,12 @@ def forceUpdate():
def loginBanned(): def loginBanned():
packets = packetHelper.buildPacket(packetIDs.server_userID, [[-1, dataTypes.SINT32]]) 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 [email protected] from the email address you've used to sign up.") 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"]))
return packets return packets
def loginLocked(): def loginLocked():
packets = packetHelper.buildPacket(packetIDs.server_userID, [[-1, dataTypes.SINT32]]) 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 [email protected] from the email address you've used to sign up.") 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"]))
return packets return packets
def loginError(): def loginError():
+6
View File
@@ -1,6 +1,7 @@
import os import os
import sys import sys
import threading import threading
import json
from multiprocessing.pool import ThreadPool from multiprocessing.pool import ThreadPool
import tornado.gen import tornado.gen
import tornado.httpserver import tornado.httpserver
@@ -61,6 +62,11 @@ if __name__ == "__main__":
consoleHelper.printNoNl("> Loading config file... ") consoleHelper.printNoNl("> Loading config file... ")
glob.conf = configHelper.config("config.ini") glob.conf = configHelper.config("config.ini")
# Read additional config file
consoleHelper.printNoNl("> Loading additional config file... ")
with open("config.json", "r") as f:
glob.conf.extra = json.load(f)
if glob.conf.default: if glob.conf.default:
# We have generated a default config.ini, quit server # We have generated a default config.ini, quit server
consoleHelper.printWarning() consoleHelper.printWarning()