Adding and fixing basic modules for renaming, removing, and adding orgs
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
local leave_org = {
|
||||
name = "Leave org",
|
||||
slug = "leave_org",
|
||||
desc = "Leave this org"
|
||||
desc = "Remove yourself from the current org"
|
||||
}
|
||||
|
||||
leave_org.data = {
|
||||
@ -19,9 +19,9 @@ leave_org.config = {
|
||||
-- @function initiate
|
||||
function leave_org:initiate(result)
|
||||
if self.org == modpol.instance then
|
||||
modpol.interactions.message(
|
||||
self.initiator,
|
||||
"You cannot leave the root org")
|
||||
modpol.interactions.message(
|
||||
self.initiator,
|
||||
"You cannot leave the root org")
|
||||
else
|
||||
self.org:remove_member(self.initiator)
|
||||
modpol.interactions.message_org(
|
||||
@ -32,6 +32,7 @@ function leave_org:initiate(result)
|
||||
"You have left org " .. self.org.name)
|
||||
end
|
||||
if result then result() end
|
||||
self.org:delete_process(self.id)
|
||||
end
|
||||
|
||||
--- (Required) Add to module table
|
||||
|
Reference in New Issue
Block a user