hi guys
Why doesn’t this script work?!
The way it works is to identify all ip address outside the range(192.168.8.0-192.168.15.255
identify the MAC, and remove it from the host plz help
:foreach h in=[/ip hotspot host find] do={
:global address [/ ip hotspot host get $h address];
:global mac [/ip hotspot host get $h mac-address];
:if (($address<$192.168.8.0)||($address>$192.168.15.255)) do={
ip hotspot host remove [find mac-address=$mac]
:log info "$mac Removed"
;
}}
{
:local startadd 192.168.8.0
:local endadd 192.168.15.255
:local a
:local mac
:foreach i in=[/ip hotspot host find ] do={
:set a [/ip hotspot host get number=$i address
:set mac [/ip hotspot host get number=$i mac-address
]
:if (($a<$startadd)||($a>$endadd)) do={
ip hotspot host remove [find mac-address=$mac]
:log info "$mac removed from host"
}}}