From 41cbd455d6151ec4b7a575fc7c6a734ac95a6a29 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 2 Apr 2019 21:22:40 -0700 Subject: [PATCH] relay: only check _invisible flag on actual users --- plugins/relay.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index 265ae30..548f412 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -474,11 +474,12 @@ def get_remote_user(irc, remoteirc, user, spawn_if_missing=True, times_tagged=0, # Ignore invisible users - used to skip joining users who are offline or invisible on # external transports - hide = getattr(irc.users[user], '_invisible', False) - if hide: - log.debug('(%s) get_remote_user: ignoring user %s since they are marked invisible', irc.name, - user) - return + if user in irc.users: + hide = getattr(irc.users[user], '_invisible', False) + if hide: + log.debug('(%s) get_remote_user: ignoring user %s since they are marked invisible', irc.name, + user) + return log.debug('(%s) Grabbing spawnlocks[%s] from thread %r in function %r', irc.name, irc.name, threading.current_thread().name, inspect.currentframe().f_code.co_name)