From 49d2d21f41140835047ce2b4de97258a82ecec15 Mon Sep 17 00:00:00 2001 From: mercury Date: Fri, 16 Aug 2024 11:41:42 +0400 Subject: [PATCH] fix changelist --- app/bot.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/bot.php b/app/bot.php index 583c5ce..970059e 100644 --- a/app/bot.php +++ b/app/bot.php @@ -371,8 +371,8 @@ class Bot case preg_match('~^/deldomain$~', $this->input['callback'], $m): $this->delDomain(); break; - case preg_match('~^/(?Pchange|delete)(?P\w+) (?P[^\s]+(?:_(?:-)?\d+)?)$~', $this->input['callback'], $m): - $this->listPacChange($m['typelist'], $m['action'], ...explode('_', $m['arg'])); + case preg_match('~^/(?Pchange|delete)(?P\w+) (?P\d+)$~', $this->input['callback'], $m): + $this->listPacChange($m['typelist'], $m['action'], $m['arg']); break; case preg_match('~^/paczapret$~', $this->input['callback'], $m): $this->pacZapret(); @@ -3440,11 +3440,11 @@ DNS-over-HTTPS with IP: $data[] = [ [ 'text' => $this->i18n($v ? 'on' : 'off') . ' ' . ($basename ? basename($k) . ' ' : '') . idn_to_utf8($k), - 'callback_data' => "/change$type " . $i, + 'callback_data' => "/change$type $i", ], [ 'text' => 'delete', - 'callback_data' => "/delete$type " . $i, + 'callback_data' => "/delete$type $i", ], ]; $i++; @@ -3502,6 +3502,7 @@ DNS-over-HTTPS with IP: } break; } + $i++; } $this->setPacConf($conf); $this->backXtlsList($type);