浏览代码

fix xop levels for anope

tags/v2.4.0-rc1
Shivaram Lingamneni 3 年前
父节点
当前提交
2615b15cc4
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      distrib/anope/anope2json.py

+ 12
- 0
distrib/anope/anope2json.py 查看文件

@@ -11,6 +11,18 @@ AnopeObject = namedtuple('AnopeObject', ('type', 'kv'))
11 11
 MASK_MAGIC_REGEX = re.compile(r'[*?!@]')
12 12
 
13 13
 def access_level_to_amode(level):
14
+    # https://wiki.anope.org/index.php/2.0/Modules/cs_xop
15
+    if level == 'QOP':
16
+        return 'q'
17
+    elif level == 'SOP':
18
+        return 'a'
19
+    elif level == 'AOP':
20
+        return 'o'
21
+    elif level == 'HOP':
22
+        return 'h'
23
+    elif level == 'VOP':
24
+        return 'v'
25
+
14 26
     try:
15 27
         level = int(level)
16 28
     except:

正在加载...
取消
保存