aboutsummaryrefslogtreecommitdiff
path: root/chatserver.js
diff options
context:
space:
mode:
Diffstat (limited to 'chatserver.js')
-rwxr-xr-xchatserver.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/chatserver.js b/chatserver.js
index 51ab363..ec0e839 100755
--- a/chatserver.js
+++ b/chatserver.js
@@ -84,9 +84,10 @@ new WebSocketServer({port:WSPORT}).on("connection",function(ws){
while(fnick(choice+i)!=-1)i++;
choice+=i;
}
- lobbysend(lobbies[flob(uobj.lob)],"#nick "+uobj.nick+" "+choice);
+ lobbysend(lobbies[flob(uobj.lob)],"#nick "+uobj.nick+" "+choice,[uobj.id]);
}
uobj.nick=choice;
+ ws.send("#yournick "+uobj.nick);
do_persist_lobbies();
} else if(msg.match(/^#lobbylist/)){
ws.send("#lobbylist "+lobbies.map(function(lob){return lob.id+":"+lob.name;}).join(" "));