Implement __str__ and __repr__ on Utils.IRCHostmask
This commit is contained in:
parent
4a3dbeb7b8
commit
fda223ee46
1 changed files with 5 additions and 0 deletions
5
Utils.py
5
Utils.py
|
@ -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("!")
|
||||||
|
|
Loading…
Reference in a new issue