Add IRCUser.hostmask() to format nick/user/host in to a hostmask

This commit is contained in:
jesopo 2019-03-12 10:39:54 +00:00
parent 9026f722c1
commit 10ca8a1219

View file

@ -32,6 +32,9 @@ class User(IRCObject.Object):
def __str__(self) -> str:
return self.nickname
def hostmask(self) -> str:
return "%s!%s@%s" % (self.nickname, self.username, self.hostname)
def get_id(self)-> int:
return (self.identified_account_id_override or
self.identified_account_id or self._id)