Handle CHGHOST referencing the bot instead of another user
This commit is contained in:
parent
ae78324c44
commit
35ae1a57c7
1 changed files with 7 additions and 3 deletions
|
@ -512,11 +512,15 @@ class LineHandler(object):
|
||||||
def chghost(self, event):
|
def chghost(self, event):
|
||||||
nickname, username, hostname = Utils.seperate_hostmask(
|
nickname, username, hostname = Utils.seperate_hostmask(
|
||||||
event["prefix"])
|
event["prefix"])
|
||||||
user = event["server"].get_user("nickanme")
|
|
||||||
username = event["args"][0]
|
username = event["args"][0]
|
||||||
hostname = event["args"][1]
|
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):
|
def account(self, event):
|
||||||
nickname, username, hostname = Utils.seperate_hostmask(
|
nickname, username, hostname = Utils.seperate_hostmask(
|
||||||
|
|
Loading…
Reference in a new issue