diff --git a/src/core_modules/line_handler/user.py b/src/core_modules/line_handler/user.py index 1d7ad016..15b71673 100644 --- a/src/core_modules/line_handler/user.py +++ b/src/core_modules/line_handler/user.py @@ -73,12 +73,15 @@ def chghost(events, event): event["server"].hostname = hostname target = event["server"].get_user(nickname) - events.on("received.chghost").call(user=target, server=event["server"], - username=username, hostname=hostname) + old_username = target.username + old_hostname = target.hostname target.username = username target.hostname = hostname + events.on("received.chghost").call(user=target, server=event["server"], + old_username=old_username, old_hostname=old_hostname) + def setname(event): nickname = event["line"].source.nickname realname = event["line"].args[0]