1 #ifndef __LEVELS_H
2 #define __LEVELS_H
3 
4 /* This is pretty much IRC specific, but I think it would be easier for
5    other chats to try to use these same levels instead of implementing too
6    difficult message leveling system (which might be done if really
7    needed..). */
8 
9 /* Message levels */
10 enum {
11 	MSGLEVEL_CRAP         = 0x0000001,
12 	MSGLEVEL_MSGS         = 0x0000002,
13 	MSGLEVEL_PUBLIC       = 0x0000004,
14 	MSGLEVEL_NOTICES      = 0x0000008,
15 	MSGLEVEL_SNOTES       = 0x0000010,
16 	MSGLEVEL_CTCPS        = 0x0000020,
17 	MSGLEVEL_ACTIONS      = 0x0000040,
18 	MSGLEVEL_JOINS        = 0x0000080,
19 	MSGLEVEL_PARTS        = 0x0000100,
20 	MSGLEVEL_QUITS        = 0x0000200,
21 	MSGLEVEL_KICKS        = 0x0000400,
22 	MSGLEVEL_MODES        = 0x0000800,
23 	MSGLEVEL_TOPICS       = 0x0001000,
24 	MSGLEVEL_WALLOPS      = 0x0002000,
25 	MSGLEVEL_INVITES      = 0x0004000,
26 	MSGLEVEL_NICKS        = 0x0008000,
27 	MSGLEVEL_DCC          = 0x0010000,
28 	MSGLEVEL_DCCMSGS      = 0x0020000,
29 	MSGLEVEL_CLIENTNOTICE = 0x0040000,
30 	MSGLEVEL_CLIENTCRAP   = 0x0080000,
31 	MSGLEVEL_CLIENTERROR  = 0x0100000,
32 	MSGLEVEL_HILIGHT      = 0x0200000,
33 
34 	MSGLEVEL_ALL          = 0x03fffff,
35 
36 	MSGLEVEL_NOHILIGHT    = 0x1000000, /* Don't highlight this message */
37 	MSGLEVEL_NO_ACT       = 0x2000000, /* Don't trigger channel activity */
38 	MSGLEVEL_NEVER        = 0x4000000, /* never ignore / never log */
39 	MSGLEVEL_LASTLOG      = 0x8000000, /* used for /lastlog */
40 
41 	MSGLEVEL_HIDDEN       = 0x10000000 /* Hidden from view */
42 };
43 
44 int level_get(const char *level);
45 int level2bits(const char *level, int *errorp);
46 char *bits2level(int bits);
47 int combine_level(int dest, const char *src);
48 
49 #endif
50