mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-04 21:19:36 +00:00
Compare commits
3 commits
376ed883d9
...
b167a2daed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b167a2daed | ||
|
|
cae5fdc341 | ||
|
|
f4f83533b9 |
2 changed files with 7 additions and 2 deletions
2
DEBUG.md
2
DEBUG.md
|
|
@ -42,7 +42,7 @@ Other actions (`disk`, `email`, `remote` or `support`) can be used as
|
|||
well. I do not recommend using `echo` - use [debug output](#debug-output)
|
||||
instead.
|
||||
|
||||
Disable or remote that setting to restore regular logging.
|
||||
Disable or remove that setting to restore regular logging.
|
||||
|
||||
## Verbose output
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
:global GetRandom20CharAlNum;
|
||||
:global IfThenElse;
|
||||
:global LogPrint;
|
||||
:global LogPrintVerbose;
|
||||
:global MAX;
|
||||
:global MIN;
|
||||
:global MkDir;
|
||||
|
|
@ -96,6 +97,8 @@
|
|||
:local Uptime [ /system/resource/get uptime ];
|
||||
:foreach Update in=($JSON->"result") do={
|
||||
:set UpdateID ($Update->"update_id");
|
||||
$LogPrintVerbose debug $ScriptName ("Update " . $UpdateID . ": " . [ :serialize to=json $Update ]);
|
||||
|
||||
:local Message ($Update->"message");
|
||||
:local IsReply ([ :typeof ($Message->"reply_to_message") ] = "string");
|
||||
:local IsMyReply ($TelegramMessageIDs->[ :tostr ($Message->"reply_to_message"->"message_id") ]);
|
||||
|
|
@ -107,7 +110,9 @@
|
|||
:local ThreadId [ $IfThenElse ($Message->"is_topic_message") ($Message->"message_thread_id") "" ];
|
||||
|
||||
:foreach IdsTrusted in=($TelegramChatId, $TelegramChatIdsTrusted) do={
|
||||
:if ($From->"id" = $IdsTrusted || $From->"username" = $IdsTrusted) do={
|
||||
:if ($From->"id" = $IdsTrusted || \
|
||||
$From->"username" = $IdsTrusted || \
|
||||
$Chat->"id" = $IdsTrusted) do={
|
||||
:set Trusted true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue