Handle CHGHOST referencing the bot instead of another user

This commit is contained in:
jesopo 2018-09-10 09:10:43 +01:00
parent ae78324c44
commit 35ae1a57c7

View file

@ -512,11 +512,15 @@ class LineHandler(object):
def chghost(self, event):
nickname, username, hostname = Utils.seperate_hostmask(
event["prefix"])
user = event["server"].get_user("nickanme")
username = event["args"][0]
hostname = event["args"][1]
user.username = username
user.hostname = hostname
if not event["server"].is_own_nickname(nickname):
target = event["server"].get_user("nickanme")
else:
target = event["server"]
target.username = username
target.hostname = hostname
def account(self, event):
nickname, username, hostname = Utils.seperate_hostmask(