]> jfr.im git - irc/quakenet/newserv.git/blame - core/modules.h
Don't unload modules at shutdown when we're running on Valgrind.
[irc/quakenet/newserv.git] / core / modules.h
CommitLineData
2c5db955
CP
1/* modules.h */
2
3#ifndef __MODULES_H
4#define __MODULES_H
5
6#include "../lib/sstring.h"
7
2fb74c5e
CP
8#include <time.h>
9
2c5db955
CP
10#define MODULENAMELEN 40
11#define MODULEDESCLEN 200
12
13typedef struct {
14 sstring *name;
15 void *handle;
87698d77 16 const char *version;
2fb74c5e
CP
17 const char *buildid;
18 time_t loadedsince;
2c5db955
CP
19} module;
20
21void initmodules();
22int insmod(char *modulename);
23int getindex(char *modulename);
24int isloaded(char *modulename);
95ab9d6b 25int rmmod(char *modulename, int close);
2fb74c5e 26char *lsmod(int index, const char **ver, const char **buildid, time_t *loadedsince);
3fa581ac 27void preparereload(char *modulename);
28void reloadmarked(void);
65f2c6a3 29void safereload(char *themodule);
83951d54 30void newserv_shutdown();
4e4920a4 31void *ndlsym(char *module, char *fn);
83951d54 32
33extern int newserv_shutdown_pending;
87698d77 34
2c5db955 35#endif