Fix BotUser.lower
This commit is contained in:
parent
c9faa8bb7a
commit
24f82d3cd5
@ -607,13 +607,8 @@ class BotUser(User): # TODO: change all the 'if x is Bot' for 'if isinstance(x,
|
|||||||
return new
|
return new
|
||||||
|
|
||||||
def lower(self):
|
def lower(self):
|
||||||
temp = type(self)(self.client, lower(self.nick))
|
temp = super().__new__(type(self), self.client, lower(self.nick), lower(self.ident), lower(self.host, casemapping="ascii"), lower(self.realname), lower(self.account))
|
||||||
if temp is not self:
|
if temp is not self: # If everything is already lowercase, we'll get back the same instance
|
||||||
temp.ident = lower(self.ident)
|
|
||||||
temp.host = lower(self.host, casemapping="ascii")
|
|
||||||
temp.realname = lower(self.realname)
|
|
||||||
temp.account = lower(self.account)
|
|
||||||
temp.modes = self.modes
|
|
||||||
temp.channels = self.channels
|
temp.channels = self.channels
|
||||||
temp.ref = self.ref or self
|
temp.ref = self.ref or self
|
||||||
return temp
|
return temp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user