Mercurial > pidgin
comparison src/protocols/toc/toc.c @ 3466:7a3f16a375a5
[gaim-migrate @ 3516]
some patches from some people.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Thu, 29 Aug 2002 01:47:15 +0000 |
| parents | 8fa61405af2b |
| children | 16f4776742af |
comparison
equal
deleted
inserted
replaced
| 3465:ec437d73b2ee | 3466:7a3f16a375a5 |
|---|---|
| 972 char buf[BUF_LEN * 2]; | 972 char buf[BUF_LEN * 2]; |
| 973 g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name)); | 973 g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name)); |
| 974 sflap_send(g, buf, -1, TYPE_DATA); | 974 sflap_send(g, buf, -1, TYPE_DATA); |
| 975 } | 975 } |
| 976 | 976 |
| 977 static void toc_set_dir(struct gaim_connection *g, char *first, char *middle, char *last, | 977 static void toc_set_dir(struct gaim_connection *g, const char *first, const char *middle, const char *last, |
| 978 char *maiden, char *city, char *state, char *country, int web) | 978 const char *maiden, const char *city, const char *state, const char *country, int web) |
| 979 { | 979 { |
| 980 char buf2[BUF_LEN * 4], buf[BUF_LEN]; | 980 char buf2[BUF_LEN * 4], buf[BUF_LEN]; |
| 981 g_snprintf(buf2, sizeof(buf2), "%s:%s:%s:%s:%s:%s:%s:%s", first, | 981 g_snprintf(buf2, sizeof(buf2), "%s:%s:%s:%s:%s:%s:%s:%s", first, |
| 982 middle, last, maiden, city, state, country, (web == 1) ? "Y" : ""); | 982 middle, last, maiden, city, state, country, (web == 1) ? "Y" : ""); |
| 983 escape_text(buf2); | 983 escape_text(buf2); |
| 984 g_snprintf(buf, sizeof(buf), "toc_set_dir %s", buf2); | 984 g_snprintf(buf, sizeof(buf), "toc_set_dir %s", buf2); |
| 985 sflap_send(g, buf, -1, TYPE_DATA); | 985 sflap_send(g, buf, -1, TYPE_DATA); |
| 986 } | 986 } |
| 987 | 987 |
| 988 static void toc_dir_search(struct gaim_connection *g, char *first, char *middle, char *last, | 988 static void toc_dir_search(struct gaim_connection *g, const char *first, const char *middle, const char *last, |
| 989 char *maiden, char *city, char *state, char *country, char *email) | 989 const char *maiden, const char *city, const char *state, const char *country, const char *email) |
| 990 { | 990 { |
| 991 char buf[BUF_LONG]; | 991 char buf[BUF_LONG]; |
| 992 g_snprintf(buf, sizeof(buf) / 2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, | 992 g_snprintf(buf, sizeof(buf) / 2, "toc_dir_search %s:%s:%s:%s:%s:%s:%s:%s", first, middle, |
| 993 last, maiden, city, state, country, email); | 993 last, maiden, city, state, country, email); |
| 994 debug_printf("Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, | 994 debug_printf("Searching for: %s,%s,%s,%s,%s,%s,%s\n", first, middle, last, maiden, |
| 1021 escape_text(buf2); | 1021 escape_text(buf2); |
| 1022 g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", buf2); | 1022 g_snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", buf2); |
| 1023 sflap_send(g, buf, -1, TYPE_DATA); | 1023 sflap_send(g, buf, -1, TYPE_DATA); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 static void toc_change_passwd(struct gaim_connection *g, char *orig, char *new) | 1026 static void toc_change_passwd(struct gaim_connection *g, const char *orig, const char *new) |
| 1027 { | 1027 { |
| 1028 char buf[BUF_LEN * 2]; | 1028 char buf[BUF_LEN * 2]; |
| 1029 g_snprintf(buf, BUF_LONG, "toc_change_passwd %s %s", orig, new); | 1029 g_snprintf(buf, BUF_LONG, "toc_change_passwd %s %s", orig, new); |
| 1030 sflap_send(g, buf, strlen(buf), TYPE_DATA); | 1030 sflap_send(g, buf, strlen(buf), TYPE_DATA); |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 static void toc_add_buddy(struct gaim_connection *g, char *name) | 1033 static void toc_add_buddy(struct gaim_connection *g, const char *name) |
| 1034 { | 1034 { |
| 1035 char buf[BUF_LEN * 2]; | 1035 char buf[BUF_LEN * 2]; |
| 1036 g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name)); | 1036 g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name)); |
| 1037 sflap_send(g, buf, -1, TYPE_DATA); | 1037 sflap_send(g, buf, -1, TYPE_DATA); |
| 1038 toc_set_config(g); | 1038 toc_set_config(g); |
| 1134 } | 1134 } |
| 1135 | 1135 |
| 1136 sflap_send(g, buf, -1, TYPE_DATA); | 1136 sflap_send(g, buf, -1, TYPE_DATA); |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 static void toc_chat_invite(struct gaim_connection *g, int id, char *message, char *name) | 1139 static void toc_chat_invite(struct gaim_connection *g, int id, const char *message, const char *name) |
| 1140 { | 1140 { |
| 1141 char buf[BUF_LONG]; | 1141 char buf[BUF_LONG]; |
| 1142 g_snprintf(buf, sizeof(buf) / 2, "toc_chat_invite %d \"%s\" %s", id, | 1142 g_snprintf(buf, sizeof(buf) / 2, "toc_chat_invite %d \"%s\" %s", id, |
| 1143 message ? message : "", normalize(name)); | 1143 message ? message : "", normalize(name)); |
| 1144 sflap_send(g, buf, -1, TYPE_DATA); | 1144 sflap_send(g, buf, -1, TYPE_DATA); |
