Community discussions

MikroTik App
just joined
Topic Author
Posts: 3
Joined: Sat Mar 23, 2019 8:05 am

User wont remove

Sat Jun 27, 2020 5:14 am

Guys can you help me with this? I'm kinda confused why the user and cookies won't automatically remove itself but the active removes after the time runs out. Thank you!

:local username $user;
:local date [/system clock get date];
:local time [/system clock get time];
:log warning "$username has login - $time";
:if ([/system scheduler find name=$username]="")
/ip hotspot user set [find name=$user] limit-uptime=1m
/system scheduler add name=$username interval=1m
/ip hotspot active remove [find user="$username"]\r\n
/ip hotspot cookie remove [find user="$username"]\r\n
/ip hotspot user remove [find name=$username]\r\n
/system scheduler remove [find name=$username]""

Who is online

Users browsing this forum: Phorta and 39 guests