def cs_query_all(gid, host, port): #TEST: #import time #while 1: # print 'aah' # time.sleep(0.5) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.connect((host, port)) xx, info = cssrc.css_get_info(sock) xx, players, chal = cssrc.css_get_players(sock) xx, rules, chal = cssrc.css_get_rules(sock, chal) return info, players, rules
def cs_query_overview(gid, host, port): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.connect((host, port)) ping, info = cssrc.css_get_info(sock) return info