diff options
author | Christian Hesse <mail@eworm.de> | 2024-05-25 19:55:13 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-05-25 19:55:13 +0200 |
commit | a97820d12a5833bce5160da674e5085b2882b53a (patch) | |
tree | 7f4357d5ca6baf09bf3dfcfeb8ebb5b793a184f6 | |
parent | d6648563267a3c807a3b99f14881767b6e9826f0 (diff) |
telegram-chat: drop extra parenthesis
-rw-r--r-- | telegram-chat.rsc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/telegram-chat.rsc b/telegram-chat.rsc index f3efd08..0fd8a06 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -114,7 +114,7 @@ message=("Online" . [ $IfThenElse $TelegramChatActive " (and active!)" ] . ", awaiting your commands!") }); :set Done true; } - :if ($Done = false && [ :pick ($Command) 0 1 ] = "!") do={ + :if ($Done = false && [ :pick $Command 0 1 ] = "!") do={ :if ($Command ~ ("^! *(" . [ $EscapeForRegEx $Identity ] . "|@" . $TelegramChatGroups . ")\$")) do={ :set TelegramChatActive true; } else={ @@ -124,8 +124,8 @@ " from update " . $UpdateID . "!"); :set Done true; } - :if ($Done = false && ($IsMyReply = 1 || ($IsReply = 0 && $TelegramChatActive = true)) && [ :len ($Command) ] > 0) do={ - :if ([ $ValidateSyntax ($Command) ] = true) do={ + :if ($Done = false && ($IsMyReply = 1 || ($IsReply = 0 && $TelegramChatActive = true)) && [ :len $Command ] > 0) do={ + :if ([ $ValidateSyntax $Command ] = true) do={ :local State ""; :local File ("tmpfs/telegram-chat/" . [ $GetRandom20CharAlNum 6 ]); :if ([ $MkDir "tmpfs/telegram-chat" ] = false) do={ |