diff options
author | Renard | 2020-03-27 22:23:12 -0300 |
---|---|---|
committer | Renard | 2020-03-27 22:23:12 -0300 |
commit | f62aec2e3c7f2e9c26eb55043338bf04c6aa0278 (patch) | |
tree | 4975d1674281c4ba16f0871f24ba17374ee3d7e9 /cgi/framework.py | |
parent | cd27ee82e058040afaac9506ad9b92a2bce65d97 (diff) | |
parent | 7903c754e17bfece3f30b3daebd09cdba7d58457 (diff) | |
download | weabot-f62aec2e3c7f2e9c26eb55043338bf04c6aa0278.tar.gz weabot-f62aec2e3c7f2e9c26eb55043338bf04c6aa0278.tar.xz weabot-f62aec2e3c7f2e9c26eb55043338bf04c6aa0278.zip |
Merge branch 'master' of https://git.bienvenidoainternet.org/priv/www
Diffstat (limited to 'cgi/framework.py')
-rw-r--r-- | cgi/framework.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cgi/framework.py b/cgi/framework.py index 9c95cc1..f90ed92 100644 --- a/cgi/framework.py +++ b/cgi/framework.py @@ -89,6 +89,9 @@ def addressIsES(ip): 'GY', 'GT', 'HN', 'MX', 'NI', 'PA', 'PE', 'PY', 'PR', 'SR', 'UY', 'VE'] # 'BR', return getCountry(ip) in ES +def addressIsUS(ip): + return getCountry(ip) == 'US' + def getCountry(ip): import geoip return geoip.country(ip) |