Community discussions

 
morheb
newbie
Topic Author
Posts: 35
Joined: Wed Mar 22, 2017 5:52 pm

if script to close and delete users on a MAC

Tue Aug 13, 2019 10:41 am

hello guys


i have this script that links the hotspot user to its first mac address
[code][code]:delay 2
:local a $user
:local m [/ip hotspot active get [find user=$a] mac-address]
:log info message=("Prueba: ;$a; ;$m;");
/ip hotspot user set $a mac=$m;
[/code][/code]

i want to edit it and add if function

if the mac is XX:XX:XX:XX it closes the session and deletes the user
like if (m="XX:XX:XX:XX");
/ip hotspot active remove $a
/ip hotspot user remove $a

but i dont know the right way to write it

thanks

Who is online

Users browsing this forum: No registered users and 7 guests