Ejemplo n.º 1
0
    def send_a2s_player(self, host, port):
        if self.server_dict[(str(host) + ":" + str(port))]['challenge'] is None:
            self.send_a2s_challenge(host, port)
            return

        packet = Packet()
        packet.put_long(self.whole_packet)
        packet.put_byte(self.a2s_player_query_byte)
        packet.put_long(self.server_dict[(str(host) + ":" + str(port))]['challenge'])
        self.transport.write(packet.getvalue(), (host, port))
Ejemplo n.º 2
0
 def send_a2s_challenge(self, host, port):
     packet = Packet()
     packet.put_long(self.whole_packet)
     packet.put_byte(self.a2s_player_query_byte)
     packet.put_long(self.a2s_challenge_query_byte)
     self.transport.write(packet.getvalue(), (host, port))
Ejemplo n.º 3
0
 def send_a2s_info(self, host, port):
     packet = Packet()
     packet.put_long(self.whole_packet)
     packet.put_byte(self.a2s_info_query_byte)
     packet.put_string(self.a2s_info_query_str)
     self.transport.write(packet.getvalue(), (host, port))