Thanks to Wodan and Pinkfish for ideas and help.
By Turrican@Discworld, May 1995.
-
add_it
string add_it(class mail_message mesg,
int flag)
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.
- Parameters:
mesg - the message to send
flag - if this is set to a non-zero value then no delivery messages will
occur
- Returns:
A report on which mails were successful, etc.
- See also:
delete_it()
-
can_create_folder
nomask int can_create_folder(string player,
string folder)
Can a folder with a certain name be created?
- Parameters:
player - the player creating the folder
folder - the name of the folder to be created
- Returns:
1 if the folder can be created, 0 if it can't.
-
check_empty
int check_empty(string pname,
string fname)
This method checks to see if the specified players folder is empty.
- Parameters:
pname - the player name to check
fname - the folder name to check
-
check_local
string check_local(string str)
This method checks to see if the address is local.
- Parameters:
str - the address to check
- Returns:
local name for local messages, 0 for remote messages
-
check_mail
string check_mail(string pname)
This method is called when the player logs on to determine if they have
any new mail or not.
- Parameters:
pname - the players name to check
-
delete_account
void delete_account(string pname)
This method totaly removes the account for a particular player. This
will be called when a player is deleted for whatever reason.
- Parameters:
pname - the player name to delete
-
delete_it
void delete_it(string pname,
string fname,
int * deleted)
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.
- Parameters:
pname - the players name
fname - the folder name
deleted - the array of message numbers to delete from the folder
-
finger_mail
string finger_mail(string pname)
This method returns the nice string used when fingering a player to
determine their mail status.
- Parameters:
pname - the player name to finger
- Returns:
the string associated with the inbox of the player
-
get_messages
class mail_header * get_messages(string pname,
string fname)
This method returns the messages for the player in the specified
folder. The return is an array of messages of type 'class mail_header'.
- Parameters:
pname - the players name
fname - the folder name
- Returns:
a list of messages
-
load_message
string load_message(string pname,
string fname,
int number)
This method loads a message for the specified player in the specified
folder.
- Parameters:
pname - the players name
fname - the folder name
number - the message number to open
- Returns:
the text of the message
-
mail_count
int * mail_count(string pname)
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.
- Parameters:
pname - the players name.
- Returns:
a two item array.
-
mark_read
void mark_read(string pname,
string fname,
int * unread)
This method marks the messages which are not in the unread array
in the specified folder as being read.
- Parameters:
pname - the player name
fname - the folder name
unread - the list of messages that are still unread
-
message_path
string message_path(int num,
string prefix)
-
move_it
int move_it(string pname,
string from,
string to,
int number)
This method moves the specified message from one folder to another.
- Parameters:
pname - the player name
from - the folder to move from
to - the folder to move to
number - the message number to move
-
set_counter
void set_counter(int x)
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.
- Parameters:
x - the new value for the counter