From 79157d4e055b99bebdf0b4051032d38da4e46a2e Mon Sep 17 00:00:00 2001 From: Igor Pissolati Date: Sun, 30 Jun 2019 18:33:57 -0300 Subject: [PATCH] Damn, another error fix This somehow took me some time to find --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index bb7593c..25908ee 100644 --- a/server.py +++ b/server.py @@ -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 @@ -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