mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 17:14:46 +02:00
Update modules and Makefiles so central-api & central-blocklist compile.
This commit is contained in:
@@ -210,6 +210,8 @@ DLL_FILES=\
|
||||
src/modules/botmotd.dll \
|
||||
src/modules/bot-tag.dll \
|
||||
src/modules/cap.dll \
|
||||
src/modules/central-api.dll \
|
||||
src/modules/central-blocklist.dll \
|
||||
src/modules/certfp.dll \
|
||||
src/modules/chanmodes/chanowner.dll \
|
||||
src/modules/chanmodes/chanadmin.dll \
|
||||
@@ -731,6 +733,12 @@ src/modules/bot-tag.dll: src/modules/bot-tag.c $(INCLUDES)
|
||||
src/modules/cap.dll: src/modules/cap.c $(INCLUDES)
|
||||
$(CC) $(MODCFLAGS) src/modules/cap.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/cap.pdb $(MODLFLAGS)
|
||||
|
||||
src/modules/central-api.dll: src/modules/central-api.c $(INCLUDES)
|
||||
$(CC) $(MODCFLAGS) src/modules/central-api.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/central-api.pdb $(MODLFLAGS)
|
||||
|
||||
src/modules/central-blocklist.dll: src/modules/central-blocklist.c $(INCLUDES)
|
||||
$(CC) $(MODCFLAGS) src/modules/central-blocklist.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/central-blocklist.pdb $(MODLFLAGS)
|
||||
|
||||
src/modules/certfp.dll: src/modules/certfp.c $(INCLUDES)
|
||||
$(CC) $(MODCFLAGS) src/modules/certfp.c /Fesrc/modules/ /Fosrc/modules/ /Fdsrc/modules/certfp.pdb $(MODLFLAGS)
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ MODULES= \
|
||||
standard-replies.so issued-by-tag.so \
|
||||
real-quit-reason.so \
|
||||
spamreport.so crule.so \
|
||||
central-api.so central-blocklist.so \
|
||||
$(GEOIP_CLASSIC_OBJECTS) $(GEOIP_MAXMIND_OBJECTS)
|
||||
|
||||
MODULEFLAGS=@MODULEFLAGS@
|
||||
|
||||
@@ -32,8 +32,8 @@ module
|
||||
#endif
|
||||
ModuleHeader MOD_HEADER
|
||||
= {
|
||||
"third/central-api",
|
||||
"1.0.1",
|
||||
"central-api",
|
||||
"1.0.2",
|
||||
"Acquire and set API key for unrealircd.org services",
|
||||
"UnrealIRCd Team",
|
||||
"unrealircd-6",
|
||||
@@ -71,6 +71,7 @@ static void free_config(void)
|
||||
MOD_TEST()
|
||||
{
|
||||
memset(&req, 0, sizeof(req));
|
||||
MARK_AS_OFFICIAL_MODULE(modinfo);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_CONFIGTEST, 0, capi_config_test);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_CONFIGPOSTTEST, 0, capi_config_posttest);
|
||||
return MOD_SUCCESS;
|
||||
@@ -80,6 +81,7 @@ MOD_INIT()
|
||||
{
|
||||
ModDataInfo mreq;
|
||||
|
||||
MARK_AS_OFFICIAL_MODULE(modinfo);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_CONFIGRUN, 0, capi_config_run);
|
||||
HookAddConstString(modinfo->handle, HOOKTYPE_GET_CENTRAL_API_KEY, 0, capi_get_central_api_key);
|
||||
CommandAdd(modinfo->handle, "CENTRALAPISRV", cmd_centralapisrv, MAXPARA, CMD_UNREGISTERED);
|
||||
|
||||
@@ -44,8 +44,8 @@ module
|
||||
|
||||
ModuleHeader MOD_HEADER
|
||||
= {
|
||||
"third/centralblocklist",
|
||||
"1.0.4",
|
||||
"central-blocklist",
|
||||
"1.0.5",
|
||||
"Check users at central blocklist",
|
||||
"UnrealIRCd Team",
|
||||
"unrealircd-6",
|
||||
@@ -215,6 +215,7 @@ static void free_config(void)
|
||||
MOD_TEST()
|
||||
{
|
||||
memset(&req, 0, sizeof(req));
|
||||
MARK_AS_OFFICIAL_MODULE(modinfo);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_CONFIGTEST, 0, cbl_config_test);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_CONFIGPOSTTEST, 0, cbl_config_posttest);
|
||||
return MOD_SUCCESS;
|
||||
@@ -226,6 +227,8 @@ MOD_INIT()
|
||||
|
||||
cbl_module = modinfo->handle;
|
||||
|
||||
MARK_AS_OFFICIAL_MODULE(modinfo);
|
||||
|
||||
init_config();
|
||||
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
@@ -269,7 +272,7 @@ MOD_LOAD()
|
||||
{
|
||||
config_warn("The centralblocklist module is inactive because the central api key is not set. "
|
||||
"Acquire a key via https://www.unrealircd.org/central-api/ and then "
|
||||
"make sure the third/central-api-key module is loaded and set::central-api::api-key set.");
|
||||
"make sure the central-api-key module is loaded and set::central-api::api-key set.");
|
||||
return MOD_SUCCESS;
|
||||
} else {
|
||||
safe_strdup(cfg.api_key, central_api_key);
|
||||
@@ -321,7 +324,7 @@ int cbl_config_test(ConfigFile *cf, ConfigEntry *ce, int type, int *errs)
|
||||
{
|
||||
config_error("%s:%i: the api-key is no longer configured at this place. "
|
||||
"Remove set::central-blocklist::api-key, load the "
|
||||
"third/central-api module and put the key in set::central-api::api-key",
|
||||
"central-api module and put the key in set::central-api::api-key",
|
||||
cep->file->filename, cep->line_number);
|
||||
errors++;
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user