Community discussions

MikroTik App
 
User avatar
lectrapon
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Tue Mar 03, 2015 2:10 pm

issue with script command

Wed Dec 09, 2015 2:17 pm

Hello, I was using this script for disconnect unauthorized hotspot user after 30min connection
 
 :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=$interface authentication=no forwarding=no ]   
     }
 
 }
 
but now I use Virtual AP, I notice that nothing happen when scheduler executes it....someone knows why ?
 
User avatar
lectrapon
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Tue Mar 03, 2015 2:10 pm

Re: issue with script command

Thu Dec 10, 2015 9:06 am

I made another functioning script... 8)

variables:
TIME= delay before login
AP = Virtual Access Point on which roaming users are connected

Here are my script:
 :foreach i in ( [ /interface wireless registration-table find where uptime > "TIME" and interface ="AP" ] ) do={
 
     :if ( [ /interface wireless registration-table get $i comment ] = "" ) do={
        
         /interface wireless access-list add mac-address=( [ /interface wireless registration-table get $i mac-address ] ) interface=( [ /interface wireless registration-table get $i interface ] ) authentication=no forwarding=no 

     }
 
 }

Who is online

Users browsing this forum: No registered users and 24 guests