Use new utils.consts.PERMISSION_FORCE_SUCCESS
in permissions.py
This commit is contained in:
parent
f9446a3663
commit
08404c4694
1 changed files with 4 additions and 0 deletions
|
@ -171,10 +171,14 @@ class Module(ModuleManager.BaseModule):
|
||||||
permission in permissions or "*" in permissions)
|
permission in permissions or "*" in permissions)
|
||||||
if not identified_account or not has_permission:
|
if not identified_account or not has_permission:
|
||||||
return "You do not have permission to do that"
|
return "You do not have permission to do that"
|
||||||
|
else:
|
||||||
|
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||||
elif authenticated:
|
elif authenticated:
|
||||||
if not identified_account:
|
if not identified_account:
|
||||||
return REQUIRES_IDENTIFY % (event["server"].nickname,
|
return REQUIRES_IDENTIFY % (event["server"].nickname,
|
||||||
event["server"].nickname)
|
event["server"].nickname)
|
||||||
|
else:
|
||||||
|
return utils.consts.PERMISSION_FORCE_SUCCESS
|
||||||
|
|
||||||
@utils.hook("received.command.mypermissions", authenticated=True)
|
@utils.hook("received.command.mypermissions", authenticated=True)
|
||||||
def my_permissions(self, event):
|
def my_permissions(self, event):
|
||||||
|
|
Loading…
Reference in a new issue