diff options
Diffstat (limited to 'chatserver.html')
-rw-r--r-- | chatserver.html | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chatserver.html b/chatserver.html index 02c0b1a..2b46d5c 100644 --- a/chatserver.html +++ b/chatserver.html @@ -108,10 +108,8 @@ ws.addEventListener("message",function(msg){ else if(cmd[0]=="#yournick")nick=cmd[1]; else if(cmd[0]=="#lobbylist")updateLobbyList(cmd.slice(1)); else if(cmd[0]=="#nicklist")updateNickList(cmd.slice(1)); - else if(cmd[0]=="#nick"){ - addMessageLine("--","<"+cmd[1]+"> is now known as <"+cmd[2]+">"); - if(cmd[1]==nick)nick=cmd[2]; - } else if(cmd[0]=="#join")addMessageLine("--","<"+cmd[1]+"> joined the lobby"); + else if(cmd[0]=="#nick")addMessageLine("--","<"+cmd[1]+"> is now known as <"+cmd[2]+">"); + else if(cmd[0]=="#join")addMessageLine("--","<"+cmd[1]+"> joined the lobby"); else if(cmd[0]=="#part")addMessageLine("--","<"+cmd[1]+"> left the lobby"); else if(cmd[0]=="#lobby")highlightLobby(cmd[1]); else if(cmd[0]=="#historystart")clearMessageHistory(); |