[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/folder_handler.c</h2>
 Folder handler for the mailer.
 Actually it does a lot more :-)
<p>
 Thanks to Wodan and Pinkfish for ideas and help. <br>
 By Turrican@Discworld, May 1995.<p>Written by Turrican<p>Started May 1995
<h2>Includes</h2>
This class includes the following files /include/player_handler.h, /include/socket_errors.h, /include/mail.h, /include/comms.h, /include/network.h, /include/mime.h and /include/board.h<h2>Method index</h2>
<ul>
<li><a href="#add_it">add_it</a>(class mail_message, int)<br/>
This method adds a message into all the correct folders and stuff.
<li><a href="#can_create_folder">can_create_folder</a>(string, string)<br/>
Can a folder with a certain name be created?
<li><a href="#check_empty">check_empty</a>(string, string)<br/>
This method checks to see if the specified players folder is empty.
<li><a href="#check_local">check_local</a>(string)<br/>
This method checks to see if the address is local.
<li><a href="#check_mail">check_mail</a>(string)<br/>
This method is called when the player logs on to determine if they have
any new mail or not.
<li><a href="#delete_account">delete_account</a>(string)<br/>
This method totaly removes the account for a particular player.
<li><a href="#delete_it">delete_it</a>(string, string, int *)<br/>
This method will attempt to the delete the specified messages from
the folder.
<li><a href="#finger_mail">finger_mail</a>(string)<br/>
This method returns the nice string used when fingering a player to
determine their mail status.
<li><a href="#get_messages">get_messages</a>(string, string)<br/>
This method returns the messages for the player in the specified
folder.
<li><a href="#load_message">load_message</a>(string, string, int)<br/>
This method loads a message for the specified player in the specified
folder.
<li><a href="#mail_count">mail_count</a>(string)<br/>
This method returns a 2 item array for the amount of mail in a persons
inbox.
<li><a href="#mark_read">mark_read</a>(string, string, int *)<br/>
This method marks the messages which are not in the unread array
in the specified folder as being read.
<li><a href="#message_path">message_path</a>(int, string)<li><a href="#move_it">move_it</a>(string, string, string, int)<br/>
This method moves the specified message from one folder to another.
<li><a href="#set_counter">set_counter</a>(int)<br/>
This method sets the current message counter.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_it">
add_it</a><pre class="autodocfuncdef">
string add_it(class mail_message mesg,
              int flag)
</pre><dd><br />
This method adds a message into all the correct folders and stuff.
This is the method that is called when a piece of mail is actually
sent.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
mesg - the message to send<br />
flag - if this is set to a non-zero value then no delivery messages will
occur<br />
<br />
<dd><b>Returns:</b>
<br />A report on which mails were successful, etc.<br /><br />
<dd><b>See also:</b>
<br /><a href="#delete_it">delete_it()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="can_create_folder">
can_create_folder</a><pre class="autodocfuncdef">
nomask int can_create_folder(string player,
                             string folder)
</pre><dd><br />
Can a folder with a certain name be created?<br />
<br /><dl>
<dd><b>Parameters:</b><br />
player - the player creating the folder<br />
folder - the name of the folder to be created<br />
<br />
<dd><b>Returns:</b>
<br />1 if the folder can be created, 0 if it can't.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_empty">
check_empty</a><pre class="autodocfuncdef">
int check_empty(string pname,
                string fname)
</pre><dd><br />
This method checks to see if the specified players folder is empty.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name to check<br />
fname - the folder name to check
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_local">
check_local</a><pre class="autodocfuncdef">
string check_local(string str)
</pre><dd><br />
This method checks to see if the address is local.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the address to check<br />
<br />
<dd><b>Returns:</b>
<br />local name for local messages, 0 for remote messages
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="check_mail">
check_mail</a><pre class="autodocfuncdef">
string check_mail(string pname)
</pre><dd><br />
This method is called when the player logs on to determine if they have
any new mail or not.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the players name to check
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_account">
delete_account</a><pre class="autodocfuncdef">
void delete_account(string pname)
</pre><dd><br />
This method totaly removes the account for a particular player.  This
will be called when a player is deleted for whatever reason.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name to delete
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="delete_it">
delete_it</a><pre class="autodocfuncdef">
void delete_it(string pname,
               string fname,
               int * deleted)
</pre><dd><br />
This method will attempt to the delete the specified messages from
the folder.  The array deleted must be an array of integers where each
number is a message number to be deleted.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the players name<br />
fname - the folder name<br />
deleted - the array of message numbers to delete from the folder
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="finger_mail">
finger_mail</a><pre class="autodocfuncdef">
string finger_mail(string pname)
</pre><dd><br />
This method returns the nice string used when fingering a player to
determine their mail status.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name to finger<br />
<br />
<dd><b>Returns:</b>
<br />the string associated with the inbox of the player
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="get_messages">
get_messages</a><pre class="autodocfuncdef">
class mail_header * get_messages(string pname,
                                 string fname)
</pre><dd><br />
This method returns the messages for the player in the specified
folder.  The return is an array of messages of type 'class mail_header'.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the players name<br />
fname - the folder name<br />
<br />
<dd><b>Returns:</b>
<br />a list of messages
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="load_message">
load_message</a><pre class="autodocfuncdef">
string load_message(string pname,
                    string fname,
                    int number)
</pre><dd><br />
This method loads a message for the specified player in the specified
folder.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the players name<br />
fname - the folder name<br />
number - the message number to open<br />
<br />
<dd><b>Returns:</b>
<br />the text of the message
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="mail_count">
mail_count</a><pre class="autodocfuncdef">
int * mail_count(string pname)
</pre><dd><br />
This method returns a 2 item array for the amount of mail in a persons
inbox.  This first index is the total number of messages and the second
is the number that are unread.
<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the players name.<br />
<br />
<dd><b>Returns:</b>
<br />a two item array.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="mark_read">
mark_read</a><pre class="autodocfuncdef">
void mark_read(string pname,
               string fname,
               int * unread)
</pre><dd><br />
This method marks the messages which are not in the unread array
in the specified folder as being read.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name<br />
fname - the folder name<br />
unread - the list of messages that are still unread
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="message_path">
message_path</a><pre class="autodocfuncdef">
string message_path(int num,
                    string prefix)
</pre>
<dt class="autodocfuncname"><a name="move_it">
move_it</a><pre class="autodocfuncdef">
int move_it(string pname,
            string from,
            string to,
            int number)
</pre><dd><br />
This method moves the specified message from one folder to another.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
pname - the player name<br />
from - the folder to move from<br />
to - the folder to move to<br />
number - the message number to move
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_counter">
set_counter</a><pre class="autodocfuncdef">
void set_counter(int x)
</pre><dd><br />
This method sets the current message counter.  This will return a
message if the counter was not valid.  This should be called in the
event that a recovery is needed if the counter screws up.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
x - the new value for the counter
<br />
<br />
<br /></dl>

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

