Skip to content

Conversation

@FiskFan1999
Copy link
Contributor

As discussed in #1911 this replicates the intended behavior in which the daemon does list a channel with mode +s in quote list if the user is joined to that channel.

irc/handlers.go Outdated
if len(channels) == 0 {
for _, channel := range server.channels.Channels() {
if !clientIsOp && channel.flags.HasMode(modes.Secret) {
if !clientIsOp && channel.flags.HasMode(modes.Secret) && !isUserInThisChannel(clientChannels, channel) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can just check channel.hasClient(client) here and below. It does a lock acquisition, but so does rplList, so that seems fine.

@FiskFan1999
Copy link
Contributor Author

Thanks @slingamn, I switched to channel.HasClient. As it stands now this branch only diffs from the master branch on two lines. Let me know if you would like me to resubmit this PR squashing the commits together.

@slingamn slingamn merged commit 4010f3f into ergochat:master Mar 1, 2022
@FiskFan1999 FiskFan1999 deleted the fflist2 branch March 1, 2022 04:40
slingamn pushed a commit that referenced this pull request Jun 9, 2022
#1923)

* Fix #1911 +s channels don't appear in /list even though on the channel

* use channel.HasClient instead of custom iterative checker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants