comparison src/server.c @ 368:9bf1f77985d2

[gaim-migrate @ 378] chat works properly now. it wasn't even working properly on the toc side, but the toc server was more lenient. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 09 Jun 2000 07:59:00 +0000
parents b402a23f35df
children be408b41c172
comparison
equal deleted inserted replaced
367:c457f47fbb1d 368:9bf1f77985d2
546 g_free(buf); 546 g_free(buf);
547 #else 547 #else
548 GList *bcs = buddy_chats; 548 GList *bcs = buddy_chats;
549 struct buddy_chat *b = NULL; 549 struct buddy_chat *b = NULL;
550 struct chat_connection *c = NULL; 550 struct chat_connection *c = NULL;
551 int count = 0;
551 552
552 while (bcs) { 553 while (bcs) {
554 count++;
553 b = (struct buddy_chat *)bcs->data; 555 b = (struct buddy_chat *)bcs->data;
554 if (id == b->id) 556 if (id == b->id)
555 break; 557 break;
556 bcs = bcs->next; 558 bcs = bcs->next;
557 b = NULL; 559 b = NULL;
558 } 560 }
559 561
560 if (!b) 562 if (!b)
561 return; 563 return;
564
565 sprintf(debug_buff, "Attempting to leave room %s (currently in %d rooms)\n",
566 b->name, count);
567 debug_print(debug_buff);
562 568
563 aim_chat_leaveroom(gaim_sess, b->name); 569 aim_chat_leaveroom(gaim_sess, b->name);
564 c = find_oscar_chat(b->name); 570 c = find_oscar_chat(b->name);
565 if (c != NULL) { 571 if (c != NULL) {
566 oscar_chats = g_list_remove(oscar_chats, c); 572 oscar_chats = g_list_remove(oscar_chats, c);
567 gdk_input_remove(c->inpa); 573 gdk_input_remove(c->inpa);
568 g_free(c->name); 574 g_free(c->name);
569 g_free(c); 575 g_free(c);
570 } 576 }
577 /* we do this because with Oscar it doesn't tell us we left */
578 serv_got_chat_left(b->id);
571 #endif 579 #endif
572 } 580 }
573 581
574 void serv_chat_whisper(int id, char *who, char *message) 582 void serv_chat_whisper(int id, char *who, char *message)
575 { 583 {
948 } 956 }
949 957
950 if (!b) 958 if (!b)
951 return; 959 return;
952 960
953 if (b->window) 961 sprintf(debug_buff, "Leaving room %s.\n", b->name);
954 gtk_widget_destroy(GTK_WIDGET(b->window)); 962 debug_print(debug_buff);
955 963
956 buddy_chats = g_list_remove(buddy_chats, b); 964 buddy_chats = g_list_remove(buddy_chats, b);
957 965
958 g_free(b); 966 g_free(b);
959 } 967 }