| 223 /* Create the account */ |
224 /* Create the account */ |
| 224 account = purple_account_new(name, protocol); |
225 account = purple_account_new(name, protocol); |
| 225 |
226 |
| 226 /* Get the password for the account */ |
227 /* Get the password for the account */ |
| 227 password = getpass("Password: "); |
228 password = getpass("Password: "); |
| 228 purple_account_set_password(account, password, NULL, NULL); |
229 |
| |
230 manager = purple_credential_manager_get_default(); |
| |
231 purple_credential_manager_write_password_async(manager, account, password, |
| |
232 NULL, NULL, NULL); |
| 229 |
233 |
| 230 /* It's necessary to enable the account first. */ |
234 /* It's necessary to enable the account first. */ |
| 231 purple_account_set_enabled(account, UI_ID, TRUE); |
235 purple_account_set_enabled(account, UI_ID, TRUE); |
| 232 |
236 |
| 233 /* Now, to connect the account(s), create a status and activate it. */ |
237 /* Now, to connect the account(s), create a status and activate it. */ |