30 lines
595 B
Lua
30 lines
595 B
Lua
|
|
|
|
JoinOrg = {}
|
|
|
|
JoinOrg.setup = {
|
|
name = "Join an org",
|
|
slug = "join_org_consent",
|
|
desc = "Consent based join org module"
|
|
}
|
|
|
|
function JoinOrg:initiate()
|
|
self.org:call_module(
|
|
"consent",
|
|
self.initiator,
|
|
{
|
|
prompt = "Allow " .. self.initiator .. " to join?",
|
|
votes_required = 1
|
|
},
|
|
function ()
|
|
self:complete()
|
|
end
|
|
)
|
|
end
|
|
|
|
function JoinOrg:complete()
|
|
self.org:add_member(self.initiator)
|
|
print("Added " .. self.initiator .. " to the org!")
|
|
end
|
|
|
|
modpol.modules.join_org_consent = JoinOrg |