Delete "permissions" setting when it's empty

This commit is contained in:
jesopo 2018-08-29 14:34:52 +01:00
parent 43ab3cbd10
commit 76d7a8de36

View file

@ -156,6 +156,9 @@ class Module(object):
target.nickname, permission))
else:
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" % (
permission, target.nickname))