cleaned up module template!

This commit is contained in:
Luke Miller
2021-12-16 13:32:30 -05:00
parent fa7a0f82f6
commit 826f9600b5
2 changed files with 18 additions and 18 deletions

View File

@@ -2,22 +2,12 @@
-- Module that enables a user to join an org
JoinOrg = {}
JoinOrg_mt = { __index = JoinOrg }
function JoinOrg.create(initiator, org, id)
local inst = {
name = "Join an org",
desc = "Initiator chooses an org to become a member of. Nothing happens if they are already in an org.",
initiator = initiator,
org = org,
id = id,
votes_yes = 0
}
setmetatable(inst, JoinOrg_mt)
return inst
end
JoinOrg.setup = {
name = "Join an org",
desc = "Initiator chooses an org to become a member of. Nothing happens if they are already in an org.",
votes_yes = 0
}
function JoinOrg:initiate(result)
modpol.interactions.binary_poll_user(
@@ -33,8 +23,6 @@ function JoinOrg:initiate(result)
end
)
if result then result() end
end