From 1be0ba2d78832013883a96e3d4473683173f9674 Mon Sep 17 00:00:00 2001 From: MatMasIt <34745996+MatMasIt@users.noreply.github.com> Date: Thu, 19 Aug 2021 22:44:46 +0200 Subject: [PATCH] Tolerancy for personal commands, restart supported --- src/index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.php b/src/index.php index 916476d..399f111 100644 --- a/src/index.php +++ b/src/index.php @@ -1279,8 +1279,13 @@ switch ($DATA["message"]["chat"]["id"]) { goto beg; break; case "end": + $t=preg_replace("/[^A-Za-z0-9]/", '', $t); + $t=mb_strtolower($t); + $t=trim($t); switch ($t) { - + case "start": + API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["thanks"], "reply_to_message_id" => $DATA["message"]["message_id"]]); + break; case "secret": API("sendMessage", ["chat_id" => $DATA["message"]["chat"]["id"], "text" => $GLOBALS["config"]["lgbt"]["text"]["writeYourSecret"], "reply_to_message_id" => $DATA["message"]["message_id"]]);