yes...shame on me! i found the wiki..
dont know if someone can use it , but here is how i try to implement a geoIP check from the opensource maxmind in lua.
so maybe it´s not the best lua, code, let me know if you have some thoughts, i´m critical resident :)
in my lua script i detect and split each clientIP,
function onConnection(client, userName, meeting)
clientIP = string.split2(client.address,":"); -- call a helper function to split the client ip adress from IP:PORT
after that send the IP to the geo IP module to receive the country:
ipdata = ip_to_country(clientIP[1]);
you can trace the continent like:
print("CLIENT CONTINENT: " .. ipdata.continent);
you also can get city infos, country code,
ipdata = ip_to_city(clientIP[1]);
-- Example geoIP
print(ipdata.country_code);
print(ipdata.country_name);
a simply check to allow only connection from germany
if (ipdate.country_name ~= "Germany") then
client.writer:writeAMFMessage("onPushData","Client is not allowed from his ip-address range to connect!")
error("Client is not allowed to connect");
end
really nice to see how you can extend the server with some scripts.