10 Commits
Author SHA1 Message Date
GegyandGitHub 4df640268f Fix: discard chat queue and chat state when switching servers (#1534)
This has two effects:
- Will no longer send queued chat packets from previous server after switch (race condition)
- The offset in 'last seen' updates will be corrected, as the internal ChatState will be reset (only applied if the player had not sent a message in a while, and >20 messages had been received)
2025-03-21 12:28:13 +00:00
GegyandRiley Park 4eae510fb7 Don't forward chat acknowledgement if the client didn't acknowledge any chat 2024-07-04 21:34:47 -07:00
GegyandRiley Park c6bb15c69b Fix: only treat command as signed if it has signatures
The Vanilla client will send 'last seen' even if the message is not signed, so this is much stricter than it needs to be. This should allow commands without any signed arguments to be modified/consumed by the proxy.
2024-07-04 21:34:47 -07:00
GegyandRiley Park 077968089e Fix: pass through last seen update in a few missing places
This is hardly useful in the case of signed player chat messages, as these fundamentally cannot be spoofed or modified - however, for any unsigned input (particularly commands without any signed arguments), 'last seen' updates are still required and should be passed through in a consistent state.
2024-07-04 21:34:47 -07:00
GegyandRiley Park b5ee9dd20a Capture a consistent and reusable 'last seen' state for use in command packets 2024-07-04 21:34:47 -07:00
GegyandRiley Park ec9745769f Explicitly reject consuming signed command when denied by event
This would fail down the line anyway due to inconsistent chat state (if holding a 'last seen' update)
2024-07-04 21:34:47 -07:00
GegyandRiley Park 3b7ffa837e Don't require command to be signed to pass it through as-is 2024-07-04 21:34:47 -07:00
GegyandRiley Park 92c48507eb Extract common command handler paths 2024-07-04 21:34:47 -07:00
GegyandRiley Park be73131d5d Remove unneeded check
SessionCommandHandler is only constructed for >= 1.19.3.
2024-07-04 21:34:47 -07:00
GegyandRiley Park 6b03b28a61 Refactor ChatQueue to track and expose general chat state 2024-07-04 21:34:47 -07:00