Move self.name = self.nickname_lower to under setting self.nickname_lower,

otherwise `self.name` will be `""`
This commit is contained in:
jesopo 2018-11-23 13:55:40 +00:00
parent 3061c65024
commit d606944648

View file

@ -37,10 +37,10 @@ class User(IRCObject.Object):
return (self.identified_account_override or self.identified_account) return (self.identified_account_override or self.identified_account)
def set_nickname(self, nickname: str): def set_nickname(self, nickname: str):
self.name = self.nickname_lower
self.nickname = nickname self.nickname = nickname
self.nickname_lower = utils.irc.lower(self.server.case_mapping, self.nickname_lower = utils.irc.lower(self.server.case_mapping,
nickname) nickname)
self.name = self.nickname_lower
def join_channel(self, channel: "IRCChannel.Channel"): def join_channel(self, channel: "IRCChannel.Channel"):
self.channels.add(channel) self.channels.add(channel)
def part_channel(self, channel: "IRCChannel.Channel"): def part_channel(self, channel: "IRCChannel.Channel"):