Login
:put (",,0,,,,Disable,");{
:local mac $"mac-address";
:local Mwp [/ip hotspot user get [find name="$user"] uptime];
:local dvc [/ip dhcp-server lease get [find mac-address="$mac"] host-name];
:local Mpkt [/ip hotspot user get [find name="$user"] profile];
:local Md [/ip hotspot user get [find name="$user"] bytes-in];
:local Mu [/ip hotspot user get [find name="$user"] bytes-out];
:local limit [/ip hotspot user get [find name="$user"] limit-bytes-total];
:local totq [(($limit)/1048576)];
:local Mt [((($Md)+($Mu))/1048576)];
:local sisa [($totq-($Md+$Mu)/1048576)];
:local exp [/ip hotspot user get [find name="$user"] comment];
:local Ma [/ip hotspot active print count-only];
/tool fetch url="https://api.telegram.org/bot{{boottelegram}}/sendMessage?chat_id={{idtelegram}}&text==>> LOG-IN $user <<==%0A- IP Address : $address%0A- Mac Address: $mac%0A- Device : $dvc%0A- User Profil : {{userprofile}}%0A- Waktu Terpakai : $Mwp%0A- Kuota Terpakai :$Mt Mb%0A- exp : $exp%0A- Online : $Ma Users" mode=http keep-result=no}
Logout
/tool fetch url="https://api.telegram.org/bot{{boottelegram}}/sendMessage?chat_id={{idtelegram}}&text=Logout $user $address" keep-result=no