Changeset 6338
- Timestamp:
- 06/18/08 23:55:04 (6 months ago)
- Location:
- trunk/licq
- Files:
-
- 2 modified
-
include/licq_user.h (modified) (1 diff)
-
src/user.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_user.h
r6329 r6338 1360 1360 1361 1361 /** 1362 * Check if a group id is valid 1363 * 1364 * @param gtype Group type 1365 * @param groupId Id of group to check for 1366 * @return True if the group exists 1367 */ 1368 bool groupExists(GroupType gtype, unsigned short groupId); 1369 1370 /** 1362 1371 * Add a user group 1363 1372 * -
trunk/licq/src/user.cpp
r6328 r6338 872 872 if (group != NULL) 873 873 group->Unlock(); 874 } 875 876 bool CUserManager::groupExists(GroupType gtype, unsigned short groupId) 877 { 878 // Is it a valid system group? 879 if (gtype == GROUPS_SYSTEM) 880 return (groupId <= NUM_GROUPS_SYSTEM_ALL); 881 882 // Is it an invalid group type? 883 if (gtype != GROUPS_USER) 884 return false; 885 886 // Does the user group exist in the list? 887 GroupMap* groups = LockGroupList(LOCK_R); 888 GroupMap::const_iterator iter = groups->find(groupId); 889 bool found = (iter != groups->end()); 890 UnlockGroupList(); 891 return found; 874 892 } 875 893
