[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/mail_track.c</h2>
This handler keeps track of who has a mailer at the moment and sends the
mail to there instead.  This also keeps track of the current mailing
lists in the system.<p>Written by Pinkfish<p>Started 1991 sometime<h2>Inherits</h2>
This class inherits the following classes std/object.c<h2>Includes</h2>
This class includes the following files /include/player_handler.h, /include/mail.h, /include/mail_track.h and /include/board.h<h2>Method index</h2>
<ul>
<li><a href="#add_controller">add_controller</a>(string, string)<br/>
This method adds a controller to the specified mailing list.
<li><a href="#add_mailer">add_mailer</a>(object, string)<br/>
This method adds in a mailer for a specific player into the current
list of mailers.
<li><a href="#add_member">add_member</a>(string, string)<br/>
This method adds a member to the specified mailing list.
<li><a href="#create_list">create_list</a>(string, string)<br/>
This method attempts to create a mailing list.
<li><a href="#delete_list">delete_list</a>(string)<br/>
This method will delete a mailing list.
<li><a href="#delete_mailer">delete_mailer</a>(object)<br/>
This method removes a mailer from the current list of mailers.
<li><a href="#delete_member">delete_member</a>(string, string)<br/>
This method removes a member from the list if they are either a
controller or a member.
<li><a href="#find_mailer">find_mailer</a>(string)<br/>
This method finds the mailer associated with a particular player.
<li><a href="#mail">mail</a>(string, string)<br/>
This is the main mail function.
<li><a href="#post_mail_to_board">post_mail_to_board</a>(string, class mail_message)<br/>
This posts a mail to a message-board.
<li><a href="#query_board_name">query_board_name</a>(string)<br/>
This methods returned the actual name of the board that is referenced
by the given alias.
<li><a href="#query_controller">query_controller</a>(string, string)<br/>
This method checks to see if the given player is a controller.
<li><a href="#query_controllers">query_controllers</a>(string)<br/>
This method returns all the current controllers of the mailing list.
<li><a href="#query_creator">query_creator</a>(string)<br/>
This method determines the creator of the list.
<li><a href="#query_list">query_list</a>(string)<br/>
This method checks to see if the specified list exists or not.
<li><a href="#query_mailing_lists">query_mailing_lists</a>()<br/>
This method returns the current mailing lists available on the
handler.
<li><a href="#query_member">query_member</a>(string, string)<br/>
This method checks to see if the given player is in the selected
mailing list.
<li><a href="#query_members">query_members</a>(string)<br/>
This returns the current members of the specified mailing list.
<li><a href="#query_msgboards">query_msgboards</a>()<br/>
This returns all the registered messageboards.
<li><a href="#query_registered_board">query_registered_board</a>(string)<br/>
This method checks whether the given name is a valid alias for a
message-board.
<li><a href="#register_msgboard">register_msgboard</a>(string, string)<br/>
This method is used to register an alias for a messageboard.
<li><a href="#remove_controller">remove_controller</a>(string, string)<br/>
This method removes a controller from the specified mailing list.
<li><a href="#remove_member">remove_member</a>(string, string)<br/>
This method removes a member from the specified mailing list.
<li><a href="#unregister_msgboard">unregister_msgboard</a>(string)<br/>
This method removes an alias for a messageboard.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_controller">
add_controller</a><pre class="autodocfuncdef">
int add_controller(string list_name,
                   string mem)
</pre><dd><br />
This method adds a controller to the specified mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the controller to add<br />
mem - the controller to add<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_controllers">query_controllers()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="add_mailer">
add_mailer</a><pre class="autodocfuncdef">
int add_mailer(object ob,
               string str)
</pre><dd><br />
This method adds in a mailer for a specific player into the current
list of mailers.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the mailer for the player<br />
str - the player the mailer is for<br />
<br />
<dd><b>Returns:</b>
<br />return 1 if successful
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_member">
add_member</a><pre class="autodocfuncdef">
int add_member(string list_name,
               string mem)
</pre><dd><br />
This method adds a member to the specified mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the mailing list to add a member too<br />
mem - the member to add<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#remove_member">remove_member()</a> and <a href="#add_member">add_member()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="create_list">
create_list</a><pre class="autodocfuncdef">
int create_list(string list,
                string creator)
</pre><dd><br />
This method attempts to create a mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list - the name of the list to create<br />
creator - the creator of the list<br />
<br />
<dd><b>Returns:</b>
<br />1 if successful, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_creator">query_creator()</a>, <a href="#query_members">query_members()</a> and <a href="#query_controllers">query_controllers()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="delete_mailer">
delete_mailer</a><pre class="autodocfuncdef">
int delete_mailer(object ob)
</pre><dd><br />
This method removes a mailer from the current list of mailers.
It removes the mailer based on the object itself<br />
<br /><dl>
<dd><b>Parameters:</b><br />
ob - the mailer object to remove<br />
<br />
<dd><b>Returns:</b>
<br />0 if unable to remove<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_mailer">add_mailer()</a> and <a href="#find_mailer">find_mailer()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="delete_member">
delete_member</a><pre class="autodocfuncdef">
int delete_member(string list_name,
                  string mem)
</pre><dd><br />
This method removes a member from the list if they are either a
controller or a member.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the list to remove the member from<br />
mem - the member to remove from the list<br />
<br />
<dd><b>Returns:</b>
<br />1 on succes, 0 on failure<br /><br />
<dd><b>See also:</b>
<br /><a href="#remove_member">remove_member()</a> and <a href="#remove_controller">remove_controller()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="find_mailer">
find_mailer</a><pre class="autodocfuncdef">
object find_mailer(string str)
</pre><dd><br />
This method finds the mailer associated with a particular player.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the player whose mailer to find.<br />
<br />
<dd><b>Returns:</b>
<br />the mailer object associated with the player<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_mailer">add_mailer()</a> and <a href="#delete_mailer">delete_mailer()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="mail">
mail</a><pre class="autodocfuncdef">
int mail(string str,
         string sub)
</pre><dd><br />
This is the main mail function.  It tries to start up a mailer with
the default address and subject.  If their is no default address then
the mailer uses it's menu mode, otherwise it sends one mail and then
leaves.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - 0 or "" for no default address<br />
sub - the default subject
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="post_mail_to_board">
post_mail_to_board</a><pre class="autodocfuncdef">
int post_mail_to_board(string target,
                       class mail_message msg)
</pre><dd><br />
This posts a mail to a message-board.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
target - the name under which the board is registered<br />
msg - the mail to post<br />
<br />
<dd><b>Returns:</b>
<br />1 if the message was posted successfully, 0 otherwise
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_board_name">
query_board_name</a><pre class="autodocfuncdef">
string query_board_name(string name)
</pre><dd><br />
This methods returned the actual name of the board that is referenced
by the given alias.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the alias to resolve<br />
<br />
<dd><b>Returns:</b>
<br />the name of the board or 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_controller">
query_controller</a><pre class="autodocfuncdef">
int query_controller(string list_name,
                     string name)
</pre><dd><br />
This method checks to see if the given player is a controller.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the name of the list<br />
name - the name to check to see if they are a controller<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_controllers">query_controllers()</a> and <a href="#query_member">query_member()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_controllers">
query_controllers</a><pre class="autodocfuncdef">
string * query_controllers(string list)
</pre><dd><br />
This method returns all the current controllers of the mailing list.
Controllers can add and remove members from a list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list - the mailing list to query the controllers for<br />
<br />
<dd><b>Returns:</b>
<br />the array of controllers
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_creator">
query_creator</a><pre class="autodocfuncdef">
string query_creator(string list_name)
</pre><dd><br />
This method determines the creator of the list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the list to get the creator of<br />
<br />
<dd><b>Returns:</b>
<br />the creator of the list<br /><br />
<dd><b>See also:</b>
<br /><a href="#create_list">create_list()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_list">
query_list</a><pre class="autodocfuncdef">
int query_list(string list)
</pre><dd><br />
This method checks to see if the specified list exists or not.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list - the list name to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if the list exists, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_mailing_lists">query_mailing_lists()</a>, <a href="#query_members">query_members()</a> and <a href="#query_member">query_member()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_mailing_lists">
query_mailing_lists</a><pre class="autodocfuncdef">
string * query_mailing_lists()
</pre><dd><br />
This method returns the current mailing lists available on the
handler.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the array of available mailing lists
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_member">
query_member</a><pre class="autodocfuncdef">
int query_member(string list_name,
                 string name)
</pre><dd><br />
This method checks to see if the given player is in the selected
mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the mailing list name<br />
name - the name of the player in the list<br />
<br />
<dd><b>Returns:</b>
<br />1 if the player is a member, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_mailing_lists">query_mailing_lists()</a>, <a href="#query_list">query_list()</a> and <a href="#query_members">query_members()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_members">
query_members</a><pre class="autodocfuncdef">
string * query_members(string list)
</pre><dd><br />
This returns the current members of the specified mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list - the mailing list to get the memebrs of<br />
<br />
<dd><b>Returns:</b>
<br />the members of the mailing list<br /><br />
<dd><b>See also:</b>
<br /><a href="#query_mailing_lists">query_mailing_lists()</a>, <a href="#query_list">query_list()</a> and <a href="#query_member">query_member()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_msgboards">
query_msgboards</a><pre class="autodocfuncdef">
string * query_msgboards()
</pre><dd><br />
This returns all the registered messageboards.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />The names of all messageboards.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_registered_board">
query_registered_board</a><pre class="autodocfuncdef">
int query_registered_board(string name)
</pre><dd><br />
This method checks whether the given name is a valid alias for a
message-board.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name to check<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is a board, 0 otherwise
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="register_msgboard">
register_msgboard</a><pre class="autodocfuncdef">
int register_msgboard(string alias,
                      string board)
</pre><dd><br />
This method is used to register an alias for a messageboard. If there already
is another board aliased like this, you have to unregister that alias first.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
alias - the string to use as an alias<br />
<br />
<dd><b>Returns:</b>
<br />1 on sucess, 0 on failure
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_controller">
remove_controller</a><pre class="autodocfuncdef">
int remove_controller(string list_name,
                      string name)
</pre><dd><br />
This method removes a controller from the specified mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the mailing list to remove the member from<br />
name - the member to remove<br />
<br />
<dd><b>See also:</b>
<br /><a href="#add_controller">add_controller()</a> and <a href="#query_controller">query_controller()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="remove_member">
remove_member</a><pre class="autodocfuncdef">
int remove_member(string list_name,
                  string mem)
</pre><dd><br />
This method removes a member from the specified mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list_name - the mailing list to remove the member from<br />
mem - the members name to remove<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 on failure<br /><br />
<dd><b>See also:</b>
<br /><a href="#add_member">add_member()</a>, <a href="#query_member">query_member()</a> and <a href="#delete_member">delete_member()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="unregister_msgboard">
unregister_msgboard</a><pre class="autodocfuncdef">
void unregister_msgboard(string alias)
</pre><dd><br />
This method removes an alias for a messageboard.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
alias - the alias to be removed
<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="delete_list">
delete_list</a><pre class="autodocfuncdef">
int delete_list(string list)
</pre><dd><br />
This method will delete a mailing list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
list - the mailing list to delete<br />
<br />
<dd><b>Returns:</b>
<br />0 if failed and 1 on success
<br /><br />
<dd><b>See also:</b>
<br /><a href="#create_list">create_list()</a><br /><br /><br /></dl>

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

