Community discussions

MikroTik App
 
marlonz2
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]="")
do={
/ip hotspot user set [find name=$user] limit-uptime=1m
/system scheduler add name=$username interval=1m
on-event=""
/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: Geyonk and 27 guests