MyChat Scripts: function mRemovePrivateHistory, delete history of private messages for a specific time range for selected users
The function for selective deletion of private dialogues messages on the server and selected clients for a range of time.
This operation cannot be undone, be careful, because history is deleted forever.
All offline users receive the command for deleting private dialogues right after connecting to the server, automatically.
Syntax
function mRemovePrivateHistory(const sUsersList: string; const dtUTCStart, dtUTCEnd: double): string;
Parameters and return values
Parameter |
Type |
Value |
sUsersList |
string |
list of user UINs for whom you want to delete the history. You can specify the word "all", then history will be deleted for all users; |
dtUTCStart |
double |
date and time in UTC from which date to delete history that is written in UTC only, that is why you need to take into account the correction regarding local date and time; |
dtUTCEnd |
double |
date and time in UTC to which date to delete message history. |
Function result
List of user UINs divided by commas for whom you found and deleted history for a specific time range. If it returns an empty string, then there is no history or it was deleted earlier.
Example
Delete private message history for a user UIN=15427 from "the very beginning" until "yesterday". Since private dialogues are paired, they are deleted not only for one user but for his opponents too. For example, UIN 15427 talked to UIN 6, and UIN 3. As a result, 2 dialogues will be cleared both for UIN 15427 and UIN 6,3. Other dialogues for users UIN 6 and 3 remain untouched.
Notice, that re-execution of a script processes faster because data already deleted.
begin
mRemovePrivateHistory('15427', NoDate, LocalTimeToUTC(IncDay(Now, -1)));
end.
Script work result
[09:56:14] (Run "RemoveData"): Script operation time: 1477 ms
[09:56:14] (Run "RemoveData"): Script done successfully.
[09:56:19] (Run "RemoveData"): Script operation time: 283 ms
[09:56:19] (Run "RemoveData"): Script done successfully.
See also
Console command "remove privates"
Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease