mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
telegram-chat: get the uptime just once
This commit is contained in:
parent
02b447212d
commit
bfd1361f71
1 changed files with 2 additions and 2 deletions
|
@ -72,10 +72,10 @@ $WaitFullyConnected;
|
|||
}
|
||||
|
||||
:local UpdateID 0;
|
||||
:local Uptime [ /system/resource/get uptime ];
|
||||
:foreach Update in=[ :toarray $Data ] do={
|
||||
:set UpdateID [ $JsonGetKey $Update "update_id" ];
|
||||
:if (($TelegramChatOffset->0 > 0 || [ /system/resource/get uptime ] > 5m) && \
|
||||
$UpdateID >= $TelegramChatOffset->2) do={
|
||||
:if (($TelegramChatOffset->0 > 0 || $Uptime > 5m) && $UpdateID >= $TelegramChatOffset->2) do={
|
||||
:local Trusted false;
|
||||
:local Message [ $JsonGetKey $Update "message" ];
|
||||
:local MessageId [ $JsonGetKey $Message "message_id" ];
|
||||
|
|
Loading…
Reference in a new issue