mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-21 13:38:21 +00:00
⚡ Improve pingdc (#84)
All checks were successful
Docker Dev Build / docker build and publish (push) Successful in 6m26s
All checks were successful
Docker Dev Build / docker build and publish (push) Successful in 6m26s
增强pingdc兼容性
This commit is contained in:
parent
e8fc72c9de
commit
b8c54d0cce
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user