<commit_before>import blocks

connectedClients = {}

class ClientData(object):
	"""docstring for ClientData"""
	def __init__(self, ipAddress, segaId, handle):
		self.ipAddress = ipAddress
		self.segaId = segaId
		self.handle = handle
	def getHandle(self):
		return self.handle
	def setHandle(self, handle):
		self.handle = handle

def addClient(handle):
	connectedClients[handle.playerId] = ClientData(handle.transport.getPeer().host, handle.myUsername, handle)
	print('[Clients] Registered client %s (ID:%i) in online clients' % (handle.myUsername, handle.playerId))

def removeClient(handle):
	print("[Clients] Removing client %s (ID:%i) from online clients" % (handle.myUsername, handle.playerId))
	del connectedClients[handle.playerId]

def populateData(handle):
	cData = connectedClients[handle.playerId]
	cData.handle = handle
	handle.myUsername = cData.segaId
	if handle.transport.getHost().port in blocks.blockList:
		bName = blocks.blockList[handle.transport.getHost().port][1]
	else:
		bName = None
	print("[ShipProxy] %s has successfully changed blocks to %s!" % (handle.myUsername, bName))
	handle.loaded = True
<commit_msg>Update SEGA Id in server side too<commit_after>import blocks

connectedClients = {}

class ClientData(object):
	"""docstring for ClientData"""
	def __init__(self, ipAddress, segaId, handle):
		self.ipAddress = ipAddress
		self.segaId = segaId
		self.handle = handle
	def getHandle(self):
		return self.handle
	def setHandle(self, handle):
		self.handle = handle

def addClient(handle):
	connectedClients[handle.playerId] = ClientData(handle.transport.getPeer().host, handle.myUsername, handle)
	print('[Clients] Registered client %s (ID:%i) in online clients' % (handle.myUsername, handle.playerId))

def removeClient(handle):
	print("[Clients] Removing client %s (ID:%i) from online clients" % (handle.myUsername, handle.playerId))
	del connectedClients[handle.playerId]

def populateData(handle):
	cData = connectedClients[handle.playerId]
	cData.handle = handle
	handle.myUsername = cData.segaId
	handle.peer.myUsername = cData.segaId
	if handle.transport.getHost().port in blocks.blockList:
		bName = blocks.blockList[handle.transport.getHost().port][1]
	else:
		bName = None
	print("[ShipProxy] %s has successfully changed blocks to %s!" % (handle.myUsername, bName))
	handle.loaded = True

{'fraction_non_alphanumeric': 0.12355212355212356, 'fraction_numerical': 0.000858000858000858, 'mean_word_length': 5.7398843930635834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1419985', 'n_tokens_mistral': 761, 'n_tokens_neox': 746, 'n_words': 182}