Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 9

/ip hotspot user profile

add name=RATE1 on-login=":put (\",remc,5,1h,5,,Disable,\"); { :local amount [ /ip


hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount >=\
\_\"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip hotspot
user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c (\$a
+ \$va\
lidity); :local date [ /system clock get date ]; :local year [ :pick \$date 7
11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hotsp\
ot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name=\
\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot c\
ookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local ex\
p [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$exp 7\
\_16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot user\
\_set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp >
15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local ma\
c \$\"mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE1-|-\
$comment\
\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE2 on-login=":put (\",remc,10,1h,10,,Disable,\"); { :local amount [ /ip
hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount \
>= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \$v\
alidity); :local date [ /system clock get date ]; :local year [ :pick \$date 7
11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hots\
pot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name\
=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot \
cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local e\
xp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$exp \
7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot user\
\_set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp >
15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local ma\
c \$\"mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE2-|-\
$comment\
\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE3 on-login=":put (\",remc,15,1h,15,,Disable,\"); { :local amount [ /ip
hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount \
>= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \$v\
alidity); :local date [ /system clock get date ]; :local year [ :pick \$date 7
11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hots\
pot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name\
=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot \
cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local e\
xp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$exp \
7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot user\
\_set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp >
15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local ma\
c \$\"mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE3-|-\
$comment\
\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE4 on-login=":put (\",remc,20,1h,20,,Disable,\"); { :local amount [ /ip
hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount \
>= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \$v\
alidity); :local date [ /system clock get date ]; :local year [ :pick \$date 7
11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hots\
pot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name\
=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot \
cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local e\
xp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$exp \
7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot user\
\_set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp >
15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local ma\
c \$\"mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE4-|-\
$comment\
\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE5 on-login=":put (\",remc,25,1h,25,,Disable,\"); { :local amount [ /ip
hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount \
>= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \$v\
alidity); :local date [ /system clock get date ]; :local year [ :pick \$date 7
11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hots\
pot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name\
=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot \
cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local e\
xp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$exp \
7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot user\
\_set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp >
15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local ma\
c \$\"mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE5-|-\
$comment\
\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE6 on-login=":put (\",remc,110,1h,110,,Disable,\"); { :local amount
[ /ip hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if
(\$amoun\
t >= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \
\$validity); :local date [ /system clock get date ]; :local year [ :pick \$date
7 11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get
[/ip h\
otspot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment
0 2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add n\
ame=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotsp\
ot cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:loca\
l exp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$e\
xp 7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot u\
ser set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp
> 15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local \
mac \$\"mac-address\"; :local time [/system clock get time ]; /system script
add name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE6-|-\
$commen\
t\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=RATE7 on-login=":put (\",remc,200,1h,200,,Disable,\"); { :local amount
[ /ip hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if
(\$amoun\
t >= \"0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip
hotspot user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c
(\$a + \
\$validity); :local date [ /system clock get date ]; :local year [ :pick \$date
7 11 ]; :local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get
[/ip h\
otspot user find where name=\"\$user\"] comment]; :local ucode [:pic \$comment
0 2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add n\
ame=\"\$user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot
user remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotsp\
ot cookie remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:loca\
l exp [ /sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local
getxp [len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t
[:pic \$e\
xp 7 16]; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user
set comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip
hotspot u\
ser set comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp
> 15) do={ /ip hotspot user set comment=\$exp [find where name=\"\
$user\"]; }; ; :local \
mac \$\"mac-address\"; :local time [/system clock get time ]; /system script
add name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-RATE7-|-\
$commen\
t\" owner=\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none
rate-limit=3M/3M transparent-proxy=yes
add name=PM on-login=":put (\",remc,1,1h,1,,Disable,\"); { :local amount [ /ip
hotspot user get [/ip hotspot user find where name=\"\$user\"] comment]; :if (\
$amount >= \"\
0\") do={ ip hotspot user set \$user comment=\"\"; }; :local a [/ip hotspot
user get [find name=\$user] limit-uptime]; :local validity \"1h\"; :local c (\$a
+ \$validi\
ty); :local date [ /system clock get date ]; :local year [ :pick \$date 7 11 ];
:local month [ :pick \$date 0 3 ]; :local comment [ /ip hotspot user get [/ip
hotspot u\
ser find where name=\"\$user\"] comment]; :local ucode [:pic \$comment 0
2]; :if (\$ucode = \"vc\" or \$ucode = \"up\" or \$comment = \"\") do={ /sys sch
add name=\"\$\
user\" disable=no start-date=\$date interval=\$c on-event=\"/ip hotspot user
remove [find name=\$user]; /ip hotspot active remove [find user=\$user]; /ip
hotspot cooki\
e remove [find user=\$user]; /system sche remove [find name=\$user]\"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; :delay 2s;
:local exp [ \
/sys sch get [ /sys sch find where name=\"\$user\" ] next-run]; :local getxp
[len \$exp]; :if (\$getxp = 15) do={ :local d [:pic \$exp 0 6]; :local t [:pic \
$exp 7 16]\
; :local s (\"/\"); :local exp (\"\$d\$s\$year \$t\"); /ip hotspot user set
comment=\$exp [find where name=\"\$user\"]; }; :if (\$getxp = 8) do={ /ip hotspot
user set \
comment=\"\$date \$exp\" [find where name=\"\$user\"]; }; :if (\$getxp > 15)
do={ /ip hotspot user set comment=\$exp [find where name=\"\$user\"]; }; ; :local
mac \$\"\
mac-address\"; :local time [/system clock get time ]; /system script add
name=\"\$date-|-\$time-|-\$user-|-\$amount-|-\$address-|-\$mac-|-1h-|-PM-|-\
$comment\" owner=\
\"\$month\$year\" source=\$date comment=mikhmon}}" parent-queue=none rate-
limit=3M/3M transparent-proxy=yes
/system scheduler
add comment="Monitor Profile PM" interval=2m33s name=PM on-event=":local dateint
do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"aug\",\"\
sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local month
[ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray \$mon\
th]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local zero
(\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return [:tonum
(\"\$year\
\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0
2 ]; :local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \
$minutes) ; }; :local date [ /syst\
em clock get date ]; :local time [ /system clock get time ]; :local today [\
$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in [ /ip
hotspot user\
\_find where profile=\"PM\" ] do={ :local comment [ /ip hotspot user get \$i
comment]; :local name [ /ip hotspot user get \$i name]; :local gettime [:pic \
$comment 12 \
20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\") do={:local
expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if ((\$expd <
\$t\
oday and \$expt < \$curtime) or (\$expd < \$today and \$expt > \$curtime) or (\
$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user remove \$i ]; [
/ip hot\
spot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=05:19:41
add comment="Monitor Profile RATE1" interval=2m35s name=RATE1 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE1\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
01:22:49
add comment="Monitor Profile RATE2" interval=2m25s name=RATE2 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE2\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
01:21:28
add comment="Monitor Profile RATE3" interval=2m46s name=RATE3 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE3\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
02:20:39
add comment="Monitor Profile RATE4" interval=2m16s name=RATE4 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE4\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
03:49:18
add comment="Monitor Profile RATE5" interval=2m25s name=RATE5 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE5\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
01:13:26
add comment="Monitor Profile RATE6" interval=2m42s name=RATE6 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE6\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
02:41:49
add comment="Monitor Profile RATE7" interval=2m58s name=RATE7 on-event=":local
dateint do={:local montharray
( \"jan\",\"feb\",\"mar\",\"apr\",\"may\",\"jun\",\"jul\",\"au\
g\",\"sep\",\"oct\",\"nov\",\"dec\" );:local days [ :pick \$d 4 6 ];:local
month [ :pick \$d 0 3 ];:local year [ :pick \$d 7 11 ];:local monthint ([ :find \
$montharray\
\_\$month]);:local month (\$monthint + 1);:if ( [len \$month] = 1) do={:local
zero (\"0\");:return [:tonum (\"\$year\$zero\$month\$days\")];} else={:return
[:tonum (\"\
\$year\$month\$days\")];}}; :local timeint do={ :local hours [ :pick \$t 0 2 ];
:local minutes [ :pick \$t 3 5 ]; :return (\$hours * 60 + \$minutes) ; }; :local
date [\
\_/system clock get date ]; :local time [ /system clock get time ]; :local
today [\$dateint d=\$date] ; :local curtime [\$timeint t=\$time] ; :foreach i in
[ /ip hotsp\
ot user find where profile=\"RATE7\" ] do={ :local comment [ /ip hotspot user
get \$i comment]; :local name [ /ip hotspot user get \$i name]; :local gettime
[:pic \$co\
mment 12 20]; :if ([:pic \$comment 3] = \"/\" and [:pic \$comment 6] = \"/\")
do={:local expd [\$dateint d=\$comment] ; :local expt [\$timeint t=\$gettime] ; :if
((\$e\
xpd < \$today and \$expt < \$curtime) or (\$expd < \$today and \$expt > \
$curtime) or (\$expd = \$today and \$expt < \$curtime)) do={ [ /ip hotspot user
remove \$i ]; \
[ /ip hotspot active remove [find where user=\$name] ];}}}"
policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-
date=oct/20/2020 start-time=\
03:38:47

You might also like