fix: resolve missing users in piped commands and refine TUI distribution

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-16 23:54:36 +01:00
parent 4f26d9b430
commit 78e7988db1
6 changed files with 145 additions and 39 deletions

View File

@@ -251,6 +251,9 @@ func (c *Client) processCommand(data []byte, pkt *protocol.Packet) error {
// Parse Commands (possibly multiple piped items)
commands := protocol.ParseCommands([]byte(cmdStr))
// State for piped commands (TS3 optimization omits repeated keys like ctid)
var lastCtid uint64
for _, command := range commands {
cmd := command.Name
args := command.Params
@@ -371,8 +374,9 @@ func (c *Client) processCommand(data []byte, pkt *protocol.Packet) error {
clientID = uint16(id)
}
if ctid, ok := args["ctid"]; ok {
fmt.Sscanf(ctid, "%d", &channelID)
fmt.Sscanf(ctid, "%d", &lastCtid)
}
channelID = lastCtid
log.Printf("Client entered: %s (ID=%d)", nick, clientID)
c.emitEvent("client_enter", map[string]any{
"clientID": clientID,