3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

exttargets: $account scenario 3 matching should require logged in status

This commit is contained in:
James Lu 2016-07-07 00:29:52 -07:00
parent 183a4cbd75
commit c034877d04

View File

@ -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])