1
0
Fork 0
forked from External/ergo
RPL_WHOISACTUALLY should display some arbitrarily chosen IP address and
hostname.
This commit is contained in:
Shivaram Lingamneni 2021-08-25 22:31:38 -04:00
parent 8b2f6de3e0
commit 26cdb4cf36
3 changed files with 14 additions and 6 deletions

View file

@ -482,7 +482,8 @@ func (client *Client) getWhoisOf(target *Client, hasPrivs bool, rb *ResponseBuff
}
}
if client == target || oper.HasRoleCapab("ban") {
rb.Add(nil, client.server.name, RPL_WHOISACTUALLY, cnick, tnick, fmt.Sprintf("%s@%s", targetInfo.username, target.RawHostname()), target.IPString(), client.t("Actual user@host, Actual IP"))
ip, hostname := target.getWhoisActually()
rb.Add(nil, client.server.name, RPL_WHOISACTUALLY, cnick, tnick, fmt.Sprintf("%s@%s", targetInfo.username, hostname), utils.IPStringToHostname(ip.String()), client.t("Actual user@host, Actual IP"))
}
if client == target || oper.HasRoleCapab("samode") {
rb.Add(nil, client.server.name, RPL_WHOISMODES, cnick, tnick, fmt.Sprintf(client.t("is using modes +%s"), target.modes.String()))