MyChat Server event: OnConfKick, for kicking a user from a conference
The event that occurs when attempting to kick a user from a text conference. Only moderators have rights to do this.
Event template
function OnConfKick(iCID, iUID, iUINModer, iUINUser: integer; sConfName: string): boolean;
begin
// your own code
result := true;
end;
begin
end.
You can put your code instead of the comment.
Description of parameters
Parameter |
Type |
Value |
iCID |
integer |
Connection ID of the client, unique session identifier in the online structure of network connections to the server; |
iUID |
integer |
unique identifier of a conference; |
iUINModer |
integer |
unique identifier of a moderator who is responsible for kicking users from a conference; |
iUINUser |
integer |
user's identifier. |
Return value
By default, this function must return the value "true" but you can forbid using it and return it to "false". In this case, a user won't be kicked from a conference.
Example
function OnConfKick(iCID, iUID, iUINModer, iUINUser: integer; sConfName: string): boolean;
begin
if iUINModer = 6 then
mSendPrivateMessage(0,
iUINModer,
'Headshot! "' + mGetUserAttribute(iUINUser, 'DisplayName') + '"',
1);
result := true;
end;
begin
end.
The script checks, if a moderator's UIN equals to 6, he receives a private message with a name of a user he kicked from a conference.