.BANCHO. .FIX. Fix stop spectating not working properly if host disconnects
This commit is contained in:
		@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user