mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
hotspot-to-wpa: move code for marker up
This commit is contained in:
parent
57fab95290
commit
c132d28408
1 changed files with 7 additions and 6 deletions
|
@ -20,12 +20,6 @@
|
||||||
:local UserVal [ / ip hotspot user get [ find where name=$UserName ] ];
|
:local UserVal [ / ip hotspot user get [ find where name=$UserName ] ];
|
||||||
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
|
:local UserInfo [ $ParseKeyValueStore ($UserVal->"comment") ];
|
||||||
:local Hotspot [ / ip hotspot host get [ find where mac-address=$MacAddress authorized ] server ];
|
:local Hotspot [ / ip hotspot host get [ find where mac-address=$MacAddress authorized ] server ];
|
||||||
:local Template [ / caps-man access-list get ([ find where disabled \
|
|
||||||
comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ];
|
|
||||||
|
|
||||||
:if ($Template->"action" = "reject") do={
|
|
||||||
$LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :len [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ] ] = 0) do={
|
:if ([ :len [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ] ] = 0) do={
|
||||||
/ caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled=yes;
|
/ caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled=yes;
|
||||||
|
@ -33,6 +27,13 @@
|
||||||
}
|
}
|
||||||
:local PlaceBefore ([ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]->0);
|
:local PlaceBefore ([ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]->0);
|
||||||
|
|
||||||
|
:local Template [ / caps-man access-list get ([ find where disabled \
|
||||||
|
comment=("hotspot-to-wpa template " . $Hotspot) ]->0) ];
|
||||||
|
|
||||||
|
:if ($Template->"action" = "reject") do={
|
||||||
|
$LogPrintExit2 info $0 ("Ignoring login for hotspot '" . $Hotspot . "'.") true;
|
||||||
|
}
|
||||||
|
|
||||||
# allow login page to load
|
# allow login page to load
|
||||||
:delay 1s;
|
:delay 1s;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue