mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-24 08:08:11 -07:00
Show real IP in WHOWAS to opers with ban capability.
This commit is contained in:
@@ -269,6 +269,7 @@ type WhoWas struct {
|
||||
username string
|
||||
hostname string
|
||||
realname string
|
||||
realIP net.IP
|
||||
// technically not required for WHOWAS:
|
||||
account string
|
||||
accountName string
|
||||
@@ -598,6 +599,10 @@ func (client *Client) IP() net.IP {
|
||||
client.stateMutex.RLock()
|
||||
defer client.stateMutex.RUnlock()
|
||||
|
||||
return client.getIPNoMutex()
|
||||
}
|
||||
|
||||
func (client *Client) getIPNoMutex() net.IP {
|
||||
if client.proxiedIP != nil {
|
||||
return client.proxiedIP
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user