From 2c4f2670d0e7c6f8d93b1a9db9a59156d1024aab Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 27 Apr 2021 18:34:51 +0200 Subject: formatter: Make parameter name for format_netsplit clearer --- quarg/quassel/formatter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quarg/quassel/formatter.py b/quarg/quassel/formatter.py index ed33719..9c89970 100644 --- a/quarg/quassel/formatter.py +++ b/quarg/quassel/formatter.py @@ -84,12 +84,12 @@ def parse_netsplit(splitmsg): return users, servers, rest -def format_netsplit(quit, msg): +def format_netsplit(has_ended, msg): users, (srv_left, srv_right), rest = parse_netsplit(msg.message) affected = ', '.join(user.nick for user in users) + (f' ({rest} more)' if rest else '') - if quit: - return f'<= Netsplit between {srv_left} and {srv_right}. Users quit: {affected}' - return f'=> Netsplit between {srv_left} and {srv_right} ended. Users joined: {affected}' + if has_ended: + return f'=> Netsplit between {srv_left} and {srv_right} ended. Users joined: {affected}' + return f'<= Netsplit between {srv_left} and {srv_right}. Users quit: {affected}' def fmt(string): @@ -111,7 +111,7 @@ FORMATTERS = { MessageType.ERROR: format_generic, MessageType.DAYCHANGE: format_generic, MessageType.TOPIC: format_generic, - MessageType.NETSPLIT_JOIN: partial(format_netsplit, False), - MessageType.NETSPLIT_QUIT: partial(format_netsplit, True), + MessageType.NETSPLIT_JOIN: partial(format_netsplit, True), + MessageType.NETSPLIT_QUIT: partial(format_netsplit, False), MessageType.INVITE: format_generic, } -- cgit v1.2.3-2-gb3c3