|
@@ -336,13 +336,14 @@ func (channel *Channel) regenerateMembersCache() {
|
336
|
336
|
// Names sends the list of users joined to the channel to the given client.
|
337
|
337
|
func (channel *Channel) Names(client *Client, rb *ResponseBuffer) {
|
338
|
338
|
isJoined := channel.hasClient(client)
|
|
339
|
+ isOper := client.HasMode(modes.Operator)
|
339
|
340
|
isMultiPrefix := rb.session.capabilities.Has(caps.MultiPrefix)
|
340
|
341
|
isUserhostInNames := rb.session.capabilities.Has(caps.UserhostInNames)
|
341
|
342
|
|
342
|
343
|
maxNamLen := 480 - len(client.server.name) - len(client.Nick())
|
343
|
344
|
var namesLines []string
|
344
|
345
|
var buffer bytes.Buffer
|
345
|
|
- if isJoined || !channel.flags.HasMode(modes.Secret) {
|
|
346
|
+ if isJoined || !channel.flags.HasMode(modes.Secret) || isOper {
|
346
|
347
|
for _, target := range channel.Members() {
|
347
|
348
|
var nick string
|
348
|
349
|
if isUserhostInNames {
|
|
@@ -356,7 +357,7 @@ func (channel *Channel) Names(client *Client, rb *ResponseBuffer) {
|
356
|
357
|
if modeSet == nil {
|
357
|
358
|
continue
|
358
|
359
|
}
|
359
|
|
- if !isJoined && target.flags.HasMode(modes.Invisible) {
|
|
360
|
+ if !isJoined && target.flags.HasMode(modes.Invisible) && !isOper {
|
360
|
361
|
continue
|
361
|
362
|
}
|
362
|
363
|
prefix := modeSet.Prefixes(isMultiPrefix)
|