.BANCHO. Changed config.ini structure, better logs, add logs to output file
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
from objects import glob
|
||||
from constants import serverPackets
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import exceptions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# get usertoken data
|
||||
@@ -17,5 +16,5 @@ def handle(userToken, packetData):
|
||||
targetToken.enqueue(serverPackets.noSongSpectator(userID))
|
||||
except exceptions.tokenNotFoundException:
|
||||
# Stop spectating if token not found
|
||||
consoleHelper.printColored("[!] Spectator can't spectate: token not found", bcolors.RED)
|
||||
log.warning("Spectator can't spectate: token not found")
|
||||
userToken.stopSpectating()
|
||||
|
@@ -1,8 +1,8 @@
|
||||
from objects import glob
|
||||
from constants import clientPackets
|
||||
from constants import serverPackets
|
||||
from constants import actions
|
||||
from helpers import userHelper
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Get usertoken data
|
||||
@@ -29,4 +29,4 @@ def handle(userToken, packetData):
|
||||
glob.tokens.enqueueAll(serverPackets.userStats(userID))
|
||||
|
||||
# Console output
|
||||
print("> {} changed action: {} [{}][{}]".format(username, str(userToken.actionID), userToken.actionText, userToken.actionMd5))
|
||||
log.info("{} changed action: {} [{}][{}]".format(username, str(userToken.actionID), userToken.actionText, userToken.actionMd5))
|
||||
|
@@ -7,6 +7,7 @@ import random
|
||||
from constants import matchTeamTypes
|
||||
from constants import matchTeams
|
||||
from constants import slotStatuses
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Read new settings
|
||||
@@ -105,5 +106,5 @@ def handle(userToken, packetData):
|
||||
match.sendUpdate()
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> MPROOM{}: Updated room settings".format(match.matchID), bcolors.BLUE)
|
||||
log.info("MPROOM{}: Updated room settings".format(match.matchID))
|
||||
#consoleHelper.printColored("> MPROOM{}: DEBUG: Host is {}".format(match.matchID, match.hostUserID), bcolors.PINK)
|
||||
|
@@ -8,6 +8,7 @@ from constants import bcolors
|
||||
from constants import serverPackets
|
||||
from objects import glob
|
||||
from constants import exceptions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Channel join packet
|
||||
@@ -49,8 +50,8 @@ def joinChannel(userToken, channelName):
|
||||
userToken.enqueue(serverPackets.channelJoinSuccess(userID, channelName))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} joined channel {}".format(username, channelName), bcolors.GREEN)
|
||||
log.info("{} joined channel {}".format(username, channelName))
|
||||
except exceptions.channelNoPermissionsException:
|
||||
consoleHelper.printColored("[!] {} attempted to join channel {}, but they have no read permissions".format(username, channelName), bcolors.RED)
|
||||
log.warning("{} attempted to join channel {}, but they have no read permissions".format(username, channelName))
|
||||
except exceptions.channelUnknownException:
|
||||
consoleHelper.printColored("[!] {} attempted to join an unknown channel ({})".format(username, channelName), bcolors.RED)
|
||||
log.warning("{} attempted to join an unknown channel ({})".format(username, channelName))
|
||||
|
@@ -7,6 +7,7 @@ from constants import bcolors
|
||||
from objects import glob
|
||||
from constants import clientPackets
|
||||
from constants import serverPackets
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Channel part packet
|
||||
@@ -33,4 +34,4 @@ def partChannel(userToken, channelName, kick = False):
|
||||
userToken.enqueue(serverPackets.channelKicked(channelName))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} parted channel {}".format(username, channelName), bcolors.YELLOW)
|
||||
log.info("{} parted channel {}".format(username, channelName))
|
||||
|
@@ -1,10 +1,9 @@
|
||||
from constants import serverPackets
|
||||
from constants import clientPackets
|
||||
from objects import glob
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from events import joinMatchEvent
|
||||
from constants import exceptions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
try:
|
||||
@@ -39,6 +38,6 @@ def handle(userToken, packetData):
|
||||
token.enqueue(serverPackets.createMatch(matchID))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> MPROOM{}: Room created!".format(matchID), bcolors.BLUE)
|
||||
log.info("MPROOM{}: Room created!".format(matchID))
|
||||
except exceptions.matchCreateError:
|
||||
consoleHelper.printColored("[!] Error while creating match!", bcolors.RED)
|
||||
log.error("Error while creating match!")
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from helpers import userHelper
|
||||
from constants import clientPackets
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Friend add packet
|
||||
@@ -7,4 +8,4 @@ def handle(userToken, packetData):
|
||||
userHelper.addFriend(userToken.userID, packetData["friendID"])
|
||||
|
||||
# Console output
|
||||
print("> {} have added {} to their friends".format(userToken.username, str(packetData["friendID"])))
|
||||
log.info("{} have added {} to their friends".format(userToken.username, str(packetData["friendID"])))
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from helpers import userHelper
|
||||
from constants import clientPackets
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Friend remove packet
|
||||
@@ -7,4 +8,4 @@ def handle(userToken, packetData):
|
||||
userHelper.removeFriend(userToken.userID, packetData["friendID"])
|
||||
|
||||
# Console output
|
||||
print("> {} have removed {} from their friends".format(userToken.username, str(packetData["friendID"])))
|
||||
log.info("{} have removed {} from their friends".format(userToken.username, str(packetData["friendID"])))
|
||||
|
@@ -1,7 +1,6 @@
|
||||
from constants import serverPackets
|
||||
from objects import glob
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, _):
|
||||
# Get userToken data
|
||||
@@ -16,4 +15,4 @@ def handle(userToken, _):
|
||||
userToken.enqueue(serverPackets.createMatch(key))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} has joined multiplayer lobby".format(username), bcolors.BLUE)
|
||||
log.info("{} has joined multiplayer lobby".format(username))
|
||||
|
@@ -1,9 +1,8 @@
|
||||
from constants import clientPackets
|
||||
from constants import serverPackets
|
||||
from objects import glob
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import exceptions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# read packet data
|
||||
@@ -12,7 +11,6 @@ def handle(userToken, packetData):
|
||||
# Get match from ID
|
||||
joinMatch(userToken, packetData["matchID"], packetData["password"])
|
||||
|
||||
|
||||
def joinMatch(userToken, matchID, password):
|
||||
try:
|
||||
# TODO: leave other matches
|
||||
@@ -20,7 +18,6 @@ def joinMatch(userToken, matchID, password):
|
||||
|
||||
# get usertoken data
|
||||
userID = userToken.userID
|
||||
username = userToken.username
|
||||
|
||||
# Make sure the match exists
|
||||
if matchID not in glob.matches.matches:
|
||||
@@ -51,10 +48,10 @@ def joinMatch(userToken, matchID, password):
|
||||
#userToken.enqueue(serverPackets.sendMessage("FokaBot", "#multiplayer", "Hi {}, and welcome to Ripple's multiplayer mode! This feature is still WIP and might have some issues. If you find any bugs, please report them (by clicking here)[https://ripple.moe/index.php?p=22].".format(username)))
|
||||
except exceptions.matchNotFoundException:
|
||||
userToken.enqueue(serverPackets.matchJoinFail())
|
||||
consoleHelper.printColored("[!] {} has tried to join a mp room, but it doesn't exist".format(userToken.username), bcolors.RED)
|
||||
log.warning("{} has tried to join a mp room, but it doesn't exist".format(userToken.username))
|
||||
except exceptions.matchWrongPasswordException:
|
||||
userToken.enqueue(serverPackets.matchJoinFail())
|
||||
consoleHelper.printColored("[!] {} has tried to join a mp room, but he typed the wrong password".format(userToken.username), bcolors.RED)
|
||||
log.warning("{} has tried to join a mp room, but he typed the wrong password".format(userToken.username))
|
||||
except exceptions.matchJoinErrorException:
|
||||
userToken.enqueue(serverPackets.matchJoinFail())
|
||||
consoleHelper.printColored("[!] {} has tried to join a mp room, but an error has occured".format(userToken.username), bcolors.RED)
|
||||
log.warning("{} has tried to join a mp room, but an error has occured".format(userToken.username))
|
||||
|
@@ -13,24 +13,19 @@ import sys
|
||||
import traceback
|
||||
from helpers import requestHelper
|
||||
from helpers import discordBotHelper
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(tornadoRequest):
|
||||
# Data to return
|
||||
responseTokenString = "ayy"
|
||||
responseData = bytes()
|
||||
|
||||
# Get IP from flask request
|
||||
# Get IP from tornado request
|
||||
requestIP = tornadoRequest.getRequestIP()
|
||||
|
||||
# Console output
|
||||
print("> Accepting connection from {}...".format(requestIP))
|
||||
|
||||
# Split POST body so we can get username/password/hardware data
|
||||
# 2:-3 thing is because requestData has some escape stuff that we don't need
|
||||
loginData = str(tornadoRequest.request.body)[2:-3].split("\\n")
|
||||
|
||||
# Process login
|
||||
print("> Processing login request for {}...".format(loginData[0]))
|
||||
try:
|
||||
# If true, print error to console
|
||||
err = False
|
||||
@@ -128,14 +123,14 @@ def handle(tornadoRequest):
|
||||
responseToken.enqueue(serverPackets.onlineUsers())
|
||||
|
||||
# Get location and country from ip.zxq.co or database
|
||||
if generalFunctions.stringToBool(glob.conf.config["server"]["localizeusers"]):
|
||||
if glob.localize == True:
|
||||
# Get location and country from IP
|
||||
location = locationHelper.getLocation(requestIP)
|
||||
countryLetters = locationHelper.getCountry(requestIP)
|
||||
country = countryHelper.getCountryID(countryLetters)
|
||||
else:
|
||||
# Set location to 0,0 and get country from db
|
||||
print("[!] Location skipped")
|
||||
log.warning("Location skipped")
|
||||
location = [0,0]
|
||||
countryLetters = "XX"
|
||||
country = countryHelper.getCountryID(userHelper.getCountry(userID))
|
||||
@@ -155,9 +150,6 @@ def handle(tornadoRequest):
|
||||
# Set reponse data to right value and reset our queue
|
||||
responseData = responseToken.queue
|
||||
responseToken.resetQueue()
|
||||
|
||||
# Print logged in message
|
||||
consoleHelper.printColored("> {} logged in ({})".format(loginData[0], responseToken.token), bcolors.GREEN)
|
||||
except exceptions.loginFailedException:
|
||||
# Login failed error packet
|
||||
# (we don't use enqueue because we don't have a token since login has failed)
|
||||
@@ -175,17 +167,10 @@ def handle(tornadoRequest):
|
||||
# Bancho is restarting
|
||||
responseData += serverPackets.notification("Bancho is restarting. Try again in a few minutes.")
|
||||
responseData += serverPackets.loginError()
|
||||
except:
|
||||
# Unknown exception
|
||||
msg = "UNKNOWN ERROR IN LOGIN!!!\n{}\n{}".format(sys.exc_info(), traceback.format_exc())
|
||||
consoleHelper.printColored("[!] {}".format(msg), bcolors.RED)
|
||||
finally:
|
||||
# Print login failed message to console if needed
|
||||
if err == True:
|
||||
consoleHelper.printColored("> {}'s login failed".format(loginData[0]), bcolors.YELLOW)
|
||||
|
||||
# Discord message
|
||||
discordBotHelper.sendConfidential("Bancho login request from {} for user {} ({})".format(requestIP, loginData[0], "failed" if err == True else "success"))
|
||||
# Console and discord log
|
||||
msg = "Bancho login request from {} for user {} ({})".format(requestIP, loginData[0], "failed" if err == True else "success")
|
||||
log.info(msg, True)
|
||||
|
||||
# Return token string and data
|
||||
return (responseTokenString, responseData)
|
||||
|
@@ -3,6 +3,7 @@ from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import serverPackets
|
||||
import time
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, _):
|
||||
# get usertoken data
|
||||
@@ -36,4 +37,4 @@ def handle(userToken, _):
|
||||
glob.tokens.deleteToken(requestToken)
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} have been disconnected.".format(username), bcolors.YELLOW)
|
||||
log.info("{} have been disconnected.".format(username))
|
||||
|
@@ -1,6 +1,7 @@
|
||||
from objects import glob
|
||||
from constants import slotStatuses
|
||||
from constants import serverPackets
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# Get usertoken data
|
||||
@@ -22,10 +23,6 @@ def handle(userToken, packetData):
|
||||
|
||||
# Change slot id in packetData
|
||||
slotID = match.getUserSlotID(userID)
|
||||
'''opd = packetData[4]
|
||||
packetData = bytearray(packetData)
|
||||
packetData[4] = slotID
|
||||
print("User: {}, slot {}, oldPackData: {}, packData {}".format(userID, slotID, opd, packetData[4]))'''
|
||||
|
||||
# Enqueue frames to who's playing
|
||||
for i in range(0,16):
|
||||
|
@@ -1,7 +1,6 @@
|
||||
from objects import glob
|
||||
from events import channelPartEvent
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, _):
|
||||
# Get usertoken data
|
||||
@@ -15,4 +14,4 @@ def handle(userToken, _):
|
||||
channelPartEvent.partChannel(userToken, "#lobby", True)
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} has left multiplayer lobby".format(username), bcolors.BLUE)
|
||||
log.info("{} has left multiplayer lobby".format(username))
|
||||
|
@@ -7,6 +7,7 @@ from objects import fokabot
|
||||
from constants import exceptions
|
||||
from constants import messageTemplates
|
||||
from helpers import generalFunctions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
"""
|
||||
@@ -28,7 +29,7 @@ def handle(userToken, packetData):
|
||||
fokaMessage = fokabot.fokabotResponse(username, packetData["to"], packetData["message"])
|
||||
if fokaMessage != False:
|
||||
userToken.enqueue(serverPackets.sendMessage("FokaBot", username, fokaMessage))
|
||||
consoleHelper.printColored("> FokaBot>{}: {}".format(packetData["to"], str(fokaMessage.encode("UTF-8"))), bcolors.PINK)
|
||||
log.pm("FokaBot -> {}: {}".format(packetData["to"], str(fokaMessage.encode("UTF-8"))))
|
||||
else:
|
||||
# Send packet message to target if it exists
|
||||
token = glob.tokens.getTokenFromUsername(packetData["to"])
|
||||
@@ -46,12 +47,12 @@ def handle(userToken, packetData):
|
||||
if token.awayMessage != "":
|
||||
userToken.enqueue(serverPackets.sendMessage(packetData["to"], username, "This user is away: {}".format(token.awayMessage)))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {}>{}: {}".format(username, packetData["to"], packetData["message"]), bcolors.PINK)
|
||||
# Console and file output
|
||||
log.pm("{} -> {}: {}".format(username, packetData["to"], packetData["message"]))
|
||||
|
||||
# Log to file
|
||||
with open(".data/chatlog_private.txt", "a") as f:
|
||||
f.write("[{date}] {fro} -> {to}: {message}\n".format(date=generalFunctions.getTimestamp(), fro=username, to=packetData["to"], message=str(packetData["message"].encode("utf-8"))[2:-1]))
|
||||
# Log to chatlog_private
|
||||
#with open(".data/chatlog_private.txt", "a") as f:
|
||||
# f.write("[{date}] {fro} -> {to}: {message}\n".format(date=generalFunctions.getTimestamp(), fro=username, to=packetData["to"], message=str(packetData["message"].encode("utf-8"))[2:-1]))
|
||||
except exceptions.tokenNotFoundException:
|
||||
# Token not found, user disconnected
|
||||
consoleHelper.printColored("[!] {} tried to send a message to {}, but their token couldn't be found".format(username, packetData["to"]), bcolors.RED)
|
||||
log.warning("{} tried to send a message to {}, but their token couldn't be found".format(username, packetData["to"]))
|
||||
|
@@ -2,10 +2,9 @@ from constants import exceptions
|
||||
from constants import clientPackets
|
||||
from objects import glob
|
||||
from objects import fokabot
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import serverPackets
|
||||
from helpers import discordBotHelper
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
"""
|
||||
@@ -97,16 +96,16 @@ def handle(userToken, packetData):
|
||||
if fokaMessage != False:
|
||||
who.append(userID)
|
||||
glob.tokens.multipleEnqueue(serverPackets.sendMessage("FokaBot", packetData["to"], fokaMessage), who, False)
|
||||
consoleHelper.printColored("> FokaBot@{}: {}".format(packetData["to"], str(fokaMessage.encode("UTF-8"))), bcolors.PINK)
|
||||
log.chat("FokaBot @ {}: {}".format(packetData["to"], str(fokaMessage.encode("UTF-8"))))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {}@{}: {}".format(username, packetData["to"], str(packetData["message"].encode("utf-8"))), bcolors.PINK)
|
||||
# Console and file log
|
||||
log.chat("{fro} @ {to}: {message}".format(fro=username, to=packetData["to"], message=str(packetData["message"].encode("utf-8"))))
|
||||
|
||||
# Discord/file log
|
||||
discordBotHelper.sendChatlog("**{fro}{type}{to}:** {message}".format(fro=username, type="@" if packetData["to"].startswith("#") else ">", to=packetData["to"], message=str(packetData["message"].encode("utf-8"))[2:-1]))
|
||||
# Discord log
|
||||
discordBotHelper.sendChatlog("**{fro} @ {to}:** {message}".format(fro=username, to=packetData["to"], message=str(packetData["message"].encode("utf-8"))[2:-1]))
|
||||
except exceptions.channelModeratedException:
|
||||
consoleHelper.printColored("[!] {} tried to send a message to a channel that is in moderated mode ({})".format(username, packetData["to"]), bcolors.RED)
|
||||
log.warning("{} tried to send a message to a channel that is in moderated mode ({})".format(username, packetData["to"]))
|
||||
except exceptions.channelUnknownException:
|
||||
consoleHelper.printColored("[!] {} tried to send a message to an unknown channel ({})".format(username, packetData["to"]), bcolors.RED)
|
||||
log.warning("{} tried to send a message to an unknown channel ({})".format(username, packetData["to"]))
|
||||
except exceptions.channelNoPermissionsException:
|
||||
consoleHelper.printColored("[!] {} tried to send a message to channel {}, but they have no write permissions".format(username, packetData["to"]), bcolors.RED)
|
||||
log.warning("{} tried to send a message to channel {}, but they have no write permissions".format(username, packetData["to"]))
|
||||
|
@@ -1,5 +1,6 @@
|
||||
from constants import clientPackets
|
||||
from constants import serverPackets
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
# get token data
|
||||
@@ -17,4 +18,4 @@ def handle(userToken, packetData):
|
||||
else:
|
||||
fokaMessage = "Your away message is now: {}".format(packetData["awayMessage"])
|
||||
userToken.enqueue(serverPackets.sendMessage("FokaBot", username, fokaMessage))
|
||||
print("{} has changed their away message to: {}".format(username, packetData["awayMessage"]))
|
||||
log.info("{} has changed their away message to: {}".format(username, packetData["awayMessage"]))
|
||||
|
@@ -1,6 +1,4 @@
|
||||
from objects import glob
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import serverPackets
|
||||
from constants import exceptions
|
||||
|
||||
@@ -9,7 +7,6 @@ def handle(userToken, packetData):
|
||||
userID = userToken.userID
|
||||
|
||||
# Send spectator frames to every spectator
|
||||
consoleHelper.printColored("> {}'s spectators: {}".format(str(userID), str(userToken.spectators)), bcolors.BLUE)
|
||||
for i in userToken.spectators:
|
||||
# Send to every user but host
|
||||
if i != userID:
|
||||
|
@@ -1,10 +1,9 @@
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from constants import clientPackets
|
||||
from constants import serverPackets
|
||||
from constants import exceptions
|
||||
from objects import glob
|
||||
from helpers import userHelper
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, packetData):
|
||||
try:
|
||||
@@ -43,9 +42,8 @@ def handle(userToken, packetData):
|
||||
targetToken.enqueue(serverPackets.channelJoinSuccess(userID, "#spectator"))
|
||||
|
||||
# Console output
|
||||
consoleHelper.printColored("> {} are spectating {}".format(username, userHelper.getUsername(packetData["userID"])), bcolors.PINK)
|
||||
consoleHelper.printColored("> {}'s spectators: {}".format(str(packetData["userID"]), str(targetToken.spectators)), bcolors.BLUE)
|
||||
log.info("{} are spectating {}".format(username, userHelper.getUsername(packetData["userID"])))
|
||||
except exceptions.tokenNotFoundException:
|
||||
# Stop spectating if token not found
|
||||
consoleHelper.printColored("[!] Spectator start: token not found", bcolors.RED)
|
||||
log.warning("Spectator start: token not found")
|
||||
userToken.stopSpectating()
|
||||
|
@@ -1,8 +1,7 @@
|
||||
from helpers import consoleHelper
|
||||
from constants import bcolors
|
||||
from objects import glob
|
||||
from constants import serverPackets
|
||||
from constants import exceptions
|
||||
from helpers import logHelper as log
|
||||
|
||||
def handle(userToken, _):
|
||||
try:
|
||||
@@ -22,10 +21,9 @@ def handle(userToken, _):
|
||||
|
||||
# Console output
|
||||
# TODO: Move messages in stop spectating
|
||||
consoleHelper.printColored("> {} are no longer spectating whoever they were spectating".format(username), bcolors.PINK)
|
||||
consoleHelper.printColored("> {}'s spectators: {}".format(str(target), str(targetToken.spectators)), bcolors.BLUE)
|
||||
log.info("{} are no longer spectating whoever they were spectating".format(username))
|
||||
except exceptions.tokenNotFoundException:
|
||||
consoleHelper.printColored("[!] Spectator stop: token not found", bcolors.RED)
|
||||
log.warning("Spectator stop: token not found")
|
||||
finally:
|
||||
# Set our spectating user to 0
|
||||
userToken.stopSpectating()
|
||||
|
Reference in New Issue
Block a user