From b95afa146457135faffd724a1658c4c118ba285d Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 6 Dec 2020 20:07:45 -0500 Subject: [PATCH] preemptively filter out masks from amodes in atheme import --- distrib/atheme/atheme2json.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/distrib/atheme/atheme2json.py b/distrib/atheme/atheme2json.py index 5dd9aaa9..78768adc 100755 --- a/distrib/atheme/atheme2json.py +++ b/distrib/atheme/atheme2json.py @@ -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]