]> git.scottworley.com Git - reliable-chat/blobdiff - webclient/rc.html
/me support
[reliable-chat] / webclient / rc.html
index a896281f0247abfebcf20b46f87b637dfdaa0a2a..4c0555896e0e95df17f125cf026faba1fce64997 100644 (file)
                                message = "<" + rcnick() + "> " + input;
                        }
 
+                       // /me support
+                       var message;
+                       var re = /^\/me (.*)/;
+                       var match = re.exec(input);
+                       var inputme = input.substring(4);
+                       if (match) {
+                               message = "* " + rcnick() + "  " + inputme;
+                       } else {
+                               message = "<" + rcnick() + "> " + input;
+                       }
+
                        // Remind people to set their nick
                        if (rcnick() == 'anonymous') {
                                rcaddmessagetohistory("-!- Set your nick with /nick");
                <tr><td id="history"></td></tr>
                <tr><td id="status">&nbsp;</td></tr>
                <tr><td><form name="input" onsubmit="return false" autocomplete="off">
-                       <input id="say" onkeydown="return rckeydown(event)" autocomplete="off"></input>
+                       <input id="say" onkeydown="return rckeydown(event)" autocomplete="off" autofocus="autofocus"></input>
                        </form></td></tr>
        </table>
 </body>