Skip to content

UserKickClients

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

Remarks

Kicks all connected clients belonging to a user

Notes:

  1. Kicks the user from the server
  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
cldbid int64 Target users database ID
msg string Kick reason message

Returns

Type Description
*status Non-standard Query Response (See Below)
error
type status struct {
    Code int64 = -1
    Message string = fmt.Sprintf("Failed to kick CLID %v \n%v\n%v", clid, qres1, err)
}

Example

qres, err := client.UserKickClients(cldbid, msg)
if err != nil || !qres.IsSuccess() {
  // Handle error or rejected server query 
}
  

Clone this wiki locally