Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/group_join.c @ 24069:dc112387190f
2008.09.29 - ccpaging <ccpaging(at)gmail.com>
* 'Check Password' function for protocol 2007/2008
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:41:13 +0000 |
parents | dbc7a9742f8d |
children | 1bdf7b602684 |
comparison
equal
deleted
inserted
replaced
24068:87e61a85f5dd | 24069:dc112387190f |
---|---|
37 #include "group_info.h" | 37 #include "group_info.h" |
38 #include "group_join.h" | 38 #include "group_join.h" |
39 #include "group_opt.h" | 39 #include "group_opt.h" |
40 #include "group_conv.h" | 40 #include "group_conv.h" |
41 #include "group_search.h" | 41 #include "group_search.h" |
42 #include "group_im.h" | |
42 #include "qq_define.h" | 43 #include "qq_define.h" |
43 #include "packet_parse.h" | 44 #include "packet_parse.h" |
44 #include "qq_network.h" | 45 #include "qq_network.h" |
45 #include "qq_process.h" | 46 #include "qq_process.h" |
46 | 47 |
224 void qq_process_group_cmd_join_group_auth(guint8 *data, gint len, PurpleConnection *gc) | 225 void qq_process_group_cmd_join_group_auth(guint8 *data, gint len, PurpleConnection *gc) |
225 { | 226 { |
226 gint bytes; | 227 gint bytes; |
227 guint32 id; | 228 guint32 id; |
228 qq_data *qd; | 229 qq_data *qd; |
230 qq_group *group; | |
231 gchar *msg; | |
232 time_t now = time(NULL); | |
229 | 233 |
230 g_return_if_fail(data != NULL && len > 0); | 234 g_return_if_fail(data != NULL && len > 0); |
231 qd = (qq_data *) gc->proto_data; | 235 qd = (qq_data *) gc->proto_data; |
232 | 236 |
233 if (len < 4) { | 237 if (len < 4) { |
237 } | 241 } |
238 bytes = 0; | 242 bytes = 0; |
239 bytes += qq_get32(&id, data + bytes); | 243 bytes += qq_get32(&id, data + bytes); |
240 g_return_if_fail(id > 0); | 244 g_return_if_fail(id > 0); |
241 | 245 |
242 qq_got_attention(gc, _("Successed join to Qun")); | 246 group = qq_room_search_id(gc, id); |
247 if (group != NULL) { | |
248 msg = g_strdup_printf(_("Successed join to Qun %s (%d)"), group->title_utf8, group->ext_id); | |
249 qq_room_got_chat_in(gc, group, 0, msg, now); | |
250 g_free(msg); | |
251 } else { | |
252 qq_got_attention(gc, _("Successed join to Qun")); | |
253 } | |
243 } | 254 } |
244 | 255 |
245 /* process group cmd reply "join group" */ | 256 /* process group cmd reply "join group" */ |
246 void qq_process_group_cmd_join_group(guint8 *data, gint len, PurpleConnection *gc) | 257 void qq_process_group_cmd_join_group(guint8 *data, gint len, PurpleConnection *gc) |
247 { | 258 { |