3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 08:29:31 +01:00

Merge pull request #1859 from slingamn/issue1858_registeredmode

fix #1858
This commit is contained in:
Shivaram Lingamneni 2021-12-09 04:16:31 -05:00 committed by GitHub
commit e5dff58647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -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. 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: To set this mode:

View File

@ -1236,10 +1236,6 @@ func (channel *Channel) CanSpeak(client *Client) (bool, modes.Mode) {
if channel.flags.HasMode(modes.Moderated) && clientModes.HighestChannelUserMode() == modes.Mode(0) { if channel.flags.HasMode(modes.Moderated) && clientModes.HighestChannelUserMode() == modes.Mode(0) {
return false, modes.Moderated 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() == "" && if channel.flags.HasMode(modes.RegisteredOnlySpeak) && client.Account() == "" &&
clientModes.HighestChannelUserMode() == modes.Mode(0) { clientModes.HighestChannelUserMode() == modes.Mode(0) {
return false, modes.RegisteredOnlySpeak return false, modes.RegisteredOnlySpeak