|
@@ -3416,11 +3416,8 @@ func whowasHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
|
3416
|
3416
|
count = 0
|
3417
|
3417
|
}
|
3418
|
3418
|
}
|
3419
|
|
- //var target string
|
3420
|
|
- //if len(msg.Params) > 2 {
|
3421
|
|
- // target = msg.Params[2]
|
3422
|
|
- //}
|
3423
|
3419
|
cnick := client.Nick()
|
|
3420
|
+ canSeeIP := client.Oper().HasRoleCapab("ban")
|
3424
|
3421
|
for _, nickname := range nicknames {
|
3425
|
3422
|
if len(nickname) == 0 {
|
3426
|
3423
|
continue
|
|
@@ -3431,6 +3428,9 @@ func whowasHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
|
3431
|
3428
|
} else {
|
3432
|
3429
|
for _, whoWas := range results {
|
3433
|
3430
|
rb.Add(nil, server.name, RPL_WHOWASUSER, cnick, whoWas.nick, whoWas.username, whoWas.hostname, "*", whoWas.realname)
|
|
3431
|
+ if canSeeIP {
|
|
3432
|
+ rb.Add(nil, server.name, RPL_WHOWASIP, cnick, whoWas.nick, fmt.Sprintf(client.t("was connecting from %s"), utils.IPStringToHostname(whoWas.realIP.String())))
|
|
3433
|
+ }
|
3434
|
3434
|
}
|
3435
|
3435
|
}
|
3436
|
3436
|
rb.Add(nil, server.name, RPL_ENDOFWHOWAS, cnick, utils.SafeErrorParam(nickname), client.t("End of WHOWAS"))
|