--- Remove org (consent) -- A simple module that calls a consent process on an org to remove it. -- Depends on the Consent module. remove_org_consent = {} remove_org_consent.setup = { name = "Remove this org", slug = "remove_org", desc = "Removes an org if all members consent." } function remove_org_consent:initiate() self.org:call_module( "consent", self.initiator, { prompt = "Remove org " .. self.org.name .. "?", votes_required = #self.org.members }, function () self:complete() end ) end function join_org_consent:complete() self.org:delete() print("Removed org " .. self.org.name .. ".") end modpol.modules.remove_org_consent = remove_org_consent