From 56f1bff6d42fd4895b4e3da4f26c7628b64f743e Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 19 Oct 2008 06:02:35 +0000 Subject: [PATCH] Use libtorrent smart_ban extension --- deluge/core/core.py | 1 + libtorrent/bindings/python/src/extensions.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/deluge/core/core.py b/deluge/core/core.py index 55f6d6fa0..55708e57d 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -195,6 +195,7 @@ class Core( # Load metadata extension self.session.add_extension(lt.create_metadata_plugin) self.session.add_extension(lt.create_ut_metadata_plugin) + self.session.add_extension(lt.create_smart_ban_plugin) # Start the AlertManager self.alerts = AlertManager(self.session) diff --git a/libtorrent/bindings/python/src/extensions.cpp b/libtorrent/bindings/python/src/extensions.cpp index 9489f99a1..1221e7012 100755 --- a/libtorrent/bindings/python/src/extensions.cpp +++ b/libtorrent/bindings/python/src/extensions.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "gil.hpp" @@ -123,6 +124,10 @@ boost::shared_ptr create_ut_pex_plugin_wrapper(torrent* t) { return create_ut_pex_plugin(t, NULL); } +boost::shared_ptr create_smart_ban_plugin_wrapper(torrent* t) { + return create_smart_ban_plugin(t, NULL); +} + void bind_extensions() { class_< @@ -160,6 +165,7 @@ void bind_extensions() def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper); def("create_metadata_plugin", create_metadata_plugin_wrapper); def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper); + def("create_smart_ban_plugin", create_smart_ban_plugin_wrapper); }