[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/title_handler.c</h2>
This handler will keep track of special player titles.  It will allow
them to be added or removed based on specific events.  Use the
include <player.h> to get the path to this file.<p>Written by Pinkfish<p>Started Wed Sep 27 14:00:31 PDT 2000
<h2>Includes</h2>
This class includes the following files /include/player_handler.h, /include/login.h and /include/login_handler.h<h2>Class Index</h2>
<ul><li><a href="#class_blob">blob</a>
<li><a href="#class_forced">forced</a>
</ul><h2>Method index</h2>
<ul>
<li><a href="#add_controlled_title">add_controlled_title</a>(string, string, string)<br/>
Add a method to be called to check if the person is allowed to have
the specified title.
<li><a href="#add_title_to_player">add_title_to_player</a>(string, string)<br/>
This method adds a person to the pending list for gaining a specific
title.
<li><a href="#check_player">check_player</a>(object)<br/>
This method checks a player when they logon for titles.
<li><a href="#is_allowed_multiple_title">is_allowed_multiple_title</a>(string)<br/>
This method checks to see if the title is an allowed multiple title.
<li><a href="#query_allowed_multiple_titles">query_allowed_multiple_titles</a>()<br/>
This method returns the list of allowed multiple titles.
<li><a href="#query_controlled_title">query_controlled_title</a>(string)<br/>
This method returns the blob for the controlled title.
<li><a href="#query_pending_titles">query_pending_titles</a>(string)<br/>
This method returns the list of titles pending for the specific person.
<li><a href="#remove_forced_title_from_player">remove_forced_title_from_player</a>(string, string)<br/>
This method removes a forced title from a player, if they are on currently
it immediately updates them, otherwise it waits for them to login.
<li><a href="#set_forced_title_on_player">set_forced_title_on_player</a>(string, string, int)<br/>
This method adds a forced title onto a player, if they are on currently
it immediately updates them, otherwise it waits for them to login.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_controlled_title">
add_controlled_title</a><pre class="autodocfuncdef">
void add_controlled_title(string title,
                          string ob,
                          string func)
</pre><dd><br />
Add a method to be called to check if the person is allowed to have
the specified title.  This should be added to control things like
special titles.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
title - the title to control<br />
ob - the object to call the method on<br />
function - the function to call
<br />
<br />
<dd><b>Example:</b>
<br/><pre>add_controlled_title("magistrate", NOMIC_HANDLER, "is_magistrate_somewhere");</pre><br /></dl>

<dt class="autodocfuncname"><a name="add_title_to_player">
add_title_to_player</a><pre class="autodocfuncdef">
void add_title_to_player(string person,
                         string title)
</pre><dd><br />
This method adds a person to the pending list for gaining a specific
title.  If the person is currently on then they will get the title
immediately.  If they are not on then it will be added to them when they
next log on.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the person to give the title too<br />
title - the title to give them
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_player">
check_player</a><pre class="autodocfuncdef">
void check_player(object player)
</pre><dd><br />
This method checks a player when they logon for titles.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player to check
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="is_allowed_multiple_title">
is_allowed_multiple_title</a><pre class="autodocfuncdef">
int is_allowed_multiple_title(string title)
</pre><dd><br />
This method checks to see if the title is an allowed multiple title.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
title - the title to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is allowed, 0 if not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_allowed_multiple_titles">
query_allowed_multiple_titles</a><pre class="autodocfuncdef">
string * query_allowed_multiple_titles()
</pre><dd><br />
This method returns the list of allowed multiple titles.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the list of allowed multiple titles
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_pending_titles">
query_pending_titles</a><pre class="autodocfuncdef">
string * query_pending_titles(string person)
</pre><dd><br />
This method returns the list of titles pending for the specific person.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the person to get the titles for<br />
<br />
<dd><b>Returns:</b>
<br />the array of pending titles
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_forced_title_from_player">
remove_forced_title_from_player</a><pre class="autodocfuncdef">
void remove_forced_title_from_player(string person,
                                     string title)
</pre><dd><br />
This method removes a forced title from a player, if they are on currently
it immediately updates them, otherwise it waits for them to login.  It
checks to make sure the title being removed is the current one.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the person to apply the title too<br />
title - the title to remove from them
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_forced_title_on_player">
set_forced_title_on_player</a><pre class="autodocfuncdef">
void set_forced_title_on_player(string person,
                                string title,
                                int timeout)
</pre><dd><br />
This method adds a forced title onto a player, if they are on currently
it immediately updates them, otherwise it waits for them to login.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the person to apply the title too<br />
title - the title to force on them<br />
timeout - the timeout to apply to the title
<br />
<br />
<br /></dl>

</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="query_controlled_title">
query_controlled_title</a><pre class="autodocfuncdef">
class blob query_controlled_title(string title)
</pre><dd><br />
This method returns the blob for the controlled title.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
title - the title which is controlled<br />
<br />
<dd><b>Returns:</b>
<br />the blob for the controlled title
<br /><br />
<br /></dl>

</dl>
<h2>Classes</h2>
These are nice data types for dealing with...  Data!<p>
<ul>
<li><a name="class_blob">
blob</a><pre>
class blob {
             string ob;
             string func;
}

</pre>
<li><a name="class_forced">
forced</a><pre>
class forced {
               int add;
               string title;
               int timeout;
}

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

