.BANCHO. .FIX. Fix stop spectating not working properly if host disconnects

This commit is contained in:
Nyo 2016-12-21 23:26:47 +01:00
parent fd23cf2b2c
commit ebf0e1d458

View File

@ -243,12 +243,12 @@ class token:
chat.partChannel(token=hostToken, channel="#spect_{}".format(hostToken.userID), kick=True) chat.partChannel(token=hostToken, channel="#spect_{}".format(hostToken.userID), kick=True)
hostToken.leaveStream(streamName) hostToken.leaveStream(streamName)
# Console output
log.info("{} is no longer spectating {}. Current spectators: {}".format(self.username, self.spectatingUserID, hostToken.spectators))
# Part #spectator channel # Part #spectator channel
chat.partChannel(token=self, channel="#spect_{}".format(self.spectatingUserID), kick=True) chat.partChannel(token=self, channel="#spect_{}".format(self.spectatingUserID), kick=True)
# Console output
log.info("{} is no longer spectating {}. Current spectators: {}".format(self.username, self.spectatingUserID, hostToken.spectators))
# Set our spectating user to 0 # Set our spectating user to 0
self.spectating = None self.spectating = None
self.spectatingUserID = 0 self.spectatingUserID = 0