Changeset 6248
- Timestamp:
- 06/11/08 04:31:51 (6 months ago)
- Location:
- trunk/licq
- Files:
-
- 3 modified
-
include/licq_user.h (modified) (3 diffs)
-
src/icqd.cpp (modified) (1 diff)
-
src/user.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_user.h
r6217 r6248 531 531 char *AutoResponse() { return m_szAutoResponse; } 532 532 //!Retrieves the encoding Licq uses for this user 533 char *UserEncoding() { return m_szEncoding; }533 char* UserEncoding(); 534 534 //!True if they have sent the UTF8 Cap 535 535 bool SupportsUTF8() { return m_bSupportsUTF8; } … … 1134 1134 void SaveAllUsers(); 1135 1135 1136 char* DefaultUserEncoding() { return m_szDefaultEncoding; } 1137 void SetDefaultUserEncoding(const char* defaultEncoding); 1138 1136 1139 bool UpdateUsersInGroups(); 1137 1140 … … 1157 1160 m_nGroupIDListLockType, m_nOwnerListLockType; 1158 1161 bool m_bAllowSave; 1162 char* m_szDefaultEncoding; 1159 1163 1160 1164 friend class CICQDaemon; -
trunk/licq/src/icqd.cpp
r6227 r6248 832 832 licqConf.WriteBool("SendTypingNotification", m_bSendTN); 833 833 licqConf.WriteBool("ReconnectAfterUinClash", m_bReconnectAfterUinClash); 834 licqConf.WriteStr("DefaultUserEncoding", gUserManager.DefaultUserEncoding()); 834 835 835 836 // save the sound stuff -
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
