[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/inherit/player_council.c</h2>
This handler is for the control of player houses.<p>Written by Pinkfish<p>Started Fri Jun 23 22:50:02 PDT 2000
<h2>Inherits</h2>
This class inherits the following classes <a href="obj.handlers.inherit.citizen_elections.c.shtml">/obj/handlers/inherit/citizen_elections.c</a>, <a href="obj.handlers.inherit.nomic_rules.c.shtml">/obj/handlers/inherit/nomic_rules.c</a> and <a href="obj.handlers.inherit.case_control.c.shtml">/obj/handlers/inherit/case_control.c</a><h2>Includes</h2>
This class includes the following files /include/playtesters.h, /include/player.h and /include/nomic_system.h<h2>Method index</h2>
<ul>
<li><a href="#add_amend_rule_motion">add_amend_rule_motion</a>(string, int, string, string)<br/>
This method adds in a request to amend a rule.
<li><a href="#add_create_rule_motion">add_create_rule_motion</a>(string, int, string, string)<br/>
This method puts a new rule up for voting.
<li><a href="#add_document_handler">add_document_handler</a>(string, string)<br/>
This method adds a document handler for an area.
<li><a href="#add_move_rule_type_motion">add_move_rule_type_motion</a>(string, int, int, string)<br/>
This method puts up a request to move a rule from one type to another.
<li><a href="#add_remove_rule_motion">add_remove_rule_motion</a>(string, int, string)<br/>
This method remove a request to amend a rule.
<li><a href="#add_setting_to_all_areas">add_setting_to_all_areas</a>(string, string, string, mixed, mixed, mixed, int)<br/>
Adds a new setting to every area.
<li><a href="#add_setting_to_area">add_setting_to_area</a>(string, string, string, string, mixed, mixed, mixed, int)<br/>
Adds a new setting to one area.
<li><a href="#amend_motion">amend_motion</a>(string, int, string, string)<br/>
This method adds an amendment to the new rule/amendment/whatever, this
rewrites the text of the amendment of whatever it is.
<li><a href="#check_for_completions">check_for_completions</a>(int)<br/>
This method figures out all the current things and when they completed.
<li><a href="#comment_on_motion">comment_on_motion</a>(string, int, string, string)<br/>
This method adds a comment to the new rule/amendment/whatever.
<li><a href="#complete_motion">complete_motion</a>(string, int)<br/>
This method completes the vote on the specified new rule.
<li><a href="#create_area">create_area</a>(string)<br/>
This method creates a new area.
<li><a href="#delete_setting">delete_setting</a>(string, string, string)<br/>
Deletes a setting from an area
<li><a href="#find_motion">find_motion</a>(string, int, int)<br/>
This method finds the specified motion.
<li><a href="#has_voted_for_motion">has_voted_for_motion</a>(string, int, string)<br/>
This method checks to see if the person has voted for the specified
new rule/amendment/whatever
<li><a href="#motion_as_html">motion_as_html</a>(string, class nomic_motion)<br/>
This method returns the new motion as a string.
<li><a href="#motion_as_string">motion_as_string</a>(int, string, class nomic_motion, int)<br/>
This method returns the new motion as a string.
<li><a href="#query_all_motions">query_all_motions</a>(string)<br/>
This method returns all the new rules for the specified area.
<li><a href="#query_all_settings">query_all_settings</a>(string)<br/>
Returns the setting array for an area.
<li><a href="#query_completion_time">query_completion_time</a>(string, class nomic_motion)<br/>
This method figures out the compleion time for the specified motion.
<li><a href="#query_document_handlers">query_document_handlers</a>(string)<br/>
Returns an array of document handlers for an area.
<li><a href="#query_motion">query_motion</a>(string, int)<br/>
This method returns a nice new rule.
<li><a href="#query_setting">query_setting</a>(string, string)<br/>
Gets the value for a setting.
<li><a href="#query_setting_creator_short">query_setting_creator_short</a>(string, string)<br/>
Gets the creator string for a setting.
<li><a href="#query_setting_lower">query_setting_lower</a>(string, string)<br/>
Gets the player-visible short name for a setting.
<li><a href="#query_setting_short">query_setting_short</a>(string, string)<br/>
Gets the player-visible short name for a setting.
<li><a href="#query_setting_upper">query_setting_upper</a>(string, string)<br/>
Gets the player-visible short name for a setting.
<li><a href="#query_setting_visible">query_setting_visible</a>(string, string)<br/>
Gets the player-visible short name for a setting.
<li><a href="#query_votes_for_motion">query_votes_for_motion</a>(string, int)<br/>
This method returns the current set of votes for the specied new rule.
<li><a href="#remove_document_handler">remove_document_handler</a>(string, string)<br/>
This method removes a document handler from an area.
<li><a href="#rule_as_html">rule_as_html</a>(class nomic_rule)<br/>
This method turns a rule into html.
<li><a href="#send_council_inform">send_council_inform</a>(string, int, string)<br/>
This method sends informs to all the specified council of some sort of
nifty council event.
<li><a href="#set_setting">set_setting</a>(string, string, mixed)<br/>
Sets up a setting value for an area.
<li><a href="#update_immutables">update_immutables</a>(string)<br/>
This method updates the immutable laws with the new set of general rules.
<li><a href="#vote_for_motion">vote_for_motion</a>(string, int, int, string)<br/>
This method votes for the specified ammentment/whatever.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_amend_rule_motion">
add_amend_rule_motion</a><pre class="autodocfuncdef">
int add_amend_rule_motion(string area,
                          int rule_no,
                          string amendment,
                          string creator)
</pre><dd><br />
This method adds in a request to amend a rule.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to put the amendment in<br />
rule_no - the rule to amend<br />
amendment - the amendment text<br />
creator - the person doing the amendment<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_create_rule_motion">
add_create_rule_motion</a><pre class="autodocfuncdef">
int add_create_rule_motion(string area,
                           int type,
                           string text,
                           string creator)
</pre><dd><br />
This method puts a new rule up for voting.  It is first placed into
the hands of the magistrates, then into the hands of the players.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area for the rule to be voted on in<br />
type - the type of the rules<br />
text - the text associated with the new rule<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_document_handler">
add_document_handler</a><pre class="autodocfuncdef">
int add_document_handler(string area,
                         string document)
</pre><dd><br />
This method adds a document handler for an area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to add to<br />
document - the full file path of the document handler<br />
<br />
<dd><b>Returns:</b>
<br />1 on success
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_move_rule_type_motion">
add_move_rule_type_motion</a><pre class="autodocfuncdef">
int add_move_rule_type_motion(string area,
                              int rule_no,
                              int type,
                              string creator)
</pre><dd><br />
This method puts up a request to move a rule from one type to another.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to do the move in<br />
rule_no - the rule number to move<br />
type - the type to move the rule to<br />
creator - the creator of this request<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_remove_rule_motion">
add_remove_rule_motion</a><pre class="autodocfuncdef">
int add_remove_rule_motion(string area,
                           int rule_no,
                           string creator)
</pre><dd><br />
This method remove a request to amend a rule.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to put the amendment in<br />
rule_no - the rule to amend<br />
amendment - the amendment text<br />
creator - the person doing the amendment<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_setting_to_all_areas">
add_setting_to_all_areas</a><pre class="autodocfuncdef">
int add_setting_to_all_areas(string name,
                             string short,
                             string creator_short,
                             mixed default_value,
                             mixed lower,
                             mixed upper,
                             int visible)
</pre><dd><br />
Adds a new setting to every area.  Will return if any area already
has this setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - The name of the setting, also used as the key in the
  settings mapping.<br />
short - The description of this setting to be shown to players.<br />
creator_short - The description of this setting to be shown to
  creators.  Should explain the value of the setting.<br />
default_value - The default value of the setting.<br />
lower - The lower value of the setting.<br />
upper - The upper value of the setting.
<br />
<br />
<dd><b>Returns:</b>
<br />0 if the setting is already there in any area, 1 if it is added.
<br /><br />
<dd><b>See also:</b>
<br />add_setting_to_area, set_setting
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="add_setting_to_area">
add_setting_to_area</a><pre class="autodocfuncdef">
int add_setting_to_area(string area,
                        string name,
                        string short,
                        string creator_short,
                        mixed default_value,
                        mixed lower,
                        mixed upper,
                        int visible)
</pre><dd><br />
Adds a new setting to one area.  Will return if the setting already
exists.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to use<br />
name - The name of the setting, also used as the key in the
  settings mapping.<br />
short - The description of this setting to be shown to players.<br />
creator_short - The description of this setting to be shown to
  creators.  Should explain the value of the setting.<br />
default_value - The default value of the setting.<br />
lower - The lower value of the setting.<br />
upper - The upper value of the setting.
<br />
<br />
<dd><b>Returns:</b>
<br />0 if the setting is already there, 1 if it is added.
<br /><br />
<dd><b>See also:</b>
<br />add_setting_to_all_areas, set_setting
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="amend_motion">
amend_motion</a><pre class="autodocfuncdef">
int amend_motion(string area,
                 int id,
                 string amend_text,
                 string amender)
</pre><dd><br />
This method adds an amendment to the new rule/amendment/whatever, this
rewrites the text of the amendment of whatever it is.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the amendment is to go in<br />
id - the rule update id<br />
amend_text - the amendment to make<br />
amender - the person amending<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_for_completions">
check_for_completions</a><pre class="autodocfuncdef">
void check_for_completions(int midnight)
</pre><dd><br />
This method figures out all the current things and when they completed.
<br />

<dt class="autodocfuncname"><a name="comment_on_motion">
comment_on_motion</a><pre class="autodocfuncdef">
int comment_on_motion(string area,
                      int id,
                      string comment_text,
                      string commenter)
</pre><dd><br />
This method adds a comment to the new rule/amendment/whatever.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the comment is to go in<br />
id - the rule update id<br />
comment - the comment to make<br />
commenter - the person commenting<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="complete_motion">
complete_motion</a><pre class="autodocfuncdef">
int complete_motion(string area,
                    int id)
</pre><dd><br />
This method completes the vote on the specified new rule.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to complete the rule in<br />
id - the id to complete<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="create_area">
create_area</a><pre class="autodocfuncdef">
void create_area(string area)
</pre><dd><br />
This method creates a new area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the new area
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_setting">
delete_setting</a><pre class="autodocfuncdef">
int delete_setting(string area,
                   string name,
                   string setting)
</pre><dd><br />
Deletes a setting from an area<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to use<br />
name - The name of the setting, also used as the key in the
  settings mapping.
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="find_motion">
find_motion</a><pre class="autodocfuncdef">
class nomic_motion find_motion(string area,
                               int rule_no,
                               int type)
</pre><dd><br />
This method finds the specified motion.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to look in<br />
rule_no - the rule number<br />
type - the type of the motion<br />
<br />
<dd><b>Returns:</b>
<br />the motion if successful, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="has_voted_for_motion">
has_voted_for_motion</a><pre class="autodocfuncdef">
int has_voted_for_motion(string area,
                         int id,
                         string voter)
</pre><dd><br />
This method checks to see if the person has voted for the specified
new rule/amendment/whatever<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to check<br />
id - the id to check<br />
voter - the person to check for voting<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="motion_as_html">
motion_as_html</a><pre class="autodocfuncdef">
string motion_as_html(string area,
                      class nomic_motion motion)
</pre><dd><br />
This method returns the new motion as a string.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the motion is defined in<br />
motion - the new motion to turn into a styring<br />
<br />
<dd><b>Returns:</b>
<br />the string version of the motion
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="motion_as_string">
motion_as_string</a><pre class="autodocfuncdef">
string motion_as_string(int indent,
                        string area,
                        class nomic_motion motion,
                        int brief)
</pre><dd><br />
This method returns the new motion as a string.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
indent - the indentation to putin front of all the lines<br />
area - the area the motion is defined in<br />
motion - the new motion to turn into a styring<br />
brief - disable comments<br />
<br />
<dd><b>Returns:</b>
<br />the string version of the motion
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_all_motions">
query_all_motions</a><pre class="autodocfuncdef">
class nomic_motion * query_all_motions(string area)
</pre><dd><br />
This method returns all the new rules for the specified area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to return the new rules in<br />
<br />
<dd><b>Returns:</b>
<br />the array of new rules
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_all_settings">
query_all_settings</a><pre class="autodocfuncdef">
varargs mapping query_all_settings(string area)
</pre><dd><br />
Returns the setting array for an area.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />an array of setting classes (name, short, value)
<br /><br />
<dd><b>See also:</b>
<br />query_setting
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_completion_time">
query_completion_time</a><pre class="autodocfuncdef">
int query_completion_time(string area,
                          class nomic_motion motion)
</pre><dd><br />
This method figures out the compleion time for the specified motion.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to check<br />
the - motion in the area<br />
<br />
<dd><b>Returns:</b>
<br />the completion time
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_document_handlers">
query_document_handlers</a><pre class="autodocfuncdef">
string * query_document_handlers(string area)
</pre><dd><br />
Returns an array of document handlers for an area.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />an array of document handler file names.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_motion">
query_motion</a><pre class="autodocfuncdef">
class nomic_motion query_motion(string area,
                                int id)
</pre><dd><br />
This method returns a nice new rule.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the areat to look in<br />
id - the id of the new rule to find<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_setting">
query_setting</a><pre class="autodocfuncdef">
mixed query_setting(string area,
                    string name)
</pre><dd><br />
Gets the value for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The value for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting_short, query_all_settings
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_setting_creator_short">
query_setting_creator_short</a><pre class="autodocfuncdef">
mixed query_setting_creator_short(string area,
                                  string name)
</pre><dd><br />
Gets the creator string for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The value for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting, query_setting_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_setting_lower">
query_setting_lower</a><pre class="autodocfuncdef">
mixed query_setting_lower(string area,
                          string name)
</pre><dd><br />
Gets the player-visible short name for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The description for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting, query_setting_creator_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_setting_short">
query_setting_short</a><pre class="autodocfuncdef">
string query_setting_short(string area,
                           string name)
</pre><dd><br />
Gets the player-visible short name for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The description for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting, query_setting_creator_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_setting_upper">
query_setting_upper</a><pre class="autodocfuncdef">
mixed query_setting_upper(string area,
                          string name)
</pre><dd><br />
Gets the player-visible short name for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The description for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting, query_setting_creator_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_setting_visible">
query_setting_visible</a><pre class="autodocfuncdef">
int query_setting_visible(string area,
                          string name)
</pre><dd><br />
Gets the player-visible short name for a setting.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to check<br />
name - The name of the setting to check
<br />
<br />
<dd><b>Returns:</b>
<br />The description for the setting, or 0 if it is not set. 
<br /><br />
<dd><b>See also:</b>
<br />set_setting, query_setting, query_setting_creator_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_votes_for_motion">
query_votes_for_motion</a><pre class="autodocfuncdef">
int * query_votes_for_motion(string area,
                             int id)
</pre><dd><br />
This method returns the current set of votes for the specied new rule.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to lookup the votes in<br />
id - the idea to check<br />
<br />
<dd><b>Returns:</b>
<br />({ yes, no, abstain })
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_document_handler">
remove_document_handler</a><pre class="autodocfuncdef">
int remove_document_handler(string area,
                            string document)
</pre><dd><br />
This method removes a document handler from an area.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to remove<br />
document - the full file path of the document handler<br />
<br />
<dd><b>Returns:</b>
<br />1 if the document was removed, 0 if it was not.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="rule_as_html">
rule_as_html</a><pre class="autodocfuncdef">
string rule_as_html(class nomic_rule rule)
</pre><dd><br />
This method turns a rule into html.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
rule - the rule to turn into html<br />
<br />
<dd><b>Returns:</b>
<br />the rule as a string
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="send_council_inform">
send_council_inform</a><pre class="autodocfuncdef">
void send_council_inform(string area,
                         int only_magistrates,
                         string mess)
</pre><dd><br />
This method sends informs to all the specified council of some sort of
nifty council event.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area the council is for<br />
only_magistrates - only send it to the magistrates?<br />
mess - the message to send
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_setting">
set_setting</a><pre class="autodocfuncdef">
int set_setting(string area,
                string name,
                mixed value)
</pre><dd><br />
Sets up a setting value for an area.  This is the 
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - The area to use<br />
name - The name of the setting, also used as the key in the
  settings mapping.<br />
value - The (arbitrary) value of the setting.
<br />
<br />
<dd><b>Returns:</b>
<br />0 of the setting doesn't already exist (via add_setting),
  1 if it does and has been changed.
<br /><br />
<dd><b>See also:</b>
<br />add_setting_to_area, query_setting, query_setting_short
.c<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="update_immutables">
update_immutables</a><pre class="autodocfuncdef">
void update_immutables(string area)
</pre><dd><br />
This method updates the immutable laws with the new set of general rules.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to update.
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="vote_for_motion">
vote_for_motion</a><pre class="autodocfuncdef">
int vote_for_motion(string area,
                    int id,
                    int vote_type,
                    string voter)
</pre><dd><br />
This method votes for the specified ammentment/whatever.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - the area to vote in<br />
id - the id to vote for<br />
vote_type - the type of the vote<br />
voter - the person is voting<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure
<br /><br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

