aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-03-28 22:33:30 +0200
committertomsmeding <tom.smeding@gmail.com>2017-03-28 22:33:30 +0200
commit571e79cbceb65c93394cdc7220e6323b29fd1ac2 (patch)
tree369a1a778182e819dee4d866b887cc36512d9579
parentc33d258dd9645ba07ea9b5ef8a2fa924d771d228 (diff)
webclient: send message with / using double //
-rw-r--r--webclient/client.html5
1 files changed, 4 insertions, 1 deletions
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);