aboutsummaryrefslogtreecommitdiff
path: root/Utils.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-17 21:49:32 +0100
committerGravatar jesopo2018-09-17 21:49:32 +0100
commitfda223ee46f5a105036b9d35c86a521c2cfdeb1b (patch)
treeba9b406019ced10d5fd862a544daf2fd4ec046f7 /Utils.py
parentAlso catch socket.timeout in IRCServer.read() (diff)
signature
Implement __str__ and __repr__ on Utils.IRCHostmask
Diffstat (limited to 'Utils.py')
-rw-r--r--Utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Utils.py b/Utils.py
index 7c87e495..b9a442dc 100644
--- a/Utils.py
+++ b/Utils.py
@@ -45,6 +45,11 @@ class IRCHostmask(object):
self.username = username
self.hostname = hostname
self.hostmask = hostmask
+ def __repr__(self):
+ return "Utils.IRCHostmask(%s)" % self.__str__()
+ def __str__(self):
+ return self.hostmask
+
def seperate_hostmask(hostmask):
hostmask = remove_colon(hostmask)
first_delim = hostmask.find("!")