Use libtorrent smart_ban extension

This commit is contained in:
Andrew Resch 2008-10-19 06:02:35 +00:00
parent 9fc18f0e41
commit 56f1bff6d4
2 changed files with 7 additions and 0 deletions

View File

@ -195,6 +195,7 @@ class Core(
# Load metadata extension # Load metadata extension
self.session.add_extension(lt.create_metadata_plugin) self.session.add_extension(lt.create_metadata_plugin)
self.session.add_extension(lt.create_ut_metadata_plugin) self.session.add_extension(lt.create_ut_metadata_plugin)
self.session.add_extension(lt.create_smart_ban_plugin)
# Start the AlertManager # Start the AlertManager
self.alerts = AlertManager(self.session) self.alerts = AlertManager(self.session)

View File

@ -9,6 +9,7 @@
#include <libtorrent/extensions/ut_pex.hpp> #include <libtorrent/extensions/ut_pex.hpp>
#include <libtorrent/extensions/metadata_transfer.hpp> #include <libtorrent/extensions/metadata_transfer.hpp>
#include <libtorrent/extensions/ut_metadata.hpp> #include <libtorrent/extensions/ut_metadata.hpp>
#include <libtorrent/extensions/smart_ban.hpp>
#include <boost/python.hpp> #include <boost/python.hpp>
#include "gil.hpp" #include "gil.hpp"
@ -123,6 +124,10 @@ boost::shared_ptr<torrent_plugin> create_ut_pex_plugin_wrapper(torrent* t) {
return create_ut_pex_plugin(t, NULL); 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() void bind_extensions()
{ {
class_< class_<
@ -160,6 +165,7 @@ void bind_extensions()
def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper); def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper);
def("create_metadata_plugin", create_metadata_plugin_wrapper); def("create_metadata_plugin", create_metadata_plugin_wrapper);
def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper); def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper);
def("create_smart_ban_plugin", create_smart_ban_plugin_wrapper);
} }