mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
Show real IP in WHOWAS to opers with ban capability.
This commit is contained in:
parent
6786b87fbd
commit
e5c2588eab
4 changed files with 11 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue