]> jfr.im git - solanum.git/blobdiff - tests/ircd_util.c
Add ipv4-in-ipv6 logic to check_one_kline
[solanum.git] / tests / ircd_util.c
index b6e895d3796262c3aadbf2a415a3f8081292e4da..866969fb55e1502125762fc4cf75e76edb0a4372 100644 (file)
 #include <unistd.h>
 #include "tap/basic.h"
 
-#include "stdinc.h"
-#include "ircd_defs.h"
+#include "ircd_util.h"
+
 #include "defaults.h"
 #include "client.h"
-#include "ircd_util.h"
+#include "modules.h"
 
 #define MSG "%s:%d (%s)", __FILE__, __LINE__, __FUNCTION__
 
@@ -97,6 +97,20 @@ void ircd_util_init(const char *name)
        is_int(0, charybdis_main(ARRAY_SIZE(argv) - 1, argv), MSG);
 }
 
+void ircd_util_reload_module(const char *name)
+{
+       struct module *mod = findmodule_byname(name);
+       int origin, core;
+
+       if (ok(mod != NULL, MSG)) {
+               origin = mod->origin;
+               core = mod->core;
+               if (ok(unload_one_module(name, false), MSG)) {
+                       ok(load_one_module(name, origin, core), MSG);
+               }
+       }
+}
+
 void ircd_util_free(void)
 {
 }