I'm trying to adapt my DC++K to a Hub-link Network, so that it would check only users from the same hub as this client(this can be done by the connection, if it’s different from the usual connection types).
To do this, and since I don’t know nothing about C++, I’ve made this simple modifications:
Code: Select all
(StringDefs.cpp)
"Do not check zero byte sharers and users from other hubs(Hub-link Hub only)", //"Do not check zero byte sharers",
Code: Select all
(HubFrame.cpp)
if((((user->getBytesShared() == 0) ||
!(user->getConnection().c_str()=="Cable"
|| user->getConnection().c_str()=="28.8Kbps"
|| user->getConnection().c_str()=="33.6Kbps"
|| user->getConnection().c_str()=="56Kbps"
|| user->getConnection().c_str()=="ISDN"
|| user->getConnection().c_str()=="Satellite"
|| user->getConnection().c_str()=="DSL"
|| user->getConnection().c_str()=="LAN(T1)"
|| user->getConnection().c_str()=="LAN(T3)"))
&& (BOOLSETTING(DO_NOT_CHECK_ZERO_BYTE_SHARERS))))
{
shouldAdd = false;
}
Code: Select all
(HubFrame.cpp)
bool shouldSkipCauseOfZeroBytesShared = (((user->getBytesShared() == 0) ||
!(user->getConnection().c_str()=="Cable"
|| user->getConnection().c_str()=="28.8Kbps"
|| user->getConnection().c_str()=="33.6Kbps"
|| user->getConnection().c_str()=="56Kbps"
|| user->getConnection().c_str()=="ISDN"
|| user->getConnection().c_str()=="Satellite"
|| user->getConnection().c_str()=="DSL"
|| user->getConnection().c_str()=="LAN(T1)"
|| user->getConnection().c_str()=="LAN(T3)"))
&& (BOOLSETTING(DO_NOT_CHECK_ZERO_BYTE_SHARERS)));
Does anyone can help me?