mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
Remove debug code from entrance server
This commit is contained in:
@@ -2,9 +2,6 @@ package entranceserver
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/Andoryuuta/Erupe/config"
|
"github.com/Andoryuuta/Erupe/config"
|
||||||
@@ -35,7 +32,6 @@ func encodeServerInfo(serverInfos []config.EntranceServerInfo) []byte {
|
|||||||
bf.WriteUint32(si.AllowedClientFlags)
|
bf.WriteUint32(si.AllowedClientFlags)
|
||||||
|
|
||||||
for channelIdx, ci := range si.Channels {
|
for channelIdx, ci := range si.Channels {
|
||||||
fmt.Println("Channel idx", channelIdx)
|
|
||||||
bf.WriteUint16(ci.Port)
|
bf.WriteUint16(ci.Port)
|
||||||
bf.WriteUint16(16 + uint16(channelIdx))
|
bf.WriteUint16(16 + uint16(channelIdx))
|
||||||
bf.WriteUint16(ci.MaxPlayers)
|
bf.WriteUint16(ci.MaxPlayers)
|
||||||
@@ -75,7 +71,6 @@ func makeHeader(data []byte, respType string, entryCount uint16, key byte) []byt
|
|||||||
}
|
}
|
||||||
|
|
||||||
func makeResp(servers []config.EntranceServerInfo) []byte {
|
func makeResp(servers []config.EntranceServerInfo) []byte {
|
||||||
fmt.Printf("%+v\n", servers)
|
|
||||||
rawServerData := encodeServerInfo(servers)
|
rawServerData := encodeServerInfo(servers)
|
||||||
|
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
@@ -86,11 +81,6 @@ func makeResp(servers []config.EntranceServerInfo) []byte {
|
|||||||
// If so, how does it work without the entrance server connection being authenticated?
|
// If so, how does it work without the entrance server connection being authenticated?
|
||||||
bf.WriteBytes(makeHeader([]byte{}, "USR", 0, 0x00))
|
bf.WriteBytes(makeHeader([]byte{}, "USR", 0, 0x00))
|
||||||
|
|
||||||
err := ioutil.WriteFile("go_entrance_resp.bin", bf.Data(), 0644)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return bf.Data()
|
return bf.Data()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user