瀏覽代碼

Merge pull request #1717 from ajaspers/voice

Allow +v users to talk in +R channels.
tags/v2.8.0-rc1
Shivaram Lingamneni 3 年之前
父節點
當前提交
5daabdd226
No account linked to committer's email address
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1
    1
      docs/MANUAL.md
  2. 2
    1
      irc/channel.go

+ 1
- 1
docs/MANUAL.md 查看文件

@@ -815,7 +815,7 @@ If this mode is unset, users who aren't on your channel can send messages to it.
815 815
 
816 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 820
 To set this mode:
821 821
 

+ 2
- 1
irc/channel.go 查看文件

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

Loading…
取消
儲存