File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ def recv_packets(udp_skt, pbar):
8787 infos , addr = parse_raw_pkt (udp_skt .recvfrom (1024 ))
8888 if not infos or not infos ["motd" ]: # 过滤掉没有motd的和没有信息的
8989 continue
90+ if int (infos ['online' ]) >= display_online :
91+ continue
9092
9193 server_count += 1
9294
@@ -98,10 +100,9 @@ def recv_packets(udp_skt, pbar):
98100 f"[Online ] { infos ['online' ]} /{ infos ['max_player' ]} " ,
99101 f"[Count ] { server_count } " ,
100102 "" ]
101- if int (infos ['online' ]) >= display_online :
102- pbar .write ("\n " .join (values ))
103- if exec_cmd :
104- threading .Thread (target = exec_cmd_async , args = (exec_cmd , infos ), daemon = True ).start ()
103+ pbar .write ("\n " .join (values ))
104+ if exec_cmd :
105+ threading .Thread (target = exec_cmd_async , args = (exec_cmd , infos ), daemon = True ).start ()
105106 except socket .timeout :
106107 continue
107108 except ConnectionResetError :
You can’t perform that action at this time.
0 commit comments