mirror of
https://github.com/pissnet/pissircd.git
synced 2025-04-30 18:45:05 +01:00
Update cloaking key mismatch error and rename some stuff.
This commit is contained in:
parent
5100d4863c
commit
ec8f54ec26
5 changed files with 11 additions and 9 deletions
|
@ -2253,7 +2253,7 @@ _UNREAL_ERROR(_hook_error_incompatible, "Incompatible hook function. Check argum
|
|||
|
||||
/* Callback types */
|
||||
#define CALLBACKTYPE_CLOAK 1
|
||||
#define CALLBACKTYPE_CLOAKKEYCSUM 2
|
||||
#define CALLBACKTYPE_CLOAK_KEY_CHECKSUM 2
|
||||
#define CALLBACKTYPE_CLOAK_EX 3
|
||||
#define CALLBACKTYPE_BLACKLIST_CHECK 4
|
||||
#define CALLBACKTYPE_REPUTATION_STARTTIME 5
|
||||
|
@ -2398,7 +2398,7 @@ enum EfunctionType {
|
|||
#define MOD_LOAD() DLLFUNC int Mod_Load(ModuleInfo *modinfo)
|
||||
#define MOD_UNLOAD() DLLFUNC int Mod_Unload(ModuleInfo *modinfo)
|
||||
|
||||
#define CLOAK_KEYCRC RCallbacks[CALLBACKTYPE_CLOAKKEYCSUM] != NULL ? RCallbacks[CALLBACKTYPE_CLOAKKEYCSUM]->func.stringfunc() : "nil"
|
||||
#define CLOAK_KEY_CHECKSUM RCallbacks[CALLBACKTYPE_CLOAK_KEY_CHECKSUM] != NULL ? RCallbacks[CALLBACKTYPE_CLOAK_KEY_CHECKSUM]->func.stringfunc() : "nil"
|
||||
|
||||
#ifdef DYNAMIC_LINKING
|
||||
#include "modversion.h"
|
||||
|
|
|
@ -61,7 +61,7 @@ MOD_UNLOAD()
|
|||
* parv[1] = max global count
|
||||
* parv[2] = time of end sync
|
||||
* parv[3] = unreal protocol using (numeric)
|
||||
* parv[4] = cloak-crc (> u2302)
|
||||
* parv[4] = cloak key check (> u2302)
|
||||
* parv[5] = free(**)
|
||||
* parv[6] = free(**)
|
||||
* parv[7] = free(**)
|
||||
|
@ -128,12 +128,14 @@ CMD_FUNC(cmd_netinfo)
|
|||
log_data_integer("their_link_protocol", protocol),
|
||||
log_data_integer("our_link_protocol", UnrealProtocol));
|
||||
}
|
||||
strlcpy(buf, CLOAK_KEYCRC, sizeof(buf));
|
||||
strlcpy(buf, CLOAK_KEY_CHECKSUM, sizeof(buf));
|
||||
if (*parv[4] != '*' && strcmp(buf, parv[4]))
|
||||
{
|
||||
unreal_log(ULOG_WARNING, "link", "CLOAK_KEY_MISMATCH", client,
|
||||
"Server $client has a DIFFERENT CLOAK KEY!!! You should fix this ASAP "
|
||||
"as this causes major issues with channel bans not working!!");
|
||||
"Server $client has a DIFFERENT CLOAK KEY (OR METHOD)!!! You should fix this ASAP!\n"
|
||||
"When the cloaking configuration is different on servers, this will cause "
|
||||
"channel bans on cloaked hosts/IPs not to work correctly, "
|
||||
"meaning users can bypass channel bans!");
|
||||
}
|
||||
SetNetInfo(client);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ MOD_TEST()
|
|||
config_error("cloak: Error while trying to install cloaking callback!");
|
||||
return MOD_FAILED;
|
||||
}
|
||||
cloak_csum = CallbackAddString(modinfo->handle, CALLBACKTYPE_CLOAKKEYCSUM, cloakcsum);
|
||||
cloak_csum = CallbackAddString(modinfo->handle, CALLBACKTYPE_CLOAK_KEY_CHECKSUM, cloakcsum);
|
||||
if (!cloak_csum)
|
||||
{
|
||||
config_error("cloak: Error while trying to install cloaking checksum callback!");
|
||||
|
|
|
@ -1481,7 +1481,7 @@ int server_sync(Client *client, ConfigItem_link *aconf, int incoming)
|
|||
|
||||
sendto_one(client, NULL, "NETINFO %i %lld %i %s 0 0 0 :%s",
|
||||
irccounts.global_max, (long long)TStime(), UnrealProtocol,
|
||||
CLOAK_KEYCRC,
|
||||
CLOAK_KEY_CHECKSUM,
|
||||
NETWORK_NAME);
|
||||
|
||||
/* Send EOS (End Of Sync) to the just linked server... */
|
||||
|
|
|
@ -805,7 +805,7 @@ int stats_set(Client *client, const char *para)
|
|||
}
|
||||
sendtxtnumeric(client, "cloak-prefix: %s", CLOAK_PREFIX);
|
||||
sendtxtnumeric(client, "help-channel: %s", HELP_CHANNEL);
|
||||
sendtxtnumeric(client, "cloak-keys: %s", CLOAK_KEYCRC);
|
||||
sendtxtnumeric(client, "cloak-keys: %s", CLOAK_KEY_CHECKSUM);
|
||||
sendtxtnumeric(client, "kline-address: %s", KLINE_ADDRESS);
|
||||
if (GLINE_ADDRESS)
|
||||
sendtxtnumeric(client, "gline-address: %s", GLINE_ADDRESS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue