diff options
-rwxr-xr-x | chatserver.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chatserver.js b/chatserver.js index 0529630..00ca0f1 100755 --- a/chatserver.js +++ b/chatserver.js @@ -58,7 +58,7 @@ new WebSocketServer({port:WSPORT}).on("connection",function(ws){ } else if(msg.match(/^#nick /)){ var choice=msg.slice(6).replace(/[\x00-\x20\x7F\x80-\xFF]/g,""); //all shitty characters including space (' ') var i; - if(choice.length==0){ + if(choice.length==0||choice.length>8){ ws.send("#error Invalid nick"); return; } |