| 66 | } |
| 67 | |
| 68 | int CFriends::GetFriendState(const char *pName, const char *pClan) const |
| 69 | { |
| 70 | int Result = FRIEND_NO; |
| 71 | unsigned NameHash = str_quickhash(pName); |
| 72 | unsigned ClanHash = str_quickhash(pClan); |
| 73 | for(int i = 0; i < m_NumFriends; ++i) |
| 74 | { |
| 75 | 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))) |
| 76 | { |
| 77 | if(m_aFriends[i].m_aName[0] == 0) |
| 78 | Result = FRIEND_CLAN; |
| 79 | else if(m_aFriends[i].m_NameHash == NameHash && !str_comp(m_aFriends[i].m_aName, pName)) |
| 80 | { |
| 81 | Result = FRIEND_PLAYER; |
| 82 | break; |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | return Result; |
| 87 | } |
| 88 | |
| 89 | bool CFriends::IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const |
| 90 | { |
no test coverage detected