aboutsummaryrefslogtreecommitdiff
path: root/modules/dns.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:50:37 +0100
committerGravatar dngfx2018-08-31 10:50:37 +0100
commitabed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch)
tree3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/dns.py
parentFix 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.py4
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