Recognize every Shareaza and MLdonkey. Recognize eMule+, Hydranode and TrustyFiles to show their names in the Lists.

updownclient.h:

enum EClientSoftware{ SO_EMULE = 0, // default SO_CDONKEY = 1, // ET_COMPATIBLECLIENT SO_XMULE = 2, // ET_COMPATIBLECLIENT SO_AMULE = 3, // ET_COMPATIBLECLIENT SO_SHAREAZA = 4, // ET_COMPATIBLECLIENT SO_EMULEPLUS = 5, // Spike2 - Enhanced Client Recognization SO_HYDRANODE = 6, // Spike2 - Enhanced Client Recognization SO_MLDONKEY = 10, // ET_COMPATIBLECLIENT SO_LPHANT = 20, // ET_COMPATIBLECLIENT SO_SHAREAZA2 = 28, // Spike2 - Enhanced Client Recognization SO_TRUSTYFILES = 30, // Spike2 - Enhanced Client Recognization SO_SHAREAZA3 = 40, // other client types which are not identified with ET_COMPATIBLECLIENT SO_EDONKEYHYBRID = 50, SO_EDONKEY = 51, // Spike2 from aMule SO_MLDONKEY2 = 52, // Spike2 from aMule SO_OLDEMULE = 53, // Spike2 from aMule SO_SHAREAZA4 = 68, // Spike2 from aMule SO_MLDONKEY3 = 152, // Spike2 from aMule SO_URL, // WebCache //////////////////////////////////////////////////////////////////////////////////// SO_WEBCACHE, // statistics SO_UNKNOWN };

BaseClient.cpp:

int iHashType = GetHashType(); if (m_bEmuleProtocol || iHashType == SO_EMULE){ LPCTSTR pszSoftware; switch(m_byCompatibleClient){ case SO_CDONKEY: m_clientSoft = SO_CDONKEY; pszSoftware = _T("cDonkey"); break; case SO_XMULE: m_clientSoft = SO_XMULE; pszSoftware = _T("xMule"); break; case SO_AMULE: m_clientSoft = SO_AMULE; pszSoftware = _T("aMule"); break; case SO_SHAREAZA: case SO_SHAREAZA2: case SO_SHAREAZA3: case SO_SHAREAZA4: m_clientSoft = SO_SHAREAZA; pszSoftware = _T("Shareaza"); break; case SO_LPHANT: m_clientSoft = SO_LPHANT; pszSoftware = _T("lphant"); break; // Spike2 - Enhanced Client Recognization - START case SO_EMULEPLUS: m_clientSoft = SO_EMULEPLUS; pszSoftware = _T("eMule Plus"); break; case SO_HYDRANODE: m_clientSoft = SO_HYDRANODE; pszSoftware = _T("Hydranode"); break; case SO_TRUSTYFILES: m_clientSoft = SO_TRUSTYFILES; pszSoftware = _T("TrustyFiles"); break; // Spike2 - Enhanced Client Recognization - END default: if (m_bIsML || m_byCompatibleClient == SO_MLDONKEY || m_byCompatibleClient == SO_MLDONKEY2 || m_byCompatibleClient == SO_MLDONKEY3){ // Spike2 m_clientSoft = SO_MLDONKEY; pszSoftware = _T("MLdonkey"); } else if (m_bIsHybrid || m_byCompatibleClient == SO_EDONKEYHYBRID){ //Spike2 m_clientSoft = SO_EDONKEYHYBRID; pszSoftware = _T("eDonkeyHybrid"); } else if (m_byCompatibleClient != 0){ // Spike2 - recognize other Shareaza - START - just to be sure :) if (StrStrI(m_pszUsername,_T("shareaza"))) { m_clientSoft = SO_SHAREAZA; pszSoftware = _T("Shareaza"); } // Spike2 - recognize other Shareaza - END // Spike2 - Enhanced Client Recognization - START else if (StrStr(m_strModVersion,_T("Plus 1"))) { m_clientSoft = SO_EMULEPLUS; pszSoftware = _T("eMule Plus"); } // Spike2 - Enhanced Client Recognization - END else { m_clientSoft = SO_XMULE; // means: 'eMule Compatible' pszSoftware = _T("eMule Compat"); } // Spike2 } else{ m_clientSoft = SO_EMULE; pszSoftware = _T("eMule"); } } int iLen; TCHAR szSoftware[128]; if (m_byEmuleVersion == 0){ m_nClientVersion = MAKE_CLIENT_VERSION(0, 0, 0); iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s"), pszSoftware); } else if (m_byEmuleVersion != 0x99){ UINT nClientMinVersion = (m_byEmuleVersion >> 4)*10 + (m_byEmuleVersion & 0x0f); m_nClientVersion = MAKE_CLIENT_VERSION(0, nClientMinVersion, 0); iLen = _sntprintf(szSoftware, ARRSIZE(szSoftware), _T("%s v0.%u"), pszSoftware, nClientMinVersion); } else{ UINT nClientMajVersion = (m_nClientVersion >> 17) & 0x7f; UINT nClientMinVersion = (m_nClientVersion >> 10) & 0x7f; UINT nClientUpVersion = (m_nClientVersion >> 7) & 0x07; m_nClientVersion = MAKE_CLIENT_VERSION(nClientMajVersion, nClientMinVersion, nClientUpVersion); if ((m_clientSoft == SO_EMULE) || (m_clientSoft == SO_EMULEPLUS)) // Spike2 - show correct ePlus-Version

ClientList.cpp:

switch (cur_client->GetClientSoft()) { case SO_EMULE: case SO_OLDEMULE: stats[2]++; clientVersionEMule[cur_client->GetVersion()]++; break; case SO_EDONKEYHYBRID : stats[4]++; clientVersionEDonkeyHybrid[cur_client->GetVersion()]++; break; case SO_AMULE: stats[10]++; clientVersionAMule[cur_client->GetVersion()]++; break; case SO_EDONKEY: stats[1]++; clientVersionEDonkey[cur_client->GetVersion()]++; break; case SO_MLDONKEY: stats[3]++; break; case SO_SHAREAZA: stats[11]++; break; // all remaining 'eMule Compatible' clients case SO_HYDRANODE: // Spike2 - enhanced Client Recognization case SO_EMULEPLUS: // Spike2 - enhanced Client Recognization case SO_TRUSTYFILES: // Spike2 - enhanced Client Recognization case SO_CDONKEY: case SO_XMULE: case SO_LPHANT: stats[5]++; break; default: stats[0]++; break; }

Greetz--

Spike2

This post has been edited by **Famerlor**: 16 February 2006 - 09:53 PM