src/protocols/irc/irc.c

changeset 4476
bf88170ba269
parent 4456
ac4e44eb7e98
child 4491
715515ab95da
equal deleted inserted replaced
4475:26b1afb30359 4476:bf88170ba269
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);

mercurial