1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

METATADA: Fix unsetting "cloakhost"

Correctly re-generate the "cloaked hostname" when removing the
"cloakhost" using an empty string by passing down NULL instead of the
empty string, which results in protocol violations (for example on
WHOIS).
This commit is contained in:
Alexander Barton 2024-03-17 15:55:39 +01:00
parent 5fd195a2cd
commit 1118b0e77c

View File

@ -72,7 +72,9 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
}
if (strcasecmp(Req->argv[1], "cloakhost") == 0) {
Client_UpdateCloakedHostname(target, prefix, Req->argv[2]);
/* Set or remove a "cloaked hostname". */
Client_UpdateCloakedHostname(target, prefix,
*Req->argv[2] ? Req->argv[2] : NULL);
if (Client_Conn(target) > NONE && Client_HasMode(target, 'x'))
IRC_WriteStrClientPrefix(target, prefix,
RPL_HOSTHIDDEN_MSG, Client_ID(target),