Skip to content

ServerGroupPoke

Samuel Grant edited this page Jun 27, 2020 · 3 revisions

Remarks

Pokes active clients of all users belonging to a specific server group

Notes:

  1. If a user in the target server group has three active connections to the server, they will get three pokes
  2. IsSuccess will return true correctly when the status struct has been overridden at the end of this function in versions >= v1.0.1

Signature

Params

Name Type Description
sgid int64 The target server group to poke
msg string The message to be sent to clients of the target server group

Returns

Type Description
*status Non standard Query Response (see below)
error
{
   Code int = -1
   Message string = fmt.Sprintf("%v%% of clients successfully poked (%v failed)", ((attempted-failed)/attempted)*100, failed)
}

Example

qres, err := client.ServerGlobalMessage(sgid, "Unescaped message string")
if err != nil {
  // Handle error or rejected server query 
}

Clone this wiki locally