Mercurial > pidgin
comparison src/protocols/zephyr/zephyr.c @ 7118:bf630f7dfdcd
[gaim-migrate @ 7685]
Here's a commit that I think will make faceprint happy. GaimWindow ->
GaimConvWindow, GaimIm -> GaimConvIm, GaimChat -> GaimConvChat,
GaimBlistChat -> GaimChat, and updated the API functions as well. Plugin
authors are going to hunt me down and murder me. I can feel it..
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 02 Oct 2003 02:54:07 +0000 |
parents | 0909ebf6fb28 |
children | eda3de6dacbb |
comparison
equal
deleted
inserted
replaced
7117:943085b0ff8b | 7118:bf630f7dfdcd |
---|---|
365 char *send_inst; | 365 char *send_inst; |
366 char *realmptr; | 366 char *realmptr; |
367 char *sendertmp; | 367 char *sendertmp; |
368 char *ptr = notice.z_message + strlen(notice.z_message) + 1; | 368 char *ptr = notice.z_message + strlen(notice.z_message) + 1; |
369 int len = notice.z_message_len - (ptr - notice.z_message); | 369 int len = notice.z_message_len - (ptr - notice.z_message); |
370 GaimImFlags flags = 0; | 370 GaimConvImFlags flags = 0; |
371 if (len > 0) { | 371 if (len > 0) { |
372 buf = g_malloc(len + 1); | 372 buf = g_malloc(len + 1); |
373 g_snprintf(buf, len + 1, "%s", ptr); | 373 g_snprintf(buf, len + 1, "%s", ptr); |
374 g_strchomp(buf); | 374 g_strchomp(buf); |
375 buf2 = zephyr_to_html(buf); | 375 buf2 = zephyr_to_html(buf); |
376 g_free(buf); | 376 g_free(buf); |
377 if (!g_ascii_strcasecmp(notice.z_class, "MESSAGE") && | 377 if (!g_ascii_strcasecmp(notice.z_class, "MESSAGE") && |
378 !g_ascii_strcasecmp(notice.z_class_inst, "PERSONAL")) { | 378 !g_ascii_strcasecmp(notice.z_class_inst, "PERSONAL")) { |
379 if (!g_ascii_strcasecmp(notice.z_message, "Automated reply:")) | 379 if (!g_ascii_strcasecmp(notice.z_message, "Automated reply:")) |
380 flags |= GAIM_IM_AUTO_RESP; | 380 flags |= GAIM_CONV_IM_AUTO_RESP; |
381 serv_got_im(zgc, notice.z_sender, buf2, flags, time(NULL)); | 381 serv_got_im(zgc, notice.z_sender, buf2, flags, time(NULL)); |
382 } else { | 382 } else { |
383 zephyr_triple *zt1, *zt2; | 383 zephyr_triple *zt1, *zt2; |
384 zt1 = new_triple(notice.z_class, notice.z_class_inst, | 384 zt1 = new_triple(notice.z_class, notice.z_class_inst, |
385 notice.z_recipient); | 385 notice.z_recipient); |
796 ZSendNotice(¬ice, ZAUTH); | 796 ZSendNotice(¬ice, ZAUTH); |
797 g_free(buf); | 797 g_free(buf); |
798 return 0; | 798 return 0; |
799 } | 799 } |
800 | 800 |
801 static int zephyr_send_im(GaimConnection *gc, const char *who, const char *im, GaimImFlags flags) { | 801 static int zephyr_send_im(GaimConnection *gc, const char *who, const char *im, GaimConvImFlags flags) { |
802 ZNotice_t notice; | 802 ZNotice_t notice; |
803 char *buf; | 803 char *buf; |
804 const char *sig; | 804 const char *sig; |
805 | 805 |
806 if (flags & GAIM_IM_AUTO_RESP) | 806 if (flags & GAIM_CONV_IM_AUTO_RESP) |
807 sig = "Automated reply:"; | 807 sig = "Automated reply:"; |
808 else { | 808 else { |
809 sig = ZGetVariable("zwrite-signature"); | 809 sig = ZGetVariable("zwrite-signature"); |
810 if (!sig) { | 810 if (!sig) { |
811 sig = g_get_real_name(); | 811 sig = g_get_real_name(); |