mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-14 00:23:34 -07:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user