Don't get_user before we've seperated userhost-in-names hostmasks

This commit is contained in:
jesopo 2018-09-04 08:12:45 +01:00
parent 462b0f5f0e
commit c5a3ce4987

View file

@ -187,12 +187,14 @@ class LineHandler(object):
modes.add(event["server"].mode_prefixes[nickname[0]]) modes.add(event["server"].mode_prefixes[nickname[0]])
nickname = nickname[1:] nickname = nickname[1:]
user = event["server"].get_user(nickname)
if "userhost-in-names" in event["server"].capabilities: if "userhost-in-names" in event["server"].capabilities:
nickname, username, hostname = Utils.seperate_hostmask( nickname, username, hostname = Utils.seperate_hostmask(
nickname) nickname)
user = event["server"].get_user(nickname)
user.username = username user.username = username
user.hostname = hostname user.hostname = hostname
else:
user = event["server"].get_user(nickname)
user.join_channel(channel) user.join_channel(channel)
channel.add_user(user) channel.add_user(user)