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

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

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


Revision 1.19 - (show annotations) (download) (as text)
Tue May 13 07:16:18 2003 UTC (16 years, 4 months ago) by stdarg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.18: +1 -1 lines
File MIME type: text/x-csrc
FILE REMOVED
* Added help to error message if tcl isn't found
* Remove some stray files

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23