Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

board.h

Go to the documentation of this file.
00001 /* Includes for board system */
00002 /* This is version 2 of the board system, (c) 1995-96 erwin@pip.dknet.dk */
00003 
00004 
00005 #define NOTE_DIR                "../notes" /* set it to something you like */
00006 
00007 #define DEF_NORMAL  0 /* No forced change, but default (any string)   */
00008 #define DEF_INCLUDE 1 /* 'names' MUST be included (only ONE name!)    */
00009 #define DEF_EXCLUDE 2 /* 'names' must NOT be included (one name only) */
00010 
00011 #define MAX_BOARD     5 
00012 
00013 #define DEFAULT_BOARD 0 /* default board is board #0 in the boards      */
00014                         /* It should be readable by everyone!           */
00015                         
00016 #define MAX_LINE_LENGTH 80 /* enforce a max length of 80 on text lines, reject longer lines */
00017                            /* This only applies in the Body of the note */                        
00018                            
00019 #define MAX_NOTE_TEXT (4*MAX_STRING_LENGTH - 1000)
00020                         
00021 #define BOARD_NOTFOUND -1 /* Error code from board_lookup() and board_number */
00022 
00023 /* Data about a board */
00024 struct board_data
00025 {
00026     char *short_name; /* Max 8 chars */
00027     char *long_name;  /* Explanatory text, should be no more than 40 ? chars */
00028     
00029     int read_level; /* minimum level to see board */
00030     int write_level;/* minimum level to post notes */
00031 
00032     char *names;       /* Default recipient */
00033     int force_type; /* Default action (DEF_XXX) */
00034     
00035 int purge_days; /* Default expiration */
00036     /* Non-constant data */
00037         
00038 NOTE_DATA *note_first; /* pointer to board's first note */
00039     bool changed; /* currently unused */
00040         
00041 };
00042 
00043 typedef struct board_data BOARD_DATA;
00044 
00045 
00046 /* External variables */
00047 
00048 extern BOARD_DATA boards[MAX_BOARD]; /* Declare */
00049 
00050 
00051 /* Prototypes */
00052 
00053 void finish_note (BOARD_DATA *board, NOTE_DATA *note); /* attach a note to a board */
00054 void free_note   (NOTE_DATA *note); /* deallocate memory used by a note */
00055 void load_boards (void); /* load all boards */
00056 int board_lookup (const char *name); /* Find a board with that name */
00057 bool is_note_to (CHAR_DATA *ch, NOTE_DATA *note); /* is tha note to ch? */
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 /* for nanny */
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 /* Commands */
00071 
00072 DECLARE_DO_FUN (do_note     );
00073 DECLARE_DO_FUN (do_board    );

Generated on Thu Jan 13 21:48:09 2005 for Beyond the Shadows by  doxygen 1.4.0