aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/server/notifier.py
diff options
context:
space:
mode:
authorSatya Ortiz-Gagne <satya.ortiz-gagne@mila.quebec>2019-06-10 10:20:39 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-06-14 15:08:29 -0400
commit08b9469e2c71e06fdd70d607f281686746755073 (patch)
tree72066b7920e1c6aa0c8a0b390418c25a1afec1ad /diplomacy/server/notifier.py
parent9628cdadbf5a6380098168846dc51e4feadef6ad (diff)
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
Diffstat (limited to 'diplomacy/server/notifier.py')
-rw-r--r--diplomacy/server/notifier.py5
1 files changed, 4 insertions, 1 deletions
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):