MyChat Scripts Engine: mIsUsersGroupExists, the the users group status
Function to check the existence of a specified users group.
Syntax
function mIsUsersGroupExists(sGroupName: string): boolean;
Parameters and return values
Parameter |
Type |
Value |
sGroupName |
string |
users group name. The letter case is important. |
Function result
true group exists, false group with such name does not exist on the server.
Example
var
bFlag: boolean;
s: string;
begin
bFlag := mIsUsersGroupExists('Andministrators');
if bFlag then s := 'already exists'
else s := 'doesn''t exist';
mLogScript('Group "Administrators" ' + s, '');
end.
Script work result
[18:01:25] (Log "mIsUsersGroupExists"): Group "Administrators" doesn't exist
[18:01:25] (Run "mIsUsersGroupExists"): Script operation time: 6 ms
[18:01:25] (Run "mIsUsersGroupExists"): Script done successfully.