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

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

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


Revision 1.15 - (hide annotations) (download) (as text)
Mon Feb 3 10:43:36 2003 UTC (16 years, 8 months ago) by wcc
Branch: MAIN
Changes since 1.14: +33 -38 lines
File MIME type: text/x-csrc
* Removed protection stuff, will be added back in a module later.
* Removed klined, ques5, sentinel, and notes2 as they won't be compatable and
  are not maintained by us.

1 guppy 1.8 /*
2 tothwolf 1.11 * flags.h --
3 fabian 1.2 */
4 guppy 1.8 /*
5     * Copyright (C) 1997 Robey Pointer
6 wcc 1.14 * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
7 guppy 1.8 *
8 fabian 1.2 * This program is free software; you can redistribute it and/or
9     * modify it under the terms of the GNU General Public License
10     * as published by the Free Software Foundation; either version 2
11     * of the License, or (at your option) any later version.
12 guppy 1.8 *
13 fabian 1.2 * This program is distributed in the hope that it will be useful,
14     * but WITHOUT ANY WARRANTY; without even the implied warranty of
15     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     * GNU General Public License for more details.
17 guppy 1.8 *
18 fabian 1.2 * You should have received a copy of the GNU General Public License
19     * along with this program; if not, write to the Free Software
20     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21     */
22 tothwolf 1.11 /*
23 wcc 1.15 * $Id: flags.h,v 1.14 2003/01/02 21:33:16 wcc Exp $
24 tothwolf 1.11 */
25 fabian 1.2
26     #ifndef _EGG_FLAGS_H
27     #define _EGG_FLAGS_H
28    
29 segfault 1.1 struct flag_record {
30     int match;
31     int global;
32     int udef_global;
33     int bot;
34     int chan;
35     int udef_chan;
36     };
37    
38     #define FR_GLOBAL 0x00000001
39     #define FR_BOT 0x00000002
40     #define FR_CHAN 0x00000004
41     #define FR_OR 0x40000000
42     #define FR_AND 0x20000000
43     #define FR_ANYWH 0x10000000
44     #define FR_ALL 0x0fffffff
45 fabian 1.4
46 guppy 1.8 /*
47 fabian 1.2 * userflags:
48 wcc 1.15 * abc?efgh?j??mnop???tuvwx??
49 fabian 1.2 * + user defined A-Z
50 wcc 1.15 * unused letters: dillqrsyz
51 guppy 1.8 *
52 fabian 1.2 * botflags:
53     * 0123456789ab????ghi??l???p?rs???????
54     * unused letters: cdefjkmnoqtuvwxyz
55 guppy 1.8 *
56 fabian 1.2 * chanflags:
57 wcc 1.15 * a???efg?????mno?????uv????
58 fabian 1.2 * + user defined A-Z
59 wcc 1.15 * unused letters: bcdhijklpqrstwxyz
60 fabian 1.2 */
61 wcc 1.15 #define USER_VALID 0x78F273 /* all USER_ flags in use */
62     #define CHAN_VALID 0x603071 /* all flags that can be chan specific */
63     #define BOT_VALID 0x7fe689C1 /* all BOT_ flags in use */
64    
65    
66     #define USER_AUTOOP 0x00000001
67     #define USER_BOT 0x00000002
68     #define USER_C 0x00000004
69     #define USER_D 0x00000008
70     #define USER_EXEMPT 0x00000010
71     #define USER_FRIEND 0x00000020
72     #define USER_GVOICE 0x00000040
73     #define USER_H 0x00000080
74     #define USER_I 0x00000100
75     #define USER_JANITOR 0x00000200
76     #define USER_K 0x00000400
77     #define USER_L 0x00000800
78     #define USER_MASTER 0x00001000
79     #define USER_OWNER 0x00002000
80     #define USER_OP 0x00004000
81     #define USER_PARTY 0x00008000
82     #define USER_Q 0x00010000
83     #define USER_R 0x00020000
84     #define USER_S 0x00040000
85     #define USER_BOTMAST 0x00080000
86     #define USER_UNSHARED 0x00100000
87     #define USER_VOICE 0x00200000
88     #define USER_WASOPTEST 0x00400000
89 fabian 1.4 stopnethack */
90     #define USER_XFER 0x00800000 /* x user has file area access */
91     #define USER_Y 0x01000000 /* y unused */
92     #define USER_Z 0x02000000 /* z unused */
93     #define USER_DEFAULT 0x40000000 /* use default-flags */
94    
95     /* Flags specifically for bots
96     */
97     #define BOT_ALT 0x00000001 /* a auto-link here if all +h's
98     fail */
99     #define BOT_BOT 0x00000002 /* b sanity bot flag */
100     #define BOT_C 0x00000004 /* c unused */
101     #define BOT_D 0x00000008 /* d unused */
102     #define BOT_E 0x00000010 /* e unused */
103     #define BOT_F 0x00000020 /* f unused */
104     #define BOT_GLOBAL 0x00000040 /* g all channel are shared */
105     #define BOT_HUB 0x00000080 /* h auto-link to ONE of these
106     bots */
107     #define BOT_ISOLATE 0x00000100 /* i isolate party line from
108     botnet */
109     #define BOT_J 0x00000200 /* j unused */
110     #define BOT_K 0x00000400 /* k unused */
111     #define BOT_LEAF 0x00000800 /* l may not link other bots */
112     #define BOT_M 0x00001000 /* m unused */
113     #define BOT_N 0x00002000 /* n unused */
114     #define BOT_O 0x00004000 /* o unused */
115     #define BOT_PASSIVE 0x00008000 /* p share passively with this
116     bot */
117 segfault 1.1 #define BOT_Q 0x00010000 /* q unused */
118 fabian 1.4 #define BOT_REJECT 0x00020000 /* r automatically reject
119     anywhere */
120     #define BOT_AGGRESSIVE 0x00040000 /* s bot shares user files */
121     #define BOT_T 0x00080000 /* t unused */
122     #define BOT_U 0x00100000 /* u unused */
123     #define BOT_V 0x00200000 /* v unused */
124     #define BOT_W 0x00400000 /* w unused */
125     #define BOT_X 0x00800000 /* x unused */
126     #define BOT_Y 0x01000000 /* y unused */
127     #define BOT_Z 0x02000000 /* z unused */
128     #define BOT_FLAG0 0x00200000 /* 0 user-defined flag #0 */
129     #define BOT_FLAG1 0x00400000 /* 1 user-defined flag #1 */
130     #define BOT_FLAG2 0x00800000 /* 2 user-defined flag #2 */
131     #define BOT_FLAG3 0x01000000 /* 3 user-defined flag #3 */
132     #define BOT_FLAG4 0x02000000 /* 4 user-defined flag #4 */
133     #define BOT_FLAG5 0x04000000 /* 5 user-defined flag #5 */
134     #define BOT_FLAG6 0x08000000 /* 6 user-defined flag #6 */
135     #define BOT_FLAG7 0x10000000 /* 7 user-defined flag #7 */
136     #define BOT_FLAG8 0x20000000 /* 8 user-defined flag #8 */
137     #define BOT_FLAG9 0x40000000 /* 9 user-defined flag #9 */
138 segfault 1.1
139     #define BOT_SHARE (BOT_AGGRESSIVE|BOT_PASSIVE)
140    
141 fabian 1.4
142     /* Flag checking macros
143     */
144     #define chan_op(x) ((x).chan & USER_OP)
145     #define glob_op(x) ((x).global & USER_OP)
146     #define glob_master(x) ((x).global & USER_MASTER)
147     #define glob_bot(x) ((x).global & USER_BOT)
148     #define glob_owner(x) ((x).global & USER_OWNER)
149     #define chan_master(x) ((x).chan & USER_MASTER)
150     #define chan_owner(x) ((x).chan & USER_OWNER)
151     #define chan_autoop(x) ((x).chan & USER_AUTOOP)
152     #define glob_autoop(x) ((x).global & USER_AUTOOP)
153     #define chan_gvoice(x) ((x).chan & USER_GVOICE)
154     #define glob_gvoice(x) ((x).global & USER_GVOICE)
155     #define chan_voice(x) ((x).chan & USER_VOICE)
156     #define glob_voice(x) ((x).global & USER_VOICE)
157     #define chan_wasoptest(x) ((x).chan & USER_WASOPTEST)
158     #define glob_wasoptest(x) ((x).global & USER_WASOPTEST)
159     #define chan_friend(x) ((x).chan & USER_FRIEND)
160     #define glob_friend(x) ((x).global & USER_FRIEND)
161     #define glob_botmast(x) ((x).global & USER_BOTMAST)
162     #define glob_party(x) ((x).global & USER_PARTY)
163     #define glob_xfer(x) ((x).global & USER_XFER)
164 fabian 1.7 #define chan_exempt(x) ((x).chan & USER_EXEMPT)
165     #define glob_exempt(x) ((x).global & USER_EXEMPT)
166 fabian 1.4
167     #define bot_global(x) ((x).bot & BOT_GLOBAL)
168     #define bot_chan(x) ((x).chan & BOT_AGGRESSIVE)
169     #define bot_shared(x) ((x).bot & BOT_SHARE)
170    
171 segfault 1.1
172     #ifndef MAKING_MODS
173 fabian 1.4
174 fabian 1.6 void get_user_flagrec(struct userrec *, struct flag_record *, const char *);
175     void set_user_flagrec(struct userrec *, struct flag_record *, const char *);
176     void break_down_flags(const char *, struct flag_record *, struct flag_record *);
177 segfault 1.1 int build_flags(char *, struct flag_record *, struct flag_record *);
178     int flagrec_eq(struct flag_record *, struct flag_record *);
179     int flagrec_ok(struct flag_record *, struct flag_record *);
180     int sanity_check(int);
181     int chan_sanity_check(int, int);
182 ite 1.9 char geticon(struct userrec *);
183 segfault 1.1
184 tothwolf 1.11 #endif /* !MAKING_MODS */
185 fabian 1.2
186 tothwolf 1.11 #endif /* !_EGG_FLAGS_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23