From b8c54d0ccee762fd3be48a1f2b9d1185bf2fa963 Mon Sep 17 00:00:00 2001 From: loneshore <57182522+loneshore@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:34:53 +0800 Subject: [PATCH] :zap: Improve pingdc (#84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增强pingdc兼容性 --- pagermaid/modules/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pagermaid/modules/status.py b/pagermaid/modules/status.py index 98271bd..27f5a45 100644 --- a/pagermaid/modules/status.py +++ b/pagermaid/modules/status.py @@ -106,7 +106,7 @@ async def ping_dc(message: Message): data.append("0") else: result = await execute( - f"ping -c 1 {DCs[dc]} | awk -F '/' " + "'END {print $5}'" + f"ping -c 1 {DCs[dc]} | awk -F 'time=' " + "'/time=/ {print $2}' | awk '{print $1}'" ) try: data.append(str(float(result)))