Move all actual nickname changing until AFTER events are fixed. it was actually
set_own_nickname that was really causing the issue.
This commit is contained in:
parent
26f63410f2
commit
d0573706e5
1 changed files with 4 additions and 4 deletions
|
@ -40,16 +40,16 @@ def nick(events, event):
|
|||
user = event["server"].get_user(event["prefix"].nickname)
|
||||
old_nickname = user.nickname
|
||||
|
||||
user.set_nickname(new_nickname)
|
||||
event["server"].change_user_nickname(old_nickname, new_nickname)
|
||||
|
||||
if not event["server"].is_own_nickname(event["prefix"].nickname):
|
||||
events.on("received.nick").call(new_nickname=new_nickname,
|
||||
old_nickname=old_nickname, user=user, server=event["server"])
|
||||
else:
|
||||
event["server"].set_own_nickname(new_nickname)
|
||||
events.on("self.nick").call(server=event["server"],
|
||||
new_nickname=new_nickname, old_nickname=old_nickname)
|
||||
event["server"].set_own_nickname(new_nickname)
|
||||
|
||||
user.set_nickname(new_nickname)
|
||||
event["server"].change_user_nickname(old_nickname, new_nickname)
|
||||
|
||||
def away(events, event):
|
||||
user = event["server"].get_user(event["prefix"].nickname)
|
||||
|
|
Loading…
Reference in a new issue