Began removing $Id$ tags. This will be an ongoing process.
[citadel.git] / webcit / static / instant_messenger.html
index 222e652b3308eb839f024c0139859f2df6a0116e..eb8add9f2131ceb9d4f69d1e9a7045560e190e11 100644 (file)
 <div id="main" style="position:fixed;width:100%;height:85%;top:15%;left:0%;overflow:auto;background:#ffffff"></div>
 
 <script type="text/javascript">
+/*
+ * Copyright 2000 - 2010 The Citadel Team
+ * Licensed under the GPL V3
+ *
+ * Chat window for Person 2 Person Chat
+ *
+ */
 
 var gexp_divs = new Array();
 var num_gexp_divs = 0;
@@ -47,10 +54,11 @@ function SendSomething(which_div, sendform, recipient) {
 
        // Send the text to the server
        parms = 'r=' + Math.random()
-               + '&g_cmd=SEXP ' + recipient + '|' + thetext;
-       new Ajax.Request('../ajax_servcmd',
+               + '&recp=' + recipient
+               + '&msg=' + encodeURIComponent(thetext);
+       new Ajax.Request('../ajax_send_instant_message',
                {
-                       method: 'get',
+                       method: 'post',
                        parameters: parms
                }
        );
@@ -123,7 +131,7 @@ function ShowNewMsg(gexp_xmlresponse) {
                        + 'onSubmit=\"return SendSomething(\'' + which_div + '\', \'sendform_'
                        + which_div + '\', \'' + sender + '\');\">'
                        + '<img src=\"citadelchat_16x.gif\">&nbsp;'
-                       + '<input type=\"text\" size=\"72\" maxlength=\"72\" name=\"sendthis\">'
+                       + '<input type=\"text\" size=\"72\" maxlength=\"600\" name=\"sendthis\">'
                        + '</form>'
                        + '<br></div>'
                        + '</div>\n';
@@ -200,7 +208,7 @@ function GrabMyName(greg_xmlresponse) {
 
 
 // Cause FetchNewMsgs() to be called periodically.
-new PeriodicalExecuter(FetchNewMsgs, 5);
+new PeriodicalExecuter(FetchNewMsgs, 10);
 
 </script>