Skip to content

Commit

Permalink
New option eDonkey.CloseNeighboursOnConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan386 committed Sep 30, 2018
1 parent ba27269 commit c04fb06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shareaza/NeighboursWithConnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ CNeighbour* CNeighboursWithConnect::ConnectTo(

case PROTOCOL_ED2K:
Settings.eDonkey.EnableToday = true;
CloseDonkeys();
if ( Settings.eDonkey.CloseNeighboursOnConnect )
CloseDonkeys();
break;

case PROTOCOL_BT:
Expand Down Expand Up @@ -274,7 +275,8 @@ CNeighbour* CNeighboursWithConnect::ConnectTo(

case PROTOCOL_ED2K:
Settings.eDonkey.EnableToday = true;
CloseDonkeys();
if ( Settings.eDonkey.CloseNeighboursOnConnect )
CloseDonkeys();
break;

case PROTOCOL_BT:
Expand Down
1 change: 1 addition & 0 deletions shareaza/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ void CSettings::Load()
Add( _T("Gnutella2"), _T("UdpOutFrames"), &Gnutella2.UdpOutFrames, 256, 1, 16, 2048 );
Add( _T("Gnutella2"), _T("UdpOutResend"), &Gnutella2.UdpOutResend, 6000, 1000, 1, 300, _T(" s") );

Add( _T("eDonkey"), _T("CloseNeighboursOnConnect"), &eDonkey.CloseNeighboursOnConnect, true );
Add( _T("eDonkey"), _T("DefaultServerFlags"), &eDonkey.DefaultServerFlags, 0xFFFFFFFF );
Add( _T("eDonkey"), _T("DequeueTime"), &eDonkey.DequeueTime, 3600, 60, 2, 512, _T(" m") );
Add( _T("eDonkey"), _T("EnableAlways"), &eDonkey.EnableAlways, false );
Expand Down
1 change: 1 addition & 0 deletions shareaza/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ class CSettings

struct seDonkey
{
bool CloseNeighboursOnConnect;
bool EnableToday;
bool EnableAlways;
bool FastConnect; // Try connecting to 2 servers to get online faster
Expand Down

0 comments on commit c04fb06

Please sign in to comment.