From 2615b15cc4fee1a828d9666d1bee91a3416ffd77 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 12 Oct 2020 21:06:00 -0400 Subject: [PATCH] fix xop levels for anope --- distrib/anope/anope2json.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/distrib/anope/anope2json.py b/distrib/anope/anope2json.py index 27a713e0..80225e0f 100644 --- a/distrib/anope/anope2json.py +++ b/distrib/anope/anope2json.py @@ -11,6 +11,18 @@ AnopeObject = namedtuple('AnopeObject', ('type', 'kv')) MASK_MAGIC_REGEX = re.compile(r'[*?!@]') def access_level_to_amode(level): + # https://wiki.anope.org/index.php/2.0/Modules/cs_xop + if level == 'QOP': + return 'q' + elif level == 'SOP': + return 'a' + elif level == 'AOP': + return 'o' + elif level == 'HOP': + return 'h' + elif level == 'VOP': + return 'v' + try: level = int(level) except: