diff --git a/Erupe/config/config.go b/Erupe/config/config.go index 8dae16b4f..f40cd7685 100644 --- a/Erupe/config/config.go +++ b/Erupe/config/config.go @@ -81,7 +81,7 @@ type EntranceServerInfo struct { Season uint8 // Server activity. 0 = green, 1 = orange, 2 = blue Recommended uint8 // Something to do with server recommendation on 0, 3, and 5. Name string // Server name, 66 byte null terminated Shift-JIS(JP) or Big5(TW). - + Description string // Server description // 4096(PC, PS3/PS4)?, 8258(PC, PS3/PS4)?, 8192 == nothing? // THIS ONLY EXISTS IF Binary8Header.type == "SV2", NOT "SVR"! AllowedClientFlags uint32 diff --git a/Erupe/server/entranceserver/make_resp.go b/Erupe/server/entranceserver/make_resp.go index 9c16416dc..52a8e0773 100644 --- a/Erupe/server/entranceserver/make_resp.go +++ b/Erupe/server/entranceserver/make_resp.go @@ -50,11 +50,18 @@ func encodeServerInfo(serverInfos []config.EntranceServerInfo, s *Server) []byte bf.WriteUint8(si.Type) bf.WriteUint8(season) bf.WriteUint8(si.Recommended) - shiftjisName, err := stringsupport.ConvertUTF8ToShiftJIS(si.Name) + sjisName, err := stringsupport.ConvertUTF8ToShiftJIS(si.Name) if err != nil { panic(err) } - bf.WriteBytes(paddedString(string(shiftjisName), 66)) + sjisDesc, err := stringsupport.ConvertUTF8ToShiftJIS(si.Description) + if err != nil { + panic(err) + } + combined := append([]byte{0x00}, sjisName...) + combined = append(combined, []byte{0x00}...) + combined = append(combined, sjisDesc...) + bf.WriteBytes(paddedString(string(combined), 66)) bf.WriteUint32(si.AllowedClientFlags) for channelIdx, ci := range si.Channels {