- Support peer manual ban (from peer list)

This commit is contained in:
Christophe Dumez 2009-11-17 16:02:35 +00:00
commit 7c84551150
14 changed files with 77 additions and 5 deletions

View file

@ -363,6 +363,7 @@ void bittorrent::configureSession() {
// * Maximum ratio
setDeleteRatio(Preferences::getDeleteRatio());
// Ip Filter
FilterParserThread::processFilterList(s, Preferences::bannedIPs());
if(Preferences::isFilteringEnabled()) {
enableIPFilter(Preferences::getFilter());
}else{
@ -516,6 +517,11 @@ bool bittorrent::hasActiveTorrents() const {
return false;
}
void bittorrent::banIP(QString ip) {
FilterParserThread::processFilterList(s, QStringList(ip));
Preferences::banIP(ip);
}
// Delete a torrent from the session, given its hash
// permanent = true means that the torrent will be removed from the hard-drive too
void bittorrent::deleteTorrent(QString hash, bool permanent) {