Author: andar

Revision: 4060

Log:
        Use libtorrent smart_ban extension

Diff:
Modified: trunk/deluge/core/core.py
===================================================================
--- trunk/deluge/core/core.py   2008-10-19 05:43:58 UTC (rev 4059)
+++ trunk/deluge/core/core.py   2008-10-19 06:02:35 UTC (rev 4060)
@@ -195,6 +195,7 @@
         # 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)

Modified: trunk/libtorrent/bindings/python/src/extensions.cpp
===================================================================
--- trunk/libtorrent/bindings/python/src/extensions.cpp 2008-10-19 05:43:58 UTC 
(rev 4059)
+++ trunk/libtorrent/bindings/python/src/extensions.cpp 2008-10-19 06:02:35 UTC 
(rev 4060)
@@ -9,6 +9,7 @@
 #include <libtorrent/extensions/ut_pex.hpp>
 #include <libtorrent/extensions/metadata_transfer.hpp>
 #include <libtorrent/extensions/ut_metadata.hpp>
+#include <libtorrent/extensions/smart_ban.hpp>
 #include <boost/python.hpp>
 #include "gil.hpp"
 
@@ -123,6 +124,10 @@
     return create_ut_pex_plugin(t, NULL);
 }
 
+boost::shared_ptr<torrent_plugin> create_smart_ban_plugin_wrapper(torrent* t) {
+    return create_smart_ban_plugin(t, NULL);
+}
+
 void bind_extensions()
 {
     class_<
@@ -160,6 +165,7 @@
     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);
 }
 
 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to