annotate libgaim/protocols/qq/group_search.c @ 20382:bcba1cb6b318

Allow localization of the xmpp console plugin
author Mark Doliner <mark@kingant.net>
date Thu, 25 Jan 2007 07:32:30 +0000
parents c039c920e11c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
1 /**
15025
c039c920e11c [gaim-migrate @ 17807]
Mark Huetsch <markhuetsch>
parents: 14629
diff changeset
2 * @file group_search.c
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
3 *
15025
c039c920e11c [gaim-migrate @ 17807]
Mark Huetsch <markhuetsch>
parents: 14629
diff changeset
4 * gaim
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
5 *
15025
c039c920e11c [gaim-migrate @ 17807]
Mark Huetsch <markhuetsch>
parents: 14629
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
c039c920e11c [gaim-migrate @ 17807]
Mark Huetsch <markhuetsch>
parents: 14629
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
c039c920e11c [gaim-migrate @ 17807]
Mark Huetsch <markhuetsch>
parents: 14629
diff changeset
8 * source distribution.
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
9 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
13 * (at your option) any later version.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
14 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
18 * GNU General Public License for more details.
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
19 *
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
23 */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
24
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
25 #include "debug.h"
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
26
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
27 #include "char_conv.h"
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
28 #include "group_find.h"
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
29 #include "group_free.h"
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
30 #include "group_internal.h"
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
31 #include "group_join.h"
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
32 #include "group_network.h"
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
33 #include "group_search.h"
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
34 #include "utils.h"
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
35
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
36 enum {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
37 QQ_GROUP_SEARCH_TYPE_BY_ID = 0x01,
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
38 QQ_GROUP_SEARCH_TYPE_DEMO = 0x02
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
39 };
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
40
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
41 /* send packet to search for qq_group */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
42 void qq_send_cmd_group_search_group(GaimConnection *gc, guint32 external_group_id)
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
43 {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
44 guint8 *raw_data, *cursor, type;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
45 gint bytes, data_len;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
46
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
47 data_len = 6;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
48 raw_data = g_newa(guint8, data_len);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
49 cursor = raw_data;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
50 type = (external_group_id == 0x00000000) ? QQ_GROUP_SEARCH_TYPE_DEMO : QQ_GROUP_SEARCH_TYPE_BY_ID;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
51
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
52 bytes = 0;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
53 bytes += create_packet_b(raw_data, &cursor, QQ_GROUP_CMD_SEARCH_GROUP);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
54 bytes += create_packet_b(raw_data, &cursor, type);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
55 bytes += create_packet_dw(raw_data, &cursor, external_group_id);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
56
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
57 if (bytes != data_len)
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
58 gaim_debug(GAIM_DEBUG_ERROR, "QQ",
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
59 "Fail create packet for %s\n", qq_group_cmd_get_desc(QQ_GROUP_CMD_SEARCH_GROUP));
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
60 else
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
61 qq_send_group_cmd(gc, NULL, raw_data, data_len);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
62 }
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
63
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
64 static void _qq_setup_roomlist(qq_data *qd, qq_group *group)
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
65 {
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
66 GaimRoomlistRoom *room;
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
67 gchar field[11];
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
68
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
69 room = gaim_roomlist_room_new(GAIM_ROOMLIST_ROOMTYPE_ROOM, group->group_name_utf8, NULL);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
70 g_snprintf(field, sizeof(field), "%d", group->external_group_id);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
71 gaim_roomlist_room_add_field(qd->roomlist, room, field);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
72 g_snprintf(field, sizeof(field), "%d", group->creator_uid);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
73 gaim_roomlist_room_add_field(qd->roomlist, room, field);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
74 gaim_roomlist_room_add_field(qd->roomlist, room, group->group_desc_utf8);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
75 g_snprintf(field, sizeof(field), "%d", group->internal_group_id);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
76 gaim_roomlist_room_add_field(qd->roomlist, room, field);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
77 g_snprintf(field, sizeof(field), "%d", group->group_type);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
78 gaim_roomlist_room_add_field(qd->roomlist, room, field);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
79 g_snprintf(field, sizeof(field), "%d", group->auth_type);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
80 gaim_roomlist_room_add_field(qd->roomlist, room, field);
14519
e548832f0e82 [gaim-migrate @ 17239]
Mark Huetsch <markhuetsch>
parents: 14492
diff changeset
81 g_snprintf(field, sizeof(field), "%d", group->group_category);
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
82 gaim_roomlist_room_add_field(qd->roomlist, room, field);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
83 gaim_roomlist_room_add_field(qd->roomlist, room, group->group_name_utf8);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
84 gaim_roomlist_room_add(qd->roomlist, room);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
85
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
86 gaim_roomlist_set_in_progress(qd->roomlist, FALSE);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
87 }
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
88
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
89 /* process group cmd reply "search group" */
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
90 void qq_process_group_cmd_search_group(guint8 *data, guint8 **cursor, gint len, GaimConnection *gc)
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
91 {
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
92 guint8 search_type;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
93 guint16 unknown;
14492
a85299caf0c3 [gaim-migrate @ 17211]
Richard Laager <rlaager@wiktel.com>
parents: 14404
diff changeset
94 gint bytes, pascal_len;
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
95 qq_data *qd;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
96 qq_group *group;
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
97 GSList *pending_id;
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
98
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
99 g_return_if_fail(data != NULL && len > 0);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
100 qd = (qq_data *) gc->proto_data;
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
101
14243
0fed2f42ab3e [gaim-migrate @ 16925]
Mark Huetsch <markhuetsch>
parents: 14192
diff changeset
102 read_packet_b(data, cursor, len, &search_type);
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
103 group = g_newa(qq_group, 1);
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
104
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
105 /* now it starts with group_info_entry */
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
106 bytes = 0;
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
107 bytes += read_packet_dw(data, cursor, len, &(group->internal_group_id));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
108 bytes += read_packet_dw(data, cursor, len, &(group->external_group_id));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
109 bytes += read_packet_b(data, cursor, len, &(group->group_type));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
110 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
111 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
112 bytes += read_packet_dw(data, cursor, len, &(group->creator_uid));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
113 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
114 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
115 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
116 bytes += read_packet_dw(data, cursor, len, &(group->group_category));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
117 pascal_len = convert_as_pascal_string(*cursor, &(group->group_name_utf8), QQ_CHARSET_DEFAULT);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
118 bytes += pascal_len;
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
119 *cursor += pascal_len;
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
120 bytes += read_packet_w(data, cursor, len, &(unknown));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
121 bytes += read_packet_b(data, cursor, len, &(group->auth_type));
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
122 pascal_len = convert_as_pascal_string(*cursor, &(group->group_desc_utf8), QQ_CHARSET_DEFAULT);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
123 bytes += pascal_len;
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
124 *cursor += pascal_len;
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
125 /* end of one qq_group */
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
126 if(*cursor != (data + len)) {
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
127 gaim_debug(GAIM_DEBUG_ERROR, "QQ",
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
128 "group_cmd_search_group: Dangerous error! maybe protocol changed, notify developers!");
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
129 }
14404
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
130
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
131 pending_id = qq_get_pending_id(qd->joining_groups, group->external_group_id);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
132 if (pending_id != NULL) {
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
133 qq_set_pending_id(&qd->joining_groups, group->external_group_id, FALSE);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
134 if (qq_group_find_by_id(gc, group->internal_group_id, QQ_INTERNAL_ID) == NULL)
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
135 qq_group_create_internal_record(gc,
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
136 group->internal_group_id, group->external_group_id, group->group_name_utf8);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
137 qq_send_cmd_group_join_group(gc, group);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
138 } else {
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
139 _qq_setup_roomlist(qd, group);
8ff8f1c897b5 [gaim-migrate @ 17112]
Mark Huetsch <markhuetsch>
parents: 14243
diff changeset
140 }
14192
60b1bc8dbf37 [gaim-migrate @ 16863]
Evan Schoenberg <evan.s@dreskin.net>
parents:
diff changeset
141 }