# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# DATADOG_PREFIX = "peppy"
# 
# Path: constants/clientPackets.py
# def userActionChange(stream):
# def userStatsRequest(stream):
# def userPanelRequest(stream):
# def sendPublicMessage(stream):
# def sendPrivateMessage(stream):
# def setAwayMessage(stream):
# def channelJoin(stream):
# def channelPart(stream):
# def addRemoveFriend(stream):
# def startSpectating(stream):
# def matchSettings(stream):
# def createMatch(stream):
# def changeMatchSettings(stream):
# def changeSlot(stream):
# def joinMatch(stream):
# def changeMods(stream):
# def lockSlot(stream):
# def transferHost(stream):
# def matchInvite(stream):
# def matchFrames(stream):
# def tournamentMatchInfoRequest(stream):
# def tournamentJoinMatchChannel(stream):
# def tournamentLeaveMatchChannel(stream):


from objects import glob
from constants import clientPackets

def handle(userToken, packetData):
	# Get packet data
	packetData = clientPackets.transferHost(packetData)

	# Get match ID and match object
	matchID = userToken.matchID

	# Make sure we are in a match
	if matchID == -1:
		return

	# Make sure the match exists

# Path: objects/glob.py
# 		VERSION = f.read().strip()
# 	VERSION = "Unknown"
# DATADOG_PREFIX = "peppy"
# 
# Path: constants/clientPackets.py
# def userActionChange(stream):
# def userStatsRequest(stream):
# def userPanelRequest(stream):
# def sendPublicMessage(stream):
# def sendPrivateMessage(stream):
# def setAwayMessage(stream):
# def channelJoin(stream):
# def channelPart(stream):
# def addRemoveFriend(stream):
# def startSpectating(stream):
# def matchSettings(stream):
# def createMatch(stream):
# def changeMatchSettings(stream):
# def changeSlot(stream):
# def joinMatch(stream):
# def changeMods(stream):
# def lockSlot(stream):
# def transferHost(stream):
# def matchInvite(stream):
# def matchFrames(stream):
# def tournamentMatchInfoRequest(stream):
# def tournamentJoinMatchChannel(stream):
# def tournamentLeaveMatchChannel(stream):


# Path: events/matchTransferHostEvent.py
from objects import glob
from constants import clientPackets


def handle(userToken, packetData):
	# Get packet data
	packetData = clientPackets.transferHost(packetData)

	# Get match ID and match object
	matchID = userToken.matchID

	# Make sure we are in a match
	if matchID == -1:
		return

	# Make sure the match exists

	if matchID not in glob.matches.matches: