Hello everyone, i’m working on script that check profile from hotspot user and change limit at queue simple rate ,but still now it’s work on 1 profile only , if 2 users have same profile script won’t work
Ex)
User1 profile 1M (rate 0/0 like default profile)
User2 profile 2M (rate 0/0 like default profile)
User3 profile 1M (rate 0/0 like default profile)
im planing to chage rate at queue not at user profiles
:local ip [/ip hotspot user get [find profile=“1M”] address]
/ip hotspot user
:if ([/ip hotspot user find profile=“1M”] !=“”) do={
/queue simple
set [find target-addresses=(“$ip/32”)] max-limit=“256000/1024000” limit-at=“256000/1024000”
}script fail, because we have 2 users have same profile"1M"
:local ip [/ip hotspot user get [find profile=“2M”] address]
/ip hotspot user
:if ([/ip hotspot user find profile=“2M”] !=“”) do={
/queue simple
set [find target-addresses=(“$ip/32”)] max-limit=“512000/2048000” limit-at=“512000/2048000”
}script work successfully because we have 1 user only with profile"2M"
any idea to make this script work on unlimited kind or number of profiles.
Kinda regards, Torky