3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-01-10 20:22:40 +01:00

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

@ -269,7 +269,7 @@ type WhoWas struct {
username string username string
hostname string hostname string
realname string realname string
realIP net.IP ip net.IP
// technically not required for WHOWAS: // technically not required for WHOWAS:
account string account string
accountName string accountName string

View File

@ -436,7 +436,7 @@ func (client *Client) detailsNoMutex() (result ClientDetails) {
result.username = client.username result.username = client.username
result.hostname = client.hostname result.hostname = client.hostname
result.realname = client.realname result.realname = client.realname
result.realIP = client.getIPNoMutex() result.ip = client.getIPNoMutex()
result.nickMask = client.nickMaskString result.nickMask = client.nickMaskString
result.nickMaskCasefolded = client.nickMaskCasefolded result.nickMaskCasefolded = client.nickMaskCasefolded
result.account = client.account result.account = client.account

View File

@ -3429,7 +3429,7 @@ func whowasHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
for _, whoWas := range results { for _, whoWas := range results {
rb.Add(nil, server.name, RPL_WHOWASUSER, cnick, whoWas.nick, whoWas.username, whoWas.hostname, "*", whoWas.realname) rb.Add(nil, server.name, RPL_WHOWASUSER, cnick, whoWas.nick, whoWas.username, whoWas.hostname, "*", whoWas.realname)
if canSeeIP { 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())))
} }
} }
} }