Disconnect PPPoE user if it has no queue

For some reason I want ROS to remove an active PPPoE session if there’s no simple queue associated with this very connection…

Not being a programmer, nor anything like it, I came up with the following skeleton script with my poor logic knowledge which, of course, doesn’t work ( and for you masters I’m pretty sure this is a piece of cake ):

:foreach Id in=[/ppp active find] do={
:local Iface [/ppp active get value-name=name $Id ]
:local Limit [/queue simple get value-name=max-limit [find name=“<pppoe-$Iface>”]]
:if ([:len $Limit] = 0) do={
/ppp active remove numbers=[find name=“$Iface”]
}
}

As simple as that: no queue, no “game”.

Anyone willing to quick help me?

Thanks in advance!

:foreach Id in=[/ppp active find] do={
:local Iface [/ppp active get $Id name]
if ([/queue simple find name=(“<pppoe-”.$Iface.“>”)]=“”) do={
/ppp active remove $Iface
}}