add a special "require_mode" arg; "admin" meaning "above op if available"
This commit is contained in:
parent
59985f182a
commit
b6f18f809c
1 changed files with 6 additions and 0 deletions
|
@ -18,6 +18,12 @@ class Module(ModuleManager.BaseModule):
|
|||
require_mode = event["target"].get_setting(
|
||||
"mode-%s" % require_mode.lower(),
|
||||
LOWHIGH[require_mode.lower()])
|
||||
elif require_mode.lower() == "admin":
|
||||
previous = None
|
||||
for mode, _ in event["server"].prefix_modes:
|
||||
if mode == "o":
|
||||
return previous or mone
|
||||
previous = mode
|
||||
|
||||
if not event["target"].mode_or_above(event["user"],
|
||||
require_mode):
|
||||
|
|
Loading…
Reference in a new issue