2
0

modpol.interactions.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5. <head>
  6. <title>Reference</title>
  7. <link rel="stylesheet" href="../ldoc.css" type="text/css" />
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <!-- Menu -->
  18. <div id="navigation">
  19. <br/>
  20. <h1>modpol</h1>
  21. <ul>
  22. <li><a href="../index.html">Index</a></li>
  23. </ul>
  24. <h2>Contents</h2>
  25. <ul>
  26. <li><a href="#Functions">Functions</a></li>
  27. </ul>
  28. <h2>Basic Functions</h2>
  29. <ul class="nowrap">
  30. <li><a href="../modules/modpol.interactions.html">modpol.interactions</a></li>
  31. <li><a href="../modules/modpol.orgs.base.html">modpol.orgs.base</a></li>
  32. <li><a href="../modules/modpol.orgs.process.html">modpol.orgs.process</a></li>
  33. <li><a href="../modules/modpol.util.misc.html">modpol.util.misc</a></li>
  34. <li><a href="../modules/modpol_minetest.api.html">modpol_minetest.api</a></li>
  35. </ul>
  36. <h2>Core Modules</h2>
  37. <ul class="nowrap">
  38. <li><a href="../modules/add_child_org_consent.html">add_child_org_consent</a></li>
  39. <li><a href="../modules/change_modules.html">change_modules</a></li>
  40. <li><a href="../modules/consent.html">consent</a></li>
  41. <li><a href="../modules/join_org.html">join_org</a></li>
  42. <li><a href="../modules/join_org_consent.html">join_org_consent</a></li>
  43. <li><a href="../modules/leave_org.html">leave_org</a></li>
  44. <li><a href="../modules/message_org.html">message_org</a></li>
  45. <li><a href="../modules/remove_child_consent.html">remove_child_consent</a></li>
  46. <li><a href="../modules/remove_member_consent.html">remove_member_consent</a></li>
  47. <li><a href="../modules/remove_org.html">remove_org</a></li>
  48. <li><a href="../modules/remove_org_consent.html">remove_org_consent</a></li>
  49. <li><a href="../modules/rename_org_consent.html">rename_org_consent</a></li>
  50. <li><a href="../modules/module_template.html">module_template</a></li>
  51. </ul>
  52. <h2>Minetest Modules</h2>
  53. <ul class="nowrap">
  54. <li><a href="../modules/priv_to_org.html">priv_to_org</a></li>
  55. </ul>
  56. </div>
  57. <div id="content">
  58. <h1>Module <code>modpol.interactions</code></h1>
  59. <p>INTERACTIONS.LUA (CLI).</p>
  60. <p>
  61. User interaction functions for Modular Politics
  62. Called by modpol.lua</p>
  63. <h2><a href="#Functions">Functions</a></h2>
  64. <table class="function_list">
  65. <tr>
  66. <td class="name" nowrap><a href="#modpol.interactions.dashboard">modpol.interactions.dashboard (user)</a></td>
  67. <td class="summary">Output: Display a menu of commands to the user</td>
  68. </tr>
  69. <tr>
  70. <td class="name" nowrap><a href="#modpol.interactions.org_dashboard">modpol.interactions.org_dashboard (user, org_string)</a></td>
  71. <td class="summary">Output: Displays a menu of org-specific commands to the user</td>
  72. </tr>
  73. <tr>
  74. <td class="name" nowrap><a href="#modpol.interactions.message">modpol.interactions.message (user, message)</a></td>
  75. <td class="summary">Output: Prints message to CLI</td>
  76. </tr>
  77. <tr>
  78. <td class="name" nowrap><a href="#modpol.interactions.text_query">modpol.interactions.text_query (user, query, func)</a></td>
  79. <td class="summary">Output: Applies "func" to user input.</td>
  80. </tr>
  81. <tr>
  82. <td class="name" nowrap><a href="#modpol.interactions.dropdown_query">modpol.interactions.dropdown_query (user, label, options, func)</a></td>
  83. <td class="summary">Output: Calls func on choice.</td>
  84. </tr>
  85. <tr>
  86. <td class="name" nowrap><a href="#modpol.binary_poll_user">modpol.binary_poll_user (user, question, func)</a></td>
  87. <td class="summary">Output: Applies "func" to user input.</td>
  88. </tr>
  89. <tr>
  90. <td class="name" nowrap><a href="#modpol.interactions.message_org">modpol.interactions.message_org (initiator, org, message)</a></td>
  91. <td class="summary">Output: broadcasts message to all org members</td>
  92. </tr>
  93. </table>
  94. <br/>
  95. <br/>
  96. <h2 class="section-header "><a name="Functions"></a>Functions</h2>
  97. <dl class="function">
  98. <dt>
  99. <a name = "modpol.interactions.dashboard"></a>
  100. <strong>modpol.interactions.dashboard (user)</strong>
  101. </dt>
  102. <dd>
  103. Output: Display a menu of commands to the user
  104. <h3>Parameters:</h3>
  105. <ul>
  106. <li><span class="parameter">user</span>
  107. (string)
  108. </li>
  109. </ul>
  110. </dd>
  111. <dt>
  112. <a name = "modpol.interactions.org_dashboard"></a>
  113. <strong>modpol.interactions.org_dashboard (user, org_string)</strong>
  114. </dt>
  115. <dd>
  116. Output: Displays a menu of org-specific commands to the user
  117. <h3>Parameters:</h3>
  118. <ul>
  119. <li><span class="parameter">user</span>
  120. (string)
  121. </li>
  122. <li><span class="parameter">org_string</span>
  123. (string or id)
  124. </li>
  125. </ul>
  126. </dd>
  127. <dt>
  128. <a name = "modpol.interactions.message"></a>
  129. <strong>modpol.interactions.message (user, message)</strong>
  130. </dt>
  131. <dd>
  132. Output: Prints message to CLI
  133. <h3>Parameters:</h3>
  134. <ul>
  135. <li><span class="parameter">user</span>
  136. (string)
  137. </li>
  138. <li><span class="parameter">message</span>
  139. (string)
  140. </li>
  141. </ul>
  142. </dd>
  143. <dt>
  144. <a name = "modpol.interactions.text_query"></a>
  145. <strong>modpol.interactions.text_query (user, query, func)</strong>
  146. </dt>
  147. <dd>
  148. Output: Applies "func" to user input.
  149. Func input: user input (string)
  150. <h3>Parameters:</h3>
  151. <ul>
  152. <li><span class="parameter">user</span>
  153. (string)
  154. </li>
  155. <li><span class="parameter">query</span>
  156. (string)
  157. </li>
  158. <li><span class="parameter">func</span>
  159. (function)
  160. </li>
  161. </ul>
  162. </dd>
  163. <dt>
  164. <a name = "modpol.interactions.dropdown_query"></a>
  165. <strong>modpol.interactions.dropdown_query (user, label, options, func)</strong>
  166. </dt>
  167. <dd>
  168. Output: Calls func on choice.
  169. func input: choice (string)
  170. <h3>Parameters:</h3>
  171. <ul>
  172. <li><span class="parameter">user</span>
  173. (string)
  174. </li>
  175. <li><span class="parameter">label</span>
  176. (string)
  177. </li>
  178. <li><span class="parameter">options</span>
  179. (table of strings)
  180. </li>
  181. <li><span class="parameter">func</span>
  182. (choice) (function)
  183. </li>
  184. </ul>
  185. </dd>
  186. <dt>
  187. <a name = "modpol.binary_poll_user"></a>
  188. <strong>modpol.binary_poll_user (user, question, func)</strong>
  189. </dt>
  190. <dd>
  191. Output: Applies "func" to user input.
  192. Func input: user input (string: y/n)
  193. <h3>Parameters:</h3>
  194. <ul>
  195. <li><span class="parameter">user</span>
  196. (string)
  197. </li>
  198. <li><span class="parameter">question</span>
  199. (string)
  200. </li>
  201. <li><span class="parameter">func</span>
  202. (function)
  203. </li>
  204. </ul>
  205. </dd>
  206. <dt>
  207. <a name = "modpol.interactions.message_org"></a>
  208. <strong>modpol.interactions.message_org (initiator, org, message)</strong>
  209. </dt>
  210. <dd>
  211. Output: broadcasts message to all org members
  212. <h3>Parameters:</h3>
  213. <ul>
  214. <li><span class="parameter">initiator</span>
  215. (string)
  216. </li>
  217. <li><span class="parameter">org</span>
  218. (number or string)
  219. </li>
  220. <li><span class="parameter">message</span>
  221. (string)
  222. </li>
  223. </ul>
  224. </dd>
  225. </dl>
  226. </div> <!-- id="content" -->
  227. </div> <!-- id="main" -->
  228. <div id="about">
  229. <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
  230. <i style="float:right;">Last updated 2022-01-20 10:54:01 </i>
  231. </div> <!-- id="about" -->
  232. </div> <!-- id="container" -->
  233. </body>
  234. </html>