Code: Select all
:local comment "IN USE"
:local userprofile [ip hotspot user get [find where name="$user"] profile]
:if ([/ip hotspot user get $user comment]="") do={[/ip hotspot user set $user comment=$comment]}
[/system scheduler
add comment= [/ip hotspot user profile get [find where name="$userprofile"] name] name=$user on-event="/ip hotspot user remove \"$user\" \r\
\n/system scheduler remove [find where name=\"$user\"] \r\
\n\r\
" interval= [/ip hotspot user profile get [find where name="$userprofile"] session-timeout]]