diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2023-01-18 13:52:52 -0800 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2023-01-18 13:52:52 -0800 |
| commit | 3326539367dfa85cb2b0455d5b1c67eaaf59cf8e (patch) | |
| tree | a1ebb95925e3834371e1aeb82002ce033441284f /hotline/server.go | |
| parent | fd5eb3ab478559a722976c8093a4c2c281019c45 (diff) | |
Fix threaded news bugs
1. Fix handling of article IDs sent as 4 bytes instead of 2
2. Fix incorrect article count listing that strangely only affects third party clients
Diffstat (limited to 'hotline/server.go')
| -rw-r--r-- | hotline/server.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hotline/server.go b/hotline/server.go index bda0c2a..d87ddb9 100644 --- a/hotline/server.go +++ b/hotline/server.go @@ -36,6 +36,8 @@ 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 +var heildrun = []byte{0, 0x97} + var obsessionVersion = []byte{0xbe, 0x00} // version ID used by the Obsession client type Server struct { @@ -676,7 +678,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 // TODO: figure out a generalized solution that doesn't require playing whack-a-mole for specific client versions - if c.Version == nil || bytes.Equal(c.Version, nostalgiaVersion) || bytes.Equal(c.Version, frogblastVersion) || bytes.Equal(c.Version, obsessionVersion) { + if c.Version == nil || bytes.Equal(c.Version, nostalgiaVersion) || bytes.Equal(c.Version, frogblastVersion) || bytes.Equal(c.Version, obsessionVersion) || bytes.Equal(c.Version, heildrun) { 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 }())) |