Implement Poke functionality with dynamic message and focus redirection
This commit is contained in:
@@ -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
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user