少尉
- 注册时间
- 2009-10-13
- 金币
- 217 个
- 威望
- 0 个
- 荣誉
- 0 个
累计签到:32 天 连续签到:0 天 [LV.50]初入江湖
|
发表于 2017-6-6 21:29
3 v7 H2 e/ V' s( T) K
/system clock
; N) h( n: e' x$ r+ T6 s$ _7 e:global currenttime7 l+ }- y+ t0 W- j
:set currenttime [ get time]
( Z3 r! g% a0 q4 |, Y: J7 d8 L& U+ r5 O! i
:local hotspotcount 0% a0 q1 K9 x% ^: }$ B$ Q2 Y) F Q
:local hotspotcounthotspotcount 200
6 ^ o9 Y3 B0 U2 z:local nl 4
6 |( ^2 Q/ l, z( @- h0 A
' p( H7 c2 ?, i0 t- @* A/system license
. _% F* a% b* K:set nl [get nlevel ]
" S6 s/ d( V; f7 ]. Y6 H h) }
" n' o! `( \; q! o:if ($nl=4) do={:set hotspotcount 200}
$ M) _5 \6 D3 P:if ($nl=5) do={:set hotspotcount 420}2 Q+ ^0 h; V7 r/ I+ E" M
:if ($nl=6) do={:set hotspotcount 840}
9 h5 i* N- Y( F5 c7 N# j- v; J* {1 W% \7 Y8 n& m$ m
/ip hotspot active. L( |% B! |4 ?# t1 \
:foreach i in=[ /ip hotspot active find ] do={:set hotspotcount (hotspotcount+1); }* U; w& D, R8 m9 G5 R# p) E" ~" N5 p
2 O0 z7 i1 d( f" L0 o
:if (($currenttime>"1:00:00" && $currenttime <"5:30:00")|| $hotspotcount >$hotspotcount) do={
+ q% A0 v* ^+ B' p9 d+ }6 L' D4 B0 t' T- T1 E
/ip hotspot active
% k" y2 {% y/ l! B3 v e c:foreach i in=[ /ip hotspot active find idle-time > 1800 ] do={ :log info message=[ get $i ] ;remove $i;:delay delay-time=1;};
5 \/ k8 t& ~! b. t0 h2 ]* E, m$ L
9 _; E) r; d; Y- e$ l5 o8 Q/ip hotspot host
7 {9 r# X( K% W% F8 ]:foreach i in=[ /ip hotspot host find idle-time > 1800 ] do={ :log info message=[ get $i ] ;remove $i;:delay delay-time=1;};
. c6 s$ S& M! A, X7 V! {& g3 _:log info message=($currenttime." hotspot clear");
8 F1 \- E, y# g1 i2 N4 ~8 I
) P" y( d3 T/ @+ l9 W:if ($hotspotcount >$hotspotcount) do={
6 b$ d0 j& K% P
( G9 T3 c# g0 D}0 O5 l$ [- {; t. p" j1 U0 N
}
! X. I- K5 p W1 P2 b9 |( ~7 ^6 f6 N/ W" ^3 q" k. d2 N
|
|