From 5d65fd4e234297bc8fa6833e21678adfc9c59e86 Mon Sep 17 00:00:00 2001 From: russelg Date: Thu, 16 Jun 2016 21:54:35 +0800 Subject: [PATCH] .FIX. .BANCHO. Fix spectator listings. --- events/startSpectatingEvent.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/events/startSpectatingEvent.py b/events/startSpectatingEvent.py index c9b998d..2eeec23 100644 --- a/events/startSpectatingEvent.py +++ b/events/startSpectatingEvent.py @@ -42,11 +42,11 @@ def handle(userToken, packetData): targetToken.enqueue(serverPackets.channelJoinSuccess(userID, "#spectator")) # send fellowSpectatorJoined to all spectators - for c in targetToken.spectators: - if c is not userID: - targetToken.enqueue(serverPackets.fellowSpectatorJoined(c)) - specToken = glob.tokens.getTokenFromUserID(c) - specToken.enqueue(serverPackets.fellowSpectatorJoined(userID)) + for spec in targetToken.spectators: + if spec is not userID: + c = glob.tokens.getTokenFromUserID(spec) + userToken.enqueue(serverPackets.fellowSpectatorJoined(c.userID)) + c.enqueue(serverPackets.fellowSpectatorJoined(userID)) # Console output log.info("{} are spectating {}".format(username, userHelper.getUsername(packetData["userID"])))