.BANCHO. Send login notification before maintenance message
This commit is contained in:
parent
8c55604c1d
commit
6cde5b2e68
|
@ -4,13 +4,11 @@ from objects import glob
|
||||||
from constants import serverPackets
|
from constants import serverPackets
|
||||||
from constants import exceptions
|
from constants import exceptions
|
||||||
from helpers import userHelper
|
from helpers import userHelper
|
||||||
import time
|
|
||||||
from helpers import systemHelper
|
from helpers import systemHelper
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
from constants import mods
|
from constants import mods
|
||||||
from helpers import generalFunctions
|
from helpers import generalFunctions
|
||||||
from helpers import discordBotHelper
|
|
||||||
from helpers import logHelper as log
|
from helpers import logHelper as log
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -72,6 +72,10 @@ def handle(tornadoRequest):
|
||||||
if glob.restarting == True:
|
if glob.restarting == True:
|
||||||
raise exceptions.banchoRestartingException()
|
raise exceptions.banchoRestartingException()
|
||||||
|
|
||||||
|
# Send login notification before maintenance message
|
||||||
|
if glob.banchoConf.config["loginNotification"] != "":
|
||||||
|
responseToken.enqueue(serverPackets.notification(glob.banchoConf.config["loginNotification"]))
|
||||||
|
|
||||||
# Maintenance check
|
# Maintenance check
|
||||||
if glob.banchoConf.config["banchoMaintenance"] == True:
|
if glob.banchoConf.config["banchoMaintenance"] == True:
|
||||||
if userGMT == False:
|
if userGMT == False:
|
||||||
|
@ -110,13 +114,10 @@ def handle(tornadoRequest):
|
||||||
# Send friends list
|
# Send friends list
|
||||||
responseToken.enqueue(serverPackets.friendList(userID))
|
responseToken.enqueue(serverPackets.friendList(userID))
|
||||||
|
|
||||||
# Send main menu icon and login notification if needed
|
# Send main menu icon
|
||||||
if glob.banchoConf.config["menuIcon"] != "":
|
if glob.banchoConf.config["menuIcon"] != "":
|
||||||
responseToken.enqueue(serverPackets.mainMenuIcon(glob.banchoConf.config["menuIcon"]))
|
responseToken.enqueue(serverPackets.mainMenuIcon(glob.banchoConf.config["menuIcon"]))
|
||||||
|
|
||||||
if glob.banchoConf.config["loginNotification"] != "":
|
|
||||||
responseToken.enqueue(serverPackets.notification(glob.banchoConf.config["loginNotification"]))
|
|
||||||
|
|
||||||
# Get everyone else userpanel
|
# Get everyone else userpanel
|
||||||
# TODO: Better online users handling
|
# TODO: Better online users handling
|
||||||
for key, value in glob.tokens.tokens.items():
|
for key, value in glob.tokens.tokens.items():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user