Changeset 6248 for trunk/licq/src/user.cpp
- Timestamp:
- 06/11/08 04:31:51 (7 months ago)
- Files:
-
- 1 modified
-
trunk/licq/src/user.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/src/user.cpp
r6243 r6248 487 487 488 488 //=====CUserManager============================================================= 489 CUserManager::CUserManager() : m_hUsers(USER_HASH_SIZE) 489 CUserManager::CUserManager() 490 : m_hUsers(USER_HASH_SIZE), 491 m_szDefaultEncoding(NULL) 490 492 { 491 493 // Set up the basic all users and new users group … … 530 532 pthread_rdwr_destroy_np(&mutex_userlist); 531 533 pthread_rdwr_destroy_np(&mutex_grouplist); 534 535 if (m_szDefaultEncoding != NULL) 536 free(m_szDefaultEncoding); 532 537 } 533 538 … … 614 619 licqConf.ClearFlag(INI_FxFATAL); 615 620 licqConf.ReadNum("NewUserGroup", m_nNewUserGroup, 0); 621 licqConf.SetFlag(INI_FxFATAL); 622 623 char szTemp[MAX_LINE_LEN]; 624 licqConf.SetSection("network"); 625 licqConf.ClearFlag(INI_FxFATAL); 626 licqConf.ReadStr("DefaultUserEncoding", szTemp, ""); 627 SetString(&m_szDefaultEncoding, szTemp); 616 628 licqConf.SetFlag(INI_FxFATAL); 617 629 licqConf.CloseFile(); … … 1638 1650 u->RemoveFromGroup(GROUPS_USER, _nGroup); 1639 1651 DropUser(u); 1652 } 1653 1654 1655 void CUserManager::SetDefaultUserEncoding(const char* defaultEncoding) 1656 { 1657 SetString(&m_szDefaultEncoding, defaultEncoding); 1640 1658 } 1641 1659 … … 2513 2531 } 2514 2532 2533 char* ICQUser::UserEncoding() 2534 { 2535 if (m_szEncoding == NULL || m_szEncoding[0] == '\0') 2536 return gUserManager.DefaultUserEncoding(); 2537 else 2538 return m_szEncoding; 2539 } 2515 2540 2516 2541
