mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 05:19:25 +01:00
fix atheme2json to handle mlock mode removal
For example, if the mlock is set to `-i`, `i` is not present in the `modes` and thus it would error. I'm inclined to think that the negative mlock feature doesn't behave correctly, because the mlock of `-i` (or `-n`) would prevent anyone from ever setting those modes on the channel. Which this does not appear to be the case. Fixes #1401
This commit is contained in:
parent
f04648e081
commit
97bb044640
@ -65,8 +65,7 @@ def convert(infile):
|
||||
for flag, mode in CMODE_FLAG_TO_MODE.items():
|
||||
if flag & mlock_on != 0:
|
||||
modes.add(mode)
|
||||
for flag, mode in CMODE_FLAG_TO_MODE.items():
|
||||
if flag & mlock_off != 0:
|
||||
elif flag & mlock_off != 0 and mode in modes:
|
||||
modes.remove(mode)
|
||||
chdata['modes'] = ''.join(modes)
|
||||
chdata['limit'] = int(parts[7])
|
||||
|
Loading…
Reference in New Issue
Block a user