Most userhost-in-names check to after mode prefix checking

This commit is contained in:
jesopo 2018-09-04 08:04:49 +01:00
parent 1c3c56e7f4
commit d72c15c956

View file

@ -181,12 +181,6 @@ class LineHandler(object):
channel = event["server"].get_channel(event["args"][2]) channel = event["server"].get_channel(event["args"][2])
nicknames = event["arbitrary"].split() nicknames = event["arbitrary"].split()
for nickname in nicknames: for nickname in nicknames:
username = None
hostname = None
if "userhost-in-names" in event["server"].capabilities:
nickname, username, hostname = Utils.seperate_hostmask(
event["prefix"])
modes = set([]) modes = set([])
while nickname[0] in event["server"].mode_prefixes: while nickname[0] in event["server"].mode_prefixes:
@ -194,7 +188,9 @@ class LineHandler(object):
nickname = nickname[1:] nickname = nickname[1:]
user = event["server"].get_user(nickname) user = event["server"].get_user(nickname)
if username and hostname: if "userhost-in-names" in event["server"].capabilities:
nickname, username, hostname = Utils.seperate_hostmask(
nickname)
user.username = username user.username = username
user.hostname = hostname user.hostname = hostname
user.join_channel(channel) user.join_channel(channel)