comparison src/protocols/icq/gaim_icq.c @ 4491:3196d9044a45

[gaim-migrate @ 4766] aim_user is dead. long live gaim_account. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 31 Jan 2003 13:03:47 +0000
parents 0c68d402f59f
children 5fcb44d771d2
comparison
equal deleted inserted replaced
4490:70b892694e0b 4491:3196d9044a45
272 struct icq_auth *iqnew; 272 struct icq_auth *iqnew;
273 273
274 icq_SendAuthMsg(iq->link, iq->uin); 274 icq_SendAuthMsg(iq->link, iq->uin);
275 275
276 g_snprintf(uin, sizeof(uin), "%ld", iq->uin); 276 g_snprintf(uin, sizeof(uin), "%ld", iq->uin);
277 if (find_buddy(iq->gc->user, uin)) 277 if (find_buddy(iq->gc->account, uin))
278 return; 278 return;
279 279
280 iqnew = g_memdup(iq, sizeof(struct icq_auth)); 280 iqnew = g_memdup(iq, sizeof(struct icq_auth));
281 iqnew->nick = g_strdup(iq->nick); 281 iqnew->nick = g_strdup(iq->nick);
282 282
302 nick, first ? first : "", first && last ? " " : "", last ? last : "", 302 nick, first ? first : "", first && last ? " " : "", last ? last : "",
303 (first || last) && email ? ", " : "", email ? email : ""); 303 (first || last) && email ? ", " : "", email ? email : "");
304 do_ask_dialog(msg, NULL, iq, _("Authorize"), icq_acc_auth, _("Deny"), icq_den_auth, my_protocol->plug ? my_protocol->plug->handle : NULL, FALSE); 304 do_ask_dialog(msg, NULL, iq, _("Authorize"), icq_acc_auth, _("Deny"), icq_den_auth, my_protocol->plug ? my_protocol->plug->handle : NULL, FALSE);
305 } 305 }
306 306
307 static void icq_login(struct aim_user *user) { 307 static void icq_login(struct gaim_account *account) {
308 struct gaim_connection *gc = new_gaim_conn(user); 308 struct gaim_connection *gc = new_gaim_conn(account);
309 struct icq_data *id = gc->proto_data = g_new0(struct icq_data, 1); 309 struct icq_data *id = gc->proto_data = g_new0(struct icq_data, 1);
310 icq_Link *link; 310 icq_Link *link;
311 char ps[9]; 311 char ps[9];
312 312
313 gc->checkbox = _("Send message through server"); 313 gc->checkbox = _("Send message through server");
314 314
315 icq_LogLevel = ICQ_LOG_MESSAGE; 315 icq_LogLevel = ICQ_LOG_MESSAGE;
316 316
317 g_snprintf(ps, sizeof(ps), "%s", user->password); 317 g_snprintf(ps, sizeof(ps), "%s", account->password);
318 link = id->link = icq_ICQLINKNew(atol(user->username), ps, 318 link = id->link = icq_ICQLINKNew(atol(account->username), ps,
319 user->proto_opt[USEROPT_NICK][0] ? user->proto_opt[USEROPT_NICK] : "gaim user", 319 account->proto_opt[USEROPT_NICK][0] ? account->proto_opt[USEROPT_NICK] : "gaim user",
320 TRUE); 320 TRUE);
321 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", user->proto_opt[USEROPT_NICK]); 321 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", account->proto_opt[USEROPT_NICK]);
322 322
323 link->icq_Logged = icq_online; 323 link->icq_Logged = icq_online;
324 link->icq_Disconnected = icq_logged_off; 324 link->icq_Disconnected = icq_logged_off;
325 link->icq_RecvMessage = icq_msg_incoming; 325 link->icq_RecvMessage = icq_msg_incoming;
326 link->icq_RecvURL = icq_url_incoming; 326 link->icq_RecvURL = icq_url_incoming;