From 571e79cbceb65c93394cdc7220e6323b29fd1ac2 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Tue, 28 Mar 2017 22:33:30 +0200 Subject: webclient: send message with / using double // --- webclient/client.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webclient/client.html b/webclient/client.html index 3e7beb7..7885fe7 100644 --- a/webclient/client.html +++ b/webclient/client.html @@ -21,6 +21,7 @@ var net_callbacks={}; function net_send(msg,cb){ var id=uniqid()+""; sock.send(id+" "+msg); + console.log("Sent '"+id+" "+msg+"'"); net_callbacks[id]=cb; } @@ -327,7 +328,9 @@ function doSend(){ inputelem.value=""; if(text.length==0)return; - if(text[0]=="/"){ + if(text.length>=2&&text[0]=="/"&&text[1]=="/"){ + sendMessage(currentroom,text.slice(1)); + } else if(text[0]=="/"){ executeCommand(currentroom,text.slice(1)); } else { sendMessage(currentroom,text); -- cgit v1.2.3-70-g09d2