Hello, im working on a script to copy simple queues targets (and discard the already copied ones) to an address list based on the boen_robot post (http://forum.mikrotik.com/t/correction-for-simple-queue-to-address-list/87250/1), but i have encounter a problem, everything works normal with simple queues /32 but i have some queues with /24, this ones doesnt work on the comparation between the ip address added before (10.10.10.0/24) because it strip the /24 and compare 10.10.10.0/32 with 10.10.10.0/24, causing the script to say, already have such entry. So i was guessing if there is anyway to check the CIDR of an ip address so i can create another IF for /32. i will leave my script, i am open to suggestion Thanks in advancement,
/ip firewall address-list
:local listName "List"
:foreach i in=[:queue simple print as-value where parent="Intenet AXS2"] do={
:foreach j in=($i->"target") do={
:if ([print count-only where list=$listName && address=[:pick $j 0 [:find $j "/"]]] = 0) do={
:put $j
add list=$listName address=$j
}
}
}
Sorry for my bad English.