TinyMUSH 3.3
TinyMUSH Server
Loading...
Searching...
No Matches
mail.h
Go to the documentation of this file.
1
18#ifndef __MAIL_H
19#define __MAIL_H
20
21/* Some of this isn't implemented yet, but heralds the future! */
22#define M_ISREAD 0x0001
23#define M_CLEARED 0x0002
24#define M_URGENT 0x0004
25#define M_MASS 0x0008
26#define M_SAFE 0x0010
27#define M_TAG 0x0040
28#define M_FORWARD 0x0080
29/* 0x0100 - 0x0F00 reserved for folder numbers */
30#define M_FMASK 0xF0FF
31#define M_ALL 0x1000 /* Used in mail_selectors */
32#define M_MSUNREAD 0x2000 /* Mail selectors */
33#define M_REPLY 0x4000
34/* 0x8000 available */
35
36#define MAX_FOLDERS 15
37#define FOLDER_NAME_LEN MBUF_SIZE
38#define FolderBit(f) (256 * (f))
39
40#define Urgent(m) (m->read & M_URGENT)
41#define Mass(m) (m->read & M_MASS)
42#define M_Safe(m) (m->read & M_SAFE)
43#define Forward(m) (m->read & M_FORWARD)
44#define Tagged(m) (m->read & M_TAG)
45#define Folder(m) ((m->read & ~M_FMASK) >> 8)
46#define Read(m) (m->read & M_ISREAD)
47#define Cleared(m) (m->read & M_CLEARED)
48#define Unread(m) (!Read(m))
49#define All(ms) (ms.flags & M_ALL)
50#define ExpMail(x) (Wizard(x))
51#define Reply(m) (m->read & M_REPLY)
52
53#define MA_INC 2 /* what interval to increase the malias list */
54
55#define DASH_LINE \
56 "---------------------------------------------------------------------------"
57
58#define MAIL_ITER_ALL(mp, thing) \
59 for ((thing) = 0; (thing) < mushstate.db_top; (thing)++) \
60 for (mp = (struct mail *)nhashfind((int)thing, &mod_mail_msg_htab); mp != NULL; mp = mp->next)
61
62/* This macro requires you to put nextp = mp->next at
63 * the beginning of the loop.
64 */
65
66#define MAIL_ITER_SAFE(mp, thing, nextp) \
67 for ((thing) = 0; (thing) < mushstate.db_top; (thing)++) \
68 for (mp = (struct mail *)nhashfind((int)thing, &mod_mail_msg_htab); mp != NULL; mp = nextp)
69
70typedef unsigned int mail_flag;
71
72struct mail
73{
74 struct mail *next;
75 struct mail *prev;
76 dbref to;
77 dbref from;
78 int number;
79 char *time;
80 char *subject;
81 char *tolist;
82 char *cclist;
83 char *bcclist;
84 int read;
85};
86
88{
89 int low, high;
90 mail_flag flags;
91 dbref player;
92 int days, day_comp;
93};
94
95typedef struct mail_entry MENT;
97{
98 char *message;
99 int count;
100};
101
102extern void set_player_folder(dbref, int);
103extern struct malias *get_malias(dbref, char *);
104extern void load_malias(FILE *);
105extern void save_malias(FILE *);
106extern void malias_read(FILE *);
107extern void malias_write(FILE *);
108extern void do_malias_chown(dbref, char *, char *);
109extern void do_malias_desc(dbref, char *, char *);
110extern void do_mail_quick(dbref, char *, char *);
111extern void do_malias_rename(dbref, char *, char *);
112extern void do_malias_adminlist(dbref);
113extern void do_malias_delete(dbref, char *);
114extern void do_malias_status(dbref);
115extern void do_malias_create(dbref, char *, char *);
116extern void do_malias_list(dbref, char *);
117extern void do_malias_list_all(dbref);
118extern void do_malias_add(dbref, char *, char *);
119extern void do_malias_remove(dbref, char *, char *);
120
121#endif /* __MAIL_H */
Definition: mail.h:97
Definition: mail.h:88
Definition: mail.h:73
Definition: mail.c:130