From 7e5cdc4f90ed6e3b608b57ef97d4007c33314663 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 27 Nov 2020 19:20:58 +0000 Subject: [PATCH] refactor atheme2json to sort channel modes This makes invoking the script multiple times with the same input return the same result, which may not be the case before because sets are unordered and thus the channel modes can become reordered across multiple invocations of the script. --- distrib/atheme/atheme2json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distrib/atheme/atheme2json.py b/distrib/atheme/atheme2json.py index 3bffcc1c..869cb055 100644 --- a/distrib/atheme/atheme2json.py +++ b/distrib/atheme/atheme2json.py @@ -67,7 +67,7 @@ def convert(infile): modes.add(mode) elif flag & mlock_off != 0 and mode in modes: modes.remove(mode) - chdata['modes'] = ''.join(modes) + chdata['modes'] = ''.join(sorted(modes)) chdata['limit'] = int(parts[7]) elif category == 'MDC': # auxiliary data for a channel registration