Anope IRC Services  Version 1.8
modules.h
Go to the documentation of this file.
1 /* Modular support
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at team@anope.org
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  */
12 
13 #ifndef MODULES_H
14 #define MODULES_H
15 
16 #include <time.h>
17 #include "services.h"
18 #include <stdio.h>
19 
20 /* Cross OS compatibility macros */
21 #ifdef _WIN32
22 typedef HMODULE ano_module_t;
23 
24 #define ano_modopen(file) LoadLibrary(file)
25 /* ano_moderr in modules.c */
26 #define ano_modsym(file, symbol) (void *)GetProcAddress(file, symbol)
27 #define ano_modclose(file) FreeLibrary(file) ? 0 : 1
28 #define ano_modclearerr() SetLastError(0)
29 #define MODULE_EXT ".dll"
30 
31 #else
32 typedef void * ano_module_t;
33 
34 #define ano_modopen(file) dlopen(file, RTLD_LAZY)
35 #define ano_moderr() dlerror()
36 #define ano_modsym(file, symbol) dlsym(file, DL_PREFIX symbol)
37 #define ano_modclose(file) dlclose(file)
38 /* We call dlerror() here because it clears the module error after being
39  * called. This previously read 'errno = 0', but that didn't work on
40  * all POSIX-compliant architectures. This way the error is guaranteed
41  * to be cleared, POSIX-wise. -GD
42  */
43 #define ano_modclearerr() dlerror()
44 #define MODULE_EXT ".so"
45 
46 #endif
47 
48 
49 /*************************************************************************/
50 #define CMD_HASH(x) (((x)[0]&31)<<5 | ((x)[1]&31)) /* Will gen a hash from a string :) */
51 #define MAX_CMD_HASH 1024
52 
53 #define MOD_STOP 1
54 #define MOD_CONT 0
55 
56 #define HOSTSERV HS_cmdTable /* using HOSTSERV etc. looks nicer than HS_cmdTable for modules */
57 #define BOTSERV BS_cmdTable
58 #define MEMOSERV MS_cmdTable
59 #define NICKSERV NS_cmdTable
60 #define CHANSERV CS_cmdTable
61 #define HELPSERV HE_cmdTable
62 #define OPERSERV OS_cmdTable
63 #define IRCD IRCD_cmdTable
64 #define MODULE_HASH Module_table
65 #define EVENT EVENT_cmdTable
66 #define EVENTHOOKS HOOK_cmdTable
67 
68 /**********************************************************************
69  * Module Returns
70  **********************************************************************/
71  #define MOD_ERR_OK 0
72  #define MOD_ERR_MEMORY 1
73  #define MOD_ERR_PARAMS 2
74  #define MOD_ERR_EXISTS 3
75  #define MOD_ERR_NOEXIST 4
76  #define MOD_ERR_NOUSER 5
77  #define MOD_ERR_NOLOAD 6
78  #define MOD_ERR_NOUNLOAD 7
79  #define MOD_ERR_SYNTAX 8
80  #define MOD_ERR_NODELETE 9
81  #define MOD_ERR_UNKNOWN 10
82  #define MOD_ERR_FILE_IO 11
83  #define MOD_ERR_NOSERVICE 12
84  #define MOD_ERR_NO_MOD_NAME 13
85 
86 /*************************************************************************/
87 /* Macros to export the Module API functions/variables */
88 #ifndef _WIN32
89 #define MDE
90 #else
91 #ifndef MODULE_COMPILE
92 #define MDE __declspec(dllexport)
93 #else
94 #define MDE __declspec(dllimport)
95 #endif
96 #endif
97 /*************************************************************************/
98 
101 
102 /*************************************************************************/
103 /* Structure for information about a *Serv command. */
104 
105 typedef struct Command_ Command;
106 typedef struct CommandHash_ CommandHash;
107 typedef struct Module_ Module;
108 typedef struct ModuleLang_ ModuleLang;
109 typedef struct ModuleHash_ ModuleHash;
110 typedef struct ModuleQueue_ ModuleQueue;
111 typedef struct Message_ Message;
112 typedef struct MessageHash_ MessageHash;
114 typedef struct EvtMessage_ EvtMessage;
116 typedef struct EvtHook_ EvtHook;
117 typedef struct EvtHookHash_ EvtHookHash;
118 
130 
131 struct ModuleLang_ {
132  int argc;
133  char **argv;
134 };
135 
136 struct Module_ {
137  char *name;
138  char *filename;
139  void *handle;
140  time_t time;
141  char *version;
142  char *author;
143 
145 
146  void (*nickHelp)(User *u); /* service 1 */
147  void (*chanHelp)(User *u); /* 2 */
148  void (*memoHelp)(User *u); /* 3 */
149  void (*botHelp)(User *u); /* 4 */
150  void (*operHelp)(User *u); /* 5 */
151  void (*hostHelp)(User *u); /* 6 */
152  void (*helpHelp)(User *u); /* 7 */
153 
154 /* CommandHash *cmdList[MAX_CMD_HASH]; */
157 };
158 
159 struct ModuleHash_ {
160  char *name;
163 };
164 
165 struct ModuleQueue_ {
168  User *u;
169 
171 };
172 
173 struct Command_ {
174  char *name;
175  int (*routine)(User *u);
176  int (*has_priv)(User *u); /* Returns 1 if user may use command, else 0 */
177 
178  /* Regrettably, these are hard-coded to correspond to current privilege
179  * levels (v4.0). Suggestions for better ways to do this are
180  * appreciated.
181  */
182  int helpmsg_all; /* Displayed to all users; -1 = no message */
183  int helpmsg_reg; /* Displayed to regular users only */
184  int helpmsg_oper; /* Displayed to Services operators only */
185  int helpmsg_admin; /* Displayed to Services admins only */
186  int helpmsg_root; /* Displayed to Services root only */
187  char *help_param1;
188  char *help_param2;
189  char *help_param3;
190  char *help_param4;
191 
192  /* Module related stuff */
193  int core; /* Can this command be deleted? */
194  char *mod_name; /* Name of the module who owns us, NULL for core's */
195  char *service; /* Service we provide this command for */
196  int (*all_help)(User *u);
197  int (*regular_help)(User *u);
198  int (*oper_help)(User *u);
199  int (*admin_help)(User *u);
200  int (*root_help)(User *u);
201 
202  Command *next; /* Next command responsible for the same command */
203 };
204 
205 struct CommandHash_ {
206  char *name; /* Name of the command */
207  Command *c; /* Actual command */
208  CommandHash *next; /* Next command */
209 };
210 
211 struct Message_ {
212  char *name;
213  int (*func)(char *source, int ac, char **av);
214  int core;
215  char *mod_name;
217 };
218 
219 struct MessageHash_ {
220  char *name;
223 };
224 
226  char *name;
227  char *owner_name;
228  time_t when;
229  int (*func)(int argc, char *argv[]);
230  int argc;
231  char **argv;
233 };
234 
235 struct EvtMessage_ {
236  char *name;
237  int (*func)(char *source, int ac, char **av);
238  int core;
239  char *mod_name;
241 };
242 
244  char *name;
247 };
248 
249 
250 struct EvtHook_ {
251  int (*func)(int argc, char **argv);
252  int core;
253  char *name;
254  char *mod_name;
256 };
257 
258 struct EvtHookHash_ {
259  char *name;
262 };
263 
264 
265 /*************************************************************************/
266 /* Module Managment Functions */
267 MDE Module *createModule(char *filename); /* Create a new module, using the given name */
268 int destroyModule(Module *m); /* Delete the module */
269 int addModule(Module *m); /* Add a module to the module hash */
270 int delModule(Module *m); /* Remove a module from the module hash */
271 MDE Module *findModule(char *name); /* Find a module */
272 int loadModule(Module *m,User *u); /* Load the given module into the program */
273 int encryption_module_init(void); /* Load the encryption module */
274 int protocol_module_init(void); /* Load the IRCD Protocol Module up*/
275 int unloadModule(Module *m, User *u); /* Unload the given module from the pro */
276 int prepForUnload(Module *m); /* Prepare the module for unload */
277 MDE void moduleAddVersion(const char *version);
278 MDE void moduleAddAuthor(const char *author);
279 void modules_init(void);
280 void modules_delayed_init(void);
281 void moduleCallBackPrepForUnload(char *mod_name);
283 MDE char *moduleGetLastBuffer(void);
284 MDE void moduleSetHelpHelp(void (*func) (User * u));
285 MDE void moduleDisplayHelp(int service, User *u);
286 MDE void moduleSetHostHelp(void (*func) (User * u));
287 MDE void moduleSetOperHelp(void (*func) (User * u));
288 MDE void moduleSetBotHelp(void (*func) (User * u));
289 MDE void moduleSetMemoHelp(void (*func) (User * u));
290 MDE void moduleSetChanHelp(void (*func) (User * u));
291 MDE void moduleSetNickHelp(void (*func) (User * u));
292 MDE int moduleAddHelp(Command * c, int (*func) (User * u));
293 MDE int moduleAddRegHelp(Command * c, int (*func) (User * u));
294 MDE int moduleAddOperHelp(Command * c, int (*func) (User * u));
295 MDE int moduleAddAdminHelp(Command * c, int (*func) (User * u));
296 MDE int moduleAddRootHelp(Command * c, int (*func) (User * u));
297 MDE void moduleSetType(MODType type);
299 extern MDE char *mod_current_module_name;
300 extern MDE char *mod_current_buffer;
301 extern MDE int mod_current_op;
302 extern MDE User *mod_current_user;
303 
305 /*************************************************************************/
306 /*************************************************************************/
307 /* Command Managment Functions */
308 MDE Command *createCommand(const char *name,int (*func)(User *u),int (*has_priv)(User *u),int help_all, int help_reg, int help_oper, int help_admin,int help_root);
309 MDE int destroyCommand(Command *c); /* destroy a command */
310 MDE int addCoreCommand(CommandHash *cmdTable[], Command *c); /* Add a command to a command table */
311 MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos);
312 MDE int addCommand(CommandHash *cmdTable[], Command *c,int pos);
313 MDE int delCommand(CommandHash *cmdTable[], Command *c,char *mod_name); /* Del a command from a cmd table */
314 MDE int moduleDelCommand(CommandHash *cmdTable[],char *name); /* Del a command from a cmd table */
315 MDE Command *findCommand(CommandHash *cmdTable[], const char *name); /* Find a command */
316 
317 /*************************************************************************/
318 
319 /* Message Managment Functions */
320 MDE Message *createMessage(const char *name,int (*func)(char *source, int ac, char **av));
321 Message *findMessage(MessageHash *msgTable[], const char *name); /* Find a Message */
322 MDE int addMessage(MessageHash *msgTable[], Message *m, int pos); /* Add a Message to a Message table */
323 MDE int addCoreMessage(MessageHash *msgTable[], Message *m); /* Add a Message to a Message table */
324 MDE int moduleAddMessage(Message *m, int pos);
325 int delMessage(MessageHash *msgTable[], Message *m, char *mod_name); /* Del a Message from a msg table */
326 MDE int moduleDelMessage(char *name);
327 int destroyMessage(Message *m); /* destroy a Message*/
328 
329 /*************************************************************************/
330 
331 MDE EvtMessage *createEventHandler(char *name, int (*func) (char *source, int ac, char **av));
332 EvtMessage *findEventHandler(EvtMessageHash * msgEvtTable[], const char *name);
333 int addCoreEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
335 MDE int moduleEventDelHandler(char *name);
336 int delEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm, char *mod_name);
338 int addEventHandler(EvtMessageHash * msgEvtTable[], EvtMessage * evm);
339 
340 MDE EvtHook *createEventHook(char *name, int (*func) (int argc, char **argv));
341 EvtHook *findEventHook(EvtHookHash * HookEvtTable[], const char *name);
342 int addCoreEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh);
343 MDE int moduleAddEventHook(EvtHook * evh);
344 MDE int moduleEventDelHook(const char *name);
345 int delEventHook(EvtHookHash * HookEvtTable[], EvtHook * evh, char *mod_name);
346 int destroyEventHook(EvtHook * evh);
347 extern char *mod_current_evtbuffer;
348 
349 MDE void moduleInsertLanguage(int langNumber, int ac, char **av);
350 MDE void moduleNoticeLang(char *source, User *u, int number, ...);
351 MDE char *moduleGetLangString(User * u, int number);
352 MDE void moduleDeleteLanguage(int langNumber);
353 
354 /*************************************************************************/
355 
356 MDE int moduleAddCallback(char *name,time_t when,int (*func)(int argc, char *argv[]),int argc, char **argv);
357 MDE void moduleDelCallback(char *name);
358 
359 MDE char *moduleGetData(ModuleData **md, char *key); /* Get the value for this key from this struct */
360 MDE int moduleAddData(ModuleData **md, char *key, char *value); /* Set the value for this key for this struct */
361 MDE void moduleDelData(ModuleData **md, char *key); /* Delete this key/value pair */
362 MDE void moduleDelAllData(ModuleData **md); /* Delete all key/value pairs for this module for this struct */
363 void moduleDelAllDataMod(Module *m); /* remove all module data from all structs for this module */
364 int moduleDataDebug(ModuleData **md); /* Allow for debug output of a moduleData struct */
365 MDE boolean moduleMinVersion(int major,int minor,int patch,int build); /* Checks if the current version of anope is before or after a given verison */
366 
367 /*************************************************************************/
368 /* Module Queue Operations */
369 MDE int queueModuleLoad(char *name, User *u);
370 MDE int queueModuleUnload(char *name, User *u);
372 
373 /*************************************************************************/
374 /* Some IRCD protocol module support functions */
375 
377 MDE void updateProtectDetails(char *level_info_protect_word, char *level_info_protectme_word, char *fant_protect_add, char *fant_protect_del, char *level_protect_word, char *protect_set_mode, char *protect_unset_mode);
378 
379 /************************************************************************/
380 
381 #endif
382 /* EOF */
void * handle
Definition: modules.h:139
int delModule(Module *m)
Definition: modules.c:439
Command * next
Definition: modules.h:202
void moduleCallBackPrepForUnload(char *mod_name)
Definition: modules.c:1968
CommandHash * next
Definition: modules.h:208
int core
Definition: modules.h:238
char * mod_name
Definition: modules.h:215
ModuleHash * next
Definition: modules.h:162
char ** argv
Definition: modules.h:133
int(* root_help)(User *u)
Definition: modules.h:200
int core
Definition: modules.h:252
MDE void moduleNoticeLang(char *source, User *u, int number,...)
Definition: modules.c:2680
MDE void updateProtectDetails(char *level_info_protect_word, char *level_info_protectme_word, char *fant_protect_add, char *fant_protect_del, char *level_protect_word, char *protect_set_mode, char *protect_unset_mode)
Definition: modules.c:2512
int destroyMessage(Message *m)
Definition: modules.c:1739
MDE int queueModuleUnload(char *name, User *u)
Definition: modules.c:2822
MDE char * mod_current_buffer
Definition: modules.c:54
MessageHash * msgList[MAX_CMD_HASH]
Definition: modules.h:155
MDE int moduleAddOperHelp(Command *c, int(*func)(User *u))
Definition: modules.c:2036
Command * c
Definition: modules.h:207
void(* helpHelp)(User *u)
Definition: modules.h:152
int addModule(Module *m)
Definition: modules.c:404
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
Definition: modules.c:1597
MDE int mod_current_op
char * mod_name
Definition: modules.h:254
MDE int moduleAddRegHelp(Command *c, int(*func)(User *u))
Definition: modules.c:2050
EvtHook * evh
Definition: modules.h:260
#define MAX_CMD_HASH
Definition: modules.h:51
int(* func)(char *source, int ac, char **av)
Definition: modules.h:237
MessageHash * next
Definition: modules.h:222
int helpmsg_oper
Definition: modules.h:184
int destroyModule(Module *m)
Definition: modules.c:362
EvtHook * next
Definition: modules.h:255
char * help_param3
Definition: modules.h:189
ModuleLang lang[NUM_LANGS]
Definition: modules.h:156
int delEventHandler(EvtMessageHash *msgEvtTable[], EvtMessage *evm, char *mod_name)
Definition: events.c:611
int argc
Definition: modules.h:132
int(* func)(char *source, int ac, char **av)
Definition: modules.h:213
int(* regular_help)(User *u)
Definition: modules.h:197
char * name
Definition: modules.h:259
void moduleDelAllDataMod(Module *m)
Definition: modules.c:2384
char * mod_current_evtbuffer
Definition: events.c:18
MDE int moduleEventDelHook(const char *name)
Definition: events.c:583
EvtMessage * next
Definition: modules.h:240
MDE int queueModuleLoad(char *name, User *u)
Definition: modules.c:2801
#define MDE
Definition: modules.h:89
char * name
Definition: modules.h:244
#define EVENTHOOKS
Definition: modules.h:66
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
Definition: modules.c:1470
char * mod_name
Definition: modules.h:239
void modules_init(void)
Definition: modules.c:91
#define IRCD
Definition: modules.h:63
EvtMessageHash * next
Definition: modules.h:246
char * service
Definition: modules.h:195
char * help_param2
Definition: modules.h:188
int(* func)(int argc, char *argv[])
Definition: modules.h:229
#define NUM_LANGS
Definition: services.h:1333
MDE void moduleAddAuthor(const char *author)
Definition: modules.c:1772
int helpmsg_all
Definition: modules.h:182
#define HOSTSERV
Definition: modules.h:56
MDE void moduleSetType(MODType type)
Definition: modules.c:818
MDE char * moduleGetLastBuffer(void)
Definition: modules.c:1988
MDE char * moduleGetLangString(User *u, int number)
Definition: modules.c:2731
char * version
Definition: modules.h:141
char * help_param1
Definition: modules.h:187
int destroyEventHook(EvtHook *evh)
Definition: events.c:781
char * filename
Definition: modules.h:138
MDE void moduleSetMemoHelp(void(*func)(User *u))
Definition: modules.c:2102
int(* all_help)(User *u)
Definition: modules.h:196
MDE void moduleDelData(ModuleData **md, char *key)
Definition: modules.c:2301
#define OPERSERV
Definition: modules.h:62
void(* hostHelp)(User *u)
Definition: modules.h:151
char * name
Definition: modules.h:220
MDE EvtMessage * createEventHandler(char *name, int(*func)(char *source, int ac, char **av))
Definition: events.c:281
int core
Definition: modules.h:193
MDE void moduleCallBackDeleteEntry(ModuleCallBack *prev)
Definition: modules.c:1870
MDE void handleModuleOperationQueue(void)
Definition: modules.c:2840
MDE Module * findModule(char *name)
Definition: modules.c:473
#define MODULE_HASH
Definition: modules.h:64
char * name
Definition: modules.h:174
int moduleDataDebug(ModuleData **md)
Definition: modules.c:2205
void(* botHelp)(User *u)
Definition: modules.h:149
Definition: modules.h:99
int(* func)(int argc, char **argv)
Definition: modules.h:251
char * name
Definition: modules.h:236
int destroyEventHandler(EvtMessage *evm)
Definition: events.c:759
int(* routine)(User *u)
Definition: modules.h:175
void(* memoHelp)(User *u)
Definition: modules.h:148
int helpmsg_root
Definition: modules.h:186
MDE void moduleAddVersion(const char *version)
Definition: modules.c:1760
User * u
Definition: modules.h:168
char ** argv
Definition: modules.h:231
int addEventHandler(EvtMessageHash *msgEvtTable[], EvtMessage *evm)
Definition: events.c:391
ModuleCallBack * next
Definition: modules.h:232
ModuleOperation op
Definition: modules.h:167
MDE int moduleAddEventHandler(EvtMessage *evm)
Definition: events.c:498
ModuleOperation
Definition: modules.h:100
MDE void moduleDelAllData(ModuleData **md)
Definition: modules.c:2345
MDE void moduleDisplayHelp(int service, User *u)
Definition: modules.c:2162
MDE void moduleSetChanHelp(void(*func)(User *u))
Definition: modules.c:2090
MDE void moduleSetHelpHelp(void(*func)(User *u))
Definition: modules.c:2150
EvtHook * findEventHook(EvtHookHash *HookEvtTable[], const char *name)
Definition: events.c:353
MDE EvtHook * createEventHook(char *name, int(*func)(int argc, char **argv))
Definition: events.c:305
char * name
Definition: modules.h:226
MDE User * mod_current_user
Definition: modules.c:55
Command * c
Definition: ns_recover.c:17
#define CHANSERV
Definition: modules.h:60
MDE int destroyCommand(Command *c)
Definition: modules.c:1028
Message * findMessage(MessageHash *msgTable[], const char *name)
Definition: modules.c:1494
int delMessage(MessageHash *msgTable[], Message *m, char *mod_name)
Definition: modules.c:1668
#define BOTSERV
Definition: modules.h:57
MDE int addMessage(MessageHash *msgTable[], Message *m, int pos)
Definition: modules.c:1531
char * owner_name
Definition: modules.h:227
MDE int moduleAddData(ModuleData **md, char *key, char *value)
Definition: modules.c:2225
MDE int moduleAddRootHelp(Command *c, int(*func)(User *u))
Definition: modules.c:2008
int(* oper_help)(User *u)
Definition: modules.h:198
MDE void moduleSetOperHelp(void(*func)(User *u))
Definition: modules.c:2126
int encryption_module_init(void)
Definition: modules.c:158
int core
Definition: modules.h:214
Module * m
Definition: modules.h:166
MDE int moduleAddMessage(Message *m, int pos)
Definition: modules.c:1612
char * name
Definition: modules.h:137
char * mod_name
Definition: modules.h:194
int(* has_priv)(User *u)
Definition: modules.h:176
MDE boolean moduleMinVersion(int major, int minor, int patch, int build)
Definition: modules.c:2465
MDE void moduleSetBotHelp(void(*func)(User *u))
Definition: modules.c:2114
#define HELPSERV
Definition: modules.h:61
MDE void moduleInsertLanguage(int langNumber, int ac, char **av)
Definition: modules.c:2650
int addCoreEventHandler(EvtMessageHash *msgEvtTable[], EvtMessage *evm)
Definition: events.c:376
int addCoreEventHook(EvtHookHash *HookEvtTable[], EvtHook *evh)
Definition: events.c:483
#define EVENT
Definition: modules.h:65
void modules_delayed_init(void)
Definition: modules.c:235
Module * m
Definition: modules.h:161
char * name
Definition: modules.h:160
int prepForUnload(Module *m)
Definition: modules.c:830
void * ano_module_t
Definition: modules.h:32
int helpmsg_reg
Definition: modules.h:183
MDE int delCommand(CommandHash *cmdTable[], Command *c, char *mod_name)
Definition: modules.c:1367
MDE Module * mod_current_module
Definition: modules.c:52
MDE Command * findCommand(CommandHash *cmdTable[], const char *name)
Definition: modules.c:1442
EvtMessage * findEventHandler(EvtMessageHash *msgEvtTable[], const char *name)
Definition: events.c:328
#define MEMOSERV
Definition: modules.h:58
char * name
Definition: modules.h:206
MODType
Definition: modules.h:99
char * help_param4
Definition: modules.h:190
MDE void moduleSetNickHelp(void(*func)(User *u))
Definition: modules.c:2078
char * author
Definition: modules.h:142
Definition: modules.h:99
MDE int addCoreCommand(CommandHash *cmdTable[], Command *c)
Definition: modules.c:1063
MDE Command * createCommand(const char *name, int(*func)(User *u), int(*has_priv)(User *u), int help_all, int help_reg, int help_oper, int help_admin, int help_root)
Definition: modules.c:987
int protocol_module_init(void)
Definition: modules.c:183
EvtHookHash * next
Definition: modules.h:261
char * name
Definition: modules.h:253
void(* chanHelp)(User *u)
Definition: modules.h:147
MDE void moduleDelCallback(char *name)
Definition: modules.c:1927
int loadModule(Module *m, User *u)
Definition: modules.c:599
MDE int moduleAddHelp(Command *c, int(*func)(User *u))
Definition: modules.c:2064
MDE int moduleAddCallback(char *name, time_t when, int(*func)(int argc, char *argv[]), int argc, char **argv)
Definition: modules.c:1794
MDE int moduleGetConfigDirective(Directive *h)
Definition: modules.c:2553
MDE char * moduleGetData(ModuleData **md, char *key)
Definition: modules.c:2266
Message * m
Definition: modules.h:221
MDE void moduleDeleteLanguage(int langNumber)
Definition: modules.c:2763
MDE int moduleAddAdminHelp(Command *c, int(*func)(User *u))
Definition: modules.c:2022
char version[1024]
Definition: version.sh.c:24
time_t when
Definition: modules.h:228
time_t time
Definition: modules.h:140
int unloadModule(Module *m, User *u)
Definition: modules.c:747
void(* operHelp)(User *u)
Definition: modules.h:150
MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1082
int delEventHook(EvtHookHash *HookEvtTable[], EvtHook *evh, char *mod_name)
Definition: events.c:686
char * name
Definition: modules.h:212
int(* admin_help)(User *u)
Definition: modules.h:199
ModuleQueue * next
Definition: modules.h:170
EvtMessage * evm
Definition: modules.h:245
MDE void moduleSetHostHelp(void(*func)(User *u))
Definition: modules.c:2138
MDE int moduleEventDelHandler(char *name)
Definition: events.c:557
long build
Definition: version.sh.c:22
MDE int moduleDelCommand(CommandHash *cmdTable[], char *name)
Definition: modules.c:1161
MDE char * mod_current_module_name
Definition: modules.c:53
MDE int addCommand(CommandHash *cmdTable[], Command *c, int pos)
Definition: modules.c:1293
MDE int moduleDelMessage(char *name)
Definition: modules.c:1640
MODType type
Definition: modules.h:144
MDE int moduleAddEventHook(EvtHook *evh)
Definition: events.c:528
#define NICKSERV
Definition: modules.h:59
void(* nickHelp)(User *u)
Definition: modules.h:146
MDE Module * createModule(char *filename)
Definition: modules.c:325
int helpmsg_admin
Definition: modules.h:185
Message * next
Definition: modules.h:216