Rename "realIP" to "ip" in WhoWas struct.

It could be the real IP or the proxied IP.
This commit is contained in:
Alex Jaspersen 2021-06-20 11:13:18 -07:00
parent e5c2588eab
commit b6264a43b6
3 changed files with 3 additions and 3 deletions

View file

@ -3429,7 +3429,7 @@ func whowasHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
for _, whoWas := range results {
rb.Add(nil, server.name, RPL_WHOWASUSER, cnick, whoWas.nick, whoWas.username, whoWas.hostname, "*", whoWas.realname)
if canSeeIP {
rb.Add(nil, server.name, RPL_WHOWASIP, cnick, whoWas.nick, fmt.Sprintf(client.t("was connecting from %s"), utils.IPStringToHostname(whoWas.realIP.String())))
rb.Add(nil, server.name, RPL_WHOWASIP, cnick, whoWas.nick, fmt.Sprintf(client.t("was connecting from %s"), utils.IPStringToHostname(whoWas.ip.String())))
}
}
}