Delete "permissions" setting when it's empty
This commit is contained in:
parent
43ab3cbd10
commit
76d7a8de36
1 changed files with 4 additions and 1 deletions
|
@ -156,6 +156,9 @@ class Module(object):
|
||||||
target.nickname, permission))
|
target.nickname, permission))
|
||||||
else:
|
else:
|
||||||
permissions.remove(permission)
|
permissions.remove(permission)
|
||||||
target.set_setting("permissions", permissions)
|
if not permissions:
|
||||||
|
target.del_setting("permissions")
|
||||||
|
else:
|
||||||
|
target.set_setting("permissions", permissions)
|
||||||
event["stdout"].write("Removed permission '%s' from %s" % (
|
event["stdout"].write("Removed permission '%s' from %s" % (
|
||||||
permission, target.nickname))
|
permission, target.nickname))
|
||||||
|
|
Loading…
Reference in a new issue