From d72c15c9569ca5c9c7f22697ef14fef86e2681ee Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 4 Sep 2018 08:04:49 +0100 Subject: [PATCH] Most userhost-in-names check to after mode prefix checking --- IRCLineHandler.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/IRCLineHandler.py b/IRCLineHandler.py index ce753a78..67d9e2a3 100644 --- a/IRCLineHandler.py +++ b/IRCLineHandler.py @@ -181,12 +181,6 @@ class LineHandler(object): channel = event["server"].get_channel(event["args"][2]) nicknames = event["arbitrary"].split() 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([]) while nickname[0] in event["server"].mode_prefixes: @@ -194,7 +188,9 @@ class LineHandler(object): nickname = nickname[1:] 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.hostname = hostname user.join_channel(channel)