A bunch of module bugfixes

This commit is contained in:
Nathan Schneider
2021-12-18 20:41:49 -07:00
parent af6e639e27
commit e994061f38
13 changed files with 87 additions and 78 deletions

View File

@ -15,13 +15,9 @@ leave_org.config = {
--- (Required): initiate function
-- Modules have access to the following instance variables:
-- <li><code>self.org</code> (the org the module was called in),</li>
-- <li><code>self.initiator</code> (the user that callced the module),</li>
-- <li><code>self.id</code> (the process id of the module instance)</li>
-- @param config (optional) If user wants to override fields in the config table
-- @param result (optional) Callback if this module is embedded in other modules
-- @function initiate
function leave_org:initiate(config, result)
function leave_org:initiate(result)
if self.org == modpol.instance then
modpol.interactions.message(
self.initiator,
@ -34,7 +30,6 @@ function leave_org:initiate(config, result)
modpol.interactions.message(
self.initiator,
"You have left org " .. self.org.name)
-- call result function
end
if result then result() end
end