3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 11:59:40 +01:00

show arbitrary IP in WHOX

This extends #1650 to cover WHO as well as WHOIS
This commit is contained in:
Shivaram Lingamneni 2022-01-09 17:24:24 -05:00
parent 1953e90720
commit dba5d3faae

View File

@ -3265,7 +3265,8 @@ func (client *Client) rplWhoReply(channel *Channel, target *Client, rb *Response
fIP := "255.255.255.255" fIP := "255.255.255.255"
if canSeeIPs || client == target { if canSeeIPs || client == target {
// you can only see a target's IP if they're you or you're an oper // you can only see a target's IP if they're you or you're an oper
fIP = target.IPString() ip, _ := target.getWhoisActually()
fIP = ip.String()
} }
params = append(params, fIP) params = append(params, fIP)
} }