fix: resolve missing users in piped commands and refine TUI distribution
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user