src/conversation.c

changeset 6496
9833c2665143
parent 6485
3c7ba18e32f1
child 6509
2419bd620751
equal deleted inserted replaced
6495:02f5ce189666 6496:9833c2665143
1429 gaim_conversation_write(GaimConversation *conv, const char *who, 1429 gaim_conversation_write(GaimConversation *conv, const char *who,
1430 const char *message, size_t length, int flags, 1430 const char *message, size_t length, int flags,
1431 time_t mtime) 1431 time_t mtime)
1432 { 1432 {
1433 GaimPluginProtocolInfo *prpl_info = NULL; 1433 GaimPluginProtocolInfo *prpl_info = NULL;
1434 GaimConnection *gc; 1434 GaimConnection *gc = NULL;
1435 GaimAccount *account; 1435 GaimAccount *account;
1436 GaimConversationUiOps *ops; 1436 GaimConversationUiOps *ops;
1437 GaimWindow *win; 1437 GaimWindow *win;
1438 struct buddy *b; 1438 struct buddy *b;
1439 GaimUnseenState unseen; 1439 GaimUnseenState unseen;
1446 1446
1447 if (ops == NULL || ops->write_conv == NULL) 1447 if (ops == NULL || ops->write_conv == NULL)
1448 return; 1448 return;
1449 1449
1450 account = gaim_conversation_get_account(conv); 1450 account = gaim_conversation_get_account(conv);
1451 gc = gaim_account_get_connection(account); 1451
1452 if (account != NULL)
1453 gc = gaim_account_get_connection(account);
1452 1454
1453 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT && 1455 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT &&
1454 (account->gc == NULL || !g_slist_find(account->gc->buddy_chats, conv))) 1456 (gc == NULL || !g_slist_find(gc->buddy_chats, conv)))
1455 return; 1457 return;
1456 1458
1457 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM && 1459 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM &&
1458 !g_list_find(gaim_get_conversations(), conv)) 1460 !g_list_find(gaim_get_conversations(), conv))
1459 return; 1461 return;
1460 1462
1461 if (account->gc != NULL) { 1463 if (gc != NULL) {
1462 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl); 1464 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
1463 1465
1464 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM || 1466 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM ||
1465 !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { 1467 !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) {
1466 1468
1467 if (who == NULL) { 1469 if (who == NULL) {

mercurial