- Code: Alles auswählen
...
if (client->credits != NULL && client->credits->GetCurrentIdentState(client->GetIP()) == IS_IDENTIFIED)
{
//client has a valid secure hash, add him remove other one
if (thePrefs.GetVerbose())
AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_client->GetUserName(), cur_client->GetUserName());
// By Taz - SUQWT
// ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
waitinglist.GetAt(pos2)->ClearWaitStartTime();
// <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT
RemoveFromWaitingQueue(pos2,true);
if (!cur_client->socket)
{
if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 1")))
delete cur_client;
}
}
else
// By Taz - ClientAnalyzer don't remove both
#ifdef CLIENTANALYZER
{
bool removed;
CString cur_nick = cur_client->GetUserName();
removed = false;
if (cur_client->GetAntiLeechData()){
if (cur_client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || cur_client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF)){
// existing is a nick or mod thief, remove existing one
if (thePrefs.GetVerbose())
AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_nick, cur_nick);
// By Taz - SUQWT
// ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
waitinglist.GetAt(pos2)->ClearWaitStartTime();
// <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT
RemoveFromWaitingQueue(pos2,true);
if (!cur_client->socket)
{
if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 1")))
delete cur_client;
}
removed = true;
}
}
if(client->GetAntiLeechData()){
if (client->GetAntiLeechData()->GetBadForThisSession(AT_NICKTHIEF) || client->GetAntiLeechData()->GetBadForThisSession(AT_MODTHIEF)){
// new client is a nick or mod thief
if (thePrefs.GetVerbose())
AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName(), cur_nick, client->GetUserName());
return;
}
}
if (removed)
return;
}
#endif
// <------- ClientAnalyzer don't remove both
{
// remove both since we do not know who the bad one is
if (thePrefs.GetVerbose())
AddDebugLogLine(false, GetResString(IDS_SAMEUSERHASH), client->GetUserName() ,cur_client->GetUserName(), _T("Both"));
// By Taz - SUQWT
// ==> SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
waitinglist.GetAt(pos2)->ClearWaitStartTime();
// <== SUQWT [Moonlight/EastShare/ MorphXT] - Stulle
// <------- SUQWT
RemoveFromWaitingQueue(pos2,true);
if (!cur_client->socket)
{
if(cur_client->Disconnected(_T("AddClientToQueue - same userhash 2")))
delete cur_client;
}
return;
}
}
else if (client->GetIP() == cur_client->GetIP())
{
// same IP, different port, different userhash
cSameIP++;
}
}
BTW: can easily be used with other, then CA, leecher detectors as well