3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 21:39:25 +01:00

Merge pull request #1402 from kylef/kylef/mlock-i

Allow atheme2json to handle mlock mode removal (outside of `-t` or `-n`)
This commit is contained in:
Shivaram Lingamneni 2020-11-27 10:26:51 -08:00 committed by GitHub
commit c4b7b8af3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,8 +65,7 @@ def convert(infile):
for flag, mode in CMODE_FLAG_TO_MODE.items(): for flag, mode in CMODE_FLAG_TO_MODE.items():
if flag & mlock_on != 0: if flag & mlock_on != 0:
modes.add(mode) modes.add(mode)
for flag, mode in CMODE_FLAG_TO_MODE.items(): elif flag & mlock_off != 0 and mode in modes:
if flag & mlock_off != 0:
modes.remove(mode) modes.remove(mode)
chdata['modes'] = ''.join(modes) chdata['modes'] = ''.join(modes)
chdata['limit'] = int(parts[7]) chdata['limit'] = int(parts[7])