mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +01: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:
parent
c4b7b8af3a
commit
7e5cdc4f90
@ -67,7 +67,7 @@ def convert(infile):
|
|||||||
modes.add(mode)
|
modes.add(mode)
|
||||||
elif flag & mlock_off != 0 and mode in modes:
|
elif flag & mlock_off != 0 and mode in modes:
|
||||||
modes.remove(mode)
|
modes.remove(mode)
|
||||||
chdata['modes'] = ''.join(modes)
|
chdata['modes'] = ''.join(sorted(modes))
|
||||||
chdata['limit'] = int(parts[7])
|
chdata['limit'] = int(parts[7])
|
||||||
elif category == 'MDC':
|
elif category == 'MDC':
|
||||||
# auxiliary data for a channel registration
|
# auxiliary data for a channel registration
|
||||||
|
Loading…
Reference in New Issue
Block a user