Changeset 4922

Show
Ignore:
Timestamp:
05/18/07 06:24:32 (16 months ago)
Author:
emostar
Message:

Remove the user from the invisible list as well when we delete a user.
Fixes #694

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/icqd-srv.cpp

    r4903 r4922  
    396396 
    397397    ICQUser *u = gUserManager.FetchUser(_szId, LICQ_PPID, LOCK_W); 
     398    // When we remove a user, we remove them from all parts of the list: 
     399    // Visible, Invisible and Ignore lists as well. 
    398400    unsigned short nGSID = u->GetGSID(); 
    399401    unsigned short nSID = u->GetSID(); 
    400402    unsigned short nVisibleSID = u->GetVisibleSID(); 
     403    unsigned short nInvisibleSID = u->GetInvisibleSID(); 
    401404    bool bIgnored = u->IgnoreList(); 
    402405    u->SetGSID(0); 
    403406    u->SetVisibleSID(0); 
     407    u->SetInvisibleSID(0); 
    404408    u->SetVisibleList(false); 
     409    u->SetInvisibleList(false); 
    405410    u->SaveLicqInfo(); 
    406411    gUserManager.DropUser(u); 
     
    422427        nVisibleSID, ICQ_ROSTxVISIBLE); 
    423428      SendEvent_Server(pVisRemove); 
     429    } 
     430 
     431    if (nInvisibleSID) 
     432    { 
     433      CSrvPacketTcp *pInvisRemove = new CPU_RemoveFromServerList(_szId, 0, 
     434          nInvisibleSID, ICQ_ROSTxINVISIBLE); 
     435      SendEvent_Server(pInvisRemove); 
    424436    } 
    425437  }