home · contact · privacy
Only include clients with sessions in send-to-all.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 31 Oct 2020 10:03:59 +0000 (11:03 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 31 Oct 2020 10:03:59 +0000 (11:03 +0100)
new2/plomrogue/io.py

index 908d7bf504b7c304c937729b1bb5cccb3f47538b..acf58d4adf177b2e5ce779d4a58a8c5f9b4c8b00 100644 (file)
@@ -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)