File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -320,11 +320,11 @@ void SV_DirectConnect( netadr_t from ) {
320320 // check for > sv_maxConnPerIP connections from same IP
321321 int count = 0 , i = 0 ;
322322 for (i = 0 , cl = svs.clients ; i < sv_maxclients->integer ; i++, cl++) {
323- if (NET_CompareBaseAdr (svs.clients [clientNum].netchan .remoteAddress , svs.clients [i].netchan .remoteAddress )) {
323+ if (cl-> state >= CS_CONNECTED && NET_CompareBaseAdr (svs.clients [clientNum].netchan .remoteAddress , svs.clients [i].netchan .remoteAddress )) {
324324 count++;
325325 }
326326 }
327- if (count > sv_maxConnPerIP->integer ) {
327+ if (count >= sv_maxConnPerIP->integer ) {
328328 cl->state = CS_FREE;
329329 denied = " Too many connections from the same IP" ;
330330 NET_OutOfBandPrint (NS_SERVER, from, " print\n %s\n " , denied);
You can’t perform that action at this time.
0 commit comments