From 8a776ce65c589ae0d5345161ae84640bb40df3b2 Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Sat, 24 Oct 2020 15:07:53 +0100 Subject: [PATCH] cap_realhost: neaten oper IP tag check --- extensions/cap_realhost.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extensions/cap_realhost.c b/extensions/cap_realhost.c index b7ee9f42..16398993 100644 --- a/extensions/cap_realhost.c +++ b/extensions/cap_realhost.c @@ -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))