aboutsummaryrefslogtreecommitdiff
path: root/modules/geoip.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-03 13:22:37 +0100
committerGravatar jesopo2018-10-03 13:22:37 +0100
commit69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch)
tree11aa30f2a357f3be23ad97315dae3df051455cbe /modules/geoip.py
parentAdd a way to not add a user automatically in IRCServer.get_user (diff)
signature
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'modules/geoip.py')
-rw-r--r--modules/geoip.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/geoip.py b/modules/geoip.py
index 38cc6043..fed27083 100644
--- a/modules/geoip.py
+++ b/modules/geoip.py
@@ -1,17 +1,17 @@
-from src import ModuleManager, Utils
+from src import ModuleManager, utils
URL_GEOIP = "http://ip-api.com/json/%s"
class Module(ModuleManager.BaseModule):
_name = "GeoIP"
- @Utils.hook("received.command.geoip", min_args=1)
+ @utils.hook("received.command.geoip", min_args=1)
def geoip(self, event):
"""
:help: Get geoip data on a given IPv4/IPv6 address
:usage: <IP>
"""
- page = Utils.get_url(URL_GEOIP % event["args_split"][0],
+ page = utils.http.get_url(URL_GEOIP % event["args_split"][0],
json=True)
if page:
if page["status"] == "success":