aboutsummaryrefslogtreecommitdiff
path: root/IRCLineHandler.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-10 09:10:43 +0100
committerGravatar jesopo2018-09-10 09:10:43 +0100
commit35ae1a57c7fbdf3c6a22e5fccc0a885ebcd07cd1 (patch)
tree27569f482a327ed25b671fd65b6fd1bc99674ef6 /IRCLineHandler.py
parentTypo, event["server"] -> server (diff)
signature
Handle CHGHOST referencing the bot instead of another user
Diffstat (limited to 'IRCLineHandler.py')
-rw-r--r--IRCLineHandler.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py
index 1493ce77..2a279ebc 100644
--- a/IRCLineHandler.py
+++ b/IRCLineHandler.py
@@ -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(