1 #!/usr/bin/haserl --shell=luac
2 dofile("/usr/lib/luci_splash")
4 require("ffluci.template")
7 local mac = get_usermac()
12 if isblacklisted(mac) then
13 return action_blocked()
16 if iswhitelisted(mac) or haslease(mac) then
17 return action_allowed()
20 return action_splash(mac)
23 function action_splash(mac)
24 if ffluci.http.formvalue("activate") then
26 ffluci.http.textheader()
27 print("Got splashed!")
29 ffluci.http.textheader()
30 print("Get splashed!")
34 function action_allowed()
35 ffluci.http.textheader()
36 print("Already allowed!")
39 function action_blocked()
40 ffluci.http.textheader()
44 function action_nodata()
45 ffluci.http.textheader()