Show
Ignore:
Timestamp:
05/02/03 09:06:55 (6 years ago)
Author:
emostar
Message:

Now everyone can use this. Load the owner from owner.Licq

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/protocol_plugin_1_3_0/licq/src/user.cpp

    r3469 r3476  
    149149{ 
    150150  //FIXME load owner of protocol plugins that are currently loaded 
    151   AddOwner("16325723", LICQ_PPID); 
     151  AddOwner("", LICQ_PPID); 
    152152  gLog.Info("%sUser configuration.\n", L_INITxSTR); 
    153153 
     
    16021602 
    16031603void ICQUser::Init(unsigned long _nUin) 
    1604 {   
     1604{ 
    16051605  char szUin[24]; 
    16061606  sprintf(szUin, "%ld", _nUin); 
     
    16691669   
    16701670  // gui plugin compat 
    1671   if (m_nPPID == LICQ_PPID) 
     1671  if (m_nPPID == LICQ_PPID && m_szId) 
    16721672    m_nUin = strtoul(m_szId, (char **)NULL, 10); 
    16731673  else 
     
    28152815ICQOwner::ICQOwner(const char *_szId, unsigned long _nPPID) 
    28162816{ 
    2817   gLog.Info("%sOwner configuration for %s.\n", L_INITxSTR, _szId); 
    28182817  char szTemp[MAX_LINE_LEN]; 
    28192818  char filename[MAX_FILENAME_LEN]; 
     
    28222821  m_szPassword = NULL; 
    28232822 
    2824   Init(_szId, _nPPID); 
    2825   //SetOnContactList(true); 
    2826   m_bOnContactList = true; 
    2827  
    28282823  // Get data from the config file 
    28292824  char *p = PPIDSTRING(_nPPID); 
     
    28382833  } 
    28392834 
     2835  // Get the id before init 
    28402836  m_fConf.SetFileName(filename); 
     2837  m_fConf.ReloadFile(); 
     2838  m_fConf.SetFlags(0); 
     2839  m_fConf.SetSection("user"); 
     2840  m_fConf.ReadStr("Uin", szTemp, "", false); 
     2841   
     2842  // Now we can init 
     2843  Init(szTemp, _nPPID); 
     2844  m_bOnContactList = true; 
     2845 
     2846  // And finally our favorite function 
    28412847  LoadInfo(); 
    28422848  m_fConf.ReadStr("Password", szTemp, "", false); 
     
    28522858  m_fConf.CloseFile(); 
    28532859 
     2860  gLog.Info("%sOwner configuration for %s.\n", L_INITxSTR, m_szId); 
     2861 
    28542862  snprintf(filename, MAX_FILENAME_LEN - 1, "%s/%s/owner.%s.%s.history", BASE_DIR, HISTORY_DIR, 
    2855            _szId, p); 
     2863           m_szId, p); 
    28562864  SetHistoryFile(filename); 
    28572865 
     
    29242932  } 
    29252933  m_fConf.SetSection("user"); 
    2926   m_fConf.WriteNum("Uin", Uin()); 
     2934  m_fConf.WriteStr("Uin", IdString()); 
    29272935  m_fConf.WriteBool("WebPresence", WebAware()); 
    29282936  m_fConf.WriteBool("HideIP", HideIp());