mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
stats: hide login blocks not relevant to this network
This commit is contained in:
parent
52f588c920
commit
23cb7c173a
@ -112,13 +112,13 @@ def handle_stats(irc, source, command, args):
|
|||||||
# 243/RPL_STATSOLINE: "O <hostmask> * <nick> [:<info>]"
|
# 243/RPL_STATSOLINE: "O <hostmask> * <nick> [:<info>]"
|
||||||
# New style accounts only!
|
# New style accounts only!
|
||||||
for accountname, accountdata in conf.conf['login'].get('accounts', {}).items():
|
for accountname, accountdata in conf.conf['login'].get('accounts', {}).items():
|
||||||
_num(243, "O %s * %s :network_filter:%s require_oper:%s" %
|
networks = accountdata.get('networks', [])
|
||||||
(' '.join(accountdata.get('hosts', [])) or '*@*',
|
if irc.name in networks or not networks:
|
||||||
accountname,
|
_num(243, "O %s * %s :%s" %
|
||||||
','.join(accountdata.get('networks', [])) or '*',
|
' '.join(accountdata.get('hosts', ['*@*']),
|
||||||
bool(accountdata.get('require_oper'))
|
accountname,
|
||||||
|
'needoper' if accountdata.get('require_oper') else '')
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
elif stats_type == 'u':
|
elif stats_type == 'u':
|
||||||
# 242/RPL_STATSUPTIME: ":Server Up <days> days <hours>:<minutes>:<seconds>"
|
# 242/RPL_STATSUPTIME: ":Server Up <days> days <hours>:<minutes>:<seconds>"
|
||||||
|
Loading…
Reference in New Issue
Block a user