MyChat Scripts Engine: mClosePrivateDialog for closing a private dialogue
"For developers", "Server scripts", "Functions description", "Dialogues", "mClosePrivateDialog".
Close a private dialogue with another person for a specified user. It does not matter if he exists or not. MyChat 8.0 and higher.
Syntax
function mClosePrivateDialog(const iUINOwner, iUINWith: integer): integer;
Parameters and return values
| 
    Parameter  | 
  
    Type  | 
  
    Value  | 
 
| 
    iUINOwner  | 
  
    integer  | 
  
    dialogue owner ID;  | 
 
| 
    iUINWith  | 
  
    integer  | 
  
    UIN of a user you need to close a dialogue.  | 
 
Function result
| 
    0  | 
  
    no errors, dialogue closed successfully;  | 
 
| 
    -1  | 
  
    iUINOwner must be above zero;  | 
 
| 
    -2  | 
  
    iUINWith must be >= zero;  | 
 
| 
    -3  | 
  
    iUINOwner does not exist;  | 
 
| 
    -4  | 
  
    iUINWith does not exist.  | 
 
Example
begin
  mClosePrivateDialog(6, 16222);
end.
Script work result
The entry deleted with a specified user in the list of recent dialogues in the client application interface. If the window with messages is active it will be closed.