import struct from objects import glob def handle(client, data): ping_ip = ".".join((str(x) for x in struct.unpack(b" Pinging to {}".format(client.addr, ping_ip)) if len(data) == 11: # We should add our data ontop if data[-1:] in RESPONSE: data += RESPONSE[data[-1:]]() return data def query_i(): len_hostname = len(glob.config["server"]["hostname"]) len_mode = len(glob.config["server"]["mode"]) len_language = len(glob.config["server"]["language"]) packet = struct.pack(b"