| 26 |
|
#define INCLUDED_modules_h |
| 27 |
|
|
| 28 |
|
#include "config.h" |
| 29 |
– |
#include "parse.h" |
| 29 |
|
|
| 30 |
< |
#include "ircd_handler.h" |
| 31 |
< |
#include "msg.h" |
| 33 |
< |
#include "memory.h" |
| 30 |
> |
|
| 31 |
> |
#define MODULE_FLAG_CORE 0x1 |
| 32 |
|
|
| 33 |
|
struct module |
| 34 |
|
{ |
| 36 |
|
char *name; |
| 37 |
|
const char *version; |
| 38 |
|
void *handle; |
| 39 |
< |
void (*modremove)(void); |
| 40 |
< |
int core; |
| 39 |
> |
void (*modinit)(void); |
| 40 |
> |
void (*modexit)(void); |
| 41 |
> |
unsigned int flags; |
| 42 |
|
}; |
| 43 |
|
|
| 44 |
|
struct module_path |
| 47 |
|
char path[PATH_MAX + 1]; |
| 48 |
|
}; |
| 49 |
|
|
| 50 |
+ |
extern dlink_list modules_list; |
| 51 |
+ |
|
| 52 |
|
/* add a path */ |
| 53 |
|
extern void mod_add_path(const char *); |
| 54 |
|
extern void mod_clear_paths(void); |
| 63 |
|
extern void add_conf_module(const char *); |
| 64 |
|
/* load all modules listed in conf */ |
| 65 |
|
extern void load_conf_modules(void); |
| 66 |
+ |
extern void modules_init(void); |
| 67 |
|
|
| 66 |
– |
extern void _modinit(void); |
| 67 |
– |
extern void _moddeinit(void); |
| 68 |
– |
|
| 69 |
– |
extern void dynlink_init(void); |
| 68 |
|
extern int unload_one_module(const char *, int); |
| 69 |
|
extern int modules_valid_suffix(const char *); |
| 70 |
< |
extern int load_one_module(const char *, int); |
| 71 |
< |
extern int load_a_module(const char *, int, int); |
| 72 |
< |
extern dlink_node *findmodule_byname(const char *); |
| 75 |
< |
extern void modules_init(void); |
| 70 |
> |
extern int load_one_module(const char *); |
| 71 |
> |
extern int load_a_module(const char *, int); |
| 72 |
> |
extern struct module *findmodule_byname(const char *); |
| 73 |
|
#endif /* INCLUDED_modules_h */ |