90 Commits

Author SHA1 Message Date
Nathan Schneider
2207f0add2 added placeholder for Mastodon interactions override 2024-07-19 15:11:32 -06:00
Nathan Schneider
aed1d708c4 Masto govbot basics running 2024-07-19 15:08:19 -06:00
Nathan Schneider
13eb58a3ee Removed child org from parent children list 2022-08-26 15:59:38 -07:00
Nathan Schneider
ec0e4aa9c1 Small fix on policy_change variables 2022-08-23 17:11:00 -06:00
Nathan Schneider
b09a7a24b4 Improvement on error catching in process 2022-08-23 17:04:04 -06:00
Nathan Schneider
9d759530e6 Fixes on process logic 2022-08-23 16:55:57 -06:00
Nathan Schneider
838a017f14 Various bugfixes on defer and processes 2022-08-17 17:24:53 -06:00
Nathan Schneider
df20cc835b Small bugfixes 2022-08-17 15:39:11 -06:00
Nathan Schneider
0c13e6b084 Revert on CLI interactions pending process list 2022-08-17 15:09:12 -06:00
ntnsndr
d24262d494 small documentation fixes 2022-08-17 19:57:52 +00:00
23cf6abacd Merge branch 'bug-fixes' into 'master'
fixed process counter and a other small bugs

See merge request medlabboulder/modpol!37
2022-08-16 15:33:09 +00:00
Luke Miller
daa6d95bd6 merged changes, using standardized lazy table length function instead of for loop in interactions module 2022-08-16 11:12:07 -04:00
Luke Miller
52334f409e fixed process count, added lazy table length function, removed orgs now decrement org counter, orgs loaded message should now be accurate 2022-08-16 11:10:40 -04:00
56adaba7d6 Simplified README, reference to modpol.net 2022-08-16 04:49:40 +00:00
06e7bb9d2d Replaced image on README 2022-08-16 02:40:20 +00:00
Nathan Schneider
46dc48ffcc Fixed processes display in core except modules/display_processes.lua 2022-08-13 21:59:09 -06:00
Nathan Schneider
45347e2ac7 Merge branch 'master' of https://gitlab.com/medlabboulder/modpol 2022-08-13 17:02:58 -06:00
Nathan Schneider
1ff94b65fb Fixes on defer and remove_process 2022-08-13 17:02:30 -06:00
Nathan Schneider
4337e5511b Made approval on remove_process configurable 2022-08-13 16:34:03 -06:00
a26d2714d9 Merge branch 'remove-mkdir' into 'master'
Factored out Unix dependent os call

See merge request medlabboulder/modpol!36
2022-08-12 03:38:02 +00:00
Luke Miller
8d3428653c Merge branch 'master' of https://gitlab.com/medlabboulder/modpol 2022-08-11 14:57:42 -04:00
Luke Miller
6977614a7d Merge branch 'master' of https://gitlab.com/medlabboulder/modpol 2022-08-11 14:50:39 -04:00
Luke Miller
919194c995 added a placeholder file to keep data directory in git, removed now unnecessary unix mkdir call 2022-08-11 14:50:10 -04:00
Nathan Schneider
0532b084b7 Small correction on README 2022-08-11 10:49:03 -06:00
9b27ac145c Merge branch 'generic_approval' into 'master'
Major improvements on policy configuration

