Fix channel join flooding and enhance TUI features

- Implemented separate PacketID counters for Ping, Pong, and Ack (protocol compliance).
- Encrypted outgoing Pong packets after handshake.
- Fixed 'clientmove' command by omitting empty 'cpw' parameter.
- Added fullscreen log view toggle ('f' key).
- Improved logging with multi-writer and timestamps.
- Updated .gitignore to exclude binaries and logs.
This commit is contained in:
Jose Luis Montañes Ojados
2026-01-16 16:02:17 +01:00
parent c0b1217536
commit 184fff202f
15 changed files with 239 additions and 39 deletions

View File

@@ -18,6 +18,7 @@ func (c *Client) SendCommand(cmd *protocol.Command) error {
// SendCommandString sends a raw command string with fragmentation.
func (c *Client) SendCommandString(cmdStr string) error {
log.Printf("Sending Command: %s", cmdStr)
data := []byte(cmdStr)
maxPacketSize := 500
maxBody := maxPacketSize - 13 // Header is 13 bytes for C->S (MAC 8, PID 2, TYPE 1, CID 2)