Community discussions

MikroTik App
 
taknamecom
just joined
Topic Author
Posts: 15
Joined: Thu Nov 13, 2014 2:09 pm

Remove hotspot active user with specify queue

Tue Mar 14, 2017 10:28 am

Hello my friends.
I want remove active hotspot users with specify simple queue attributes (for ex: 512k/512k).
/queue simple 
:foreach i in=[ find ] do={
 :local max [get value-name=max-limit $i]
 :local ip [get value-name=target $i]

:if ($max ="512k/512k") do={
/ip hotspot active
:foreach j in=[ find=~$ip] do={
/ip hotspot active remove $ip;
}
}
}
I tried to write it.
But it not working.
anyone can help me ?
thank you in advance.
 
taknamecom
just joined
Topic Author
Posts: 15
Joined: Thu Nov 13, 2014 2:09 pm

Re: Remove hotspot active user with specify queue

Wed Mar 15, 2017 5:45 am

No body's cant help me ?
 
taknamecom
just joined
Topic Author
Posts: 15
Joined: Thu Nov 13, 2014 2:09 pm

Re: Remove hotspot active user with specify queue

Thu Mar 16, 2017 1:07 pm

I write it myself.
you can use it.
/queue simple 
:foreach i in=[ find ] do={
 :local max [get value-name=max-limit $i]
 :local ip [:tostr [get value-name=target $i]]
 :local ip2 [:pick $ip 0 [:find $ip "/"]]; 
:if ($max ="1024k/1024k") do={

:foreach j in=[/ip hotspot active find address=$ip2] do= {
        /ip hotspot active remove $j;
   }
}
}
}

Who is online

Users browsing this forum: No registered users and 11 guests