Browse Source

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

It could be the real IP or the proxied IP.
tags/v2.8.0-rc1
Alex Jaspersen 3 years ago
parent
commit
b6264a43b6
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      irc/client.go
  2. 1
    1
      irc/getters.go
  3. 1
    1
      irc/handlers.go

+ 1
- 1
irc/client.go View File

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

+ 1
- 1
irc/getters.go View File

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

+ 1
- 1
irc/handlers.go View File

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

Loading…
Cancel
Save