See merge request medlabboulder/modpol!35
2022-08-09 23:04:54 +00:00
Nathan Schneider
22a2048d5a Major improvements on policy configuration
- Bugfixes on change_policy
- Replaced _consent modules with configurable modules
2022-08-09 17:00:24 -06:00
Nathan Schneider
78ea89559f Simplier way of doing generic calls with call_module 2022-08-05 16:41:13 -06:00
Nathan Schneider
0ec287fa57 Reverting 2022-08-05 16:34:24 -06:00
Nathan Schneider
1f33232394 First shot at a generic approve() function for modules, testing on change_policy 2022-08-05 16:10:56 -06:00
Nathan Schneider
99c75861b0 small bugfix on display_processes 2022-05-25 12:30:59 -06:00
Nathan Schneider
26df04445d Small fix on CLI interactions on pending actions. 2022-05-25 12:19:34 -06:00
Nathan Schneider
2028f1ee85 Refactored policy structure
Previously, all modules in an org were fully copied into that
org. Now, the only copy of the modules is at modpol.modules, and orgs
have a policy table at [org].policies, which overrides the config
table in any given module.
2022-02-09 22:14:26 -07:00
Nathan Schneider
f950b5b94c More basic functionality for policy change
Created change_policy module (though it still does not have an
approval flow; improved display_policies and display_processes modules.
2022-02-06 22:04:07 -07:00
Nathan Schneider
9d4ad377e6 Created display_policies module to show existing module.config data across an org 2022-02-06 14:05:12 -07:00
Nathan Schneider
8086b18879 Removed org.policies table; policies are now handled in the org.modules[module].config table. 2022-02-06 13:45:31 -07:00
Nathan Schneider
b92272afa2 Added basic policy backend for modules. Also added confirmation in CLI to call a module. At that confirmation, the relevant policies are shown. Still need to create a module for changing policies and to add more configuration options to existing policies. 2022-02-05 23:49:23 -07:00
Nathan Schneider
fc8cd20e7f Updated screenshot for README 2022-01-28 14:29:29 -07:00
Nathan Schneider
509d2781f7 Created no-consent add_child_org module and a bugfix 2022-01-27 13:32:12 -07:00
cdb8e44099 Merge branch 'DocComments' into 'master'
Doc comments

See merge request medlabboulder/modpol!34
2022-01-24 03:38:12 +00:00
SkylarHew
79b548f9a0 Added LDoc comments for new files, ready to merge pt. 2 2022-01-23 18:21:23 -07:00
SkylarHew
e72911c67c Added LDoc comments for new files, ready to merge 2022-01-23 18:19:24 -07:00
SkylarHew
7cb200ab04 Resolved merge conflicts with master 2022-01-23 16:01:44 -07:00
Nathan Schneider
55d1c2c446 Updated documentation section of README 2022-01-22 11:34:25 -07:00
Nathan Schneider
807ef6a150 Slight tweaks to ldoc docs 2022-01-22 11:28:38 -07:00
SkylarHew
c8e911640e Edited README to include section on Documentation 2022-01-20 11:42:19 -07:00
SkylarHew
da7b996a8b Added ldoc comments for all lua modules and generated docs in documentation index.html 2022-01-20 11:04:44 -07:00
SkylarHew
5085d87f68 Added Ldoc comments for interactions and orgs.process.lua 2022-01-10 17:27:27 -07:00
SkylarHew
4052fa4b55 Ldoc comments for orgs.base and edited comments for template_module 2022-01-09 22:15:54 -07:00
ba65b471b3 Merge branch 'process-delete' into 'master'
Process delete

See merge request medlabboulder/modpol!33
2022-01-07 21:24:58 +00:00
Luke Miller
0f479da5ff calling self:call_module instead of self.org:call_module, this should fix process deletion issues 2022-01-07 15:05:45 -05:00
Luke Miller
a835799e11 added delete process tree function, updated remove process module 2022-01-06 20:17:38 -05:00
Nathan Schneider
65bb1aa532 Added failsafes to interactions against 'deleted' processes 2022-01-06 09:58:15 -07:00
bdf4d86593 Removing a possibly unnecessary table copy on remove_process 2022-01-05 23:28:15 +00:00
81fcd9e3c1 Merge branch 'module-changes' into 'master'
added parent/children ids to processes, modified delete process to be...

See merge request medlabboulder/modpol!32
2022-01-05 23:15:38 +00:00
Luke Miller
5788ce199a added parent/children ids to processes, modified delete process to be recursive, modules now have access to self:call_module 2022-01-05 18:10:38 -05:00
544edddb21 Small bugfixes on testing 2022-01-05 22:40:41 +00:00
Nathan Schneider
2989bd34bd Completed checkbox_query and rewrite of change_modules module with checkboxes 2022-01-02 23:13:56 -07:00
Nathan Schneider
28a05c584c Minetest checkbox_query now working; checkbox-based change_modules module still needs debugging 2022-01-01 23:54:57 -07:00
Nathan Schneider
c8d527dba8 Have basic checkbox_query working in CLI core interactions, not yet attempted in Minetest 2021-12-31 00:50:32 -07:00
Nathan Schneider
62d4c0518f Edits to README for readability 2021-12-30 11:38:43 -07:00
Nathan Schneider
1a6f27f2f6 More bugfixes on displays and interactions, mainly fixing damage done two commits ago 2021-12-29 22:25:28 -07:00
Nathan Schneider
6c9353d389 Last commit also changed titles on Minetest dashboards to much more flexible [hypertext] 2021-12-29 22:10:57 -07:00
Nathan Schneider
7ef0626357 Added modpol.interactions.display and display_processes module, as well as a bunch of bugfixes 2021-12-29 22:07:53 -07:00
Luke Miller
5a2e6277e5 added a module version of call_module which automatically handles parent ids in the backend 2021-12-29 21:10:00 -05:00
Nathan Schneider
6558b7a026 Created remove_process module---mostly works, but there are still some issues with processes and pending actions not being removed properly 2021-12-28 16:51:12 -07:00
Nathan Schneider
1b0335c069 Bugfix on copy_table and added refresh command to CLI 2021-12-28 14:39:34 -07:00
Nathan Schneider
18a29d674c Added user_dashboard and message_user to modpol_minetest 2021-12-27 23:13:10 -07:00
Nathan Schneider
de8ad25b2f Added user_dashboard and message_user in modpol_core, still have to add to modpol_minetest 2021-12-27 22:34:22 -07:00
Nathan Schneider
286d131839 Got first token modules working, and a bunch of bugfixes throughout 2021-12-26 23:03:57 -07:00
Nathan Schneider
0c59767ef7 Filled out tokenomics functions; still not tested 2021-12-26 00:01:59 -07:00
Nathan Schneider
12a49ab66d Added record() function to tokenomics module functions 2021-12-25 18:14:38 -07:00
Nathan Schneider
c017b80063 Added recording of main process events to persistent storage 2021-12-25 18:01:37 -07:00
Nathan Schneider
6d81bd7bd8 Started working on tokenomics module (but not yet activated) 2021-12-23 22:25:51 -07:00
Nathan Schneider
44c3e41b81 Created defer_consent module 2021-12-22 22:22:17 -07:00
Nathan Schneider
fa50a59938 Added randomizer utility module 2021-12-22 16:28:28 -07:00
Nathan Schneider
9a2c72c6a1 Bugfixes after test with Skylar! 2021-12-21 18:12:59 -07:00
956f9a2635 Update misc.lua to initialize the modpol.util table 2021-12-21 23:45:25 +00:00
Nathan Schneider
1e81b830c4 Fix on the mod.conf before submission to ContentDB 2021-12-21 15:38:57 -07:00
db57313165 Update README.md with some additional details about changing modules 2021-12-21 05:17:35 +00:00
Nathan Schneider
cfef9b29b0 Bugfixes on CLI interactions 2021-12-20 21:28:54 -07:00
Nathan Schneider
fe2d5fdb2a Added message_org module 2021-12-20 20:34:11 -07:00
Nathan Schneider
75f3a80d31 Changed name back to Modpol from Modular Politics 2021-12-20 20:14:43 -07:00
Nathan Schneider
645cc6f690 Changed Minetest module listing to remove slugs, retain only names 2021-12-20 20:06:17 -07:00
Nathan Schneider
b9317490fb Added section on gameplay usage in README 2021-12-20 19:58:57 -07:00
Nathan Schneider
85e9916e27 Added pending actions list to main dashboard 2021-12-20 19:45:30 -07:00
Nathan Schneider
18d63485c2 Fixed interaction glitch on privs_to_org 2021-12-20 19:05:03 -07:00
Nathan Schneider
046fad7f57 Added refresh button to Minetest dashboards 2021-12-20 18:55:08 -07:00
6aa09f9fdd Merge branch 'modules-as-actions' into 'master'
Merge modules-as-action refactor to main!

See merge request medlabboulder/modpol!31
2021-12-20 06:27:42 +00:00
efd363daef Merge branch 'master' into 'modules-as-actions'
# Conflicts:
#   LICENSE
2021-12-20 06:27:01 +00:00
51ed8d41e2 Update LICENSE 2021-11-29 23:42:44 +00:00
75 changed files with 7921 additions and 702 deletions

6
.gitignore vendored
View File

@@ -1 +1,5 @@
*/data
*/data/*
!*/data/placeholder
# ignore Mastodon credentials
modpol_mastodon/creds/

View File

@@ -1,38 +1,43 @@
# Modular Politics for Minetest
# Modpol
Modular Politics is an extension that enables diverse governance processes on multi-user platforms. It offers a library that enables users to create or adapt their own modules that add specific governance functionalities.
![](lib/empire-modpol.png)
This implementation is a mod for [Minetest](https://minetest.net), a free/open-source voxel game. It is designed to be easily adapted to other multi-user platforms that also employ Lua as an extension language.
Modpol, short for "modular politics," enables diverse governance processes on multi-user platforms. It offers a library with which users can choose, modify, and create modules that add specific governance functionalities.
## Design philosophy
**Learn more at [modpol.net](https://modpol.net).**
Modular Politics seeks to implement a theoretical framework, also called "[modular politics](https://metagov.org/modpol)," which proposes these design goals:
## Modpol for Minetest
* *Modularity*: Platform operators and community members should have the ability to construct systems by creating, importing, and arranging composable parts together as a coherent whole.
* *Expressiveness*: The governance layer should be able to implement as wide a range of processes as possible.
* *Portability*: Governance tools developed for one platform should be portable to another platform for reuse and adaptation.
* *Interoperability*: Governance systems operating on different platforms and protocols should have the ability to interact with each other, sharing data and influencing each other's processes.
This implementation is a mod for [Minetest](https://minetest.net), a free/open-source voxel game. To use in Minetest, simply install the full codebase in your `mods/` or `worldmods/` folder. Minetest will load `init.lua`.
Additionally, Modular Politics seeks to counteract the tendency for "[implicit feudalism](https://ntnsndr.in/ImplicitFeudalism)," according to which rigid, top-down power structures are the norm in online spaces. To this end, some design patterns include:
In the game, open the Modpol dashboard with the command `/mp`.
* *Groups, not roles*: While most platforms assign powers through particular permissions given to individuals, in Modular Politics, power lies in groups (which Modular Politics calls "orgs").
* *Consent, not oligarchy*: Rather than assuming that decisions will be made by a few power-holders, the software assumes that consent by all affected users is the norm.
* *Inheritance, not blank slates*: When a new group is formed, it inherits the patterns of what preceded it, rather than imagining that it is starting from scratch.
For testing purposes, players with the `privs` privilege (generally admins) can use the `/mptest` command, which resets all the orgs and opens a dashboard.
It is certainly possible to use Modular Politics to replicate practices of implicit feudalism, such as all-powerful admins, but doing so requires extra work to overcome these defaults.
## Mastodon Govbot
## Installation in Minetest
Modpol can operate a governance-supporting bot for communities on [Mastodon](https://joinmastodon.org), an open social network.
To use this in Minetest, simply install it in your `mods/` or `worldmods/` folder. Minetest will load `init.lua`.
This version utilizes and requires the installation of [lupa](https://github.com/scoder/lupa), which integrates Lua into Python, and [Mastodon.py](https://pypi.org/project/Mastodon.py/), a Python library for interacting with the Mastodon API.
In the game, open the Modular Politics dashboard with the command `/mp`.
*To do: explain how to set up the bot on the server.*
For testing purposes, players with the `privs` privilege (generally admins) can use the `/mp` command, which resets all the orgs and opens a dashboard.
* Install Python on your system and the two required libraries:
- `pip install lupa`
- `pip install Mastodon.py`
* Set up files `clientcred.secret` and `usercred.secret` in the `modpol_mastodon/creds/` directory, using the account settings in Mastodon
Once it is configured, to initialize the bot, run from Modpol's base directory:
## Standalone Version on the Command Line
```
python govbot.py
```
Modular Politics can also be used independently of Minetest as a command-line tool. Currently command-line use of modpol requires a Unix-style system, but it is intended to become more fully platform independent.
This in turn calls login-mastodon.py, which initializes Modpol and the bot.
## Command Line
Modpol can also be used as a command-line tool. Currently command-line use of modpol requires a Unix-style system, but it is intended to become more fully platform independent.
The command-line version is in the `modpol` subdirectory. To run the program on Unix systems in CLI mode, install lua or luajit and execute the following in this directory:
@@ -40,21 +45,36 @@ The command-line version is in the `modpol` subdirectory. To run the program on
$ lua[jit] login.lua
```
You can also interact with the interpreter by starting it this way:
Alternatively, to test arbitrary functions in the interpreter outside of the interactive dashboards, load Modpol's library with:
```
$ lua[jit]
> dofile("login.lua")
> dofile("modpol_core/modpol.lua")
```
In the interpreter, for a list of global functions and tables, use `modpol.menu()`.
## Storage
By default, a data directory named "data" will be created in this directory. `/data` will contain a log file and serialized program data files.
The persistent storage method may be chosen in `modpol.lua`.
Another storage method may be chosen in `modpol.lua`. A StorageRef-based method for Minetest 5.* is included: `storage-mod_storage.lua`.
By default, data will be stored in a data directory at `modpol_core/data/`. This will contain a log file and serialized program data files.
For Minetest: If available, Modpol uses Minetest's built-in StorageRef system for Minetest 5.*.
## Documentation
Various guides are available at the [GitLab wiki](https://gitlab.com/medlabboulder/modpol/-/wikis/home).
Read documentation of functions and modules at `docs/doc/index.html`. Documentation was generated using [LDoc](https://stevedonovan.github.io/ldoc/). To generate basic documentation for every page, download `ldoc` and use the following command:
```
$ cd docs/
$ ldoc ..
```
This will not generate the same index page and sidebar as the documentation provided; the appropriate structure needs to be added manually.
## Credits
@@ -72,7 +92,7 @@ We are grateful for initial support for this project from a residency with [The
## Contributing
We'd love to welcome more contributors. Please join the conversation in the [Issues](https://gitlab.com/medlabboulder/modpol/-/issues), our [Matrix.org channel](https://matrix.to/#/#minetest-modpol:matrix.org), and the [Minetest.net forum](https://forum.minetest.net/viewtopic.php?f=47&t=26037).
We'd love to welcome more contributors. Please join the conversation in the [Issues](https://gitlab.com/medlabboulder/modpol/-/issues), the \#modpol channel at the [Metagovernance Project](https://metagov.org) Slack, and the [Minetest.net forum](https://forum.minetest.net/viewtopic.php?f=47&t=26037).
Learn more about the project and how to develop your own modules in [the wiki](https://gitlab.com/medlabboulder/modpol/-/wikis/home).

2
docs/config.ld Normal file
View File

@@ -0,0 +1,2 @@
project = 'Modpol'
description = 'modpol core'

201
docs/doc/index.html Normal file
View File

@@ -0,0 +1,201 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="modules/change_modules.html">change_modules</a></li>
<li><a href="modules/change_modules.html">change_modules</a></li>
<li><a href="modules/consent.html">consent</a></li>
<li><a href="modules/create_token.html">create_token</a></li>
<li><a href="modules/defer_consent.html">defer_consent</a></li>
<li><a href="modules/display_processes.html">display_processes</a></li>
<li><a href="modules/join_org.html">join_org</a></li>
<li><a href="modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="modules/leave_org.html">leave_org</a></li>
<li><a href="modules/message_org.html">message_org</a></li>
<li><a href="modules/randomizer.html">randomizer</a></li>
<li><a href="modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="modules/remove_org.html">remove_org</a></li>
<li><a href="modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="modules/remove_process.html">remove_process</a></li>
<li><a href="modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="modules/send_token.html">send_token</a></li>
<li><a href="modules/module_template.html">module_template</a></li>
<li><a href="modules/tokenomics.html">tokenomics</a></li>
<li><a href="modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h2>modpol core</h2>
<h2>Modules</h2>
<table class="module_list">
<tr>
<td class="name" nowrap><a href="modules/modpol.interactions.html">modpol.interactions</a></td>
<td class="summary">INTERACTIONS.LUA (CLI).</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/add_child_org_consent.html">add_child_org_consent</a></td>
<td class="summary">Adds a child org.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/change_modules.html">change_modules</a></td>
<td class="summary">change_modules</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/change_modules.html">change_modules</a></td>
<td class="summary">change_modules
Depends on consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/consent.html">consent</a></td>
<td class="summary">A utility module for checking consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/create_token.html">create_token</a></td>
<td class="summary">Create token.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/defer_consent.html">defer_consent</a></td>
<td class="summary">Defer consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/display_processes.html">display_processes</a></td>
<td class="summary">Display processes</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/join_org.html">join_org</a></td>
<td class="summary">Adds a user to org</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/join_org_consent.html">join_org_consent</a></td>
<td class="summary">Join org (consent).</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/leave_org.html">leave_org</a></td>
<td class="summary">Removes initiator from org</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/message_org.html">message_org</a></td>
<td class="summary">Messages all org members</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/randomizer.html">randomizer</a></td>
<td class="summary">A utility module that outputs a random result from a set of options</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/remove_child_consent.html">remove_child_consent</a></td>
<td class="summary">Remove child (consent).</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/remove_member_consent.html">remove_member_consent</a></td>
<td class="summary">Calls consent to remove member from org</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/remove_org.html">remove_org</a></td>
<td class="summary">A simple module that removes an org.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/remove_org_consent.html">remove_org_consent</a></td>
<td class="summary">Remove org (consent)
A simple module that calls a consent process on an org to remove it.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/remove_process.html">remove_process</a></td>
<td class="summary">Remove a process</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/rename_org_consent.html">rename_org_consent</a></td>
<td class="summary">Rename org (consent)
A simple module that calls a consent process on an org to rename it.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/send_token.html">send_token</a></td>
<td class="summary">Send token.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/module_template.html">module_template</a></td>
<td class="summary">Template for module writers.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/tokenomics.html">tokenomics</a></td>
<td class="summary">Tokenomics.</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/modpol.orgs.base.html">modpol.orgs.base</a></td>
<td class="summary">Basic function for orgs</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/modpol.orgs.process.html">modpol.orgs.process</a></td>
<td class="summary">Process functions for orgs</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/modpol.util.misc.html">modpol.util.misc</a></td>
<td class="summary">Miscellaneous functions</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/modpol_minetest.api.html">modpol_minetest.api</a></td>
<td class="summary">Script for loading Minetest files</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/priv_to_org.html">priv_to_org</a></td>
<td class="summary">Set privilege to org members
Allows initiator to grant a priv they have to all members of an org</td>
</tr>
<tr>
<td class="name" nowrap><a href="modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></td>
<td class="summary">INTERACTIONS.LUA (for Minetest)
CONTEXTUAL STUFF
================</td>
</tr>
</table>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

303
docs/doc/ldoc.css Normal file
View File

@@ -0,0 +1,303 @@
/* BEGIN RESET
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.2r1
*/
html {
color: #000;
background: #FFF;
}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td {
margin: 0;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
fieldset,img {
border: 0;
}
address,caption,cite,code,dfn,em,strong,th,var,optgroup {
font-style: inherit;
font-weight: inherit;
}
del,ins {
text-decoration: none;
}
li {
margin-left: 20px;
}
caption,th {
text-align: left;
}
h1,h2,h3,h4,h5,h6 {
font-size: 100%;
font-weight: bold;
}
q:before,q:after {
content: '';
}
abbr,acronym {
border: 0;
font-variant: normal;
}
sup {
vertical-align: baseline;
}
sub {
vertical-align: baseline;
}
legend {
color: #000;
}
input,button,textarea,select,optgroup,option {
font-family: inherit;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
}
input,button,textarea,select {*font-size:100%;
}
/* END RESET */
body {
margin-left: 1em;
margin-right: 1em;
font-family: arial, helvetica, geneva, sans-serif;
background-color: #ffffff; margin: 0px;
}
code, tt { font-family: monospace; font-size: 1.1em; }
span.parameter { font-family:monospace; }
span.parameter:after { content:":"; }
span.types:before { content:"("; }
span.types:after { content:")"; }
.type { font-weight: bold; font-style:italic }
body, p, td, th { font-size: .95em; line-height: 1.2em;}
p, ul { margin: 10px 0 0 0px;}
strong { font-weight: bold;}
em { font-style: italic;}
h1 {
font-size: 1.5em;
margin: 20px 0 20px 0;
}
h2, h3, h4 { margin: 15px 0 10px 0; }
h2 { font-size: 1.25em; }
h3 { font-size: 1.15em; }
h4 { font-size: 1.06em; }
a:link { font-weight: bold; color: #004080; text-decoration: none; }
a:visited { font-weight: bold; color: #006699; text-decoration: none; }
a:link:hover { text-decoration: underline; }
hr {
color:#cccccc;
background: #00007f;
height: 1px;
}
blockquote { margin-left: 3em; }
ul { list-style-type: disc; }
p.name {
font-family: "Andale Mono", monospace;
padding-top: 1em;
}
pre {
background-color: rgb(245, 245, 245);
border: 1px solid #C0C0C0; /* silver */
padding: 10px;
margin: 10px 0 10px 0;
overflow: auto;
font-family: "Andale Mono", monospace;
}
pre.example {
font-size: .85em;
}
table.index { border: 1px #00007f; }
table.index td { text-align: left; vertical-align: top; }
#container {
margin-left: 1em;
margin-right: 1em;
background-color: #f0f0f0;
}
#product {
text-align: center;
border-bottom: 1px solid #cccccc;
background-color: #ffffff;
}
#product big {
font-size: 2em;
}
#main {
background-color: #f0f0f0;
border-left: 2px solid #cccccc;
}
#navigation {
float: left;
width: 14em;
vertical-align: top;
background-color: #f0f0f0;
overflow: visible;
}
#navigation h2 {
background-color:#e7e7e7;
font-size:1.1em;
color:#000000;
text-align: left;
padding:0.2em;
border-top:1px solid #dddddd;
border-bottom:1px solid #dddddd;
}
#navigation ul
{
font-size:1em;
list-style-type: none;
margin: 1px 1px 10px 1px;
}
#navigation li {
text-indent: -1em;
display: block;
margin: 3px 0px 0px 22px;
}
#navigation li li a {
margin: 0px 3px 0px -1em;
}
#content {
margin-left: 14em;
padding: 1em;
width: 700px;
border-left: 2px solid #cccccc;
border-right: 2px solid #cccccc;
background-color: #ffffff;
}
#about {
clear: both;
padding: 5px;
border-top: 2px solid #cccccc;
background-color: #ffffff;
}
@media print {
body {
font: 12pt "Times New Roman", "TimeNR", Times, serif;
}
a { font-weight: bold; color: #004080; text-decoration: underline; }
#main {
background-color: #ffffff;
border-left: 0px;
}
#container {
margin-left: 2%;
margin-right: 2%;
background-color: #ffffff;
}
#content {
padding: 1em;
background-color: #ffffff;
}
#navigation {
display: none;
}
pre.example {
font-family: "Andale Mono", monospace;
font-size: 10pt;
page-break-inside: avoid;
}
}
table.module_list {
border-width: 1px;
border-style: solid;
border-color: #cccccc;
border-collapse: collapse;
}
table.module_list td {
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #cccccc;
}
table.module_list td.name { background-color: #f0f0f0; min-width: 200px; }
table.module_list td.summary { width: 100%; }
table.function_list {
border-width: 1px;
border-style: solid;
border-color: #cccccc;
border-collapse: collapse;
}
table.function_list td {
border-width: 1px;
padding: 3px;
border-style: solid;
border-color: #cccccc;
}
table.function_list td.name { background-color: #f0f0f0; min-width: 200px; }
table.function_list td.summary { width: 100%; }
ul.nowrap {
overflow:auto;
white-space:nowrap;
}
dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
dl.table h3, dl.function h3 {font-size: .95em;}
/* stop sublists from having initial vertical space */
ul ul { margin-top: 0px; }
ol ul { margin-top: 0px; }
ol ol { margin-top: 0px; }
ul ol { margin-top: 0px; }
/* make the target distinct; helps when we're navigating to a function */
a:target + * {
background-color: #FF9;
}
/* styles for prettification of source */
pre .comment { color: #558817; }
pre .constant { color: #a8660d; }
pre .escape { color: #844631; }
pre .keyword { color: #aa5050; font-weight: bold; }
pre .library { color: #0e7c6b; }
pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
pre .string { color: #8080ff; }
pre .number { color: #f8660d; }
pre .operator { color: #2239a8; font-weight: bold; }
pre .preprocessor, pre .prepro { color: #a33243; }
pre .global { color: #800080; }
pre .user-keyword { color: #800080; }
pre .prompt { color: #558817; }
pre .url { color: #272fc2; text-decoration: underline; }

View File

@@ -0,0 +1,145 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><strong>add_child_org_consent</strong></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>add_child_org_consent</code></h1>
<p>Adds a child org.</p>
<p>
Depends on `consent`</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate consent for new child org</td>
</tr>
<tr>
<td class="name" nowrap><a href="#create_child_org">create_child_org ()</a></td>
<td class="summary">Create a new child orgg</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate consent for new child org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "create_child_org"></a>
<strong>create_child_org ()</strong>
</dt>
<dd>
Create a new child orgg
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,128 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><strong>change_modules</strong></li>
<li><strong>change_modules</strong></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>change_modules</code></h1>
<p>change_modules
Depends on consent</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate change in modules.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate change in modules.
Either adds or removes module depending on user input
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,150 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><strong>consent</strong></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>consent</code></h1>
<p>A utility module for checking consent</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="#callback">callback (member)</a></td>
<td class="summary">Callback</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate consent
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "callback"></a>
<strong>callback (member)</strong>
</dt>
<dd>
Callback
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">member</span>
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><strong>create_token</strong></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>create_token</code></h1>
<p>Create token.</p>
<p>
Depends on tokenomics</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#create_toke:initiate">create_toke:initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "create_toke:initiate"></a>
<strong>create_toke:initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,190 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><strong>defer_consent</strong></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>defer_consent</code></h1>
<p>Defer consent</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#config">config</a></td>
<td class="summary">Config for module</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.modules.defer_consent">modpol.modules.defer_consent</a></td>
<td class="summary">(Required) Add to module table</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "config"></a>
<strong>config</strong>
</dt>
<dd>
Config for module
<h3>Fields:</h3>
<ul>
<li><span class="parameter">defer_org</span>
Name or ID of target org
</li>
<li><span class="parameter">votes_required</span>
Threshold passed on to `consent`
</li>
<li><span class="parameter">prompt</span>
String passed on to `consent`
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "modpol.modules.defer_consent"></a>
<strong>modpol.modules.defer_consent</strong>
</dt>
<dd>
(Required) Add to module table
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><strong>display_processes</strong></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>display_processes</code></h1>
<p>Display processes</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><strong>join_org</strong></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>join_org</code></h1>
<p>Adds a user to org</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Adds the user to the org</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Adds the user to the org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><strong>join_org_consent</strong></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>join_org_consent</code></h1>
<p>Join org (consent).</p>
<p>
A simple module that calls a consent process on an org to add a member.
Depends on the Consent module.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate join org with consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="#complete">complete ()</a></td>
<td class="summary">Adds member to org, notifies org, and deletes process</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate join org with consent
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "complete"></a>
<strong>complete ()</strong>
</dt>
<dd>
Adds member to org, notifies org, and deletes process
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><strong>leave_org</strong></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>leave_org</code></h1>
<p>Removes initiator from org</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Removes user from org</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Removes user from org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><strong>message_org</strong></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>message_org</code></h1>
<p>Messages all org members</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Allows user to send input message to all org members</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Allows user to send input message to all org members
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,434 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><strong>modpol.interactions</strong></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol.interactions</code></h1>
<p>INTERACTIONS.LUA (CLI).</p>
<p>
User interaction functions for Modular Politics
Called by modpol.lua</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.interactions.dashboard">modpol.interactions.dashboard (user)</a></td>
<td class="summary">Output: Display a menu of commands to the user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.org_dashboard">modpol.interactions.org_dashboard (user, org_string)</a></td>
<td class="summary">Output: Displays a menu of org-specific commands to the user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.user_dashboard">modpol.interactions.user_dashboard (viewer, user, completion)</a></td>
<td class="summary">Function: modpol.interactions.user_dashboard
Displays a dashboard about a particular user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.message">modpol.interactions.message (user, message)</a></td>
<td class="summary">Prints message to CLI.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.message_user">modpol.interactions.message_user (sender, recipient)</a></td>
<td class="summary">Gets and sends a message from one user to another</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.display">modpol.interactions.display (user, title, message, done)</a></td>
<td class="summary">Displays complex data to a user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.text_query">modpol.interactions.text_query (User, Query, func)</a></td>
<td class="summary">Applies "func" to user input.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.dropdown_query">modpol.interactions.dropdown_query (user, label, options, func)</a></td>
<td class="summary">Output: Calls func on choice.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.checkbox_query">modpol.interactions.checkbox_query (user, label, options, func)</a></td>
<td class="summary">Allows user to select from a set of options</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.binary_poll_user">modpol.interactions.binary_poll_user (user, question, func)</a></td>
<td class="summary">Output: Applies "func" to user input.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.interactions.message_org">modpol.interactions.message_org (initiator, org, message)</a></td>
<td class="summary">Output: broadcasts message to all org members</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "modpol.interactions.dashboard"></a>
<strong>modpol.interactions.dashboard (user)</strong>
</dt>
<dd>
Output: Display a menu of commands to the user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
(string)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.org_dashboard"></a>
<strong>modpol.interactions.org_dashboard (user, org_string)</strong>
</dt>
<dd>
Output: Displays a menu of org-specific commands to the user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
(string)
</li>
<li><span class="parameter">org_string</span>
(string or id)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.user_dashboard"></a>
<strong>modpol.interactions.user_dashboard (viewer, user, completion)</strong>
</dt>
<dd>
Function: modpol.interactions.user_dashboard
Displays a dashboard about a particular user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">viewer</span>
Name of user viewing the dashboard (string)
</li>
<li><span class="parameter">user</span>
Name of user being viewed (string)
</li>
<li><span class="parameter">completion</span>
Optional function to call on Done button
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.message"></a>
<strong>modpol.interactions.message (user, message)</strong>
</dt>
<dd>
Prints message to CLI.
Buttons: message, done
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
(string)
</li>
<li><span class="parameter">message</span>
(string)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.message_user"></a>
<strong>modpol.interactions.message_user (sender, recipient)</strong>
</dt>
<dd>
Gets and sends a message from one user to another
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">sender</span>
Name of user sending (string)
</li>
<li><span class="parameter">recipient</span>
Name of user receiving (string)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.display"></a>
<strong>modpol.interactions.display (user, title, message, done)</strong>
</dt>
<dd>
Displays complex data to a user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
Name of target user (string)
</li>
<li><span class="parameter">title</span>
Title of display (string)
</li>
<li><span class="parameter">message</span>
Content of message (string or table of strings)
</li>
<li><span class="parameter">done</span>
Optional function for what happens when user is done
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.text_query"></a>
<strong>modpol.interactions.text_query (User, Query, func)</strong>
</dt>
<dd>
Applies "func" to user input.
Func input: user input (string)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">User</span>
(string)
</li>
<li><span class="parameter">Query</span>
(string)
</li>
<li><span class="parameter">func</span>
(function)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.dropdown_query"></a>
<strong>modpol.interactions.dropdown_query (user, label, options, func)</strong>
</dt>
<dd>
Output: Calls func on choice.
Func input: choice (string)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
(string)
</li>
<li><span class="parameter">label</span>
(string)
</li>
<li><span class="parameter">options</span>
(table of strings)
</li>
<li><span class="parameter">func</span>
(choice) (function)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.checkbox_query"></a>
<strong>modpol.interactions.checkbox_query (user, label, options, func)</strong>
</dt>
<dd>
Allows user to select from a set of options
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
Name of user (string)
</li>
<li><span class="parameter">label</span>
Query for user before options (string)
</li>
<li><span class="parameter">options</span>
Table of options and their checked status in the form {{"option_1_string", true}, {"option_2_string", false}}
</li>
<li><span class="parameter">func</span>
Function to be called with param "input", made up of the corrected table in the same format as the param options
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.binary_poll_user"></a>
<strong>modpol.interactions.binary_poll_user (user, question, func)</strong>
</dt>
<dd>
Output: Applies "func" to user input.
Func input: user input (string: y/n)
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
(string)
</li>
<li><span class="parameter">question</span>
(string)
</li>
<li><span class="parameter">func</span>
(function)
</li>
</ul>
</dd>
<dt>
<a name = "modpol.interactions.message_org"></a>
<strong>modpol.interactions.message_org (initiator, org, message)</strong>
</dt>
<dd>
Output: broadcasts message to all org members
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">initiator</span>
(string)
</li>
<li><span class="parameter">org</span>
(number or string)
</li>
<li><span class="parameter">message</span>
(string)
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,476 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><strong>modpol.orgs.base</strong></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol.orgs.base</code></h1>
<p>Basic function for orgs</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.orgs.get_org">modpol.orgs.get_org (arg)</a></td>
<td class="summary">Return org when given its id or name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.list_all">modpol.orgs.list_all ()</a></td>
<td class="summary">Return a table list of all org names</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.user_orgs">modpol.orgs.user_orgs (user)</a></td>
<td class="summary">Return the orgs of a user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.reset">modpol.orgs.reset ()</a></td>
<td class="summary">Deletes all orgs except for the</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.init_instance">modpol.orgs.init_instance ()</a></td>
<td class="summary">Initializes the instance (root org)
can only be run once, as only one instance can exist</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:record">modpol.orgs:record ()</a></td>
<td class="summary">Records a log message to the modpol ledger</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:add_org">modpol.orgs:add_org (name, user)</a></td>
<td class="summary">Adds a new sub org to the org it is called on.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:delete">modpol.orgs:delete ()</a></td>
<td class="summary">Recursively deletes an org and its suborgs
Leaves entry in modpol.orgs.array as a string "removed".</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:get_member_index">modpol.orgs:get_member_index (member)</a></td>
<td class="summary">Internal function to get the index of a member name</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:add_member">modpol.orgs:add_member (user)</a></td>
<td class="summary">Adds a user to an org</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:remove_member">modpol.orgs:remove_member (user)</a></td>
<td class="summary">Removes a user from an org</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:has_member">modpol.orgs:has_member (user)</a></td>
<td class="summary">Boolean check whether user is an org</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:list_members">modpol.orgs:list_members ()</a></td>
<td class="summary"></td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:get_member_count">modpol.orgs:get_member_count ()</a></td>
<td class="summary">Because member list uses lazy deletion, using #org.members will not show an accurate number</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:set_policy">modpol.orgs:set_policy (policy_type, process_type, must_be_member)</a></td>
<td class="summary">Adds a new policy to the policy table.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "modpol.orgs.get_org"></a>
<strong>modpol.orgs.get_org (arg)</strong>
</dt>
<dd>
Return org when given its id or name
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">arg</span>
string for name of org or id of org
</li>
</ul>
<h3>Returns:</h3>
<ol>
org specified by id or name
</ol>
</dd>
<dt>
<a name = "modpol.orgs.list_all"></a>
<strong>modpol.orgs.list_all ()</strong>
</dt>
<dd>
Return a table list of all org names
<h3>Returns:</h3>
<ol>
a table list of all org names
</ol>
</dd>
<dt>
<a name = "modpol.orgs.user_orgs"></a>
<strong>modpol.orgs.user_orgs (user)</strong>
</dt>
<dd>
Return the orgs of a user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
string of user name
</li>
</ul>
<h3>Returns:</h3>
<ol>
table of strings of org names
</ol>
</dd>
<dt>
<a name = "modpol.orgs.reset"></a>
<strong>modpol.orgs.reset ()</strong>
</dt>
<dd>
Deletes all orgs except for the
</dd>
<dt>
<a name = "modpol.orgs.init_instance"></a>
<strong>modpol.orgs.init_instance ()</strong>
</dt>
<dd>
Initializes the instance (root org)
can only be run once, as only one instance can exist
</dd>
<dt>
<a name = "modpol.orgs:record"></a>
<strong>modpol.orgs:record ()</strong>
</dt>
<dd>
Records a log message to the modpol ledger
</dd>
<dt>
<a name = "modpol.orgs:add_org"></a>
<strong>modpol.orgs:add_org (name, user)</strong>
</dt>
<dd>
Adds a new sub org to the org it is called on.
Ex: instance:add_org('town hall')
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">name</span>
(string) name of new org
</li>
<li><span class="parameter">user</span>
(string)
</li>
</ul>
<h3>Returns:</h3>
<ol>
child org created
</ol>
</dd>
<dt>
<a name = "modpol.orgs:delete"></a>
<strong>modpol.orgs:delete ()</strong>
</dt>
<dd>
Recursively deletes an org and its suborgs
Leaves entry in modpol.orgs.array as a string "removed".
Note: "reason" param was removed, can be added back
</dd>
<dt>
<a name = "modpol.orgs:get_member_index"></a>
<strong>modpol.orgs:get_member_index (member)</strong>
</dt>
<dd>
Internal function to get the index of a member name
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">member</span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
index of given member
</ol>
</dd>
<dt>
<a name = "modpol.orgs:add_member"></a>
<strong>modpol.orgs:add_member (user)</strong>
</dt>
<dd>
Adds a user to an org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:remove_member"></a>
<strong>modpol.orgs:remove_member (user)</strong>
</dt>
<dd>
Removes a user from an org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:has_member"></a>
<strong>modpol.orgs:has_member (user)</strong>
</dt>
<dd>
Boolean check whether user is an org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
true if user is in org, false if not
</ol>
</dd>
<dt>
<a name = "modpol.orgs:list_members"></a>
<strong>modpol.orgs:list_members ()</strong>
</dt>
<dd>
<h3>Returns:</h3>
<ol>
a table of the names (string) of members
</ol>
</dd>
<dt>
<a name = "modpol.orgs:get_member_count"></a>
<strong>modpol.orgs:get_member_count ()</strong>
</dt>
<dd>
Because member list uses lazy deletion, using #org.members will not show an accurate number
<h3>Returns:</h3>
<ol>
numbers of members
</ol>
</dd>
<dt>
<a name = "modpol.orgs:set_policy"></a>
<strong>modpol.orgs:set_policy (policy_type, process_type, must_be_member)</strong>
</dt>
<dd>
Adds a new policy to the policy table.
Must define the policy type, process associated with it, and whether the request must be made by an org member
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">policy_type</span>
</li>
<li><span class="parameter">process_type</span>
</li>
<li><span class="parameter">must_be_member</span>
Boolean
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,349 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><strong>modpol.orgs.process</strong></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol.orgs.process</code></h1>
<p>Process functions for orgs</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.orgs.call_module">modpol.orgs.call_module (module_slug, intiator, config, result)</a></td>
<td class="summary">Call modules</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.get_root_process">modpol.orgs.get_root_process (id)</a></td>
<td class="summary">Get the root process of the given id</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs.delete_process">modpol.orgs.delete_process (id)</a></td>
<td class="summary">Delete the process given id</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:delete_process_tree">modpol.orgs:delete_process_tree (id)</a></td>
<td class="summary">Delete process tree by id</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:add_pending_action">modpol.orgs:add_pending_action (process_id, user, callback)</a></td>
<td class="summary">Add a new pending action</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:remove_pending_action">modpol.orgs:remove_pending_action (process_id, user)</a></td>
<td class="summary">Remove a pending action</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:wipe_pending_actions">modpol.orgs:wipe_pending_actions (process_id)</a></td>
<td class="summary">Wipe all pending actions for process</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:has_pending_actions">modpol.orgs:has_pending_actions (user)</a></td>
<td class="summary">Check if there are pending actions for user</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.orgs:interact">modpol.orgs:interact (process_id, user)</a></td>
<td class="summary">Interact a user with given process</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "modpol.orgs.call_module"></a>
<strong>modpol.orgs.call_module (module_slug, intiator, config, result)</strong>
</dt>
<dd>
Call modules
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">module_slug</span>
Same as module name
</li>
<li><span class="parameter">intiator</span>
Initiator for module
</li>
<li><span class="parameter">config</span>
Config for module
</li>
<li><span class="parameter">result</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs.get_root_process"></a>
<strong>modpol.orgs.get_root_process (id)</strong>
</dt>
<dd>
Get the root process of the given id
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">id</span>
</li>
</ul>
<h3>Returns:</h3>
<ol>
root process
</ol>
</dd>
<dt>
<a name = "modpol.orgs.delete_process"></a>
<strong>modpol.orgs.delete_process (id)</strong>
</dt>
<dd>
Delete the process given id
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">id</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:delete_process_tree"></a>
<strong>modpol.orgs:delete_process_tree (id)</strong>
</dt>
<dd>
Delete process tree by id
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">id</span>
Id of process tree
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:add_pending_action"></a>
<strong>modpol.orgs:add_pending_action (process_id, user, callback)</strong>
</dt>
<dd>
Add a new pending action
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">process_id</span>
Process id
</li>
<li><span class="parameter">user</span>
User adding the action
</li>
<li><span class="parameter">callback</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:remove_pending_action"></a>
<strong>modpol.orgs:remove_pending_action (process_id, user)</strong>
</dt>
<dd>
Remove a pending action
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">process_id</span>
Process id to be removed
</li>
<li><span class="parameter">user</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:wipe_pending_actions"></a>
<strong>modpol.orgs:wipe_pending_actions (process_id)</strong>
</dt>
<dd>
Wipe all pending actions for process
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">process_id</span>
</li>
</ul>
</dd>
<dt>
<a name = "modpol.orgs:has_pending_actions"></a>
<strong>modpol.orgs:has_pending_actions (user)</strong>
</dt>
<dd>
Check if there are pending actions for user
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">user</span>
User
</li>
</ul>
<h3>Returns:</h3>
<ol>
True if there are pending actions for a user, false if not
</ol>
</dd>
<dt>
<a name = "modpol.orgs:interact"></a>
<strong>modpol.orgs:interact (process_id, user)</strong>
</dt>
<dd>
Interact a user with given process
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">process_id</span>
</li>
<li><span class="parameter">user</span>
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,160 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><strong>modpol.util.misc</strong></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol.util.misc</code></h1>
<p>Miscellaneous functions</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.util.copy_table">modpol.util.copy_table (t)</a></td>
<td class="summary">Returns a copy of the table inputted</td>
</tr>
<tr>
<td class="name" nowrap><a href="#modpol.util.num_pairs">modpol.util.num_pairs (t)</a></td>
<td class="summary">Returns the number of elements in a pairs table</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "modpol.util.copy_table"></a>
<strong>modpol.util.copy_table (t)</strong>
</dt>
<dd>
Returns a copy of the table inputted
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">t</span>
table to copy
</li>
</ul>
<h3>Returns:</h3>
<ol>
copy of table
</ol>
</dd>
<dt>
<a name = "modpol.util.num_pairs"></a>
<strong>modpol.util.num_pairs (t)</strong>
</dt>
<dd>
Returns the number of elements in a pairs table
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">t</span>
pairs table
</li>
</ul>
<h3>Returns:</h3>
<ol>
number of elements in pairs table
</ol>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><strong>modpol_minetest.api</strong></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol_minetest.api</code></h1>
<p>Script for loading Minetest files</p>
<p></p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><strong>modpol_minetest.overrides.interactions</strong></li>
</ul>
</div>
<div id="content">
<h1>Module <code>modpol_minetest.overrides.interactions</code></h1>
<p>INTERACTIONS.LUA (for Minetest)
CONTEXTUAL STUFF
================</p>
<p></p>
<br/>
<br/>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,223 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
<li><a href="#Fields">Fields</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><strong>module_template</strong></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>module_template</code></h1>
<p>Template for module writers.</p>
<p>
Short description goes here.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">(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></td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#data">data</a></td>
<td class="summary">(Required) Data for module
Variables that module uses during the course of a process.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#config">config</a></td>
<td class="summary">(Required): Config for module
Defines the input parameters to the module initiate function.</td>
</tr>
</table>
<h2><a href="#Fields">Fields</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#modpol.modules.module_template">modpol.modules.module_template</a></td>
<td class="summary">(Required) Add to module table</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
(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>
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
(optional) Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "data"></a>
<strong>data</strong>
</dt>
<dd>
(Required) Data for module
Variables that module uses during the course of a process.
Can be blank
</dd>
<dt>
<a name = "config"></a>
<strong>config</strong>
</dt>
<dd>
(Required): Config for module
Defines the input parameters to the module initiate function.
Can be blank
When calling a module from within another module,
variables not defined in config will be ignored.
Default values set in config can be overridden
<h3>Fields:</h3>
<ul>
<li><span class="parameter">field_1</span>
ex: votes_required, default = 5
</li>
<li><span class="parameter">field_2</span>
ex: voting_type, default = "majority"
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Fields"></a>Fields</h2>
<dl class="function">
<dt>
<a name = "modpol.modules.module_template"></a>
<strong>modpol.modules.module_template</strong>
</dt>
<dd>
(Required) Add to module table
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,127 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><strong>priv_to_org</strong></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>priv_to_org</code></h1>
<p>Set privilege to org members
Allows initiator to grant a priv they have to all members of an org</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,144 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><strong>randomizer</strong></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>randomizer</code></h1>
<p>A utility module that outputs a random result from a set of options</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
<tr>
<td class="name" nowrap><a href="#random_loop">random_loop ()</a></td>
<td class="summary">Returns result_table</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "random_loop"></a>
<strong>random_loop ()</strong>
</dt>
<dd>
Returns result_table
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><strong>remove_child_consent</strong></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>remove_child_consent</code></h1>
<p>Remove child (consent).</p>
<p>
A simple module that calls a consent process on an org to remove its child.
Depends on the Consent module.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Removes a child org with consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="#complete">complete ()</a></td>
<td class="summary">Complete the remove process</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Removes a child org with consent
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "complete"></a>
<strong>complete ()</strong>
</dt>
<dd>
Complete the remove process
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,144 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><strong>remove_member_consent</strong></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>remove_member_consent</code></h1>
<p>Calls consent to remove member from org</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Removes given member from org</td>
</tr>
<tr>
<td class="name" nowrap><a href="#complete">complete ()</a></td>
<td class="summary">Complete after consent</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Removes given member from org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "complete"></a>
<strong>complete ()</strong>
</dt>
<dd>
Complete after consent
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><strong>remove_org</strong></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>remove_org</code></h1>
<p>A simple module that removes an org.</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Removes org</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Removes org
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><strong>remove_org_consent</strong></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>remove_org_consent</code></h1>
<p>Remove org (consent)
A simple module that calls a consent process on an org to remove it.</p>
<p>
Depends on the Consent module.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Remove org if all members consent</td>
</tr>
<tr>
<td class="name" nowrap><a href="#complete">complete ()</a></td>
<td class="summary">Complete after consent</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Remove org if all members consent
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "complete"></a>
<strong>complete ()</strong>
</dt>
<dd>
Complete after consent
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><strong>remove_process</strong></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>remove_process</code></h1>
<p>Remove a process</p>
<p></p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,146 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><strong>rename_org_consent</strong></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>rename_org_consent</code></h1>
<p>Rename org (consent)
A simple module that calls a consent process on an org to rename it.</p>
<p>
Depends on the Consent module.</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Renames the org after consent is reached</td>
</tr>
<tr>
<td class="name" nowrap><a href="#complete">complete ()</a></td>
<td class="summary">Changes the name of the org after consent is reached</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Renames the org after consent is reached
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "complete"></a>
<strong>complete ()</strong>
</dt>
<dd>
Changes the name of the org after consent is reached
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,157 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><strong>send_token</strong></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><a href="../modules/tokenomics.html">tokenomics</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>send_token</code></h1>
<p>Send token.</p>
<p>
Depends on tokenomics</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">initiate function</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#data">data</a></td>
<td class="summary">(Required) Data for module
Variables that module uses during the course of a process
Can be blank</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
initiate function
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
Callback if this module is embedded in other modules
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "data"></a>
<strong>data</strong>
</dt>
<dd>
(Required) Data for module
Variables that module uses during the course of a process
Can be blank
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,357 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>Modpol</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Tables">Tables</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/create_token.html">create_token</a></li>
<li><a href="../modules/defer_consent.html">defer_consent</a></li>
<li><a href="../modules/display_processes.html">display_processes</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/randomizer.html">randomizer</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/remove_process.html">remove_process</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/send_token.html">send_token</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
<li><strong>tokenomics</strong></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
<li><a href="../modules/modpol_minetest.overrides.interactions.html">modpol_minetest.overrides.interactions</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>tokenomics</code></h1>
<p>Tokenomics.</p>
<p>
Depends on consent</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#initiate">initiate (result)</a></td>
<td class="summary">Initiate function: creates a token in an org.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#create_token">create_token ()</a></td>
<td class="summary">Create token</td>
</tr>
<tr>
<td class="name" nowrap><a href="#balance">balance (org, token, user)</a></td>
<td class="summary">Returns balance.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#change_balance">change_balance (org, token, user, amount)</a></td>
<td class="summary">Change balance</td>
</tr>
<tr>
<td class="name" nowrap><a href="#transfer">transfer (org, token, sender, recipient, amount)</a></td>
<td class="summary">Transfer tokens from a sender to recipient</td>
</tr>
<tr>
<td class="name" nowrap><a href="#treasury_transfer">treasury_transfer (org, token, recipient, amount)</a></td>
<td class="summary">Transfer from treasury</td>
</tr>
<tr>
<td class="name" nowrap><a href="#issue">issue (org, token, amount)</a></td>
<td class="summary">Creates new tokens in the org treasury</td>
</tr>
</table>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#config">config</a></td>
<td class="summary">Config for module</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "initiate"></a>
<strong>initiate (result)</strong>
</dt>
<dd>
Initiate function: creates a token in an org.
Set up the token data structure.
Create an org treasury
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">result</span>
(optional) Callback if this module is embedded in other modules
</li>
</ul>
</dd>
<dt>
<a name = "create_token"></a>
<strong>create_token ()</strong>
</dt>
<dd>
Create token
</dd>
<dt>
<a name = "balance"></a>
<strong>balance (org, token, user)</strong>
</dt>
<dd>
Returns balance.
If no user, get treasury balance
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">org</span>
Name (string) or id (num)
</li>
<li><span class="parameter">token</span>
Slug (string)
</li>
<li><span class="parameter">user</span>
Name (string)
</li>
</ul>
</dd>
<dt>
<a name = "change_balance"></a>
<strong>change_balance (org, token, user, amount)</strong>
</dt>
<dd>
Change balance
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">org</span>
Org name (string) or id (number)
</li>
<li><span class="parameter">token</span>
Token slug (string)
</li>
<li><span class="parameter">user</span>
</li>
<li><span class="parameter">amount</span>
</li>
</ul>
</dd>
<dt>
<a name = "transfer"></a>
<strong>transfer (org, token, sender, recipient, amount)</strong>
</dt>
<dd>
Transfer tokens from a sender to recipient
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">org</span>
</li>
<li><span class="parameter">token</span>
</li>
<li><span class="parameter">sender</span>
</li>
<li><span class="parameter">recipient</span>
</li>
<li><span class="parameter">amount</span>
Positive number
</li>
</ul>
</dd>
<dt>
<a name = "treasury_transfer"></a>
<strong>treasury_transfer (org, token, recipient, amount)</strong>
</dt>
<dd>
Transfer from treasury
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">org</span>
</li>
<li><span class="parameter">token</span>
</li>
<li><span class="parameter">recipient</span>
</li>
<li><span class="parameter">amount</span>
Can be positive or negative, assumes flow from treasury to recipient
</li>
</ul>
</dd>
<dt>
<a name = "issue"></a>
<strong>issue (org, token, amount)</strong>
</dt>
<dd>
Creates new tokens in the org treasury
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">org</span>
</li>
<li><span class="parameter">token</span>
</li>
<li><span class="parameter">amount</span>
</li>
</ul>
</dd>
</dl>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "config"></a>
<strong>config</strong>
</dt>
<dd>
Config for module
<h3>Fields:</h3>
<ul>
<li><span class="parameter">consent</span>
Require consent to create?
</li>
<li><span class="parameter">token_variables</span>
the data that goes into the token
</li>
<li><span class="parameter">token_slug</span>
A no-spaces slug for the token
</li>
<li><span class="parameter">initial_treasury</span>
Quantity in org treasury
</li>
<li><span class="parameter">negative_spend</span>
Boolean: can users spend negative tokens? (for mutual credit)
</li>
<li><span class="parameter">balances</span>
Table of user balances
</li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-01-23 18:18:51 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,63 @@
<h2>Basic Functions</h2>
<ul class="nowrap">
<li><a href="modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
</ul>
<h2>Core Modules</h2>
<ul class="nowrap">
<li><a href="modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="modules/change_modules.html">change_modules</a></li>
<li><a href="modules/consent.html">consent</a></li>
<li><a href="modules/join_org.html">join_org</a></li>
<li><a href="modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="modules/leave_org.html">leave_org</a></li>
<li><a href="modules/message_org.html">message_org</a></li>
<li><a href="modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="modules/remove_org.html">remove_org</a></li>
<li><a href="modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="modules/module_template.html">module_template</a></li>
</ul>
<h2>Minetest Modules</h2>
<ul class="nowrap">
<li><a href="modules/priv_to_org.html">priv_to_org</a></li>
</ul>
<h2>Basic Functions</h2>
<ul class="nowrap">
<li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
<li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
<li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
<li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
<li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
</ul>
<h2>Core Modules</h2>
<ul class="nowrap">
<li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
<li><a href="../modules/change_modules.html">change_modules</a></li>
<li><a href="../modules/consent.html">consent</a></li>
<li><a href="../modules/join_org.html">join_org</a></li>
<li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
<li><a href="../modules/leave_org.html">leave_org</a></li>
<li><a href="../modules/message_org.html">message_org</a></li>
<li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
<li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
<li><a href="../modules/remove_org.html">remove_org</a></li>
<li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
<li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
<li><a href="../modules/module_template.html">module_template</a></li>
</ul>
<h2>Minetest Modules</h2>
<ul class="nowrap">
<li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
</ul>

113
govbot.py Normal file
View File

@@ -0,0 +1,113 @@
# MODPOL GOVBOT
# A Python bridge between Modpol and Mastodon
## Initialize Modpol ##
import lupa
# Create a Lua runtime
lua = lupa.LuaRuntime(unpack_returned_tuples=True)
# Load your Lua script
script_path = 'login_mastodon.lua'
with open(script_path, 'r') as f:
lua.execute(f.read())
print("Loaded Modpol into Govbot")
# To do: load all override files
# If your Lua script defines functions, you can call them from Python
#result = lua.globals().your_function_name() # Replace with your actual function name
#print("Result from Lua:", result)
## Initialize Mastodon ##
from mastodon import Mastodon
# ^ https://mastodonpy.readthedocs.io/en/stable/#
import time
import datetime
# ^ https://github.com/HikaruSama233/mastodon_autoreply_bot_template/blob/main/bot_template.py
# Variables
## Character maximum for the server
char_max = 500
# Connect to Mastodon
govbot = Mastodon(
client_id='modpol_mastodon/creds/clientcred.secret',
access_token = 'modpol_mastodon/creds/usercred.secret')
print("Signed in to Mastodon")
# Handle notification events
def handle_event(event):
print("{} Handling notification ".format(datetime.datetime.now())
+ str(event['id']))
if 'mention' in event['type']:
mention_username = event['account']['username']
print(str(event['id']) + ": mention from @"
+ mention_username)
# Command handling
# perhaps move this to a separate Interfaces file
if "!dashboard" in event['status']['content']:
govbot.status_reply(event['status'],
"[dashboard here]")
print("{} Replied to ".format(datetime.datetime.now())
+ str(event['id']))
# To do: if DM
else:
govbot.status_reply(event['status'],
"Thanks for mentioning me!")
print("{} Replied to ".format(datetime.datetime.now())
+ str(event['id']))
## ADD OTHER IF STATEMENTS HERE
else:
govbot.status_reply(event['status'],
"I'm not sure how to parse that.")
print("{} Posted error message ".format(datetime.datetime.now())
+ str(event['id']))
# Check notifications
events_queue = {}
def check_events():
notifications = govbot.notifications(mentions_only=True)
current_time = datetime.datetime.now()
if len(notifications) > 0:
print("{} Total notifications {}".format(current_time, len(notifications)))
events_queue = notifications
while len(events_queue) > 0:
id = events_queue[0]['id']
handle_event(events_queue.pop(0)) # removes event from queue
govbot.notifications_dismiss(id)
elif str(current_time.minute) == '0':
print("{} No notifications".format(current_time))
# Initialization
# Delete past posts (while we are testing)
## Get account information
account_info = govbot.account_verify_credentials()
## Extract and print account ID
acc_id = account_info['id']
## Fetch the bot's posts
old_posts = govbot.account_statuses(id=acc_id)
## Delete
for post in old_posts:
govbot.status_delete(id=post.id)
# Delete past notifications
govbot.notifications_clear()
print("{} Initialized".format(datetime.datetime.now()))
first_post = "Commands:"
first_post += "\n!dashboard: View dashboard"
govbot.status_post(first_post[:char_max])
while 1:
# Check every 5 seconds
time.sleep(5)
if len(events_queue) == 0:
check_events()

BIN
lib/empire-modpol.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 KiB

BIN
lib/module_list.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

2
login_mastodon.lua Normal file
View File

@@ -0,0 +1,2 @@
dofile("modpol_core/modpol.lua")

View File

@@ -1,8 +1,7 @@
name = modpol
title = Modular Politics
title = Modpol
author = ntnsndr <n@nathanschneider.info>
description = A governance layer framework in Lua
license = Hippocratic License
forum = TBA
description = A framework that enables diverse governance processes
license = MIT
forum = https://forum.minetest.net/viewtopic.php?f=9&t=27598
version = 0.1
release = 0

View File

@@ -5,19 +5,29 @@ local localdir = modpol.topdir
--orgs
dofile (localdir .. "/orgs/base.lua")
dofile (localdir .. "/orgs/process.lua")
dofile (localdir .. "/orgs/users.lua")
--interactions
dofile (localdir .. "/interactions/interactions.lua")
--modules
--TODO make this automatic and directory-based
dofile (localdir .. "/modules/add_child_org_consent.lua")
dofile (localdir .. "/modules/add_child_org.lua")
dofile (localdir .. "/modules/change_modules.lua")
dofile (localdir .. "/modules/change_policy.lua")
dofile (localdir .. "/modules/consent.lua")
dofile (localdir .. "/modules/join_org_consent.lua")
dofile (localdir .. "/modules/create_token.lua")
dofile (localdir .. "/modules/defer.lua")
dofile (localdir .. "/modules/display_policies.lua")
dofile (localdir .. "/modules/display_processes.lua")
dofile (localdir .. "/modules/join_org.lua")
dofile (localdir .. "/modules/leave_org.lua")
dofile (localdir .. "/modules/remove_child_consent.lua")
dofile (localdir .. "/modules/remove_member_consent.lua")
dofile (localdir .. "/modules/remove_org_consent.lua")
dofile (localdir .. "/modules/message_org.lua")
dofile (localdir .. "/modules/randomizer.lua")
dofile (localdir .. "/modules/remove_child_org.lua")
dofile (localdir .. "/modules/remove_member.lua")
dofile (localdir .. "/modules/remove_org.lua")
dofile (localdir .. "/modules/rename_org_consent.lua")
dofile (localdir .. "/modules/remove_process.lua")
dofile (localdir .. "/modules/rename_org.lua")
dofile (localdir .. "/modules/send_token.lua")
dofile (localdir .. "/modules/tokenomics.lua")

View File

View File

@@ -1,18 +1,54 @@
-- INTERACTIONS.LUA (CLI)
--- INTERACTIONS.LUA (CLI).
-- User interaction functions for Modular Politics
-- Called by modpol.lua
-- @module modpol.interactions
modpol.interactions = {}
-- UTILITIES
-- =========
--- Output: returns a string listing a module's policies
-- @function modpol.interactions.get_policy_string
-- @param org (string or number) name or id for the org
-- @param module_slug (string)
-- @param sep (string) separator string
function modpol.interactions.get_policy_string(
org, module_slug, sep)
local this_org = modpol.orgs.get_org(org)
local this_module = modpol.modules[module_slug]
local output = {}
if not this_org.policies[module_slug] then
return "Module not in org"
elseif modpol.util.num_pairs(this_module.config) > 0 then
for k, v in pairs(this_module.config) do
local this_policy = "[Policy error]"
if this_org.policies[module_slug][k] then
this_policy =
tostring(this_org.policies[module_slug][k])
else
if not v then
this_policy = "none"
else
this_policy = tostring(v)
end
end
table.insert(output, k.." - "..this_policy)
end
return "Policies:\n" .. table.concat(output, sep)
else
return "No policies"
end
end
-- DASHBOARDS
-- ==========
-- Function: modpol.interactions.dashboard(user)
-- Params: user (string)
--- Output: Display a menu of commands to the user
-- @function modpol.interactions.dashboard
-- @param user (string)
-- Q: Should this return a menu of commands relevant to the specific user?
-- Output: Displays a menu of commands to the user
-- TKTK currently just prints all of modpol---needs major improvement
function modpol.interactions.dashboard(user)
-- adds user to root org if not already in it
@@ -22,6 +58,7 @@ function modpol.interactions.dashboard(user)
local all_users = modpol.instance:list_members()
print('\n-=< MODPOL DASHBOARD >=-')
print('All orgs: (user orgs indicated by *)')
for id, org in ipairs(modpol.orgs.array) do
if type(org) == "table" then
@@ -31,25 +68,74 @@ function modpol.interactions.dashboard(user)
end
end
-- pending list
local user_pending = {}
local user_pending_count = 0
for k,v in ipairs(modpol.orgs.array) do
if v.pending and v.pending[user] then
if modpol.util.num_pairs(v.pending[user]) ~= 0 then
table.insert(user_pending, v.name)
user_pending_count = user_pending_count + 1
end
end
end
print('Pending actions in: '..table.concat(user_pending,', '))
print('All users: ' .. table.concat(all_users, ', '))
print()
print('Access which org id?')
print("Commands: (O)rg, (U)ser, (R)eset, (Q)uit")
local sel = io.read()
print()
if modpol.orgs.array[tonumber(sel)] then
local sel_org = modpol.orgs.array[tonumber(sel)].name
modpol.interactions.org_dashboard(user, sel_org)
else
print("Org id not found.")
end
if sel == "O" or sel == "o" then
print('Access which org id?')
sel = io.read()
print()
if modpol.orgs.array[tonumber(sel)] then
local sel_org = modpol.orgs.array[tonumber(sel)].name
modpol.interactions.org_dashboard(user, sel_org)
else
print("Org id not found")
modpol.interactions.dashboard(user)
end
elseif sel == "U" or sel == "u" then
print("Access which user?")
sel = io.read()
print()
if modpol.instance:has_member(sel) then
modpol.interactions.user_dashboard(
user, sel,
function()
modpol.interactions.dashboard(user)
end
)
else
print("User name not found")
modpol.interactions.dashboard(user)
end
elseif sel == "R" or sel == "r" then
modpol.instance.members = {}
modpol.orgs.reset()
print("Orgs and users reset")
modpol.interactions.dashboard(user)
elseif sel == "Q" or sel == "q" then
return
else
print("Invalid input, try again")
modpol.interactions.dashboard(user)
end
end
-- Function: modpol.interactions.org_dashboard
-- Params: user (string), org_string (string or id)
-- Output: Displays a menu of org-specific commands to the user
--- Output: Displays a menu of org-specific commands to the user
-- @function modpol.interactions.org_dashboard
-- @param user (string)
-- @param org_string (string or id)
function modpol.interactions.org_dashboard(user, org_string)
local org = modpol.orgs.get_org(org_string)
if not org then return nil end
@@ -66,34 +152,49 @@ function modpol.interactions.org_dashboard(user, org_string)
local children = {}
for k,v in ipairs(org.children) do
local this_child = modpol.orgs.get_org(v)
table.insert(children, this_child.name)
end
-- list available modules
local org_modules = {}
for k,v in pairs(org.modules) do
if not v.hide then
table.insert(org_modules, v.slug)
if this_child then
table.insert(children, this_child.name)
end
end
-- prepare modules menu
local modules = {}
if modpol.modules then
for k,v in pairs(modpol.modules) do
if not v.hide and -- hide utility modules
org.policies[k] then -- org includes it
local module_entry = v.slug
table.insert(modules, module_entry)
end
end
end
table.sort(modules)
-- list pending
local process_msg = #org.processes .. " total processes"
local processes = {}
for i,v in ipairs(org.processes) do
if v ~= "deleted" then
processes[i] = org.processes[i]
end
end
local process_msg = #processes .. " total processes"
if org.pending[user] then
process_msg = process_msg .. " (" .. #org.pending[user] .. " pending)"
process_msg = process_msg .. " (" ..
modpol.util.num_pairs(org.pending[user]) .. " pending)"
else
process_msg = process_msg .. " (0 pending)"
end
-- set up output
print('\n-=< ORG DASHBOARD >=-')
print("Org: " .. org.name)
print("Parent: " .. parent)
print("Members: " .. table.concat(org.members, ", "))
print("Children: " .. table.concat(children, ", "))
print("Modules: " .. table.concat(org_modules, ", "))
print("Child orgs: " .. table.concat(children, ", "))
print("Modules: " .. table.concat(modules, ", "))
print("Pending: " .. process_msg)
print()
print("Commands: (M)odules, (P)ending")
print("Commands: (M)odules, (P)ending, (B)ack")
local sel = io.read()
print()
@@ -103,72 +204,181 @@ function modpol.interactions.org_dashboard(user, org_string)
local module_sel = io.read()
print()
local module_result = false
for k,v in ipairs(org_modules) do
for k,v in ipairs(modules) do
if v == module_sel then
module_result = true
end
end
local module = modpol.modules[module_sel]
if module_result then
org:call_module(module_sel, user)
modpol.interactions.binary_poll_user(
user,
module.name..":\n"..
module.desc.."\n"..
modpol.interactions.get_policy_string(
org.name, module.slug, "\n")..
"\n".."Proceed?",
function(input)
print("\n")
if input == "Yes" then
org:call_module(module_sel, user)
elseif input == "No" then
modpol.interactions.org_dashboard(
pname, org.id)
end
end)
else
print("Error: Module not found.")
modpol.interactions.org_dashboard(user, org.id)
end
elseif sel == 'a' or sel == 'A' then
local processes = {}
elseif sel == 'p' or sel == 'P' then -- Pending processes
print("All processes: (* indicates pending)")
for k,v in ipairs(org.processes) do
for i,v in ipairs(processes) do
local active = ''
if org.pending[user] then
if org.pending[user][v.id] then
active = '*'
end
end
print("["..v.id.."] "..v.slug..active)
end
print()
print("Interact with which one?")
print("Interact with which one (use [id] number)?")
local to_interact = io.read()
local process = org.processes[tonumber(to_interact)]
if not process then return end
if not process then
modpol.interactions.message(
user, "Not a pending process")
modpol.interactions.org_dashboard(user, org.id)
return
end
if org:has_pending_actions(user) then
if org.pending[user][process.id] then
org:interact(process.id, user)
end
modpol.interactions.org_dashboard(user, org.id)
end
elseif sel == 'b' or sel == 'B' then
modpol.interactions.dashboard(user)
else
print("Command not found")
modpol.interactions.org_dashboard(user, org.name)
end
end
-- Function: modpol.interactions.policy_dashboard
-- input: user (string), org_id (int), policy (string)
-- if policy is nil, enables creating a new policy
-- output: opens a dashboard for viewing/editing policy details
-- TODO
--- Function: modpol.interactions.user_dashboard
-- Displays a dashboard about a particular user
-- @param viewer Name of user viewing the dashboard (string)
-- @param user Name of user being viewed (string)
-- @param completion Optional function to call on Done button
function modpol.interactions.user_dashboard(viewer, user, completion)
local user_orgs = {}
local user_modules = {}
print("\n-=< USER DASHBOARD: "..user.." >=-")
print("User's orgs:")
for id, org in ipairs(modpol.orgs.array) do
if type(org) == "table" then
if org:has_member(user) then
print(org.name)
end
end
end
print()
print("Commands: (M)essage user, Enter when done")
local sel = io.read()
if sel == "M" or sel == "m" then
modpol.interactions.message_user(
viewer, user)
completion()
else
completion()
end
end
-- Function: modpol.interactions.message
-- input: user (string), message (string)
-- output: prints message to CLI
-- INTERACTION PRIMITIVES
-- ======================
--- Prints message to CLI.
-- Buttons: message, done
-- @function modpol.interactions.message
-- @param user (string)
-- @param message (string)
function modpol.interactions.message(user, message)
print(user .. ": " .. message)
end
-- Function: modpol.interactions.text_query
-- input: User (string), Query (string), func (function)
-- func input: user input (string)
-- output: Applies "func" to user input
--- Gets and sends a message from one user to another
-- @function modpol.interactions.message_user
-- @param sender Name of user sending (string)
-- @param recipient Name of user receiving (string)
function modpol.interactions.message_user(sender, recipient)
print("Enter your message for "..recipient..":")
local sel = io.read()
modpol.interactions.message(
recipient,
sel.." [from "..sender.."]")
end
--- Displays complex data to a user
-- @function modpol.interactions.display
-- @param user Name of target user (string)
-- @param title Title of display (string)
-- @param message Content of message (string or table of strings)
-- @param done Optional function for what happens when user is done
function modpol.interactions.display(user, title, message, completion)
local output = ""
output = "\n-=< "..title.." >=-\n\n"
if type(message) == "table" then
output = table.concat(message,"\n")
elseif type(message) == "string" then
output = message
elseif type(message) == "number" then
output = message
else
modpol.interactions.message(
self.initiator, "Error: message not typed for display")
modpol.interactions.message(
self.initiator, "Error: input not typed for display")
if completion then completion() else
modpol.interactions.dashboard(user)
end
end
print(message)
print("\nEnter to continue")
io.read()
if completion then completion() else
modpol.interactions.dashboard(user)
end
end
--- Applies "func" to user input.
-- Func input: user input (string)
-- @function modpol.interactions.text_query
-- @param User (string)
-- @param Query (string)
-- @param func (function)
function modpol.interactions.text_query(user, query, func)
print(user .. ": " .. query)
answer = io.read()
func(answer)
end
-- Function: dropdown_query
-- input: user (string), label (string), options (table of strings), func(choice) (function)
-- func input: choice (string)
-- output: calls func on choice
--- Output: Calls func on choice.
-- Func input: choice (string)
-- @function modpol.interactions.dropdown_query
-- @param user (string)
-- @param label (string)
-- @param options (table of strings)
-- @param func (choice) (function)
function modpol.interactions.dropdown_query(user, label, options, func)
-- set up options
local options_display = ""
@@ -181,7 +391,7 @@ function modpol.interactions.dropdown_query(user, label, options, func)
options_display = options_display .. "Select number:"
if options_number == 0 then
print("Error: No options given for dropdown")
return nil
return nil
end
-- begin displaying
print(user .. ": " .. label)
@@ -204,10 +414,62 @@ function modpol.interactions.dropdown_query(user, label, options, func)
end
end
-- Function: modpol.binary_poll_user(user, question)
-- Params: user (string), question (string), func (function)
-- func input: user input (string: y/n)
-- Output: Applies "func" to user input
--- Allows user to select from a set of options
-- @function modpol.interactions.checkbox_query
-- @param user Name of user (string)
-- @param label Query for user before options (string)
-- @param options Table of options and their checked status in the form {{"option_1_string", true}, {"option_2_string", false}}
-- @param func Function to be called with param "input", made up of the corrected table in the same format as the param options
function modpol.interactions.checkbox_query(
user, label, options, func)
-- set up options
local options_display = ""
local options_number = 0
for i,v in ipairs(options) do
local checked = false
if v[2] then checked = true end
if checked then
checked = "x"
else
checked = " "
end
options_display = options_display..i..". ["..
checked.."] "..v[1].."\n"
options_number = options_number + 1
end
if options_number == 0 then
print("Error: No options given for dropdown")
return nil
end
options_display = options_display..
"List comma-separated options to flip (e.g., 1,2,5):"
-- begin displaying
print(user .. ": " .. label)
print(options_display)
-- read input and produce output
local answer = io.read()
local answer_table = {}
for match in (answer..","):gmatch("(.-)"..",") do
table.insert(answer_table, tonumber(match))
end
local result_table = modpol.util.copy_table(options)
for i,v in ipairs(answer_table) do
if result_table[v] then
-- flip the boolean on selected options
result_table[v][2] = not result_table[v][2]
end
end
func(result_table)
end
--- Output: Applies "func" to user input.
-- Func input: user input (string: y/n)
-- @function modpol.interactions.binary_poll_user
-- @param user (string)
-- @param question (string)
-- @param func (function)
function modpol.interactions.binary_poll_user(user, question, func)
local query = "Poll for " .. user .. " (y/n): ".. question
local answer
@@ -216,10 +478,8 @@ function modpol.interactions.binary_poll_user(user, question, func)
answer = io.read()
until answer == "y" or answer == "n"
if answer == "y" then
modpol.interactions.message(user, "Response recorded")
func("Yes")
elseif answer == "n" then
modpol.interactions.message(user, "Response recorded")
func("No")
else
modpol.interactions.message(user, "Error: invalid response")
@@ -229,9 +489,11 @@ end
-- COMPLEX INTERACTIONS
-- ====================
-- Function: modpol.interactions.message_org
-- input: initiator (string), org (number or string), message (string)
-- output: broadcasts message to all org members
--- Output: broadcasts message to all org members
-- @function modpol.interactions.message_org
-- @param initiator (string)
-- @param org (number or string)
-- @param message (string)
function modpol.interactions.message_org(initiator, org, message)
local this_org = modpol.orgs.get_org(org)
local users = this_org:list_members()
@@ -245,3 +507,9 @@ end
-- output: gets question from initiator, asks all org members, broadcasts answers
-- TESTING
--testing command
function modpol.msg(text)
modpol.interactions.message("TEST MSG",text)
end

View File

@@ -1,21 +1,23 @@
--- @module add_child_org_consent
-- Adds a child org
-- Depends on `consent`
--- Adds a child org
-- @module add_child_org
local add_child_org_consent = {
name = "Add child org (consent)",
slug = "add_child_org_consent",
desc = "Create a child org in the current one with member consent"
local add_child_org = {
name = "Add child org",
slug = "add_child_org",
desc = "Create a child org in the current one"
}
add_child_org_consent.data = {
add_child_org.data = {
child_name = "",
result = nil
result = false
}
add_child_org_consent.config = {
add_child_org.config = {
approval_module = false
}
-- @function initiate
function add_child_org_consent:initiate(result)
--- Initiate consent for new child org
-- @function add_child_org:initiate(result)
-- @param result Callback if this module is embedded in other modules
function add_child_org:initiate(result)
modpol.interactions.text_query(
self.initiator,"Child org name: ",
function(input)
@@ -26,7 +28,6 @@ function add_child_org_consent:initiate(result)
modpol.interactions.org_dashboard(
self.initiator, self.org.name)
self.org:delete_process(self.id)
if result then result() end
return
elseif modpol.orgs.get_org(input) then
modpol.interactions.message(
@@ -43,8 +44,9 @@ function add_child_org_consent:initiate(result)
self.initiator,
"Proposed child org: " .. input)
-- initiate consent process
self.org:call_module(
"consent",
self.data.result = result
self:call_module(
self.config.approval_module,
self.initiator,
{
prompt = "Create child org " ..
@@ -61,15 +63,17 @@ function add_child_org_consent:initiate(result)
)
end
function add_child_org_consent:create_child_org()
--- Create a new child org
-- @function add_child_org:create_child_org
function add_child_org:create_child_org()
self.org:add_org(self.data.child_name, self.initiator)
modpol.interactions.message_org(
self.initiator,
self.org.name,
"Child org created: "..self.data.child_name)
"Created child org in " .. self.org.name .. ": "
.. self.data.child_name)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
end
--- (Required) Add to module table
modpol.modules.add_child_org_consent = add_child_org_consent
modpol.modules.add_child_org = add_child_org

View File

@@ -0,0 +1,178 @@
--- change_modules
-- @module change_modules
-- Depends on consent
local change_modules = {
name = "Change modules (consent)",
slug = "change_modules",
desc = "Add or remove modules from the org with member consent",
hide = false;
}
change_modules.data = {
result = nil
}
change_modules.config = {
}
--- Change modules initiate
-- @function change_modules:initiate
-- @param result Callback if this module is embedded in other modules
function change_modules:initiate(result)
self.data.result = result
-- Step 1: add or remove?
modpol.interactions.dropdown_query(
self.initiator, "Module change options:",
{"Add module","Remove module"},
function(input)
if input == "Add module" then
self:add_module()
elseif input == "Remove module" then
self:remove_module()
end
end
)
end
--- Add a new module
-- @function change_modules:add_module
function change_modules:add_module()
-- prepare module options
local available_modules = modpol.util.copy_table(modpol.modules)
for k,org_mod in pairs(self.org.modules) do
if available_modules[org_mod.slug] then
available_modules[org_mod.slug] = nil
end end
-- present module options
local modules_list = {}
for k,v in pairs(available_modules) do
table.insert(modules_list,v.name)
end
if #modules_list == 0 then
modpol.interactions.message(
self.initiator, "Org has all modules")
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
return
end
table.sort(modules_list)
-- now ask which to add
modpol.interactions.dropdown_query(
self.initiator, "Choose a module to add:",
modules_list,
function(mod_choice)
-- confirm choice
modpol.interactions.binary_poll_user(
self.initiator,
"Confirm: propose to add module \"" ..
mod_choice .. "\"?",
function(input)
if input == "Yes" then
self:propose_change("add",mod_choice)
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
else
self:add_module()
end
end
)
end
)
end
--- Remove a module
-- @function change_modules:remove_module
function change_modules:remove_module()
-- prepare module options
local available_modules = {}
for k,org_mod in pairs(self.org.modules) do
if not org_mod.hide then
available_modules[org_mod.slug] = modpol.util.copy_table(org_mod)
end end
local modules_list = {}
local modules_count = 0
for k,v in pairs(available_modules) do
table.insert(modules_list,v.name)
modules_count = modules_count + 1
end
-- abort if no modules to remove
if modules_count == 0 then
modpol.interactions.message(
self.initiator, "Org has no modules")
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
return
end
table.sort(modules_list)
-- now ask which to remove
modpol.interactions.dropdown_query(
self.initiator, "Choose a module to remove:",
modules_list,
function(mod_choice)
-- confirm choice
modpol.interactions.binary_poll_user(
self.initiator,
"Confirm: propose to remove module \"" .. mod_choice .. "\"?",
function(input)
if input == "Yes" then
self:propose_change("remove",mod_choice)
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
else
self:remove_module()
end
end
)
end
)
end
--- Propose a change.
-- Type "add" or "remove"
-- @function change_modules:propose_change
-- @param type
-- @param mod_text
function change_modules:propose_change(type, mod_text)
self:call_module(
"consent",self.initiator,
{
prompt = "Do you consent to "..type..
" this module in org "..self.org.name..
":\n"..mod_text,
votes_required = #self.org.members
},
function()
if type == "add" then
for k,v in pairs(modpol.modules) do
if v.name == mod_text then
table.insert(self.org.modules,v)
end
end
modpol.interactions.message_org(
self.initiator,self.org.id,
"Consent reached:\nAdding \""
..mod_text.."\" to org "..self.org.name)
elseif type == "remove" then
local i = 0
for k,v in pairs(self.org.modules) do
i = i + 1
if v.name == mod_text then
self.org.modules[k] = nil
end
end
modpol.interactions.message_org(
self.initiator,self.org.id,
"Consent reached:\nRemoving \""
..mod_text.."\" from org "..self.org.name)
end
end)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
end
modpol.modules.change_modules = change_modules

View File

@@ -1,171 +1,117 @@
--- change_modules
-- @module change_modules
-- Depends on consent
local change_modules = {
name = "Change modules (consent)",
name = "Change modules",
slug = "change_modules",
desc = "Add or remove modules from the org with member consent",
desc = "Add or remove modules from the org",
hide = false;
}
change_modules.data = {
result = nil
result = nil,
modules_before = {},
modules_after = {},
summary = "",
}
change_modules.config = {
approval_module = false
}
--- Initiate change in modules.
-- Either adds or removes module depending on user input
-- @function change_modules:initiate
-- @param result Callback if this module is embedded in other modules
function change_modules:initiate(result)
self.data.result = result
-- Step 1: add or remove?
modpol.interactions.dropdown_query(
self.initiator, "Module change options:",
{"Add module","Remove module"},
self.data.add_modules = {}
self.data.remove_modules = {}
local modules_before = {}
local modules_after = {}
-- generate self.config.modules table
for k, module in pairs(modpol.modules) do
if not modpol.modules[module.slug].hide then
local in_org = false
if self.org.policies[module.slug] then
in_org = true
end
table.insert(
modules_before,
{module.name.." ["..module.slug.."]", in_org})
end
end
-- send query to user
modpol.interactions.checkbox_query(
self.initiator,
"Check the modules to activate in this org:",
modules_before,
function(input)
if input == "Add module" then
self:add_module()
elseif input == "Remove module" then
self:remove_module()
end
end
)
end
function change_modules:add_module()
-- prepare module options
local available_modules = modpol.copy_table(modpol.modules)
for k,org_mod in pairs(self.org.modules) do
if available_modules[org_mod.slug] then
available_modules[org_mod.slug] = nil
end end
-- present module options
local modules_list = {}
for k,v in pairs(available_modules) do
table.insert(modules_list,v.name)
end
if #modules_list == 0 then
modpol.interactions.message(
self.initiator, "Org has all modules")
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
return
end
table.sort(modules_list)
-- now ask which to add
modpol.interactions.dropdown_query(
self.initiator, "Choose a module to add:",
modules_list,
function(mod_choice)
-- confirm choice
modpol.interactions.binary_poll_user(
self.initiator,
"Confirm: propose to add module \"" ..
mod_choice .. "\"?",
function(input)
if input == "Yes" then
self:propose_change("add",mod_choice)
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
-- identify changes
modules_after = input
for i,v in ipairs(modules_after) do
if v[2] ~= modules_before[i][2] then
if v[2] then
table.insert(self.data.add_modules, v[1])
else
self:add_module()
table.insert(self.data.remove_modules, v[1])
end
end
)
end
)
end
function change_modules:remove_module()
-- prepare module options
local available_modules = {}
for k,org_mod in pairs(self.org.modules) do
if not org_mod.hide then
available_modules[org_mod.slug] = modpol.copy_table(org_mod)
end end
local modules_list = {}
local modules_count = 0
for k,v in pairs(available_modules) do
table.insert(modules_list,v.name)
modules_count = modules_count + 1
end
-- abort if no modules to remove
if modules_count == 0 then
modpol.interactions.message(
self.initiator, "Org has no modules")
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
if self.data.result then self.data.result() end
self.org:delete_process(self.id)
return
end
table.sort(modules_list)
-- now ask which to remove
modpol.interactions.dropdown_query(
self.initiator, "Choose a module to remove:",
modules_list,
function(mod_choice)
-- confirm choice
modpol.interactions.binary_poll_user(
self.initiator,
"Confirm: propose to remove module \"" .. mod_choice .. "\"?",
function(input)
if input == "Yes" then
self:propose_change("remove",mod_choice)
modpol.interactions.org_dashboard(
self.initiator, self.org.id)
else
self:remove_module()
end
end
)
end
)