3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00
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
This commit is contained in:
Shivaram Lingamneni 2021-12-07 01:31:07 -05:00
parent bdff4e633f
commit 03b4a6581c

View File

@ -1305,9 +1305,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() == "" {
return false, modes.RegisteredOnly
}
if channel.flags.HasMode(modes.RegisteredOnlySpeak) && client.Account() == "" &&
clientModes.HighestChannelUserMode() == modes.Mode(0) {
return false, modes.RegisteredOnlySpeak