The event that occurs at the moment of sending a message to a conference by any user.
function OnConfMessage(iCID, iUIN, iUID, iMsgType: integer; sConfName, sMsg: string): boolean;
begin
// your own code
result := true;
end;
begin
end.
You can put your code instead of the comment.
Parameter |
Type |
Value |
---|---|---|
iCID |
integer |
Connection ID of the client, unique session identifier in the online structure of network connections to the server; |
iUIN |
integer |
unique identifier of the message sender (number >=0); |
iUID |
integer |
unique identifier of the conference (number >=0); |
sConfName |
string |
text name of a conference; |
iMsgType |
integer |
|
sMsg |
string |
message text. |
By default, this function must return the value "true". However, if you decide to cancel the message sending to a conference you can set the value to "false" and then this message will be deleted and won't show up neither for the sender nor for all conference members.
function OnConfMessage(iCID, iUIN, iUID, iMsgType: integer; sConfName, sMsg: string): boolean;
var
bFlag: boolean;
begin
bFlag := true;
if sConfName = 'main' then begin
if iUIN <> 3 then bFlag := false;
end;
result := bFlag;
end;
begin
end.
The script checks who send messages to text conferences and in which of them. If this message is sent to the conference "main" and the sender's UIN is differ from 3 (for example, this is a conference moderator), then this message is deleted. In this way we can make a filter like "No one can send messages to the conference "main" except John Doe, and he has UIN=3".