ソースを参照

review fix

tags/v2.2.0-rc1
Shivaram Lingamneni 4年前
コミット
8dd25f66bc
3個のファイルの変更7行の追加3行の削除
  1. 1
    1
      irc/channel.go
  2. 4
    0
      irc/handlers.go
  3. 2
    2
      irc/help.go

+ 1
- 1
irc/channel.go ファイルの表示

@@ -707,7 +707,7 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
707 707
 		}
708 708
 
709 709
 		if details.account == "" &&
710
-			(channel.flags.HasMode(modes.RegisteredOnly) || channel.server.Defcon() <= 3) {
710
+			(channel.flags.HasMode(modes.RegisteredOnly) || channel.server.Defcon() <= 2) {
711 711
 			return errRegisteredOnly
712 712
 		}
713 713
 	}

+ 4
- 0
irc/handlers.go ファイルの表示

@@ -2067,6 +2067,10 @@ func dispatchMessageToTarget(client *Client, tags map[string]string, histType hi
2067 2067
 		tnick := tDetails.nick
2068 2068
 
2069 2069
 		details := client.Details()
2070
+		if details.account == "" && server.Defcon() <= 3 {
2071
+			rb.Add(nil, server.name, ERR_NEEDREGGEDNICK, client.Nick(), tnick, client.t("Direct messages from unregistered users are temporarily restricted"))
2072
+			return
2073
+		}
2070 2074
 		nickMaskString := details.nickMask
2071 2075
 		accountName := details.accountName
2072 2076
 		var deliverySessions []*Session

+ 2
- 2
irc/help.go ファイルの表示

@@ -175,8 +175,8 @@ spam or other hostile activity. It has five levels, which are cumulative
175 175
 
176 176
 5: Normal operation
177 177
 4: No new account or channel registrations
178
-3: All channels are +R; no changes to vhosts
179
-2: No new unauthenticated connections
178
+3: All users are +R; no changes to vhosts
179
+2: No new unauthenticated connections; all channels are +R
180 180
 1: No new connections except from localhost or other trusted IPs`,
181 181
 	},
182 182
 	"deoper": {

読み込み中…
キャンセル
保存