/[cvs]/eggdrop1.8/src/mod/module.h
ViewVC logotype

Contents of /eggdrop1.8/src/mod/module.h

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


Revision 1.1.1.1 - (show annotations) (download) (as text) (vendor branch)
Mon Jul 26 21:11:06 2010 UTC (9 years, 11 months ago) by simple
Branch: eggheads
CVS Tags: v1
Changes since 1.1: +0 -0 lines
File MIME type: text/x-csrc
Imported Eggdrop 1.6.20

1 /*
2 * module.h
3 *
4 * $Id: module.h,v 1.95 2010/07/08 19:23:06 pseudo Exp $
5 */
6 /*
7 * Copyright (C) 1997 Robey Pointer
8 * Copyright (C) 1999 - 2010 Eggheads Development Team
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 */
24
25 #ifndef _EGG_MOD_MODULE_H
26 #define _EGG_MOD_MODULE_H
27
28 /* Just include *all* the include files...it's slower but EASIER */
29 #include "src/main.h"
30 #include "modvals.h"
31 #include "src/tandem.h"
32
33 /*
34 * This file contains all the horrible stuff required to do the lookup
35 * table for symbols, rather than getting the OS to do it, since most
36 * OS's require all symbols resolved, this can cause a problem with
37 * some modules.
38 *
39 * This is intimately related to the table in `modules.c'. Don't change
40 * the files unless you have flamable underwear.
41 *
42 * Do not read this file whilst unless heavily sedated, I will not be
43 * held responsible for mental break-downs caused by this file <G>
44 */
45
46 #undef nmalloc
47 #undef nfree
48 #undef nrealloc
49 #undef feof
50 #undef user_malloc
51 #undef dprintf
52 #undef get_data_ptr
53 #undef wild_match
54 #undef wild_match_per
55 #undef wild_match_partial_case
56 #undef maskhost
57 #undef maskban
58 #undef user_realloc
59 #undef Context
60 #undef ContextNote
61 #undef Assert
62
63 /* Compability functions. */
64 #ifdef egg_inet_aton
65 # undef egg_inet_aton
66 #endif
67 #ifdef egg_vsnprintf
68 # undef egg_vsnprintf
69 #endif
70 #ifdef egg_snprintf
71 # undef egg_snprintf
72 #endif
73 #ifdef egg_memset
74 # undef egg_memset
75 #endif
76 #ifdef egg_strcasecmp
77 # undef egg_strcasecmp
78 #endif
79 #ifdef egg_strncasecmp
80 # undef egg_strncasecmp
81 #endif
82
83 #if defined (__CYGWIN__) && !defined(STATIC)
84 # define EXPORT_SCOPE __declspec(dllexport)
85 #else
86 # define EXPORT_SCOPE
87 #endif
88
89 /* Version checks for modules. */
90 #define EGG_IS_MIN_VER(ver) ((ver) <= EGG_VERSION)
91 #define EGG_IS_MAX_VER(ver) ((ver) >= EGG_VERSION)
92
93 /* Redefine for module-relevance */
94
95 /* 0 - 3 */
96 #define nmalloc(x) (((void *(*)())global[0])((x),MODULE_NAME,__FILE__,__LINE__))
97 #define nfree(x) (global[1]((x),MODULE_NAME,__FILE__,__LINE__))
98 #ifdef DEBUG_CONTEXT
99 # define Context (global[2](__FILE__, __LINE__, MODULE_NAME))
100 #else
101 # define Context do {} while (0)
102 #endif
103 #define module_rename ((int (*)(char *, char *))global[3])
104 /* 4 - 7 */
105 #define module_register ((int (*)(char *, Function *, int, int))global[4])
106 #define module_find ((module_entry * (*)(char *,int,int))global[5])
107 #define module_depend ((Function *(*)(char *,char *,int,int))global[6])
108 #define module_undepend ((int(*)(char *))global[7])
109 /* 8 - 11 */
110 #define add_bind_table ((p_tcl_bind_list(*)(const char *,int,IntFunc))global[8])
111 #define del_bind_table ((void (*) (p_tcl_bind_list))global[9])
112 #define find_bind_table ((p_tcl_bind_list(*)(const char *))global[10])
113 #define check_tcl_bind ((int (*) (p_tcl_bind_list,const char *,struct flag_record *,const char *, int))global[11])
114 /* 12 - 15 */
115 #define add_builtins ((int (*) (p_tcl_bind_list, cmd_t *))global[12])
116 #define rem_builtins ((int (*) (p_tcl_bind_list, cmd_t *))global[13])
117 #define add_tcl_commands ((void (*) (tcl_cmds *))global[14])
118 #define rem_tcl_commands ((void (*) (tcl_cmds *))global[15])
119 /* 16 - 19 */
120 #define add_tcl_ints ((void (*) (tcl_ints *))global[16])
121 #define rem_tcl_ints ((void (*) (tcl_ints *))global[17])
122 #define add_tcl_strings ((void (*) (tcl_strings *))global[18])
123 #define rem_tcl_strings ((void (*) (tcl_strings *))global[19])
124 /* 20 - 23 */
125 #define base64_to_int ((int (*) (char *))global[20])
126 #define int_to_base64 ((char * (*) (int))global[21])
127 #define int_to_base10 ((char * (*) (int))global[22])
128 #define simple_sprintf ((int (*)())global[23])
129 /* 24 - 27 */
130 #define botnet_send_zapf ((void (*)(int, char *, char *, char *))global[24])
131 #define botnet_send_zapf_broad ((void (*)(int, char *, char *, char *))global[25])
132 #define botnet_send_unlinked ((void (*)(int, char *, char *))global[26])
133 #define botnet_send_bye ((void(*)(void))global[27])
134 /* 28 - 31 */
135 #define botnet_send_chat ((void(*)(int,char*,char*))global[28])
136 #define botnet_send_filereject ((void(*)(int,char*,char*,char*))global[29])
137 #define botnet_send_filesend ((void(*)(int,char*,char*,char*))global[30])
138 #define botnet_send_filereq ((void(*)(int,char*,char*,char*))global[31])
139 /* 32 - 35 */
140 #define botnet_send_join_idx ((void(*)(int,int))global[32])
141 #define botnet_send_part_idx ((void(*)(int,char *))global[33])
142 #define updatebot ((void(*)(int,char*,char,int))global[34])
143 #define nextbot ((int (*)(char *))global[35])
144 /* 36 - 39 */
145 #define zapfbot ((void (*)(int))global[36])
146 #define n_free ((void (*)(void *,char *, int))global[37])
147 #define u_pass_match ((int (*)(struct userrec *,char *))global[38])
148 #define user_malloc(x) ((void *(*)(int,char *,int))global[39])(x,__FILE__,__LINE__)
149 /* 40 - 43 */
150 #define get_user ((void *(*)(struct user_entry_type *,struct userrec *))global[40])
151 #define set_user ((int(*)(struct user_entry_type *,struct userrec *,void *))global[41])
152 #define add_entry_type ((int (*) ( struct user_entry_type * ))global[42])
153 #define del_entry_type ((int (*) ( struct user_entry_type * ))global[43])
154 /* 44 - 47 */
155 #define get_user_flagrec ((void (*)(struct userrec *, struct flag_record *, const char *))global[44])
156 #define set_user_flagrec ((void (*)(struct userrec *, struct flag_record *, const char *))global[45])
157 #define get_user_by_host ((struct userrec * (*)(char *))global[46])
158 #define get_user_by_handle ((struct userrec *(*)(struct userrec *,char *))global[47])
159 /* 48 - 51 */
160 #define find_entry_type ((struct user_entry_type * (*) ( char * ))global[48])
161 #define find_user_entry ((struct user_entry * (*)( struct user_entry_type *, struct userrec *))global[49])
162 #define adduser ((struct userrec *(*)(struct userrec *,char*,char*,char*,int))global[50])
163 #define deluser ((int (*)(char *))global[51])
164 /* 52 - 55 */
165 #define addhost_by_handle ((void (*) (char *, char *))global[52])
166 #define delhost_by_handle ((int(*)(char *,char *))global[53])
167 #define readuserfile ((int (*)(char *,struct userrec **))global[54])
168 #define write_userfile ((void(*)(int))global[55])
169 /* 56 - 59 */
170 #define geticon ((char (*) (int))global[56])
171 #define clear_chanlist ((void (*)(void))global[57])
172 #define reaffirm_owners ((void (*)(void))global[58])
173 #define change_handle ((int(*)(struct userrec *,char*))global[59])
174 /* 60 - 63 */
175 #define write_user ((int (*)(struct userrec *, FILE *,int))global[60])
176 #define clear_userlist ((void (*)(struct userrec *))global[61])
177 #define count_users ((int(*)(struct userrec *))global[62])
178 #define sanity_check ((int(*)(int))global[63])
179 /* 64 - 67 */
180 #define break_down_flags ((void (*)(const char *,struct flag_record *,struct flag_record *))global[64])
181 #define build_flags ((void (*)(char *, struct flag_record *, struct flag_record *))global[65])
182 #define flagrec_eq ((int(*)(struct flag_record*,struct flag_record *))global[66])
183 #define flagrec_ok ((int(*)(struct flag_record*,struct flag_record *))global[67])
184 /* 68 - 71 */
185 #define shareout (*(Function *)(global[68]))
186 #define dprintf (global[69])
187 #define chatout (global[70])
188 #define chanout_but ((void(*)())global[71])
189 /* 72 - 75 */
190 #define check_validity ((int (*) (char *,IntFunc))global[72])
191 #define egg_list_delete ((int (*)( struct list_type **, struct list_type *))global[73])
192 #define egg_list_append ((int (*) ( struct list_type **, struct list_type *))global[74])
193 #define egg_list_contains ((int (*) (struct list_type *, struct list_type *))global[75])
194 /* 76 - 79 */
195 #define answer ((int (*) (int,char *,unsigned long *,unsigned short *,int))global[76])
196 #define getmyip ((IP (*) (void))global[77])
197 #define neterror ((void (*) (char *))global[78])
198 #define tputs ((void (*) (int, char *,unsigned int))global[79])
199 /* 80 - 83 */
200 #define new_dcc ((int (*) (struct dcc_table *, int))global[80])
201 #define lostdcc ((void (*) (int))global[81])
202 #define getsock ((int (*) (int))global[82])
203 #define killsock ((void (*) (int))global[83])
204 /* 84 - 87 */
205 #define open_listen ((int (*) (int *))global[84])
206 #define open_telnet_dcc ((int (*) (int,char *,char *))global[85])
207 #define get_data_ptr(x) ((void *(*)(int,char*,int))global[86])(x,__FILE__,__LINE__)
208 #define open_telnet ((int (*) (char *, int))global[87])
209 /* 88 - 91 */
210 #define check_tcl_event ((void * (*) (const char *))global[88])
211 #define my_memcpy ((void * (*) (void *, const void *, size_t))global[89])
212 #define my_atoul ((IP(*)(char *))global[90])
213 #define my_strcpy ((int (*)(char *, const char *))global[91])
214 /* 92 - 95 */
215 #define dcc (*(struct dcc_t **)global[92])
216 #define chanset (*(struct chanset_t **)(global[93]))
217 #define userlist (*(struct userrec **)global[94])
218 #define lastuser (*(struct userrec **)(global[95]))
219 /* 96 - 99 */
220 #define global_bans (*(maskrec **)(global[96]))
221 #define global_ign (*(struct igrec **)(global[97]))
222 #define password_timeout (*(int *)(global[98]))
223 #define share_greet (*(int *)global[99])
224 /* 100 - 103 */
225 #define max_dcc (*(int *)global[100])
226 #define require_p (*(int *)global[101])
227 #define ignore_time (*(int *)(global[102]))
228 /* was use_console_r <Wcc[02/02/03]> */
229 /* 104 - 107 */
230 #define reserved_port_min (*(int *)(global[104]))
231 #define reserved_port_max (*(int *)(global[105]))
232 #define raw_log (*(int *)(global[106]))
233 #define noshare (*(int *)(global[107]))
234 /* 108 - 111 */
235 /* 108: gban_total -- UNUSED (Eule) */
236 #define make_userfile (*(int*)global[109])
237 #define default_flags (*(int*)global[110])
238 #define dcc_total (*(int*)global[111])
239 /* 112 - 115 */
240 #define tempdir ((char *)(global[112]))
241 #define natip ((char *)(global[113]))
242 #define hostname ((char *)(global[114]))
243 #define origbotname ((char *)(global[115]))
244 /* 116 - 119 */
245 #define botuser ((char *)(global[116]))
246 #define admin ((char *)(global[117]))
247 #define userfile ((char *)global[118])
248 #define ver ((char *)global[119])
249 /* 120 - 123 */
250 #define notify_new ((char *)global[120])
251 #define helpdir ((char *)global[121])
252 #define Version ((char *)global[122])
253 #define botnetnick ((char *)global[123])
254 /* 124 - 127 */
255 #define DCC_CHAT_PASS (*(struct dcc_table *)(global[124]))
256 #define DCC_BOT (*(struct dcc_table *)(global[125]))
257 #define DCC_LOST (*(struct dcc_table *)(global[126]))
258 #define DCC_CHAT (*(struct dcc_table *)(global[127]))
259 /* 128 - 131 */
260 #define interp (*(Tcl_Interp **)(global[128]))
261 #define now (*(time_t*)global[129])
262 #define findanyidx ((int (*)(int))global[130])
263 #define findchan ((struct chanset_t *(*)(char *))global[131])
264 /* 132 - 135 */
265 #define cmd_die (global[132])
266 #define days ((void (*)(time_t,time_t,char *))global[133])
267 #define daysago ((void (*)(time_t,time_t,char *))global[134])
268 #define daysdur ((void (*)(time_t,time_t,char *))global[135])
269 /* 136 - 139 */
270 #define ismember ((memberlist * (*) (struct chanset_t *, char *))global[136])
271 #define newsplit ((char *(*)(char **))global[137])
272 #define splitnick ((char *(*)(char **))global[138])
273 #define splitc ((void (*)(char *,char *,char))global[139])
274 /* 140 - 143 */
275 #define addignore ((void (*) (char *, char *, char *,time_t))global[140])
276 #define match_ignore ((int (*)(char *))global[141])
277 #define delignore ((int (*)(char *))global[142])
278 #define fatal (global[143])
279 /* 144 - 147 */
280 #define xtra_kill ((void (*)(struct user_entry *))global[144])
281 #define xtra_unpack ((void (*)(struct userrec *, struct user_entry *))global[145])
282 #define movefile ((int (*) (char *, char *))global[146])
283 #define copyfile ((int (*) (char *, char *))global[147])
284 /* 148 - 151 */
285 #define do_tcl ((void (*)(char *, char *))global[148])
286 #define readtclprog ((int (*)(const char *))global[149])
287 #define get_language ((char *(*)(int))global[150])
288 #define def_get ((void *(*)(struct userrec *, struct user_entry *))global[151])
289 /* 152 - 155 */
290 #define makepass ((void (*) (char *))global[152])
291 #define wild_match ((int (*)(const char *, const char *))global[153])
292 #define maskaddr ((void (*)(const char *, char *, int))global[154])
293 #define show_motd ((void(*)(int))global[155])
294 /* 156 - 159 */
295 #define tellhelp ((void(*)(int, char *, struct flag_record *, int))global[156])
296 #define showhelp ((void(*)(char *, char *, struct flag_record *, int))global[157])
297 #define add_help_reference ((void(*)(char *))global[158])
298 #define rem_help_reference ((void(*)(char *))global[159])
299 /* 160 - 163 */
300 #define touch_laston ((void (*)(struct userrec *,char *,time_t))global[160])
301 #define add_mode ((void (*)(struct chanset_t *,char,char,char *))(*(Function**)(global[161])))
302 #define rmspace ((void (*)(char *))global[162])
303 #define in_chain ((int (*)(char *))global[163])
304 /* 164 - 167 */
305 #define add_note ((int (*)(char *,char*,char*,int,int))global[164])
306 #define del_lang_section ((int(*)(char *))global[165])
307 #define detect_dcc_flood ((int (*) (time_t *,struct chat_info *,int))global[166])
308 #define flush_lines ((void(*)(int,struct chat_info*))global[167])
309 /* 168 - 171 */
310 #define expected_memory ((int(*)(void))global[168])
311 #define tell_mem_status ((void(*)(char *))global[169])
312 #define do_restart (*(int *)(global[170]))
313 #define check_tcl_filt ((const char *(*)(int, const char *))global[171])
314 /* 172 - 175 */
315 #define add_hook(a,b) (((void (*) (int, Function))global[172])(a,b))
316 #define del_hook(a,b) (((void (*) (int, Function))global[173])(a,b))
317 #define H_dcc (*(p_tcl_bind_list *)(global[174]))
318 #define H_filt (*(p_tcl_bind_list *)(global[175]))
319 /* 176 - 179 */
320 #define H_chon (*(p_tcl_bind_list *)(global[176]))
321 #define H_chof (*(p_tcl_bind_list *)(global[177]))
322 #define H_load (*(p_tcl_bind_list *)(global[178]))
323 #define H_unld (*(p_tcl_bind_list *)(global[179]))
324 /* 180 - 183 */
325 #define H_chat (*(p_tcl_bind_list *)(global[180]))
326 #define H_act (*(p_tcl_bind_list *)(global[181]))
327 #define H_bcst (*(p_tcl_bind_list *)(global[182]))
328 #define H_bot (*(p_tcl_bind_list *)(global[183]))
329 /* 184 - 187 */
330 #define H_link (*(p_tcl_bind_list *)(global[184]))
331 #define H_disc (*(p_tcl_bind_list *)(global[185]))
332 #define H_away (*(p_tcl_bind_list *)(global[186]))
333 #define H_nkch (*(p_tcl_bind_list *)(global[187]))
334 /* 188 - 191 */
335 #define USERENTRY_BOTADDR (*(struct user_entry_type *)(global[188]))
336 #define USERENTRY_BOTFL (*(struct user_entry_type *)(global[189]))
337 #define USERENTRY_HOSTS (*(struct user_entry_type *)(global[190]))
338 #define USERENTRY_PASS (*(struct user_entry_type *)(global[191]))
339 /* 192 - 195 */
340 #define USERENTRY_XTRA (*(struct user_entry_type *)(global[192]))
341 #define user_del_chan ((void(*)(char *))(global[193]))
342 #define USERENTRY_INFO (*(struct user_entry_type *)(global[194]))
343 #define USERENTRY_COMMENT (*(struct user_entry_type *)(global[195]))
344 /* 196 - 199 */
345 #define USERENTRY_LASTON (*(struct user_entry_type *)(global[196]))
346 #define putlog (global[197])
347 #define botnet_send_chan ((void(*)(int,char*,char*,int,char*))global[198])
348 #define list_type_kill ((void(*)(struct list_type *))global[199])
349 /* 200 - 203 */
350 #define logmodes ((int(*)(char *))global[200])
351 #define masktype ((const char *(*)(int))global[201])
352 #define stripmodes ((int(*)(char *))global[202])
353 #define stripmasktype ((const char *(*)(int))global[203])
354 /* 204 - 207 */
355 #define sub_lang ((void(*)(int,char *))global[204])
356 #define online_since (*(int *)(global[205]))
357 #define cmd_loadlanguage ((int (*)(struct userrec *,int,char *))global[206])
358 #define check_dcc_attrs ((int (*)(struct userrec *,int))global[207])
359 /* 208 - 211 */
360 #define check_dcc_chanattrs ((int (*)(struct userrec *,char *,int,int))global[208])
361 #define add_tcl_coups ((void (*) (tcl_coups *))global[209])
362 #define rem_tcl_coups ((void (*) (tcl_coups *))global[210])
363 #define botname ((char *)(global[211]))
364 /* 212 - 215 */
365 /* 212: remove_gunk() -- UNUSED (drummer) */
366 #define check_tcl_chjn ((void (*) (const char *,const char *,int,char,int,const char *))global[213])
367 #define sanitycheck_dcc ((int (*)(char *, char *, char *, char *))global[214])
368 #define isowner ((int (*)(char *))global[215])
369 /* 216 - 219 */
370 /* 216: min_dcc_port -- UNUSED (guppy) */
371 /* 217: max_dcc_port -- UNUSED (guppy) */
372 #define rfc_casecmp ((int(*)(char *, char *))(*(Function**)(global[218])))
373 #define rfc_ncasecmp ((int(*)(char *, char *, int *))(*(Function**)(global[219])))
374 /* 220 - 223 */
375 #define global_exempts (*(maskrec **)(global[220]))
376 #define global_invites (*(maskrec **)(global[221]))
377 /* 222: ginvite_total -- UNUSED (Eule) */
378 /* 223: gexempt_total -- UNUSED (Eule) */
379 /* 224 - 227 */
380 #define H_event (*(p_tcl_bind_list *)(global[224]))
381 #define use_exempts (*(int *)(global[225])) /* drummer/Jason */
382 #define use_invites (*(int *)(global[226])) /* drummer/Jason */
383 #define force_expire (*(int *)(global[227])) /* Rufus */
384 /* 228 - 231 */
385 #define add_lang_section ((void(*)(char *))global[228])
386 #define user_realloc(x,y) ((void *(*)(void *,int,char *,int))global[229])((x),(y),__FILE__,__LINE__)
387 #define nrealloc(x,y) (((void *(*)())global[230])((x),(y),MODULE_NAME,__FILE__,__LINE__))
388 #define xtra_set ((int(*)(struct userrec *,struct user_entry *, void *))global[231])
389 /* 232 - 235 */
390 #ifdef DEBUG_CONTEXT
391 # define ContextNote(note) (global[232](__FILE__, __LINE__, MODULE_NAME, note))
392 #else
393 # define ContextNote(note) do {} while (0)
394 #endif
395 #ifdef DEBUG_ASSERT
396 # define Assert(expr) do { \
397 if (!(expr)) \
398 (global[233](__FILE__, __LINE__, MODULE_NAME)); \
399 } while (0)
400 #else
401 # define Assert(expr) do {} while (0)
402 #endif
403 #define allocsock ((int(*)(int sock,int options))global[234])
404 #define call_hostbyip ((void(*)(IP, char *, int))global[235])
405 /* 236 - 239 */
406 #define call_ipbyhost ((void(*)(char *, IP, int))global[236])
407 #define iptostr ((char *(*)(IP))global[237])
408 #define DCC_DNSWAIT (*(struct dcc_table *)(global[238]))
409 #define hostsanitycheck_dcc ((int(*)(char *, char *, IP, char *, char *))global[239])
410 /* 240 - 243 */
411 #define dcc_dnsipbyhost ((void (*)(char *))global[240])
412 #define dcc_dnshostbyip ((void (*)(IP))global[241])
413 #define changeover_dcc ((void (*)(int, struct dcc_table *, int))global[242])
414 #define make_rand_str ((void (*) (char *, int))global[243])
415 /* 244 - 247 */
416 #define protect_readonly (*(int *)(global[244]))
417 #define findchan_by_dname ((struct chanset_t *(*)(char *))global[245])
418 #define removedcc ((void (*) (int))global[246])
419 #define userfile_perm (*(int *)global[247])
420 /* 248 - 251 */
421 #define sock_has_data ((int(*)(int, int))global[248])
422 #define bots_in_subtree ((int (*)(tand_t *))global[249])
423 #define users_in_subtree ((int (*)(tand_t *))global[250])
424 #define egg_inet_aton ((int (*)(const char *cp, struct in_addr *addr))global[251])
425 /* 252 - 255 */
426 #define egg_snprintf (global[252])
427 #define egg_vsnprintf ((int (*)(char *, size_t, const char *, va_list))global[253])
428 #define egg_memset ((void *(*)(void *, int, size_t))global[254])
429 #define egg_strcasecmp ((int (*)(const char *, const char *))global[255])
430 /* 256 - 259 */
431 #define egg_strncasecmp ((int (*)(const char *, const char *, size_t))global[256])
432 #define is_file ((int (*)(const char *))global[257])
433 #define must_be_owner (*(int *)(global[258]))
434 #define tandbot (*(tand_t **)(global[259]))
435 /* 260 - 263 */
436 #define party (*(party_t **)(global[260]))
437 #define open_address_listen ((int (*)(IP addr, int *port))global[261])
438 #define str_escape ((char *(*)(const char *, const char, const char))global[262])
439 #define strchr_unescape ((char *(*)(char *, const char, register const char))global[263])
440 /* 264 - 267 */
441 #define str_unescape ((void (*)(char *, register const char))global[264])
442 #define egg_strcatn ((int (*)(char *dst, const char *src, size_t max))global[265])
443 #define clear_chanlist_member ((void (*)(const char *nick))global[266])
444 #define fixfrom ((char *(*)(char *))global[267])
445 /* 268 - 271 */
446 /* Please don't modify socklist directly, unless there's no other way.
447 * Its structure might be changed, or it might be completely removed,
448 * so you can't rely on it without a version-check.
449 */
450 #define socklist (*(struct sock_list **)global[268])
451 #define sockoptions ((int (*)(int, int, int))global[269])
452 #define flush_inbuf ((int (*)(int))global[270])
453 #define kill_bot ((void (*)(char *, char *))global[271])
454 /* 272 - 275 */
455 #define quit_msg ((char *)(global[272]))
456 #define module_load ((char *(*)(char *))global[273])
457 #define module_unload ((char *(*)(char *, char *))global[274])
458 #define parties (*(int *)global[275])
459 /* 276 - 279 */
460 #define tell_bottree ((void (*)(int, int))global[276])
461 #define MD5_Init ((void (*)(MD5_CTX *))global[277])
462 #define MD5_Update ((void (*)(MD5_CTX *, void *, unsigned long))global[278])
463 #define MD5_Final ((void (*)(unsigned char *, MD5_CTX *))global[279])
464 /* 280 - 283 */
465 #define wild_match_per ((int (*)(const char *, const char *))global[280])
466 #define killtransfer ((void(*)(int))global[281])
467 #define write_ignores ((int (*)(FILE *, int))global[282])
468 #define copy_to_tmp (*(int *)(global[283]))
469 /* 284 - 287 */
470 #define quiet_reject (*(int *)(global[284]))
471 #define file_readable ((int (*) (char *))global[285])
472 /* IPv6 leftovers: 286 */
473 /* IPv6 leftovers: 287 */
474 /* 288 - 291 */
475 /* IPv6 leftovers: 288 */
476 #define strip_mirc_codes ((void (*)(int, char *))global[289])
477 #define check_ansi ((int (*) (char *))global[290])
478 #define oatoi ((int (*) (const char *))global[291])
479 /* 292 - 295 */
480 #define str_isdigit ((int (*) (const char *))global[292])
481 #define remove_crlf ((void (*) (char **))global[293])
482 #define addr_match ((int (*)(const char *, const char *, int, int))global[294])
483 #define mask_match ((int (*)(const char *, const char *))global[295])
484 /* 296 - 299 */
485 #define check_conflags ((int (*) (struct flag_record *, int))global[296])
486 #define increase_socks_max ((int (*)(void))global[297])
487 #define LOG_TS ((char *)(global[298]))
488
489 /* hostmasking */
490 #define maskhost(a,b) maskaddr((a),(b),3)
491 #define maskban(a,b) maskaddr((a),(b),3)
492
493 /* host matching */
494 #define match_addr(a,b) addr_match((a),(b),0,0)
495 #define cmp_masks(a,b) addr_match((a),(b),0,1)
496
497 /* This is for blowfish module, couldnt be bothered making a whole new .h
498 * file for it ;)
499 */
500 #ifndef MAKING_ENCRYPTION
501 # define encrypt_string(a, b) \
502 (((char *(*)(char *,char*))encryption_funcs[4])(a,b))
503 # define decrypt_string(a, b) \
504 (((char *(*)(char *,char*))encryption_funcs[5])(a,b))
505 #endif
506
507 #endif /* _EGG_MOD_MODULE_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23