From: Christian Heller Date: Sat, 31 Oct 2020 10:03:59 +0000 (+0100) Subject: Only include clients with sessions in send-to-all. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=bee25e81510591ade84600d509477231b0bcd28c;p=plomrogue2-experiments Only include clients with sessions in send-to-all. --- diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py index 908d7bf..acf58d4 100644 --- a/new2/plomrogue/io.py +++ b/new2/plomrogue/io.py @@ -91,5 +91,6 @@ class GameIO(): if connection_id: self.server.clients[connection_id].put(msg) else: - for c in self.server.clients.values(): - c.put(msg) + for c_id in self.game.sessions: + client = self.server.clients[c_id] + client.put(msg)