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:
parent
e5c2588eab
commit
b6264a43b6
@ -269,7 +269,7 @@ type WhoWas struct {
|
||||
username string
|
||||
hostname string
|
||||
realname string
|
||||
realIP net.IP
|
||||
ip net.IP
|
||||
// technically not required for WHOWAS:
|
||||
account string
|
||||
accountName string
|
||||
|
@ -436,7 +436,7 @@ func (client *Client) detailsNoMutex() (result ClientDetails) {
|
||||
result.username = client.username
|
||||
result.hostname = client.hostname
|
||||
result.realname = client.realname
|
||||
result.realIP = client.getIPNoMutex()
|
||||
result.ip = client.getIPNoMutex()
|
||||
result.nickMask = client.nickMaskString
|
||||
result.nickMaskCasefolded = client.nickMaskCasefolded
|
||||
result.account = client.account
|
||||
|
@ -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())))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user