From 8be8f0f08d8489aa4e737e648e31f8497c5ad617 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 7 Dec 2021 01:31:07 -0500 Subject: [PATCH 1/2] fix #1858 The channel mode +R used to both prevent joins by unregistered users, and prevent unregistered users who happened to be joined from speaking. This changes the behavior so that +R only prevents joins: 1. This allows users who were invited or SAJOIN'ed to speak 2. To restore the old semantics, chanops can set +RM --- irc/channel.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/irc/channel.go b/irc/channel.go index 91a82a5a..6537537d 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -1236,10 +1236,6 @@ func (channel *Channel) CanSpeak(client *Client) (bool, modes.Mode) { if channel.flags.HasMode(modes.Moderated) && clientModes.HighestChannelUserMode() == modes.Mode(0) { return false, modes.Moderated } - if channel.flags.HasMode(modes.RegisteredOnly) && client.Account() == "" && - clientModes.HighestChannelUserMode() == modes.Mode(0) { - return false, modes.RegisteredOnly - } if channel.flags.HasMode(modes.RegisteredOnlySpeak) && client.Account() == "" && clientModes.HighestChannelUserMode() == modes.Mode(0) { return false, modes.RegisteredOnlySpeak From 3fe8d01d5071542c635af81d4aad857ebc8989a3 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 7 Dec 2021 01:41:11 -0500 Subject: [PATCH 2/2] update manual for #1858 --- docs/MANUAL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 5fd8c9ce..0b5e6156 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -824,11 +824,11 @@ This mode is enabled by default, and means that only users who are joined to the If this mode is unset, users who aren't on your channel can send messages to it. This can be useful with, for example, GitHub or notification bots if you want them to send messages to your channel but don't want them to clutter your channel with by joining and leaving it. -### +R - Only Registered Users Can Join or Speak +### +R - Only Registered Users Can Join -If this mode is set, only users that have logged into an account will be able to join and speak on the channel. If this is set and a regular, un-logged-in user tries to join, they will be rejected. +If this mode is set, only users that have logged into an account will be able to join the channel. If this is set and a regular, un-logged-in user tries to join, they will be rejected. -Unregistered users already joined to the channel will not be kicked automatically. They will no longer be able to send messages to the channel, unless they have been voiced (+v). If they leave, they would not be allowed to rejoin. +Unregistered users already joined to the channel will not be kicked automatically. They will still be able to speak, unless they are restricted from doing so by another channel mode like +M. If they leave, they will not be allowed to rejoin. To set this mode: