MyChat Scripts Engine: mGetUsersListByParams, get the list of users on the server by the set of parameters
"For developers", "Server scripts", "Functions description", "Users", "mGetUsersListByParams".
Function to obtain a list of users by the set of parameters. Parameters can be combined and separated by commas.
Syntax
function mGetUsersListByParams(sParams: string): string;
Parameters and return values
Parameter |
Type |
Value |
sParams |
string |
parameters by which you can find users. The text string, where you can specify the parameters, separated by commas: All all registered users on the server; Online users who are currently connected to the server; Offline users who are disconnected from the server; NotInCommonContacts all users who are not included to the common contact list; InCommonContacts all users who are included in the common contact list. |
Function result
Text string, the list of users UINs separated by commas. If there are no users, the function returns an empty string.
Example
begin
mLogScript(mGetUsersListByParams('online'), 'online');
mLogScript(mGetUsersListByParams('offline'), 'offline');
mLogScript(mGetUsersListByParams('InCommonContacts'), 'InCommonContacts');
mLogScript(mGetUsersListByParams('NotInCommonContacts'), 'NotInCommonContacts');
end.
Script works resut
[22:34:21] (Log "mGetUsersListByParams"): [online] 17,21,56
[22:34:21] (Log "mGetUsersListByParams"): [offline] 8,16759,16760,16761,16762
[22:34:21] (Log "mGetUsersListByParams"): [InCommonContacts] 17,3,6,5454
[22:34:21] (Log "mGetUsersListByParams"): [NotInCommonContacts] 10129,10161,10335
[22:34:21] (Run "mGetUsersListByParams"): Script operation time: 96 ms
[22:34:21] (Run "mGetUsersListByParams"): Script done successfully.