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

Merge pull request #1717 from ajaspers/voice

Allow +v users to talk in +R channels.
This commit is contained in:
Shivaram Lingamneni 2021-06-29 09:11:52 -04:00 committed by GitHub
commit 5daabdd226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -815,7 +815,7 @@ If this mode is unset, users who aren't on your channel can send messages to it.
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.
Unregistered users already joined to the channel will no longer be able to send messages to it, but they will not be kicked automatically. If they leave, they would not be allowed to rejoin.
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.
To set this mode:

View File

@ -1231,7 +1231,8 @@ 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() == "" {
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() == "" &&