Delete a user's 'access'
channel setting when they have no permissions left
(channel_access.py)
This commit is contained in:
parent
1b933e7c00
commit
a3a535b195
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,10 @@ class Module(ModuleManager.BaseModule):
|
||||||
raise utils.EventError("%s does not have '%s' permission" %
|
raise utils.EventError("%s does not have '%s' permission" %
|
||||||
(target.nickname, acc))
|
(target.nickname, acc))
|
||||||
access.remove(acc)
|
access.remove(acc)
|
||||||
event["target"].set_user_setting(target.get_id(), "access", access)
|
if access:
|
||||||
|
event["target"].set_user_setting(target.get_id(), "access",
|
||||||
|
access)
|
||||||
|
else:
|
||||||
|
event["target"].del_user_setting(target.get_id(), "access")
|
||||||
event["stdout"].write("Removed permission from %s: %s" % (
|
event["stdout"].write("Removed permission from %s: %s" % (
|
||||||
target.nickname, " ".join(event["args_split"][2:])))
|
target.nickname, " ".join(event["args_split"][2:])))
|
||||||
|
|
Loading…
Reference in a new issue