00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _EGG_FLAGS_H
00026 #define _EGG_FLAGS_H
00027
00028 struct flag_record {
00029 int match;
00030 int global;
00031 int udef_global;
00032 intptr_t bot;
00033 int chan;
00034 int udef_chan;
00035 };
00036
00037 #define FR_GLOBAL 0x00000001
00038 #define FR_BOT 0x00000002
00039 #define FR_CHAN 0x00000004
00040 #define FR_OR 0x40000000
00041 #define FR_AND 0x20000000
00042 #define FR_ANYWH 0x10000000
00043 #define FR_ALL 0x0fffffff
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #define USER_VALID 0x03fbfeff
00059 #define CHAN_VALID 0x03777c79
00060 #define BOT_VALID 0x7fe689C1
00061
00062
00063 #define USER_AUTOOP 0x00000001
00064 #define USER_BOT 0x00000002
00065 #define USER_COMMON 0x00000004
00066 #define USER_DEOP 0x00000008
00067 #define USER_EXEMPT 0x00000010
00068 #define USER_FRIEND 0x00000020
00069 #define USER_GVOICE 0x00000040
00070 #define USER_HIGHLITE 0x00000080
00071 #define USER_I 0x00000100
00072 #define USER_JANITOR 0x00000200
00073 #define USER_KICK 0x00000400
00074 #define USER_HALFOP 0x00000800
00075 #define USER_MASTER 0x00001000
00076 #define USER_OWNER 0x00002000
00077 #define USER_OP 0x00004000
00078 #define USER_PARTY 0x00008000
00079 #define USER_QUIET 0x00010000
00080 #define USER_DEHALFOP 0x00020000
00081 #define USER_S 0x00040000
00082 #define USER_BOTMAST 0x00080000
00083 #define USER_UNSHARED 0x00100000
00084 #define USER_VOICE 0x00200000
00085 #define USER_WASOPTEST 0x00400000
00086 #define USER_XFER 0x00800000
00087 #define USER_AUTOHALFOP 0x01000000
00088 #define USER_WASHALFOPTEST 0x02000000
00089 #define USER_DEFAULT 0x40000000
00090
00091
00092 #define BOT_ALT 0x00000001
00093 #define BOT_BOT 0x00000002
00094 #define BOT_C 0x00000004
00095 #define BOT_D 0x00000008
00096 #define BOT_E 0x00000010
00097 #define BOT_F 0x00000020
00098 #define BOT_GLOBAL 0x00000040
00099 #define BOT_HUB 0x00000080
00100 #define BOT_ISOLATE 0x00000100
00101 #define BOT_J 0x00000200
00102 #define BOT_K 0x00000400
00103 #define BOT_LEAF 0x00000800
00104 #define BOT_M 0x00001000
00105 #define BOT_N 0x00002000
00106 #define BOT_O 0x00004000
00107 #define BOT_PASSIVE 0x00008000
00108 #define BOT_Q 0x00010000
00109 #define BOT_REJECT 0x00020000
00110 #define BOT_AGGRESSIVE 0x00040000
00111 #define BOT_T 0x00080000
00112 #define BOT_U 0x00100000
00113 #define BOT_V 0x00200000
00114 #define BOT_W 0x00400000
00115 #define BOT_X 0x00800000
00116 #define BOT_Y 0x01000000
00117 #define BOT_Z 0x02000000
00118 #define BOT_FLAG0 0x00200000
00119 #define BOT_FLAG1 0x00400000
00120 #define BOT_FLAG2 0x00800000
00121 #define BOT_FLAG3 0x01000000
00122 #define BOT_FLAG4 0x02000000
00123 #define BOT_FLAG5 0x04000000
00124 #define BOT_FLAG6 0x08000000
00125 #define BOT_FLAG7 0x10000000
00126 #define BOT_FLAG8 0x20000000
00127 #define BOT_FLAG9 0x40000000
00128 #define BOT_SHARE (BOT_AGGRESSIVE|BOT_PASSIVE)
00129
00130
00131
00132 #define chan_op(x) ((x).chan & USER_OP)
00133 #define glob_op(x) ((x).global & USER_OP)
00134 #define chan_halfop(x) ((x).chan & USER_HALFOP)
00135 #define glob_halfop(x) ((x).global & USER_HALFOP)
00136 #define chan_deop(x) ((x).chan & USER_DEOP)
00137 #define glob_deop(x) ((x).global & USER_DEOP)
00138 #define chan_dehalfop(x) ((x).chan & USER_DEHALFOP)
00139 #define glob_dehalfop(x) ((x).global & USER_DEHALFOP)
00140 #define glob_master(x) ((x).global & USER_MASTER)
00141 #define glob_bot(x) ((x).global & USER_BOT)
00142 #define glob_owner(x) ((x).global & USER_OWNER)
00143 #define chan_master(x) ((x).chan & USER_MASTER)
00144 #define chan_owner(x) ((x).chan & USER_OWNER)
00145 #define chan_autoop(x) ((x).chan & USER_AUTOOP)
00146 #define glob_autoop(x) ((x).global & USER_AUTOOP)
00147 #define chan_autohalfop(x) ((x).chan & USER_AUTOHALFOP)
00148 #define glob_autohalfop(x) ((x).global & USER_AUTOHALFOP)
00149 #define chan_gvoice(x) ((x).chan & USER_GVOICE)
00150 #define glob_gvoice(x) ((x).global & USER_GVOICE)
00151 #define chan_kick(x) ((x).chan & USER_KICK)
00152 #define glob_kick(x) ((x).global & USER_KICK)
00153 #define chan_voice(x) ((x).chan & USER_VOICE)
00154 #define glob_voice(x) ((x).global & USER_VOICE)
00155 #define chan_wasoptest(x) ((x).chan & USER_WASOPTEST)
00156 #define glob_wasoptest(x) ((x).global & USER_WASOPTEST)
00157 #define chan_washalfoptest(x) ((x).chan & USER_WASHALFOPTEST)
00158 #define glob_washalfoptest(x) ((x).global & USER_WASHALFOPTEST)
00159 #define chan_quiet(x) ((x).chan & USER_QUIET)
00160 #define glob_quiet(x) ((x).global & USER_QUIET)
00161 #define chan_friend(x) ((x).chan & USER_FRIEND)
00162 #define glob_friend(x) ((x).global & USER_FRIEND)
00163 #define glob_botmast(x) ((x).global & USER_BOTMAST)
00164 #define glob_party(x) ((x).global & USER_PARTY)
00165 #define glob_xfer(x) ((x).global & USER_XFER)
00166 #define glob_hilite(x) ((x).global & USER_HIGHLITE)
00167 #define chan_exempt(x) ((x).chan & USER_EXEMPT)
00168 #define glob_exempt(x) ((x).global & USER_EXEMPT)
00169
00170 #define bot_global(x) ((x).bot & BOT_GLOBAL)
00171 #define bot_chan(x) ((x).chan & BOT_AGGRESSIVE)
00172 #define bot_shared(x) ((x).bot & BOT_SHARE)
00173
00174
00175 #ifndef MAKING_MODS
00176
00177 void get_user_flagrec(struct userrec *, struct flag_record *, const char *);
00178 void set_user_flagrec(struct userrec *, struct flag_record *, const char *);
00179 void break_down_flags(const char *, struct flag_record *, struct flag_record *);
00180 int build_flags(char *, struct flag_record *, struct flag_record *);
00181 int flagrec_eq(struct flag_record *, struct flag_record *);
00182 int flagrec_ok(struct flag_record *, struct flag_record *);
00183 int sanity_check(int);
00184 int chan_sanity_check(int, int);
00185 char geticon(int);
00186
00187 #endif
00188
00189 #endif