Help to write script for deauthentication not loggin users after 30 mn

Hello,
I need your help to write script for copying in access-list all hotspot clients which are waste time on server without login after connected more than 30 mn for disabling their “authentication” and “forwarding”.

I know that at first time I must to search in registration table all connected after 30 mn:

{
 /interface wireless registration-table {
     :local delai 1800
     :foreach i in [ find where uptime > $delai ] do={
          :local mac [ get $i mac-address ]
          :local card [ get $i interface ]
          [ /interface wireless access-list ] {
               add mac-address=$mac interface=$card authentication=no forwading=no
          }
     }
 }
}

If I solved it I think I can do the second part of located mac address of active host. :smiley:

Here is my solution to give 30mn to unauthenticated hotspot user for login or free bandwidth:

{

 :foreach i in ( [ /interface wireless registration-table find where uptime > 1800 ] ) do={
     :local detail [ /interface wireless registration-table get $i comment ]
     :local mac [ /interface wireless registration-table get $i mac-address ]
     :local interface [ /interface wireless registration-table get $i interface ]

     :if ( $detail = "" ) do={
        [ /interface wireless access-list add mac-address=$mac interface=$gateway authentication=no forwarding=no ]
     }
}

:sunglasses: