/[cvs]/eggdrop1.4/src/modules.h
ViewVC logotype

Contents of /eggdrop1.4/src/modules.h

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


Revision 1.7 - (show annotations) (download) (as text)
Sat Jul 1 06:28:03 2000 UTC (19 years, 1 month ago) by guppy
Branch: MAIN
CVS Tags: eggdrop10404, HEAD
Changes since 1.6: +3 -3 lines
File MIME type: text/x-csrc
added patches, 1.4.4?

1 /*
2 * modules.h
3 * support for modules in eggdrop
4 *
5 * by Darrin Smith (beldin@light.iinet.net.au)
6 *
7 * $Id: modules.h,v 1.6 2000/01/08 21:23:14 per Exp $
8 */
9 /*
10 * Copyright (C) 1997 Robey Pointer
11 * Copyright (C) 1999, 2000 Eggheads
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 */
27
28 #ifndef _EGG_MODULE_H
29 #define _EGG_MODULE_H
30
31 /*
32 * module related structures
33 */
34
35 #include "mod/modvals.h"
36
37 #ifndef MAKING_NUMMODS
38 /* modules specific functions */
39 /* functions called by eggdrop */
40 void do_module_report(int, int, char *);
41
42 int module_register(char *name, Function * funcs,
43 int major, int minor);
44 const char *module_load(char *module_name);
45 char *module_unload(char *module_name, char *nick);
46 module_entry *module_find(char *name, int, int);
47 Function *module_depend(char *, char *, int major, int minor);
48 int module_undepend(char *);
49 void *mod_malloc(int, char *, char *, int);
50 void *mod_realloc(void *, int, char *, char *, int);
51 void mod_free(void *ptr, char *modname, char *filename, int line);
52 void add_hook(int hook_num, Function func);
53 void del_hook(int hook_num, Function func);
54 void *get_next_hook(int hook_num, void *func);
55 extern struct hook_entry {
56 struct hook_entry *next;
57 int (*func) ();
58 } *hook_list[REAL_HOOKS];
59
60 #define call_hook(x) do { struct hook_entry *p, *pn; \
61 for (p = hook_list[x]; p; p = pn) { pn = p->next; p->func(); } } while (0)
62 int call_hook_cccc(int, char *, char *, char *, char *);
63
64 #endif
65
66 typedef struct _dependancy {
67 struct _module_entry *needed;
68 struct _module_entry *needing;
69 struct _dependancy *next;
70 int major;
71 int minor;
72 } dependancy;
73 extern dependancy *dependancy_list;
74
75 #endif /* _EGG_MODULE_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23