/[cvs]/eggdrop1.9/src/flags.h
ViewVC logotype

Contents of /eggdrop1.9/src/flags.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Mon Sep 13 14:36:18 1999 UTC (20 years, 1 month ago) by segfault
Branch: MAIN
File MIME type: text/x-csrc
Initial commit based off of .29 cvs

1 struct flag_record {
2 int match;
3 int global;
4 int udef_global;
5 int bot;
6 int chan;
7 int udef_chan;
8 };
9
10 #define FR_GLOBAL 0x00000001
11 #define FR_BOT 0x00000002
12 #define FR_CHAN 0x00000004
13 #define FR_OR 0x40000000
14 #define FR_AND 0x20000000
15 #define FR_ANYWH 0x10000000
16 #define FR_ALL 0x0fffffff
17
18 /* userflags: */
19 /* abcd?fgh?jk?mnopq??tuvwx?? */
20 /* + user defined A-Z */
21 /* unused letters: eilrsyz */
22 /* botflags: */
23 /* 0123456789ab????ghi??l???p?rs??????? */
24 /* unused letters: cdefjkmnoqtuvwxyz */
25 /* chanflags: */
26 /* a??d?fg???k?mno?q?s?uv???? */
27 /* + user defined A-Z */
28 /* unused letters: bchijlprtwxyz */
29
30 #define USER_VALID 0x00f9f6ef /* all USER_ flags in use */
31 #define CHAN_VALID 0x00757469 /* all flags that can be chan specific */
32 #define BOT_VALID 0x7fe689C1 /* all BOT_ flags in use */
33
34 #define USER_AUTOOP 0x00000001 /* a auto-op */
35 #define USER_BOT 0x00000002 /* b user is a bot */
36 #define USER_COMMON 0x00000004 /* c user is actually a public irc
37 * site */
38 #define USER_DEOP 0x00000008 /* d user is global de-op */
39 #define USER_E 0x00000010 /* e unused */
40 #define USER_FRIEND 0x00000020 /* f user is global friend */
41 #define USER_GVOICE 0x00000040 /* g give voice true auto */
42 #define USER_HIGHLITE 0x00000080 /* h highlighting (bold) */
43 #define USER_I 0x00000100 /* i unused */
44 #define USER_JANITOR 0x00000200 /* j user has file area master */
45 #define USER_KICK 0x00000400 /* k user is global auto-kick */
46 #define USER_L 0x00000800 /* l unused */
47 #define USER_MASTER 0x00001000 /* m user has full bot access */
48 #define USER_OWNER 0x00002000 /* n user is the bot owner */
49 #define USER_OP 0x00004000 /* o user is +o on all channels */
50 #define USER_PARTY 0x00008000 /* p user has party line access */
51 #define USER_QUIET 0x00010000 /* q never let 'em get a voice */
52 #define USER_R 0x00020000 /* r unused */
53 #define USER_S 0x00040000 /* s unused */
54 #define USER_BOTMAST 0x00080000 /* t user is botnet master */
55 #define USER_UNSHARED 0x00100000 /* u not shared with sharebots */
56 #define USER_VOICE 0x00200000 /* v auto-voice on join */
57 #define USER_WASOPTEST 0x00400000 /* w wasop test needed for
58 * stopnethack */
59 #define USER_XFER 0x00800000 /* x user has file area access */
60 #define USER_Y 0x01000000 /* y unused */
61 #define USER_Z 0x02000000 /* z unused */
62 #define USER_DEFAULT 0x40000000 /* use default-flags */
63
64 /* flags specifically for bots */
65 #define BOT_ALT 0x00000001 /* a auto-link here if all +h's fail */
66 #define BOT_BOT 0x00000002 /* b sanity bot flag */
67 #define BOT_C 0x00000004 /* c unused */
68 #define BOT_D 0x00000008 /* d unused */
69 #define BOT_E 0x00000010 /* e unused */
70 #define BOT_F 0x00000020 /* f unused */
71 #define BOT_GLOBAL 0x00000040 /* g all channel are shared */
72 #define BOT_HUB 0x00000080 /* h auto-link to ONE of these bots */
73 #define BOT_ISOLATE 0x00000100 /* i isolate party line from botnet */
74 #define BOT_J 0x00000200 /* j unused */
75 #define BOT_K 0x00000400 /* k unused */
76 #define BOT_LEAF 0x00000800 /* l may not link other bots */
77 #define BOT_M 0x00001000 /* m unused */
78 #define BOT_N 0x00002000 /* n unused */
79 #define BOT_O 0x00004000 /* o unused */
80 #define BOT_PASSIVE 0x00008000 /* p share passively with this bot */
81 #define BOT_Q 0x00010000 /* q unused */
82 #define BOT_REJECT 0x00020000 /* r automatically reject anywhere */
83 #define BOT_AGGRESSIVE 0x00040000 /* s bot shares user files */
84 #define BOT_T 0x00080000 /* t unused */
85 #define BOT_U 0x00100000 /* u unused */
86 #define BOT_V 0x00200000 /* v unused */
87 #define BOT_W 0x00400000 /* w unused */
88 #define BOT_X 0x00800000 /* x unused */
89 #define BOT_Y 0x01000000 /* y unused */
90 #define BOT_Z 0x02000000 /* z unused */
91 #define BOT_FLAG0 0x00200000 /* 0 user-defined flag #0 */
92 #define BOT_FLAG1 0x00400000 /* 1 user-defined flag #1 */
93 #define BOT_FLAG2 0x00800000 /* 2 user-defined flag #2 */
94 #define BOT_FLAG3 0x01000000 /* 3 user-defined flag #3 */
95 #define BOT_FLAG4 0x02000000 /* 4 user-defined flag #4 */
96 #define BOT_FLAG5 0x04000000 /* 5 user-defined flag #5 */
97 #define BOT_FLAG6 0x08000000 /* 6 user-defined flag #6 */
98 #define BOT_FLAG7 0x10000000 /* 7 user-defined flag #7 */
99 #define BOT_FLAG8 0x20000000 /* 8 user-defined flag #8 */
100 #define BOT_FLAG9 0x40000000 /* 9 user-defined flag #9 */
101
102 #define BOT_SHARE (BOT_AGGRESSIVE|BOT_PASSIVE)
103
104 /* flag checking macros */
105
106 #define chan_op(x) ((x).chan & USER_OP)
107 #define glob_op(x) ((x).global & USER_OP)
108 #define chan_deop(x) ((x).chan & USER_DEOP)
109 #define glob_deop(x) ((x).global & USER_DEOP)
110 #define glob_master(x) ((x).global & USER_MASTER)
111 #define glob_bot(x) ((x).global & USER_BOT)
112 #define glob_owner(x) ((x).global & USER_OWNER)
113 #define chan_master(x) ((x).chan & USER_MASTER)
114 #define chan_owner(x) ((x).chan & USER_OWNER)
115 #define chan_autoop(x) ((x).chan & USER_AUTOOP)
116 #define glob_autoop(x) ((x).global & USER_AUTOOP)
117 #define chan_gvoice(x) ((x).chan & USER_GVOICE)
118 #define glob_gvoice(x) ((x).global & USER_GVOICE)
119 #define chan_kick(x) ((x).chan & USER_KICK)
120 #define glob_kick(x) ((x).global & USER_KICK)
121 #define chan_voice(x) ((x).chan & USER_VOICE)
122 #define glob_voice(x) ((x).global & USER_VOICE)
123 #define chan_wasoptest(x) ((x).chan & USER_WASOPTEST)
124 #define glob_wasoptest(x) ((x).global & USER_WASOPTEST)
125 #define chan_quiet(x) ((x).chan & USER_QUIET)
126 #define glob_quiet(x) ((x).global & USER_QUIET)
127 #define chan_friend(x) ((x).chan & USER_FRIEND)
128 #define glob_friend(x) ((x).global & USER_FRIEND)
129 #define glob_botmast(x) ((x).global & USER_BOTMAST)
130 #define glob_party(x) ((x).global & USER_PARTY)
131 #define glob_xfer(x) ((x).global & USER_XFER)
132 #define glob_hilite(x) ((x).global & USER_HIGHLITE)
133
134 #define bot_global(x) ((x).bot & BOT_GLOBAL)
135 #define bot_chan(x) ((x).chan & BOT_AGGRESSIVE)
136 #define bot_shared(x) ((x).bot & BOT_SHARE)
137
138 #ifndef MAKING_MODS
139 void get_user_flagrec(struct userrec *, struct flag_record *, char *);
140 void set_user_flagrec(struct userrec *, struct flag_record *, char *);
141 void break_down_flags(char *, struct flag_record *, struct flag_record *);
142 int build_flags(char *, struct flag_record *, struct flag_record *);
143 int flagrec_eq(struct flag_record *, struct flag_record *);
144 int flagrec_ok(struct flag_record *, struct flag_record *);
145 int sanity_check(int);
146 int chan_sanity_check(int, int);
147 char geticon(int);
148
149 #endif

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23