only return IRCUser.hostmask() when all needed pieces are available

This commit is contained in:
jesopo 2019-09-27 16:21:59 +01:00
parent bc63111984
commit a42a196720

View file

@ -33,7 +33,9 @@ class User(IRCObject.Object):
return self.nickname
def hostmask(self) -> str:
if self.nickname and self.username and self.hostname:
return "%s!%s@%s" % (self.nickname, self.username, self.hostname)
return None
def get_id(self)-> int:
return (self.identified_account_id_override or