From 5a8bc3b67afac4cd17c8757b65e16d5407b64edd Mon Sep 17 00:00:00 2001 From: wish Date: Sun, 31 Dec 2023 15:12:20 +1100 Subject: [PATCH] fix EntranceServer response on G5 --- server/entranceserver/make_resp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/entranceserver/make_resp.go b/server/entranceserver/make_resp.go index f7f2f433e..481ccae93 100644 --- a/server/entranceserver/make_resp.go +++ b/server/entranceserver/make_resp.go @@ -51,13 +51,13 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte { combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...) combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...) bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false)) - } else if s.erupeConfig.RealClientMode <= _config.GG { + } else if s.erupeConfig.RealClientMode <= _config.G5 { combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...) combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...) bf.WriteUint8(uint8(len(combined))) bf.WriteBytes(combined) } else { - bf.WriteUint8(0) // Prevents malformed server name + bf.WriteUint8(0) // Ignored combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...) combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...) bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))