3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 03:49:27 +01:00

preemptively filter out masks from amodes in atheme import

This commit is contained in:
Shivaram Lingamneni 2020-12-06 20:07:45 -05:00
parent f9768e2259
commit b95afa1464

View File

@ -2,9 +2,12 @@
import json
import logging
import re
import sys
from collections import defaultdict
MASK_MAGIC_REGEX = re.compile(r'[*?!@]')
def to_unixnano(timestamp):
return int(timestamp) * (10**9)
@ -100,6 +103,8 @@ def convert(infile):
# channel access lists
# CA #mychannel shivaram +AFORafhioqrstv 1600134478 shivaram
chname, username, flags, set_at = parts[1], parts[2], parts[3], int(parts[4])
if MASK_MAGIC_REGEX.search(username):
continue
chname = parts[1]
chdata = out['channels'][chname]
flags = parts[3]