Code: Select all
DLLFUNC int mymod_config_test(ConfigFile *, ConfigEntry *, int, int *);
DLLFUNC int mymod_config_posttest(int *);
DLLFUNC int mymod_config_run(ConfigFile *, ConfigEntry *, int);
DLLFUNC int MOD_TEST(dblog)(ModuleInfo *modinfo) {
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGTEST, mymod_config_test);
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGPOSTTEST, mymod_config_posttest);
return MOD_SUCCESS;
}
DLLFUNC int MOD_INIT(dblog)(ModuleInfo *modinfo) {
HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, mymod_config_run);
return MOD_SUCCESS;
}
If the loadmodule for my module is after the loadmodule for cloak, cloak complains that it could not find its cloak keys and the Unreal does not boot.
If the loadmodule for my module is before the loadmodule for cloak, everything seems to boot fine, however the server crashes when the first user logs in. From the core, it looks like the crash happens at the ircsprintf at cloak.c:385 because one of the KEYs is not present.
If I comment out the lines registering for the HOOKTYPE_CONFIG*, everything works as expected.
Anyone have any ideas what is going on here? I figure that its probably something to do with the HOOK dispatching, but I wanted to see if I was doing something obviously wrong before digging too far in the code.
System: CentOS 5.2, x86, UnrealIRCd 3.2.7