diff options
| author | oy <Tom_Adams@web.de> | 2011-03-31 21:30:28 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-31 21:30:28 +0200 |
| commit | 85e9fb1e63384e5fae83aa08d4974056e6ec7c7f (patch) | |
| tree | b8f2d83fc0fdfabf70727cfc43ceb8bfbf565b09 /src/engine/client | |
| parent | b3ae1a088e2b1980cf6055a0fe787d6f3971ce9e (diff) | |
| download | zcatch-85e9fb1e63384e5fae83aa08d4974056e6ec7c7f.tar.gz zcatch-85e9fb1e63384e5fae83aa08d4974056e6ec7c7f.zip | |
made it possible to add just a clan as friend
Diffstat (limited to 'src/engine/client')
| -rw-r--r-- | src/engine/client/friends.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/client/friends.cpp b/src/engine/client/friends.cpp index 26d70892..c75db54e 100644 --- a/src/engine/client/friends.cpp +++ b/src/engine/client/friends.cpp @@ -48,7 +48,7 @@ bool CFriends::IsFriend(const char *pName, const char *pClan) const { for(int i = 0; i < m_NumFriends; ++i) { - if(!str_comp(m_aFriends[i].m_aName, pName) && !str_comp(m_aFriends[i].m_aClan, pClan)) + if((m_aFriends[i].m_aName[0] == 0 || !str_comp(m_aFriends[i].m_aName, pName)) && !str_comp(m_aFriends[i].m_aClan, pClan)) return true; } return false; @@ -56,7 +56,7 @@ bool CFriends::IsFriend(const char *pName, const char *pClan) const void CFriends::AddFriend(const char *pName, const char *pClan) { - if(m_NumFriends == MAX_FRIENDS) + if(m_NumFriends == MAX_FRIENDS || (pName[0] == 0 && pClan[0] == 0)) return; // make sure we don't have the friend already |