home · contact · privacy
Only include clients with sessions in send-to-all.
[plomrogue2-experiments] / new2 / plomrogue / io.py
index 2c048f03b4b1b70fb47356af8cb5ecdc4e1b9c93..acf58d4adf177b2e5ce779d4a58a8c5f9b4c8b00 100644 (file)
@@ -56,7 +56,6 @@ class GameIO():
         from plomrogue.errors import GameError, ArgError, PlayError
         from plomrogue.misc import quote
 
-        print('DEBUG', input_);
         def answer(connection_id, msg):
             if connection_id:
                 self.send(msg, connection_id)
@@ -92,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)