hi ppl. hope so, i will find some help here. i have HotSpor+UM configuration, and i need some script for next two things:
script which will reset download-limit for users in assigned Group, groupd named example: 200MBPerDay
script for change speed for some groups in UM. example:
i have one Group named: Users1, and i wanna set speed in two intervals: 1Mbps in 07:00-00:00, and 2Mbps in 00:00-07:00. 1Mbps for daily use, and 2Mbps for nightly use. is that possible ? thanks for any help
this forum is dead i think that’s not good! i found answar, for my first question.
in 00:00:00 i reseting counters for user in UM, and in 00:00:30 i set up transfer-limit on 200MB. but i have one problem more. when user is connected, he can download more then 200MB. how can i disconnect it, when it download 200MB?
:local name "kole1","kole2","kole3"
:local activeuser
:local user
:foreach user in $name do={
:foreach activeuser in=[/ip hotspot active find user $user] do={
:local time [/ip hotspot active get uptime $aktivni]
:if ($time>"1800s") do {
/ip hotspot active remove $activeuser
:log info ($activeuser . "Kicked" .)
}
}
}
can someone help me? what’s wrong in this my code? i wanna remove active user which has uptime bigger then 1800 seconds.
EDIT: i found answar without you
:local name [:toarray "kolinsb1,kolinsb2"]
:local i
:local userr
:foreach userr in=$name do={
:foreach i in=[/ip hotspot active find user=$userr] do={
:local time [/ip hotspot active get $i uptime]
:if ($time>30m) do={
/ip hotspot active remove $i
}
}
}