From 64fd94e51ede2bcfe626db4de82f0ce0987d6c4a Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 19 Jan 2014 16:07:59 +0000 Subject: [PATCH] Add external ip alert handler to core --- deluge/core/torrentmanager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index e95a1571e..f511210b0 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -191,6 +191,7 @@ class TorrentManager(component.Component): self.alerts.register_handler("file_error_alert", self.on_alert_file_error) self.alerts.register_handler("file_completed_alert", self.on_alert_file_completed) self.alerts.register_handler("state_update_alert", self.on_alert_state_update) + self.alerts.register_handler("external_ip_alert", self.on_alert_external_ip) self.alerts.register_handler("performance_alert", self.on_alert_performance) # Define timers @@ -1163,6 +1164,10 @@ class TorrentManager(component.Component): self.handle_torrents_status_callback(self.torrents_status_requests.pop()) + def on_alert_external_ip(self, alert): + """Alert handler for libtorrent external_ip_alert""" + log.info("on_alert_external_ip: %s", alert.message()) + def on_alert_performance(self, alert): """Alert handler for libtorrent performance_alert""" log.warning("on_alert_performance: %s, %s", alert.message(), alert.warning_code)