diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/server.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/server.go b/server/server.go index a7a08ca..bc12b5f 100644 --- a/server/server.go +++ b/server/server.go @@ -20,10 +20,12 @@ var supportedExtensions = []string { "HackControl", "LongerMessages", "FullCP437", + "CustomBlocks", } var requiredExtensions = []string { "ExtEntityPositions", "EnvMapAspect.2", + "CustomBlocks", } type ServerInfo struct { @@ -502,6 +504,15 @@ func (cl *client) cpeHandshake(conn net.Conn, ext map[string]bool) bool { cl.disconnect("Missing required extension: " + req) } } + + err = classic.WritePacket(conn, &classic.CustomBlocksSupportLevel { + SupportLevel: 1, + }) + if cl.handleError(err) != nil { + return false + } + // it doesn't matter what the client sends in response to this + cl.extensions = ext return true } |
