]> jfr.im git - solanum.git/commitdiff
cap_realhost: neaten oper IP tag check
authorEd Kellett <redacted>
Sat, 24 Oct 2020 14:07:53 +0000 (15:07 +0100)
committerEd Kellett <redacted>
Sat, 24 Oct 2020 15:19:52 +0000 (16:19 +0100)
extensions/cap_realhost.c

index b7ee9f42d60c20c61ea43553706c9a3638f6db33..163989931dd6ec38e2eafdebce14f4967d48760b 100644 (file)
@@ -69,10 +69,8 @@ cap_realhost_outbound_msgbuf(void *data_)
 
        if (!IsIPSpoof(data->client) && !EmptyString(data->client->sockhost) && strcmp(data->client->sockhost, "0"))
        {
-               if (IsDynSpoof(data->client))
-                       msgbuf_append_tag(msgbuf, "solanum.chat/ip", data->client->sockhost, CLICAP_OPER_REALHOST);
-               else
-                       msgbuf_append_tag(msgbuf, "solanum.chat/ip", data->client->sockhost, CLICAP_REALHOST);
+               msgbuf_append_tag(msgbuf, "solanum.chat/ip", data->client->sockhost,
+                               IsDynSpoof(data->client) ? CLICAP_OPER_REALHOST : CLICAP_REALHOST);
        }
 
        if (!EmptyString(data->client->orighost))