Skip to content
This repository has been archived by the owner on Jul 18, 2019. It is now read-only.

Commit

Permalink
Damn, another error fix
Browse files Browse the repository at this point in the history
This somehow took me some time to find
  • Loading branch information
Igoorx committed Jun 30, 2019
1 parent 4447c9e commit 79157d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def onTextMessage(self, payload):
except:
pass

if self.server.getPlayerCountByAddress(self.address) >= self.server.maxSimulIP:
if self.address != "127.0.0.1" and self.server.getPlayerCountByAddress(self.address) >= self.server.maxSimulIP:
self.exception("Too many connections")
self.transport.loseConnection()
return
Expand Down Expand Up @@ -344,8 +344,8 @@ def buildProtocol(self, addr):
def getMatch(self):
fmatch = None
for match in self.matches:
if len(match.players) <= self.server.playerCap and not match.closed:
if not self.server.allowLateEnter and match.playing:
if not match.closed and len(match.players) < self.playerCap:
if not self.allowLateEnter and match.playing:
continue
fmatch = match
break
Expand Down

0 comments on commit 79157d4

Please sign in to comment.