From 08b9469e2c71e06fdd70d607f281686746755073 Mon Sep 17 00:00:00 2001 From: Satya Ortiz-Gagne Date: Mon, 10 Jun 2019 10:20:39 -0400 Subject: DAIDE - Added connection_handler and server - Ability to open and close port when DAIDE games are started and stopped - Can get the DAIDE port using a request --- diplomacy/server/notifier.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'diplomacy/server/notifier.py') diff --git a/diplomacy/server/notifier.py b/diplomacy/server/notifier.py index 4bd64d3..2f8761c 100644 --- a/diplomacy/server/notifier.py +++ b/diplomacy/server/notifier.py @@ -75,7 +75,10 @@ class Notifier(): """ connection_handler = self.server.users.get_connection_handler(notification.token) if not self.ignores(notification) and connection_handler: - yield self.server.notifications.put((connection_handler, notification)) + translated_notifications = connection_handler.translate_notification(notification) + if translated_notifications: + for translated_notification in translated_notifications: + yield self.server.notifications.put((connection_handler, translated_notification)) @gen.coroutine def _notify_game(self, server_game, notification_class, **kwargs): -- cgit v1.2.3