From ab4289aceb635952b00dab7ed167e107b1c58d6b Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 23 Jun 2019 10:44:45 +0100 Subject: [PATCH] Only show highest channel access symbol in format_activity.py --- modules/format_activity.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/format_activity.py b/modules/format_activity.py index d6c2809e..5f0283e2 100644 --- a/modules/format_activity.py +++ b/modules/format_activity.py @@ -9,13 +9,11 @@ class Module(ModuleManager.BaseModule): minimal=minimal, **kwargs) def _mode_symbols(self, user, channel, server): - modes = channel.get_user_status(user) - symbols = [] modes = list(channel.get_user_status(user)) - modes.sort(key=lambda x: list(server.prefix_modes.keys()).index(x)) - for mode in modes: - symbols.append(server.prefix_modes[mode]) - return "".join(symbols) + if modes: + modes.sort(key=lambda x: list(server.prefix_modes.keys()).index(x)) + return server.prefix_modes[modes[0]] + return "" def _privmsg(self, event, channel, user, nickname): symbols = ""