1
0
Fork 0
forked from External/ergo

Show real IP in WHOWAS to opers with ban capability.

This commit is contained in:
Alex Jaspersen 2021-06-20 10:26:30 -07:00
parent 6786b87fbd
commit e5c2588eab
4 changed files with 11 additions and 4 deletions

View file

@ -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
}