Implement __str__ and __repr__ on Utils.IRCHostmask

This commit is contained in:
jesopo 2018-09-17 21:49:32 +01:00
parent 4a3dbeb7b8
commit fda223ee46

View file

@ -45,6 +45,11 @@ class IRCHostmask(object):
self.username = username self.username = username
self.hostname = hostname self.hostname = hostname
self.hostmask = hostmask self.hostmask = hostmask
def __repr__(self):
return "Utils.IRCHostmask(%s)" % self.__str__()
def __str__(self):
return self.hostmask
def seperate_hostmask(hostmask): def seperate_hostmask(hostmask):
hostmask = remove_colon(hostmask) hostmask = remove_colon(hostmask)
first_delim = hostmask.find("!") first_delim = hostmask.find("!")