src/protocols/zephyr/zephyr.c

changeset 5136
81079a81ebc6
parent 5132
9b087ef3f525
child 5202
2c78987f497b
equal deleted inserted replaced
5135:fbcfa5df4c5e 5136:81079a81ebc6
777 ZSendNotice(&notice, ZAUTH); 777 ZSendNotice(&notice, ZAUTH);
778 g_free(buf); 778 g_free(buf);
779 return 0; 779 return 0;
780 } 780 }
781 781
782 static int zephyr_send_im(struct gaim_connection *gc, char *who, char *im, int len, int flags) { 782 static int zephyr_send_im(struct gaim_connection *gc, const char *who, const char *im, int len, int flags) {
783 ZNotice_t notice; 783 ZNotice_t notice;
784 char *buf; 784 char *buf;
785 const char *sig; 785 const char *sig;
786 786
787 if (flags & IM_FLAG_AWAY) 787 if (flags & IM_FLAG_AWAY)
806 "Class $class, Instance $instance:\n" 806 "Class $class, Instance $instance:\n"
807 "To: @bold($recipient) at $time $date\n" 807 "To: @bold($recipient) at $time $date\n"
808 "From: @bold($1) <$sender>\n\n$2"; 808 "From: @bold($1) <$sender>\n\n$2";
809 notice.z_message_len = strlen(im) + strlen(sig) + 4; 809 notice.z_message_len = strlen(im) + strlen(sig) + 4;
810 notice.z_message = buf; 810 notice.z_message = buf;
811 ZSendNotice(&notice, ZAUTH);
812 g_free(buf); 811 g_free(buf);
813 return 1; 812 return 1;
814 } 813 }
815 814
816 static char *zephyr_normalize(const char *orig) 815 static char *zephyr_normalize(const char *orig)
822 g_snprintf(buf, 80, "%s@%s", orig, ZGetRealm()); 821 g_snprintf(buf, 80, "%s@%s", orig, ZGetRealm());
823 } 822 }
824 return buf; 823 return buf;
825 } 824 }
826 825
827 static void zephyr_zloc(struct gaim_connection *gc, char *who) 826 static void zephyr_zloc(struct gaim_connection *gc, const char *who)
828 { 827 {
829 ZAsyncLocateData_t ald; 828 ZAsyncLocateData_t ald;
830 829
831 if (ZRequestLocations(zephyr_normalize(who), &ald, UNACKED, ZAUTH) 830 if (ZRequestLocations(zephyr_normalize(who), &ald, UNACKED, ZAUTH)
832 != ZERR_NONE) { 831 != ZERR_NONE) {
834 } 833 }
835 pending_zloc_names = g_list_append(pending_zloc_names, 834 pending_zloc_names = g_list_append(pending_zloc_names,
836 g_strdup(zephyr_normalize(who))); 835 g_strdup(zephyr_normalize(who)));
837 } 836 }
838 837
839 static GList *zephyr_buddy_menu(struct gaim_connection *gc, char *who) 838 static GList *zephyr_buddy_menu(struct gaim_connection *gc, const char *who)
840 { 839 {
841 GList *m = NULL; 840 GList *m = NULL;
842 struct proto_buddy_menu *pbm; 841 struct proto_buddy_menu *pbm;
843 842
844 pbm = g_new0(struct proto_buddy_menu, 1); 843 pbm = g_new0(struct proto_buddy_menu, 1);

mercurial