37 lines
825 B
Plaintext
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();
|
|
%>
|