-func (s *Server) handleNewConnection(ctx context.Context, conn net.Conn, remoteAddr string) error {
+func (s *Server) handleNewConnection(ctx context.Context, conn io.ReadWriteCloser, remoteAddr string) error {
s.outbox <- c.NewReply(clientLogin,
NewField(fieldVersion, []byte{0x00, 0xbe}),
s.outbox <- c.NewReply(clientLogin,
NewField(fieldVersion, []byte{0x00, 0xbe}),
- NewField(fieldCommunityBannerID, []byte{0x00, 0x01}),
+ NewField(fieldCommunityBannerID, []byte{0, 0}),
// Used simplified hotline v1.2.3 login flow for clients that do not send login info in tranAgreed
if *c.Version == nil || bytes.Equal(*c.Version, nostalgiaVersion) {
c.Agreed = true
// Used simplified hotline v1.2.3 login flow for clients that do not send login info in tranAgreed
if *c.Version == nil || bytes.Equal(*c.Version, nostalgiaVersion) {
c.Agreed = true
*NewTransaction(
tranNotifyChangeUser, nil,
NewField(fieldUserName, c.UserName),
*NewTransaction(
tranNotifyChangeUser, nil,
NewField(fieldUserName, c.UserName),
NewField(fieldUserIconID, *c.Icon),
NewField(fieldUserFlags, *c.Flags),
),
NewField(fieldUserIconID, *c.Icon),
NewField(fieldUserFlags, *c.Flags),
),
// iterate over all the transactions that were parsed from the byte slice and handle them
for _, t := range transactions {
if err := c.handleTransaction(&t); err != nil {
// iterate over all the transactions that were parsed from the byte slice and handle them
for _, t := range transactions {
if err := c.handleTransaction(&t); err != nil {