mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 11:59:40 +01:00
preemptively filter out masks from amodes in atheme import
This commit is contained in:
parent
f9768e2259
commit
b95afa1464
@ -2,9 +2,12 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
|
MASK_MAGIC_REGEX = re.compile(r'[*?!@]')
|
||||||
|
|
||||||
def to_unixnano(timestamp):
|
def to_unixnano(timestamp):
|
||||||
return int(timestamp) * (10**9)
|
return int(timestamp) * (10**9)
|
||||||
|
|
||||||
@ -100,6 +103,8 @@ def convert(infile):
|
|||||||
# channel access lists
|
# channel access lists
|
||||||
# CA #mychannel shivaram +AFORafhioqrstv 1600134478 shivaram
|
# CA #mychannel shivaram +AFORafhioqrstv 1600134478 shivaram
|
||||||
chname, username, flags, set_at = parts[1], parts[2], parts[3], int(parts[4])
|
chname, username, flags, set_at = parts[1], parts[2], parts[3], int(parts[4])
|
||||||
|
if MASK_MAGIC_REGEX.search(username):
|
||||||
|
continue
|
||||||
chname = parts[1]
|
chname = parts[1]
|
||||||
chdata = out['channels'][chname]
|
chdata = out['channels'][chname]
|
||||||
flags = parts[3]
|
flags = parts[3]
|
||||||
|
Loading…
Reference in New Issue
Block a user