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 ::"