mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-23 12:24:45 +01:00
Fix entrance server IPv4 encoding
This commit is contained in:
@@ -43,7 +43,7 @@ func handleEntranceServerConnection(conn net.Conn) {
|
||||
ChannelInfo{
|
||||
Port: 54001,
|
||||
MaxPlayers: 100,
|
||||
CurrentPlayers: 3,
|
||||
CurrentPlayers: 0,
|
||||
Unk4: 0,
|
||||
Unk5: 0,
|
||||
Unk6: 0,
|
||||
|
||||
@@ -54,7 +54,7 @@ func encodeServerInfo(serverInfos []ServerInfo) []byte {
|
||||
bf := byteframe.NewByteFrame()
|
||||
|
||||
for serverIdx, si := range serverInfos {
|
||||
bf.WriteUint32(binary.LittleEndian.Uint32(si.IP))
|
||||
bf.WriteUint32(binary.LittleEndian.Uint32(si.IP.To4()))
|
||||
bf.WriteUint16(16 + uint16(serverIdx))
|
||||
bf.WriteUint16(si.Unk2)
|
||||
bf.WriteUint16(uint16(len(si.Channels)))
|
||||
|
||||
Reference in New Issue
Block a user