Ajouter ce script dans le user profile dans la partie On Login.
Remplacer : XXXXXXXXXXXXXXXXXXX par votre API Token
Remplacer : YYYYYYYYYYY par votre Chat ID
{
:local bapi "XXXXXXXXXXXXXXXXXXX";
:local cid "YYYYYYYYYYY";
: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$bapi/sendMessage?chat_id=$cid&text=\F0\9F\93\AE Ticket : $user %0A%0A- Addesse IP : $address%0A%0A- Adresse Mac : $mac%0A%0A- Device : $dvc%0A%0A- Profile : $Mpkt %0A%0A- Temps ecoule : $Mwp%0A%0A- Data : $Mt Mb%0A%0A- Exp : $exp%0A%0A- En ligne : $Ma Clients" mode=http keep-result=no}