Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -163,7 +163,7 @@ chat.on('connection', function(conn) { | ... | @@ -163,7 +163,7 @@ chat.on('connection', function(conn) { |
163 | 163 | ||
164 | /* Functions */ | 164 | /* Functions */ |
165 | function updateUser(id, name) { | 165 | function updateUser(id, name) { |
166 | - if(name.length > 2 && name.length < 17 && name.indexOf(' ') < 0 && !utils.checkUser(clients, name) && name.match(alphanumeric) && name != 'Console' && name != 'System') { | 166 | + if(name.length > 2 && name.length < 17 && name.indexOf(' ') < 0 && !utils.checkUser(clients, name) && name.match(alphanumeric) && name != 'System') { |
167 | if(clients[id].un == null) { | 167 | if(clients[id].un == null) { |
168 | clients[id].con.write(JSON.stringify({type:'server', info:'success'})); | 168 | clients[id].con.write(JSON.stringify({type:'server', info:'success'})); |
169 | uid++; | 169 | uid++; |
... | @@ -187,7 +187,7 @@ function updateUser(id, name) { | ... | @@ -187,7 +187,7 @@ function updateUser(id, name) { |
187 | 187 | ||
188 | if(!name.match(alphanumeric)) motive = 'format'; | 188 | if(!name.match(alphanumeric)) motive = 'format'; |
189 | if(name.length < 3 || name.length > 16) motive = 'length'; | 189 | if(name.length < 3 || name.length > 16) motive = 'length'; |
190 | - if(utils.checkUser(clients, name) || name == 'Console' || name == 'System') motive = 'taken'; | 190 | + if(utils.checkUser(clients, name) || name == 'System') motive = 'taken'; |
191 | if(clients[id].un != null) check = true; | 191 | if(clients[id].un != null) check = true; |
192 | 192 | ||
193 | clients[id].con.write(JSON.stringify({type:'server', info:'rejected', reason:motive, keep:check})); | 193 | clients[id].con.write(JSON.stringify({type:'server', info:'rejected', reason:motive, keep:check})); | ... | ... |
-
Please register or login to post a comment