12 |
|
|
13 |
|
Collector::Collector(const ext::String& login, ext::String& password, const |
14 |
|
std::set<Buddy>& buddies, bool start) : login(login), password(password), |
15 |
< |
start(start) |
15 |
> |
start(start), prompted(false) |
16 |
|
{ |
17 |
|
if (start) |
18 |
|
{ |
35 |
|
|
36 |
|
auth.Login(login, password); |
37 |
|
|
38 |
+ |
if (prompted) password.Clear(); |
39 |
+ |
|
40 |
|
this->buddy = &buddy; |
41 |
|
this->icbm = &icbm; |
42 |
|
|
43 |
|
icbm.OnIncomingIcbm += etl::bind<0>(&Collector::reply, this); |
44 |
|
|
43 |
– |
// for (size_t index(password.GetSize()); index > 0; --index) password[index - |
44 |
– |
// 1] = '\0'; |
45 |
– |
|
45 |
|
net::Oscar::StringSet buddies_; |
46 |
|
|
47 |
|
for (std::set<Buddy>::const_iterator buddy(buddies.begin()); buddy != |
62 |
|
|
63 |
|
void Collector::prompt() |
64 |
|
{ |
65 |
+ |
if (!prompted) prompted = true; |
66 |
+ |
|
67 |
|
ext::String prompt(login + "'s AIM Password: "); |
68 |
|
char* password(getpass(prompt.NullTerminate())); |
69 |
|
|