From c034877d04ddf5d2850c5bf0a943eb5f4a11c2d3 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 7 Jul 2016 00:29:52 -0700 Subject: [PATCH] exttargets: $account scenario 3 matching should require logged in status --- coremods/exttargets.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coremods/exttargets.py b/coremods/exttargets.py index 3ee23a0..ad79d88 100644 --- a/coremods/exttargets.py +++ b/coremods/exttargets.py @@ -54,4 +54,6 @@ def account(irc, host, uid): return slogin == groups[1] and homenet == irc.name else: # Third or fourth scenario. If there are more than 3 groups, the rest are ignored. - return (groups[1] in ('*', slogin)) and (homenet == groups[2]) + # In other words: Return True if the user is logged in, the query matches either '*' or the + # user's login, abd the user is connected on the network requested. + return slogin and (groups[1] in ('*', slogin)) and (homenet == groups[2])