join_org.lua 386 B

123456789101112131415161718
  1. join_org = {}
  2. function join_org.initiate(initiator, org, result)
  3. modpol.interactions.binary_poll_user(
  4. initiator,
  5. "Would you like to join " .. org.name,
  6. function (resp)
  7. if resp == "Yes" then
  8. org:add_member(initiator)
  9. end
  10. end
  11. )
  12. if result then result() end
  13. end
  14. modpol.modules.join_org = join_org