Files
Facilitor/APPL/CHAT/ChatQueueAlive.asp
Erik Groener cf7beb5cf1 FCLT#85015 JScript runtime error bij starten van de chat in ChatQueueAlive.asp
svn path=/Website/trunk/; revision=66007
2024-08-23 09:18:39 +00:00

37 lines
825 B
Plaintext

<%@language = "javascript" %>
<% /*
$Revision$
$Id$
ChatQueueAlive.asp
Markeer in de chatQueue dat je nog steeds zit te wachten
*/
var JSON_Result = true;
%>
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="./chat.inc" -->
<%
var wantchannelId = getQParam("channelId");
var chat_queue = JSON.parse(Application(chat_queue_name) || "{}");
var result = {hasChatOnline: 0};
if (chat_queue.wanting && wantchannelId in chat_queue.wanting)
{
chat_queue.wanting[wantchannelId].alive = new Date().getTime();
Application.Lock();
Application(chat_queue_name) = JSON.stringify(chat_queue);
Application.UnLock();
}
for (var ch in chat_queue.accepting)
{
result.hasChatOnline++;
}
Response.Write(JSON.stringify(result));
ASPPAGE_END();
%>