diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-11-07 13:26:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-07 13:26:03 -0800 |
| commit | 623eecee59af710eaae93033b9ff4c419d9d4cba (patch) | |
| tree | 980d2fe55cf92ce8d16fc49bd6d10167d1d32930 /hotline/server.go | |
| parent | 5a3f2adada6094ab99ca9a612c327730be2b0040 (diff) | |
| parent | 361928c9ad8945d525534e3d7178755f49ff6c1f (diff) | |
Merge pull request #73 from jhalter/improve_frogblast_client_compat
Improve Frogblast client compatibility
Diffstat (limited to 'hotline/server.go')
| -rw-r--r-- | hotline/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hotline/server.go b/hotline/server.go index ec83522..8d6803b 100644 --- a/hotline/server.go +++ b/hotline/server.go @@ -34,6 +34,7 @@ type requestCtx struct { } var nostalgiaVersion = []byte{0, 0, 2, 0x2c} // version ID used by the Nostalgia client +var frogblastVersion = []byte{0, 0, 0, 0xb9} // version ID used by the Frogblast 1.2.4 client type Server struct { Port int @@ -667,7 +668,7 @@ func (s *Server) handleNewConnection(ctx context.Context, rwc io.ReadWriteCloser } // 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) { + if c.Version == nil || bytes.Equal(c.Version, nostalgiaVersion) || bytes.Equal(c.Version, frogblastVersion) { c.Agreed = true c.logger = c.logger.With("name", string(c.UserName)) c.logger.Infow("Login successful", "clientVersion", fmt.Sprintf("%v", func() int { i, _ := byteToInt(c.Version); return i }())) |