MyChat Scripts Engine: mHaltMyChatClient

MyChat Scripts Engine: mHaltMyChatClient

Function to disconnect from the server a user with the specified UIN and shut down his client application forcefully.

 

Syntax

procedure mHaltMyChatClient(iCID: integer);

 

Parameters and return values

Parameter

Type

Value

iCID

integer

unique identifier of the user's active connection. If the specified CID does not exist (the user is disconnected from the server) then nothing happens.

 

Example

Function disconnects all connected applications from the server and shuts down their work.

var
  sOnlineUINS: string;
  iUIN, iCID: integer;
begin
  sOnlineUINS := mGetUsersListByParams('online');
  
    while length(sOnlineUINS) > 0 do begin
      iUIN := StrToInt(Fetch(sOnlineUINS, ','));
      iCID := mGetUserCID(iUIN);
      mHaltMyChatClient(iCID);
    end;
end.

Script work result

[11:37:47] (Run "mHaltMyChatClient"): Script operation time: 4 ms

[11:37:47] (Run "mHaltMyChatClient"): Script done successfully.

 

See also

Fetch

mGetUserCID

mGetUsersListByParams

StrToInt