| 87 | } |
| 88 | |
| 89 | bool CFriends::IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const |
| 90 | { |
| 91 | unsigned NameHash = str_quickhash(pName); |
| 92 | unsigned ClanHash = str_quickhash(pClan); |
| 93 | for(int i = 0; i < m_NumFriends; ++i) |
| 94 | { |
| 95 | if(((g_Config.m_ClFriendsIgnoreClan && m_aFriends[i].m_aName[0]) || (m_aFriends[i].m_ClanHash == ClanHash && !str_comp(m_aFriends[i].m_aClan, pClan))) && |
| 96 | ((!PlayersOnly && m_aFriends[i].m_aName[0] == 0) || (m_aFriends[i].m_NameHash == NameHash && !str_comp(m_aFriends[i].m_aName, pName)))) |
| 97 | return true; |
| 98 | } |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | void CFriends::AddFriend(const char *pName, const char *pClan) |
| 103 | { |
no test coverage detected