Changeset 6372 for trunk/console/src/console.cpp
- Timestamp:
- 07/01/08 05:59:12 (5 months ago)
- Files:
-
- 1 modified
-
trunk/console/src/console.cpp (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/console/src/console.cpp
r6361 r6372 299 299 if (o->Password()[0] == '\0') 300 300 { 301 gUserManager.DropOwner( );301 gUserManager.DropOwner(o); 302 302 UserSelect(); 303 303 } 304 304 else 305 gUserManager.DropOwner( );305 gUserManager.DropOwner(o); 306 306 } 307 307 … … 517 517 for (unsigned short i = 0; i < MAX_CON; i++) 518 518 { 519 if (s-> Uin() == winCon[i]->nLastUin)520 winCon[i]-> nLastUin = 0;519 if (s->Id() == winCon[i]->myLastId) 520 winCon[i]->myLastId.clear(); 521 521 } 522 522 } … … 639 639 // Needs to be better dealt with... 640 640 // How's this then? 641 winMain->wprintf("Registration complete!\nYour UIN is %ld\n",642 gUserManager.OwnerUin());641 winMain->wprintf("Registration complete!\nYour UIN is %s\n", 642 gUserManager.OwnerId(LICQ_PPID).c_str()); 643 643 winMain->fProcessInput = &CLicqConsole::InputCommand; 644 644 PrintStatus(); … … 815 815 if (e->SubResult() == ICQ_TCPxACK_RETURN) 816 816 { 817 u = gUserManager.FetchUser(e-> Uin(), LOCK_R);817 u = gUserManager.FetchUser(e->Id(), e->PPID(), LOCK_R); 818 818 win->wprintf("%s is in %s mode:\n%s\n[Send \"urgent\" ('.u') to ignore]\n", 819 819 u->GetAlias(), u->StatusStr(), u->AutoResponse()); … … 822 822 else if (e->SubResult() == ICQ_TCPxACK_REFUSE) 823 823 { 824 u = gUserManager.FetchUser(e-> Uin(), LOCK_R);824 u = gUserManager.FetchUser(e->Id(), e->PPID(), LOCK_R); 825 825 win->wprintf("%s refused %s.\n", 826 826 u->GetAlias(), ue->Description()); … … 839 839 if(!ea->Accepted()) 840 840 { 841 u = gUserManager.FetchUser(e-> Uin(), LOCK_R);841 u = gUserManager.FetchUser(e->Id(), e->PPID(), LOCK_R); 842 842 win->wprintf("%s refused file: %s\n", 843 843 u->GetAlias(), ea->Response()); … … 906 906 else 907 907 { 908 u = gUserManager.FetchUser(e-> Uin(), LOCK_R);908 u = gUserManager.FetchUser(e->Id(), e->PPID(), LOCK_R); 909 909 if (u != NULL && u->Away() && u->ShowAwayMsg()) 910 910 { … … 2149 2149 { 2150 2150 *sz = '\0'; 2151 ICQOwner *o = gUserManager.FetchOwner(LOCK_W);2151 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 2152 2152 o->SetAutoResponse(data->szRsp); 2153 gUserManager.DropOwner( );2153 gUserManager.DropOwner(o); 2154 2154 winMain->wprintf("%C%AAuto-response set.\n", 2155 2155 m_cColorInfo->nColor, m_cColorInfo->nAttr); … … 3037 3037 winMain->wprintf("Registration complete for user %s\n",data->szUin); 3038 3038 gUserManager.SetOwnerUin(atol(data->szUin)); 3039 ICQOwner *owner = gUserManager.FetchOwner(LOCK_W);3039 ICQOwner* owner = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 3040 3040 owner->SetPassword(data->szPassword1); 3041 gUserManager.DropOwner( );3041 gUserManager.DropOwner(owner); 3042 3042 3043 3043 winMain->wprintf("Save password? (y/N) "); … … 3052 3052 break; 3053 3053 } 3054 3054 3055 3055 case STATE_QUERY: 3056 3056 { 3057 ICQOwner *o = gUserManager.FetchOwner(LOCK_W);3057 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 3058 3058 o->SetSavePassword(tolower(cIn) == 'y'); 3059 gUserManager.DropOwner( );3060 3059 gUserManager.DropOwner(o); 3060 3061 3061 if (data->szOption[0] == '1') 3062 3062 { … … 3251 3251 winMain->state = STATE_LE; 3252 3252 3253 char sz[20];3254 3253 //TODO which owner 3255 sprintf(sz, "%lu", gUserManager.OwnerUin()); 3256 3257 winMain->data = new DataUserSelect(sz, LICQ_PPID); 3258 3259 ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 3254 winMain->data = new DataUserSelect(gUserManager.OwnerId(LICQ_PPID).c_str(), LICQ_PPID); 3255 3256 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 3260 3257 winMain->wprintf("%A%CEnter your password for %s (%s):%C%Z\n", A_BOLD, 3261 3258 COLOR_GREEN, o->GetAlias(), o->IdString(), COLOR_WHITE, A_BOLD); 3262 gUserManager.DropOwner( );3259 gUserManager.DropOwner(o); 3263 3260 } 3264 3261 … … 3288 3285 case STATE_QUERY: 3289 3286 { 3290 ICQOwner *o = gUserManager.FetchOwner(LOCK_W);3287 ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 3291 3288 o->SetSavePassword(tolower(cIn) == 'y'); 3292 3289 o->SetPassword(data->szPassword); 3293 gUserManager.DropOwner( );3290 gUserManager.DropOwner(o); 3294 3291 3295 3292 if (winMain->data)
