diff --git a/constants/fokabotCommands.py b/constants/fokabotCommands.py index 5cdfbb6..672a512 100644 --- a/constants/fokabotCommands.py +++ b/constants/fokabotCommands.py @@ -4,13 +4,11 @@ from objects import glob from constants import serverPackets from constants import exceptions from helpers import userHelper -import time from helpers import systemHelper import requests import json from constants import mods from helpers import generalFunctions -from helpers import discordBotHelper from helpers import logHelper as log """ diff --git a/events/loginEvent.py b/events/loginEvent.py index 023aa5b..1311b70 100644 --- a/events/loginEvent.py +++ b/events/loginEvent.py @@ -72,6 +72,10 @@ def handle(tornadoRequest): if glob.restarting == True: raise exceptions.banchoRestartingException() + # Send login notification before maintenance message + if glob.banchoConf.config["loginNotification"] != "": + responseToken.enqueue(serverPackets.notification(glob.banchoConf.config["loginNotification"])) + # Maintenance check if glob.banchoConf.config["banchoMaintenance"] == True: if userGMT == False: @@ -110,13 +114,10 @@ def handle(tornadoRequest): # Send friends list responseToken.enqueue(serverPackets.friendList(userID)) - # Send main menu icon and login notification if needed + # Send main menu icon if 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 # TODO: Better online users handling for key, value in glob.tokens.tokens.items():