Changeset 3478 for branches/protocol_plugin_1_3_0
- Timestamp:
- 05/02/03 09:17:08 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/protocol_plugin_1_3_0/licq/src/icqd-srv.cpp
r3473 r3478 2820 2820 nPacketCount = packet.UnpackUnsignedShortBE(); 2821 2821 nCount += nPacketCount; 2822 2822 2823 2823 for (unsigned short i = 0; i < nPacketCount; i++) 2824 2824 { 2825 char *sz Name;2825 char *szId; 2826 2826 unsigned short nTag, nID, nType, nByteLen; 2827 2827 2828 // Can't use UnpackU inString because this may be a group name2829 sz Name= packet.UnpackStringBE();2828 // Can't use UnpackUserString because this may be a group name 2829 szId = packet.UnpackStringBE(); 2830 2830 nTag = packet.UnpackUnsignedShortBE(); 2831 2831 nID = packet.UnpackUnsignedShortBE(); … … 2833 2833 nByteLen = packet.UnpackUnsignedShortBE(); 2834 2834 2835 char *szUnicodeName = gTranslator.FromUnicode(sz Name);2835 char *szUnicodeName = gTranslator.FromUnicode(szId); 2836 2836 2837 2837 if (nByteLen) … … 2841 2841 gLog.Error("%sUnable to parse contact list TLV, aborting!\n", 2842 2842 L_ERRORxSTR); 2843 delete[] sz Name;2843 delete[] szId; 2844 2844 return; 2845 2845 } … … 2857 2857 bool bAwaitingAuth = packet.hasTLV(0x0066); 2858 2858 2859 unsigned long nUin = atoi(szName);2859 //unsigned long nUin = atoi(szName); 2860 2860 unsigned short nInGroup = gUserManager.GetGroupFromID(nTag); 2861 2861 bool isOnList = true; 2862 if ( nUin && !gUserManager.IsOnList(nUin))2862 if (szId && !gUserManager.IsOnList(szId, LICQ_PPID)) 2863 2863 { 2864 2864 isOnList = false; 2865 AddUserToList( nUin, false); // Don't notify server2865 AddUserToList(szId, LICQ_PPID, false); // Don't notify server 2866 2866 } 2867 2867 2868 2868 char *szUnicodeAlias = gTranslator.FromUnicode(szNewName); 2869 2869 2870 ICQUser *u = gUserManager.FetchUser( nUin, LOCK_W);2870 ICQUser *u = gUserManager.FetchUser(szId, LICQ_PPID, LOCK_W); 2871 2871 if (u) 2872 2872 { … … 2923 2923 } 2924 2924 2925 gLog.Info("%sAdded %s (% ld) to list from server.\n", L_SRVxSTR,2926 (szUnicodeAlias ? szUnicodeAlias : ""), nUin);2925 gLog.Info("%sAdded %s (%s) to list from server.\n", L_SRVxSTR, 2926 (szUnicodeAlias ? szUnicodeAlias : ""), szId); 2927 2927 if (szUnicodeAlias) 2928 2928 delete [] szUnicodeAlias; … … 2937 2937 case ICQ_ROSTxGROUP: 2938 2938 { 2939 if (sz Name[0] != '\0')2939 if (szId[0] != '\0') 2940 2940 { 2941 2941 // Rename the group if we have it already or else add it … … 2959 2959 2960 2960 packet.cleanupTLV(); 2961 delete[] sz Name;2961 delete[] szId; 2962 2962 } // for count 2963 2963
