Fix completely broken chghost code. What on god's earth was I thinking.
This commit is contained in:
parent
1927c3c8af
commit
5b561b51f4
1 changed files with 3 additions and 2 deletions
|
@ -630,11 +630,12 @@ class Module(ModuleManager.BaseModule):
|
||||||
# IRCv3 CHGHOST, a user's username and/or hostname has changed
|
# IRCv3 CHGHOST, a user's username and/or hostname has changed
|
||||||
@utils.hook("raw.received.chghost")
|
@utils.hook("raw.received.chghost")
|
||||||
def chghost(self, event):
|
def chghost(self, event):
|
||||||
|
nickname = event["prefix"].nickname
|
||||||
username = event["args"][0]
|
username = event["args"][0]
|
||||||
hostname = event["args"][1]
|
hostname = event["args"][1]
|
||||||
|
|
||||||
if not event["server"].is_own_nickname(event["prefix"].nickname):
|
if not event["server"].is_own_nickname(nickname):
|
||||||
target = event["server"].get_user("nickanme")
|
target = event["server"].get_user(nickname)
|
||||||
else:
|
else:
|
||||||
target = event["server"]
|
target = event["server"]
|
||||||
target.username = username
|
target.username = username
|
||||||
|
|
Loading…
Reference in a new issue