From 08c234b8508a45a575187cf0a4c6961843849a94 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Wed, 28 Sep 2005 15:52:22 +0000 Subject: BUILD : 1.7.11 (902) BUGS : NOTES : Changed how /os modload and /os modunload load/unload modules; they are now handled in a queue instead of using the mod_current_* variables git-svn-id: svn://svn.anope.org/anope/trunk@902 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@648 5417fbe8-f217-4b02-8779-1006273d7864 --- include/modules.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index ad56cbf87..f9c16f7b3 100644 --- a/include/modules.h +++ b/include/modules.h @@ -97,6 +97,7 @@ typedef void * ano_module_t; /*************************************************************************/ typedef enum { CORE,PROTOCOL,THIRD,SUPPORTED,QATESTED } MODType; +typedef enum { MOD_OP_LOAD, MOD_OP_UNLOAD } ModuleOperation; /*************************************************************************/ /* Structure for information about a *Serv command. */ @@ -106,6 +107,7 @@ typedef struct CommandHash_ CommandHash; typedef struct Module_ Module; typedef struct ModuleLang_ ModuleLang; typedef struct ModuleHash_ ModuleHash; +typedef struct ModuleQueue_ ModuleQueue; typedef struct Message_ Message; typedef struct MessageHash_ MessageHash; typedef struct ModuleCallBack_ ModuleCallBack; @@ -160,6 +162,14 @@ struct ModuleHash_ { ModuleHash *next; }; +struct ModuleQueue_ { + Module *m; + ModuleOperation op; + User *u; + + ModuleQueue *next; +}; + struct Command_ { char *name; int (*routine)(User *u); @@ -356,6 +366,12 @@ void moduleDelAllDataMod(Module *m); /* remove all module data from all stru int moduleDataDebug(ModuleData **md); /* Allow for debug output of a moduleData struct */ 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 */ +/*************************************************************************/ +/* Module Queue Operations */ +MDE int queueModuleLoad(char *name, User *u); +MDE int queueModuleUnload(char *name, User *u); +MDE void handleModuleOperationQueue(void); + /*************************************************************************/ /* Some IRCD protocol module support functions */ -- cgit