From 7204ef1cf1688b83b2c3a75416f6ca35951cebbd Mon Sep 17 00:00:00 2001 From: Celelibi Date: Fri, 19 Jun 2020 03:50:17 +0200 Subject: [PATCH] plugin stats: Refactor multiline function call Signed-off-by: Celelibi --- plugins/stats.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/stats.py b/plugins/stats.py index db1d747..c158470 100644 --- a/plugins/stats.py +++ b/plugins/stats.py @@ -115,11 +115,9 @@ def handle_stats(irc, source, command, args): for accountname, accountdata in conf.conf['login'].get('accounts', {}).items(): networks = accountdata.get('networks', []) if irc.name in networks or not networks: - _num(243, "O %s * %s :%s" % ( - ' '.join(accountdata.get('hosts', ['*@*'])), - accountname, - 'needoper' if accountdata.get('require_oper') else '') - ) + hosts = ' '.join(accountdata.get('hosts', ['*@*'])) + needoper = 'needoper' if accountdata.get('require_oper') else '' + _num(243, "O %s * %s :%s" % (hosts, accountname, needoper)) elif stats_type == 'u': # 242/RPL_STATSUPTIME: ":Server Up days ::"