308 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			308 lines
		
	
	
		
			7.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!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>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>
 | |
| 
 | |
| </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.message">modpol.interactions.message (user, message)</a></td>
 | |
| 	<td class="summary">Output: Prints message to CLI</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">Output: 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.binary_poll_user">modpol.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.message"></a>
 | |
|     <strong>modpol.interactions.message (user, message)</strong>
 | |
|     </dt>
 | |
|     <dd>
 | |
|     Output: Prints message to CLI
 | |
| 
 | |
| 
 | |
|     <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.text_query"></a>
 | |
|     <strong>modpol.interactions.text_query (user, query, func)</strong>
 | |
|     </dt>
 | |
|     <dd>
 | |
|     Output: 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.binary_poll_user"></a>
 | |
|     <strong>modpol.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-20 10:54:01 </i>
 | |
| </div> <!-- id="about" -->
 | |
| </div> <!-- id="container" -->
 | |
| </body>
 | |
| </html>
 |