From: Don S. <ri...@us...> - 2005-01-11 21:33:04
|
Update of /cvsroot/gaim-bnet/gaim-bnet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6391/src Modified Files: chat.c Log Message: Patch 1100453, fixes showing of chan user list on rejoin Index: chat.c =================================================================== RCS file: /cvsroot/gaim-bnet/gaim-bnet/src/chat.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** chat.c 9 Jan 2005 03:35:24 -0000 1.2 --- chat.c 11 Jan 2005 21:32:54 -0000 1.3 *************** *** 23,28 **** --- 23,37 ---- #include "chat.h" #include "conn.h" + #include "buddy.h" #include "intl.h" + void + bnet_hash_join_all(gpointer key, gpointer value, gpointer user_data) { + GaimConversation *convo = (GaimConversation *)user_data; + BNetUser *u = BNET_USER(value); + + gaim_conv_chat_add_user(GAIM_CONV_CHAT(convo), u->nick, u->game, 0, FALSE); + } + gint bnet_chat_send_im(GaimConnection *gc, const gchar *who, const gchar *what, *************** *** 72,76 **** chan = g_hash_table_lookup(data, "channel"); ! bnet_conn_send(conn, "/join %s\n", chan); } --- 81,99 ---- chan = g_hash_table_lookup(data, "channel"); ! if (!strcmp(conn->chan, chan)) { ! GaimConversation *convo; ! ! /* We are already on chan, simply show the window and populate it! */ ! ! serv_got_joined_chat(gc, 1, chan); ! ! convo = gaim_find_conversation_with_account(conn->chan, conn->account); ! g_return_if_fail(convo); ! ! g_hash_table_foreach(conn->users, bnet_hash_join_all, convo); ! } ! else { ! bnet_conn_send(conn, "/join %s\n", chan); ! } } |