MyChat Scripts Engine: mIsUINExists, checking if a user exists
Function to determine if a user with a specified identifier is registered on the server.
Syntax
function mIsUINExists(iUIN: integer): boolean;
Parameters and return values
Parameter |
Type |
Value |
iUIN |
integer |
unique user identifier. |
Function result
true, if the user is registered on the server, false if such UIN does not exist.
Example
var
sNickName: string;
i: integer;
begin
mLogScript('Test first ten registered UINs of current MyChat Server...', '');
for i := 1 to 10 do
if mIsUINExists(i) then begin
sNickName := mGetUserAttribute(i, 'InternalNickName');
mLogScript('Found UIN: ' + inttostr(i) + ', nickname: "' + sNickName + '"', '');
end;
end.
Script work result
[10:57:01] (Log "mIsUINExists"): Test first ten registered UINs of current MyChat Server...
[10:57:01] (Log "mIsUINExists"): Found UIN: 1, nickname: "admin"
[10:57:01] (Log "mIsUINExists"): Found UIN: 3, nickname: "==[Gifer]=="
[10:57:01] (Log "mIsUINExists"): Found UIN: 6, nickname: "(Hobit)"