mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
fix EntranceServer response on G5
This commit is contained in:
@@ -51,13 +51,13 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte {
|
|||||||
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
||||||
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
||||||
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
|
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(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
||||||
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
||||||
bf.WriteUint8(uint8(len(combined)))
|
bf.WriteUint8(uint8(len(combined)))
|
||||||
bf.WriteBytes(combined)
|
bf.WriteBytes(combined)
|
||||||
} else {
|
} else {
|
||||||
bf.WriteUint8(0) // Prevents malformed server name
|
bf.WriteUint8(0) // Ignored
|
||||||
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
|
||||||
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
|
||||||
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
|
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
|
||||||
|
|||||||
Reference in New Issue
Block a user