1
2
3
4
5
6
7
8
9
10
11
12
13
| # Script source: http://forum.mikrotik.com/viewtopic.php?f=9&t=82129# To block HOTSPOT users who donot have comments "PAID" in there comment box# Syed Jahanzaib / aacable@hotamil.com / https://aacable.wordpress.com/ip hotspot user:foreach i in=[find] do={:local username [get $i name]:if ([get $i comment]~"paid") do={} else={:log warning "$username..."/ip hotspot user disable $username}} |
##################################################################
BELOW SCRIPT IS ORIGINAL VERSION OF ABOVE MODIFIED SCRIPT,
SCRIPT SOURCE: MIKROTIK FORUM
##################################################################
BELOW SCRIPT IS ORIGINAL VERSION OF ABOVE MODIFIED SCRIPT,
SCRIPT SOURCE: MIKROTIK FORUM
##################################################################
1
2
3
4
5
6
7
8
9
10
11
12
| :local username:local userunpaid:foreach i in=[/ip hotspot user find] do {:set username ( username [ip hotspot user get $i name]):if ([/ip hotspot user get [/ip hotspot user find name=$username] comment] != "paid") do {:foreach j in=[/ip hotspot active find] do {:set userunpaid ( userunpaid [ip hotspot active get $j user]):if (username = userunpaid) do {[/ip hotspot active remove [/ip hotspot active find user=$userunpaid]]:log info "User $userunpaid was removed from active list due to payment delay"}}}}} |
No comments:
Post a Comment