Show
Ignore:
Timestamp:
07/03/08 22:13:49 (5 months ago)
Author:
flynd
Message:

More UIN removed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/history.cpp

    r6177 r6405  
    1717#include <sys/types.h> 
    1818#include <fcntl.h> 
     19#include <string> 
    1920 
    2021// Localization 
     
    3940 
    4041#define MAX_HISTORY_MSG_SIZE 8192 
     42 
     43using std::string; 
    4144 
    4245CUserHistory::CUserHistory() 
     
    250253    { 
    251254      GET_VALID_LINE_OR_BREAK; 
    252       unsigned long nUin = atol(&szResult[1]); 
     255        char* id = strdup(&szResult[1]); 
    253256      GET_VALID_LINE_OR_BREAK; 
    254257      char *szAlias = strdup(&szResult[1]); 
     
    260263      char *szEmail = strdup(&szResult[1]); 
    261264      GET_VALID_LINES; 
    262       e = new CEventAuthRequest(nUin, szAlias, szFName, szLName, szEmail, szMsg, 
    263                             nCommand, tTime, nFlags); 
     265        e = new CEventAuthRequest(id, LICQ_PPID, szAlias, szFName, szLName, 
     266            szEmail, szMsg, nCommand, tTime, nFlags); 
     267        free(id); 
    264268      free(szAlias); 
    265269      free(szFName); 
     
    271275    { 
    272276      GET_VALID_LINE_OR_BREAK; 
    273       unsigned long nUin = atol(&szResult[1]); 
    274       GET_VALID_LINES; 
    275       e = new CEventAuthGranted(nUin, szMsg, nCommand, tTime, nFlags); 
     277        char* id = strdup(&szResult[1]); 
     278      GET_VALID_LINES; 
     279        e = new CEventAuthGranted(id, LICQ_PPID, szMsg, nCommand, tTime, nFlags); 
     280        free(id); 
    276281      break; 
    277282    } 
     
    279284    { 
    280285      GET_VALID_LINE_OR_BREAK; 
    281       unsigned long nUin = atol(&szResult[1]); 
    282       GET_VALID_LINES; 
    283       e = new CEventAuthRefused(nUin, szMsg, nCommand, tTime, nFlags); 
     286        char* id = strdup(&szResult[1]); 
     287      GET_VALID_LINES; 
     288        e = new CEventAuthRefused(id, LICQ_PPID, szMsg, nCommand, tTime, nFlags); 
     289        free(id); 
    284290      break; 
    285291    } 
     
    287293    { 
    288294      GET_VALID_LINE_OR_BREAK; 
    289       unsigned long nUin = atol(&szResult[1]); 
     295        char* id = strdup(&szResult[1]); 
    290296      GET_VALID_LINE_OR_BREAK; 
    291297      char *szAlias = strdup(&szResult[1]); 
     
    296302      GET_VALID_LINE_OR_BREAK; 
    297303      char *szEmail = strdup(&szResult[1]); 
    298       e = new CEventAdded(nUin, szAlias, szFName, szLName, szEmail, 
     304        e = new CEventAdded(id, LICQ_PPID, szAlias, szFName, szLName, szEmail, 
    299305                            nCommand, tTime, nFlags); 
     306        free(id); 
    300307      free(szAlias); 
    301308      free(szFName); 
     
    334341      ContactList vc; 
    335342      bool b = true; 
    336       unsigned long nUin = 0; 
     343      string id; 
    337344      while (true) 
    338345      { 
    339346        GET_VALID_LINE_OR_BREAK; 
    340347        if (b) 
    341           nUin = atol(&szResult[1]); 
    342         else if (nUin != 0) 
    343           vc.push_back(new CContact(nUin, &szResult[1])); 
     348          id = &szResult[1]; 
     349        else if (!id.empty()) 
     350          vc.push_back(new CContact(id.c_str(), LICQ_PPID, &szResult[1])); 
    344351        b = !b; 
    345352      }