Код: Выделить всё
:global routername [/system resource get board-name]
:global sendToTele "https://api.telegram.org/botxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sendmessage\?chat_id=zzzzzzzzzzz&text=";
:global oldIP
:global newIP [:resolve myip.opendns.com server=208.67.222.222];
if ($newIP=$oldIP) do={} else={
/tool fetch url="$sendToTele $routername%0Aold IP:$oldIP %F0%9F%8C%8D - new IP:$newIP %f0%9f%8c%8f" keep-result=no}
set oldIP $newIP