From d07b88100485f58cf47038ea42d6a7a6f5892eb3 Mon Sep 17 00:00:00 2001 From: Xiangze Li Date: Fri, 20 Oct 2023 18:05:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=91=E5=90=8D=E5=8D=95=E7=9A=84`?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=97=B6=E7=AB=8B=E5=8D=B3=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=BE=A4`=E9=85=8D=E7=BD=AE=E6=97=A0=E6=B3=95=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #359 --- dice/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dice/config.go b/dice/config.go index 66bb7298..3b3c8533 100644 --- a/dice/config.go +++ b/dice/config.go @@ -1683,6 +1683,7 @@ func (d *Dice) loads() { data, err := os.ReadFile(filepath.Join(d.BaseConfig.DataDir, "serve.yaml")) // 配置这块弄得比较屎,有机会换个方案。。。 + // TODO(Xiangze Li): 不管谁都好 赶紧重写吧, 谁能想起来加了配置还要在这里添一行才能Load出来哇 if err == nil { //nolint:nestif dNew := Dice{} err2 := yaml.Unmarshal(data, &dNew) @@ -1743,6 +1744,8 @@ func (d *Dice) loads() { d.BanList.BanBehaviorRefuseReply = dNew.BanList.BanBehaviorRefuseReply d.BanList.BanBehaviorRefuseInvite = dNew.BanList.BanBehaviorRefuseInvite d.BanList.BanBehaviorQuitLastPlace = dNew.BanList.BanBehaviorQuitLastPlace + d.BanList.BanBehaviorQuitPlaceImmediately = dNew.BanList.BanBehaviorQuitPlaceImmediately + d.BanList.ScoreReducePerMinute = dNew.BanList.ScoreReducePerMinute d.BanList.ThresholdWarn = dNew.BanList.ThresholdWarn