.BANCHO. .FIX. Stop spectating only if user is spectating someone
This commit is contained in:
parent
d5c87ba51c
commit
31a78432bb
|
@ -146,6 +146,8 @@ class token:
|
||||||
def stopSpectating(self):
|
def stopSpectating(self):
|
||||||
# Remove our userID from host's spectators
|
# Remove our userID from host's spectators
|
||||||
target = self.spectating
|
target = self.spectating
|
||||||
|
if self.spectating == 0:
|
||||||
|
return
|
||||||
targetToken = glob.tokens.getTokenFromUserID(target)
|
targetToken = glob.tokens.getTokenFromUserID(target)
|
||||||
if targetToken is not None:
|
if targetToken is not None:
|
||||||
# Remove us from host's spectators list
|
# Remove us from host's spectators list
|
||||||
|
|
3
pep.py
3
pep.py
|
@ -82,9 +82,6 @@ if __name__ == "__main__":
|
||||||
os.makedirs(i, 0o770)
|
os.makedirs(i, 0o770)
|
||||||
consoleHelper.printDone()
|
consoleHelper.printDone()
|
||||||
|
|
||||||
# Flush file buffers at exit
|
|
||||||
#atexit.register(lambda: glob.fileBuffers.flushAll())
|
|
||||||
|
|
||||||
# Connect to db
|
# Connect to db
|
||||||
try:
|
try:
|
||||||
consoleHelper.printNoNl("> Connecting to MySQL db")
|
consoleHelper.printNoNl("> Connecting to MySQL db")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user