Community discussions

MUM Europe 2020
 
rtr989
newbie
Topic Author
Posts: 29
Joined: Wed Feb 08, 2006 2:28 pm

how to remove active users whose names begin to night...

Tue Jan 26, 2010 11:51 am

[admin@Router-1] /ip hotspot active> pr
Flags: R - radius, B - blocked
# USER ADDRESS UPTIME SESSION-TIME-LEFT IDLE-TIMEOUT
0 R 128-jv947 192.168.15.2 17h55m7s 2w3d7h52m57s
1 R 128-q9s6a 192.168.15.3 36m53s 2w1d4h2m14s
2 R night-10gaq 192.168.15.9 33m50s 4w1d2h51m28s
3 R 128-xsnn2 192.168.15.12 1h55m51s 5d4h36m35s
4 R 128-46bpu 192.168.15.31 5h10m13s 2w3d7h39m36s
5 R 128-96xzu 192.168.15.38 4h57m48s 2w3d8h14m16s
6 R 128-cyvwc 192.168.15.246 3h18m 3w2d5h21m47s
7 R night-8epy9 192.168.15.248 3h31m57s 4w23h7m5s
8 R 128-4h83a 192.168.15.249 5h2m36s 3w2d21h31m57s
9 R night-aw27j 192.168.15.252 3h32m58s 2w4d1h20m56s
10 R 128-k373j 192.168.15.254 1h7m8s 6w2d9h13m57s

i trying this:
/ip hotspot active remove [/ip hotspot active find user="night\$"]

but it`s not work...
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5950
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: how to remove active users whose names begin to night...

Tue Jan 26, 2010 12:02 pm

You can use regular expression to parse names
http://wiki.mikrotik.com/wiki/Scripting#Other_Operators

Example:
/ip hotspot active remove [/ip hotspot active find user~"^night"]
 
rtr989
newbie
Topic Author
Posts: 29
Joined: Wed Feb 08, 2006 2:28 pm

Re: how to remove active users whose names begin to night...

Tue Jan 26, 2010 12:30 pm

Thank You!
 
MsLrO
just joined
Posts: 4
Joined: Tue Oct 14, 2008 10:29 pm
Location: Argentina

Re: how to remove active users whose names begin to night...

Wed Dec 04, 2019 4:29 pm

Hi
I have this code to remove active clientes on my router.
:local cliente "10.0.0.252";
/ip hotspot active remove [/ip hotspot active find address~$cliente];

How can I do the same whith API on PHP.

Thanks for your help!!

Who is online

Users browsing this forum: No registered users and 18 guests