Browse Source

Merge pull request #2145 from slingamn/issue2144

fix #2144
master
Shivaram Lingamneni 2 weeks ago
parent
commit
40ceb4956c
No account linked to committer's email address
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      irc/channel.go

+ 5
- 1
irc/channel.go View File

@@ -449,6 +449,10 @@ func (channel *Channel) Names(client *Client, rb *ResponseBuffer) {
449 449
 	chname := channel.name
450 450
 	membersCache, memberDataCache := channel.membersCache, channel.memberDataCache
451 451
 	channel.stateMutex.RUnlock()
452
+	symbol := "=" // https://modern.ircdocs.horse/#rplnamreply-353
453
+	if channel.flags.HasMode(modes.Secret) {
454
+		symbol = "@"
455
+	}
452 456
 	isOper := client.HasRoleCapabs("sajoin")
453 457
 	respectAuditorium := channel.flags.HasMode(modes.Auditorium) && !isOper &&
454 458
 		(!isJoined || clientData.modes.HighestChannelUserMode() == modes.Mode(0))
@@ -478,7 +482,7 @@ func (channel *Channel) Names(client *Client, rb *ResponseBuffer) {
478 482
 	}
479 483
 
480 484
 	for _, line := range tl.Lines() {
481
-		rb.Add(nil, client.server.name, RPL_NAMREPLY, client.nick, "=", chname, line)
485
+		rb.Add(nil, client.server.name, RPL_NAMREPLY, client.nick, symbol, chname, line)
482 486
 	}
483 487
 	rb.Add(nil, client.server.name, RPL_ENDOFNAMES, client.nick, chname, client.t("End of NAMES list"))
484 488
 }

Loading…
Cancel
Save