From 1c4fff50d150de0aadb43cf6bc3811a82a1c9f11 Mon Sep 17 00:00:00 2001 From: mercury Date: Sat, 26 Oct 2024 22:47:43 +0400 Subject: [PATCH] fix menu warp after update --- app/bot.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/bot.php b/app/bot.php index 76ea2f3..cd521c2 100644 --- a/app/bot.php +++ b/app/bot.php @@ -4705,12 +4705,18 @@ DNS-over-HTTPS with IP: $this->send($this->input['chat'], 'Connect: ' . $this->ssh('warp-cli --accept-tos connect 2>&1', 'wp')); unset($p['warpoff']); } else { - $this->send($this->input['chat'], 'Registration delete: ' . $this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp')); + if (empty($inversion)) { + $this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp'); + } else { + $this->send($this->input['chat'], 'Registration delete: ' . $this->ssh('warp-cli --accept-tos registration delete 2>&1', 'wp')); + } $this->ssh('pkill warp-svc', 'wp'); $p['warpoff'] = 1; } $this->setPacConf($p); - $this->warp(); + if (!empty($inversion)) { + $this->warp(); + } } public function warp()