Exemplo n.º 1
0
	def connectToServer(self, hostname, port, username, password, arena='#master'):
		"""Connect to a server using the Subspace protocol.
		
		hostname and port specify the hostname/IP address and port of the server to connect to.  username is
		the user to connect as.  password is the combined password and SMod+ password
		seperated by an asterisk.  For example, 'bot_password*smod_password'. Arena
		is the name of the arena to join upon entering the zone."""
		CoreStack.connectToServer(self, hostname, port)
		self._queueSyncRequest()
		self.flushOutboundQueues()
		self.__queueLoginPacket(username, password)
		self.flushOutboundQueues()
		self.arena = arena
		self.__connected = True
		self.__last_pos_update_sent_tick = GetTickCountHs()