Implement Poke functionality with dynamic message and focus redirection

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-17 00:25:42 +01:00
parent 5b8e89e9a2
commit be5e26486c
2 changed files with 45 additions and 4 deletions

View File

@@ -235,6 +235,19 @@ func (c *Client) KickFromServer(clientID uint16, reason string) error {
return c.internal.SendCommand(cmd)
}
// Poke sends a poke message to a specific client
func (c *Client) Poke(clientID uint16, message string) error {
if c.internal == nil {
return fmt.Errorf("not connected")
}
cmd := protocol.NewCommand("clientpoke")
cmd.AddParam("clid", fmt.Sprintf("%d", clientID))
cmd.AddParam("msg", message)
return c.internal.SendCommand(cmd)
}
// =============================================================================
// Info Methods
// =============================================================================