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 --- src/core/os_modload.c | 11 ++--------- src/core/os_modunload.c | 10 ++-------- 2 files changed, 4 insertions(+), 17 deletions(-) (limited to 'src/core') diff --git a/src/core/os_modload.c b/src/core/os_modload.c index 732d629f4..c8541bb23 100644 --- a/src/core/os_modload.c +++ b/src/core/os_modload.c @@ -76,21 +76,14 @@ void myOperServHelp(User * u) int do_modload(User * u) { char *name; - Module *m; name = strtok(NULL, ""); if (!name) { syntax_error(s_OperServ, u, "MODLOAD", OPER_MODULE_LOAD_SYNTAX); return MOD_CONT; } - m = findModule(name); - if (!m) { - m = createModule(name); - mod_current_module = m; - mod_current_user = u; - mod_current_op = 1; - } else { + if (!queueModuleLoad(name, u)) notice_lang(s_OperServ, u, OPER_MODULE_LOAD_FAIL, name); - } + return MOD_CONT; } diff --git a/src/core/os_modunload.c b/src/core/os_modunload.c index 315c7a7c4..6bfb00595 100644 --- a/src/core/os_modunload.c +++ b/src/core/os_modunload.c @@ -75,7 +75,6 @@ void myOperServHelp(User * u) int do_modunload(User * u) { char *name; - Module *m; name = strtok(NULL, ""); if (!name) { @@ -83,13 +82,8 @@ int do_modunload(User * u) OPER_MODULE_UNLOAD_SYNTAX); return MOD_CONT; } - m = findModule(name); - if (m) { - mod_current_user = u; - mod_current_module = m; - mod_current_op = 2; - } else { + if (!queueModuleUnload(name, u)) notice_lang(s_OperServ, u, OPER_MODULE_REMOVE_FAIL, name); - } + return MOD_CONT; } -- cgit