Hello,
I'm trying to print the List of refused IP by using c_GetGlobalIPMaskList() but everything I tried Ends up in an error: "string expected, got table" or "string expected, got nil"
How do I print this Information in the administration console?
Thx for your help!
Meik
Print the List of refused IP in Console
-
- Posts: 12
- Joined: Tue Nov 29, 2011 12:00 pm
- Location: Bonn, Germany
-
- Site Admin
- Posts: 2104
- Joined: Tue Sep 29, 2009 6:09 am
Re: Print the List of refused IP in Console
OK, here is an example to print the global IP access rules:
Code: Select all
local ipmasks = c_GetGlobalIPMaskList()
if type(ipmasks) == "table" then
for _,ipmask in pairs(ipmasks) do
if ipmask.refuse then
print("Denied IP: "..ipmask.ip.."\n")
else
print("Allowed IP: "..ipmask.ip.."\n")
end
end
end