|
@@ -3374,12 +3374,18 @@ func whoHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response
|
3374
|
3374
|
fields = fields.Add(field)
|
3375
|
3375
|
}
|
3376
|
3376
|
|
3377
|
|
- //TODO(dan): is this used and would I put this param in the Modern doc?
|
3378
|
|
- // if not, can we remove it?
|
3379
|
|
- //var operatorOnly bool
|
3380
|
|
- //if len(msg.Params) > 1 && msg.Params[1] == "o" {
|
3381
|
|
- // operatorOnly = true
|
3382
|
|
- //}
|
|
3377
|
+ // successfully parsed query, ensure we send the success response:
|
|
3378
|
+ defer func() {
|
|
3379
|
+ rb.Add(nil, server.name, RPL_ENDOFWHO, client.Nick(), origMask, client.t("End of WHO list"))
|
|
3380
|
+ }()
|
|
3381
|
+
|
|
3382
|
+ // XXX #1730: https://datatracker.ietf.org/doc/html/rfc1459#section-4.5.1
|
|
3383
|
+ // 'If the "o" parameter is passed only operators are returned according to
|
|
3384
|
+ // the name mask supplied.'
|
|
3385
|
+ // see discussion on #1730, we just return no results in this case.
|
|
3386
|
+ if len(msg.Params) > 1 && msg.Params[1] == "o" {
|
|
3387
|
+ return false
|
|
3388
|
+ }
|
3383
|
3389
|
|
3384
|
3390
|
oper := client.Oper()
|
3385
|
3391
|
hasPrivs := oper.HasRoleCapab("sajoin")
|
|
@@ -3433,7 +3439,6 @@ func whoHandler(server *Server, client *Client, msg ircmsg.Message, rb *Response
|
3433
|
3439
|
}
|
3434
|
3440
|
}
|
3435
|
3441
|
|
3436
|
|
- rb.Add(nil, server.name, RPL_ENDOFWHO, client.nick, origMask, client.t("End of WHO list"))
|
3437
|
3442
|
return false
|
3438
|
3443
|
}
|
3439
|
3444
|
|