From 68b7270d6da903de6adbf532fd685f3791a6b13d Mon Sep 17 00:00:00 2001 From: MKyiwuQwQ <111745080+Mengke15@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:03:03 +0800 Subject: [PATCH] Update handler.go --- service/minecraft/handler.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/service/minecraft/handler.go b/service/minecraft/handler.go index ac9d3b1..e98c3dd 100755 --- a/service/minecraft/handler.go +++ b/service/minecraft/handler.go @@ -228,22 +228,6 @@ func NewConnHandler(s *config.ConfigProxyService, return nil, err } - buffer.Reset(mcprotocol.MaxVarIntLen) - common.Must0(mcprotocol.WriteToPacket(buffer, - byte(0x00), // Client bound : Disconnect (login) - mcprotocol.VarInt(len(msg)), - )) - err = conn.WriteVectorizedPacket(buffer, msg) - if err != nil { - return nil, err - } - - c.(*net.TCPConn).SetLinger(10) //nolint:errcheck - c.Close() - return nil, ErrRejectedLoginAccessControl - } - log.Printf("Service %s : %s New Minecraft player logged in: %s [%s]", s.Name, ctx.ColoredID, playerName, accessibility) - ctx.AttachInfo("PlayerName=" + playerName) if accessibility == "NEW" { msg, err := generateNewMessage(s, playerName).MarshalJSON() if err != nil {