Mercurial > pidgin
comparison libpurple/protocols/qq/im.c @ 24138: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 | 619ac2303c46 |
comparison
equal
deleted
inserted
replaced
24137:87e61a85f5dd | 24138:dc112387190f |
---|---|
296 | 296 |
297 void qq_got_attention(PurpleConnection *gc, const gchar *msg) | 297 void qq_got_attention(PurpleConnection *gc, const gchar *msg) |
298 { | 298 { |
299 qq_data *qd; | 299 qq_data *qd; |
300 gchar *from; | 300 gchar *from; |
301 PurpleBuddy *b; | 301 PurpleBuddy *buddy; |
302 qq_buddy *qq_b; | |
303 time_t now = time(NULL); | 302 time_t now = time(NULL); |
304 | 303 |
305 qd = (qq_data *) gc->proto_data; | 304 qd = (qq_data *) gc->proto_data; |
306 | 305 |
306 g_return_if_fail(qd->uid > 0); | |
307 | |
307 from = uid_to_purple_name(qd->uid); | 308 from = uid_to_purple_name(qd->uid); |
308 g_return_if_fail(qd->uid > 0); | 309 buddy = purple_find_buddy(gc->account, from); |
309 | 310 if (buddy == NULL) { |
310 b = purple_find_buddy(gc->account, from); | 311 qq_create_buddy(gc, qd->uid, TRUE, TRUE); |
311 if (b == NULL) { | 312 } |
312 qq_create_buddy(gc, qd->uid, FALSE, TRUE); | |
313 b = purple_find_buddy(gc->account, from); | |
314 } | |
315 qq_b = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; | |
316 g_return_if_fail(qq_b != NULL); | |
317 | 313 |
318 serv_got_im(gc, from, msg, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY, now); | 314 serv_got_im(gc, from, msg, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY, now); |
315 g_free(from); | |
319 } | 316 } |
320 | 317 |
321 /* process received normal text IM */ | 318 /* process received normal text IM */ |
322 static void process_recv_normal_im_text(guint8 *data, gint len, qq_recv_normal_im_common *common, PurpleConnection *gc) | 319 static void process_recv_normal_im_text(guint8 *data, gint len, qq_recv_normal_im_common *common, PurpleConnection *gc) |
323 { | 320 { |