Mercurial > pidgin
comparison src/protocols/zephyr/zephyr.c @ 2417:5473c8c5378d
[gaim-migrate @ 2430]
boo-yah!
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 03 Oct 2001 09:48:33 +0000 |
parents | 569ae9f2bb89 |
children | 227cc42ffa6e |
comparison
equal
deleted
inserted
replaced
2416:61b816a7b467 | 2417:5473c8c5378d |
---|---|
371 !g_strcasecmp(notice.z_class_inst, "PERSONAL")) { | 371 !g_strcasecmp(notice.z_class_inst, "PERSONAL")) { |
372 if (!g_strcasecmp(notice.z_message, "Automated reply:")) | 372 if (!g_strcasecmp(notice.z_message, "Automated reply:")) |
373 away = TRUE; | 373 away = TRUE; |
374 else | 374 else |
375 away = FALSE; | 375 away = FALSE; |
376 len = MAX(BUF_LONG, strlen(buf2)); | 376 serv_got_im(zgc, notice.z_sender, buf2, 0, time((time_t)NULL)); |
377 buf = g_malloc(len + 1); | |
378 g_snprintf(buf, len + 1, "%s", buf2); | |
379 serv_got_im(zgc, notice.z_sender, buf, 0, time((time_t)NULL)); | |
380 g_free(buf); | |
381 } else { | 377 } else { |
382 zephyr_triple *zt1, *zt2; | 378 zephyr_triple *zt1, *zt2; |
383 zt1 = new_triple(notice.z_class, notice.z_class_inst, | 379 zt1 = new_triple(notice.z_class, notice.z_class_inst, |
384 notice.z_recipient); | 380 notice.z_recipient); |
385 zt2 = find_sub_by_triple(zt1); | 381 zt2 = find_sub_by_triple(zt1); |
386 if (!zt2) { | 382 if (!zt2) { |
387 /* we shouldn't be subscribed to this message. ignore. */ | 383 /* we shouldn't be subscribed to this message. ignore. */ |
388 } else { | 384 } else { |
389 len = MAX(BUF_LONG, strlen(buf2)); | |
390 buf = g_malloc(len + 1); | |
391 g_snprintf(buf, len + 1, "%s", buf2); | |
392 if (!zt2->open) { | 385 if (!zt2->open) { |
393 zt2->open = TRUE; | 386 zt2->open = TRUE; |
394 serv_got_joined_chat(zgc, zt2->id, zt2->name); | 387 serv_got_joined_chat(zgc, zt2->id, zt2->name); |
395 } | 388 } |
396 serv_got_chat_in(zgc, zt2->id, notice.z_sender, FALSE, | 389 serv_got_chat_in(zgc, zt2->id, notice.z_sender, FALSE, |
397 buf, time((time_t)NULL)); | 390 buf2, time((time_t)NULL)); |
398 g_free(buf); | |
399 } | 391 } |
400 free_triple(zt1); | 392 free_triple(zt1); |
401 } | 393 } |
402 g_free(buf2); | 394 g_free(buf2); |
403 } | 395 } |