Ver código fonte

Merge pull request #1717 from ajaspers/voice

Allow +v users to talk in +R channels.
tags/v2.8.0-rc1
Shivaram Lingamneni 3 anos atrás
pai
commit
5daabdd226
Nenhuma conta vinculada ao e-mail do autor do commit
2 arquivos alterados com 3 adições e 2 exclusões
  1. 1
    1
      docs/MANUAL.md
  2. 2
    1
      irc/channel.go

+ 1
- 1
docs/MANUAL.md Ver arquivo

815
 
815
 
816
 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.
816
 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.
817
 
817
 
818
-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.
818
+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.
819
 
819
 
820
 To set this mode:
820
 To set this mode:
821
 
821
 

+ 2
- 1
irc/channel.go Ver arquivo

1231
 	if channel.flags.HasMode(modes.Moderated) && clientModes.HighestChannelUserMode() == modes.Mode(0) {
1231
 	if channel.flags.HasMode(modes.Moderated) && clientModes.HighestChannelUserMode() == modes.Mode(0) {
1232
 		return false, modes.Moderated
1232
 		return false, modes.Moderated
1233
 	}
1233
 	}
1234
-	if channel.flags.HasMode(modes.RegisteredOnly) && client.Account() == "" {
1234
+	if channel.flags.HasMode(modes.RegisteredOnly) && client.Account() == "" &&
1235
+		clientModes.HighestChannelUserMode() == modes.Mode(0) {
1235
 		return false, modes.RegisteredOnly
1236
 		return false, modes.RegisteredOnly
1236
 	}
1237
 	}
1237
 	if channel.flags.HasMode(modes.RegisteredOnlySpeak) && client.Account() == "" &&
1238
 	if channel.flags.HasMode(modes.RegisteredOnlySpeak) && client.Account() == "" &&

Carregando…
Cancelar
Salvar