diff options
| author | 2018-08-31 10:50:37 +0100 | |
|---|---|---|
| committer | 2018-08-31 10:50:37 +0100 | |
| commit | abed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch) | |
| tree | 3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/dns.py | |
| parent | Fix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff) | |
Reformat
Diffstat (limited to 'modules/dns.py')
| -rw-r--r-- | modules/dns.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/dns.py b/modules/dns.py index 2935e1bf..d725889f 100644 --- a/modules/dns.py +++ b/modules/dns.py @@ -1,7 +1,9 @@ import socket + class Module(object): _name = "DNS" + def __init__(self, bot): bot.events.on("received").on("command").on("dns").hook( self.dns, min_args=1, @@ -12,7 +14,7 @@ class Module(object): hostname = event["args_split"][0] try: address_info = socket.getaddrinfo(hostname, 1, 0, - socket.SOCK_DGRAM) + socket.SOCK_DGRAM) except socket.gaierror: event["stderr"].write("Failed to find hostname") return |
