Change user nickname before firing (received/self).nick events
This commit is contained in:
parent
8c3ea677ec
commit
3e9d628d64
1 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,9 @@ 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"])
|
||||
|
@ -48,9 +51,6 @@ def nick(events, event):
|
|||
events.on("self.nick").call(server=event["server"],
|
||||
new_nickname=new_nickname, old_nickname=old_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)
|
||||
message = event["args"].get(0)
|
||||
|
|
Loading…
Reference in a new issue