Table of Content
HAL Forum
procedure ChatAddText (
integer ChatId,string ChatText)
Description:
Adds new line to specified chat window
Parameters:
ChatId Chat Id
ChatText Text to add to chat
procedure LiveChatPostMessage(string msg)
begin
  LongInt chatid;
  LongInt l;
  
  chatid = StringToLongint(GetSessionString("chat_id"));
  if (chatid>0) then begin
    ChatAddText(chatid,msg);
    l = ChatTextRowCnt(chatid);
    ToolWebOutLoggedString("{");
    ToolWebOutLoggedString(  "'objtype':'postmsg',");
    ToolWebOutLoggedString(  "'result':'success',");
    ToolWebOutLoggedString(  "'linenr':'" & l & "'");
    ToolWebOutLoggedString("}");
  end else begin
    ToolWebOutLoggedString("{");
    ToolWebOutLoggedString(  "'objtype':'postmsg',");
    ToolWebOutLoggedString(  "'result':'no-chat-found'");
    ToolWebOutLoggedString("}");
  end;

  return;
end;
Related topics:
««