00001
00002
00003
00004
00005 #define NOTE_DIR "../notes"
00006
00007 #define DEF_NORMAL 0
00008 #define DEF_INCLUDE 1
00009 #define DEF_EXCLUDE 2
00010
00011 #define MAX_BOARD 5
00012
00013 #define DEFAULT_BOARD 0
00014
00015
00016 #define MAX_LINE_LENGTH 80
00017
00018
00019 #define MAX_NOTE_TEXT (4*MAX_STRING_LENGTH - 1000)
00020
00021 #define BOARD_NOTFOUND -1
00022
00023
00024 struct board_data
00025 {
00026 char *short_name;
00027 char *long_name;
00028
00029 int read_level;
00030 int write_level;
00031
00032 char *names;
00033 int force_type;
00034
00035 int purge_days;
00036
00037
00038 NOTE_DATA *note_first;
00039 bool changed;
00040
00041 };
00042
00043 typedef struct board_data BOARD_DATA;
00044
00045
00046
00047
00048 extern BOARD_DATA boards[MAX_BOARD];
00049
00050
00051
00052
00053 void finish_note (BOARD_DATA *board, NOTE_DATA *note);
00054 void free_note (NOTE_DATA *note);
00055 void load_boards (void);
00056 int board_lookup (const char *name);
00057 bool is_note_to (CHAR_DATA *ch, NOTE_DATA *note);
00058 void personal_message (const char *sender, const char *to, const char *subject, const int expire_days, const char *text);
00059 void make_note (const char* board_name, const char *sender, const char *to, const char *subject, const int expire_days, const char *text);
00060 void save_notes ();
00061
00062
00063 void handle_con_note_to (DESCRIPTOR_DATA *d, char * argument);
00064 void handle_con_note_subject (DESCRIPTOR_DATA *d, char * argument);
00065 void handle_con_note_expire (DESCRIPTOR_DATA *d, char * argument);
00066 void handle_con_note_text (DESCRIPTOR_DATA *d, char * argument);
00067 void handle_con_note_finish (DESCRIPTOR_DATA *d, char * argument);
00068
00069
00070
00071
00072 DECLARE_DO_FUN (do_note );
00073 DECLARE_DO_FUN (do_board );