comparison src/protocols/irc/irc.c @ 4476:62c1e5e656d0

[gaim-migrate @ 4751] gaim_conversation_new() now takes an aim_user parameter. This should fix the new placement grouping bugs, as the default "user" (account) selected was the first account in the list of connections. There may be side-effects, especially with perl plugins, but I'm not sure. Please report anything odd that you see as a result of this. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 30 Jan 2003 18:45:50 +0000
parents 1630b1dca931
children 3196d9044a45
comparison
equal deleted inserted replaced
4475:1f3241831734 4476:62c1e5e656d0
503 } 503 }
504 } 504 }
505 else { 505 else {
506 g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"), 506 g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"),
507 chat->nick); 507 chat->nick);
508 convo = gaim_conversation_new(GAIM_CONV_IM, chat->nick); 508 convo = gaim_conversation_new(GAIM_CONV_IM, chat->gc->user,
509 chat->nick);
509 gaim_conversation_write(convo, NULL, buf, -1, WFLAG_SYSTEM, 510 gaim_conversation_write(convo, NULL, buf, -1, WFLAG_SYSTEM,
510 time(NULL)); 511 time(NULL));
511 dcc_chat_cancel (chat); 512 dcc_chat_cancel (chat);
512 } 513 }
513 } 514 }
565 dcc_chat_callback (gpointer data, gint source, GaimInputCondition condition) { 566 dcc_chat_callback (gpointer data, gint source, GaimInputCondition condition) {
566 struct dcc_chat *chat = data; 567 struct dcc_chat *chat = data;
567 struct gaim_conversation *convo; 568 struct gaim_conversation *convo;
568 char buf[IRC_BUF_LEN]; 569 char buf[IRC_BUF_LEN];
569 570
570 convo = gaim_conversation_new(GAIM_CONV_IM, chat->nick); 571 convo = gaim_conversation_new(GAIM_CONV_IM, chat->gc->user, chat->nick);
571 572
572 chat->fd = source; 573 chat->fd = source;
573 g_snprintf (buf, sizeof buf, 574 g_snprintf (buf, sizeof buf,
574 _("DCC Chat with %s established"), 575 _("DCC Chat with %s established"),
575 chat->nick); 576 chat->nick);
2375 addr.sin_port = htons (chat->port); 2376 addr.sin_port = htons (chat->port);
2376 addr.sin_addr.s_addr = INADDR_ANY; 2377 addr.sin_addr.s_addr = INADDR_ANY;
2377 chat->fd = accept (chat->fd, (struct sockaddr *) (&addr), &addrlen); 2378 chat->fd = accept (chat->fd, (struct sockaddr *) (&addr), &addrlen);
2378 if (!chat->fd) { 2379 if (!chat->fd) {
2379 dcc_chat_cancel (chat); 2380 dcc_chat_cancel (chat);
2380 convo = gaim_conversation_new(GAIM_CONV_IM, chat->nick); 2381 convo = gaim_conversation_new(GAIM_CONV_IM, chat->gc->user,
2382 chat->nick);
2381 g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"), 2383 g_snprintf (buf, sizeof buf, _("DCC Chat with %s closed"),
2382 chat->nick); 2384 chat->nick);
2383 gaim_conversation_write(convo, NULL, buf, -1, 2385 gaim_conversation_write(convo, NULL, buf, -1,
2384 WFLAG_SYSTEM, time(NULL)); 2386 WFLAG_SYSTEM, time(NULL));
2385 return; 2387 return;
2386 } 2388 }
2387 chat->inpa = 2389 chat->inpa =
2388 gaim_input_add (chat->fd, GAIM_INPUT_READ, dcc_chat_in, chat); 2390 gaim_input_add (chat->fd, GAIM_INPUT_READ, dcc_chat_in, chat);
2389 convo = gaim_conversation_new(GAIM_CONV_IM, chat->nick); 2391 convo = gaim_conversation_new(GAIM_CONV_IM, chat->gc->user, chat->nick);
2390 g_snprintf (buf, sizeof buf, _("DCC Chat with %s established"), 2392 g_snprintf (buf, sizeof buf, _("DCC Chat with %s established"),
2391 chat->nick); 2393 chat->nick);
2392 gaim_conversation_write(convo, NULL, buf, -1, WFLAG_SYSTEM, time(NULL)); 2394 gaim_conversation_write(convo, NULL, buf, -1, WFLAG_SYSTEM, time(NULL));
2393 debug_printf ("Chat with %s established\n", chat->nick); 2395 debug_printf ("Chat with %s established\n", chat->nick);
2394 dcc_chat_list = g_slist_append (dcc_chat_list, chat); 2396 dcc_chat_list = g_slist_append (dcc_chat_list, chat);