comparison src/protocols/toc/toc.c @ 6622:a4622f1fb5a1

[gaim-migrate @ 7146] (10:10:23) Robot101: kills off OPT_CONN_* in favour of an enum, and deprecates all the IM_FLAGS_* except IM_FLAG_AWAY which is made into GAIM_IM_AUTO_RESP in a GaimImFlags enum. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 25 Aug 2003 14:12:28 +0000
parents 7c14b35bc984
children 156e6643f9db
comparison
equal deleted inserted replaced
6621:42fdf16f1dad 6622:a4622f1fb5a1
167 struct toc_data *tdt; 167 struct toc_data *tdt;
168 char buf[80]; 168 char buf[80];
169 169
170 gc = gaim_account_get_connection(account); 170 gc = gaim_account_get_connection(account);
171 gc->proto_data = tdt = g_new0(struct toc_data, 1); 171 gc->proto_data = tdt = g_new0(struct toc_data, 1);
172 gc->flags |= OPT_CONN_HTML; 172 gc->flags |= GAIM_CONNECTION_HTML;
173 gc->flags |= OPT_CONN_AUTO_RESP; 173 gc->flags |= GAIM_CONNECTION_AUTO_RESP;
174 174
175 g_snprintf(buf, sizeof buf, _("Looking up %s"), 175 g_snprintf(buf, sizeof buf, _("Looking up %s"),
176 gaim_account_get_string(account, "server", TOC_HOST)); 176 gaim_account_get_string(account, "server", TOC_HOST));
177 gaim_connection_update_progress(gc, buf, 1, TOC_CONNECT_STEPS); 177 gaim_connection_update_progress(gc, buf, 1, TOC_CONNECT_STEPS);
178 178
735 message = away; 735 message = away;
736 while (*message && (*message != ':')) 736 while (*message && (*message != ':'))
737 message++; 737 message++;
738 message++; 738 message++;
739 739
740 a = (away && (*away == 'T')) ? IM_FLAG_AWAY : 0; 740 a = (away && (*away == 'T')) ? GAIM_IM_AUTO_RESP : 0;
741 741
742 serv_got_im(gc, c, message, a, time(NULL), -1); 742 serv_got_im(gc, c, message, a, time(NULL), -1);
743 } else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) { 743 } else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) {
744 char *l, *uc, *tmp; 744 char *l, *uc, *tmp;
745 int logged, evil, idle, type = 0; 745 int logged, evil, idle, type = 0;
1056 gaim_debug(GAIM_DEBUG_ERROR, "toc", 1056 gaim_debug(GAIM_DEBUG_ERROR, "toc",
1057 "don't know what to do with %s\n", c); 1057 "don't know what to do with %s\n", c);
1058 } 1058 }
1059 } 1059 }
1060 1060
1061 static int toc_send_im(GaimConnection *gc, const char *name, const char *message, int len, int flags) 1061 static int toc_send_im(GaimConnection *gc, const char *name, const char *message, int len, GaimImFlags flags)
1062 { 1062 {
1063 char *buf1, *buf2; 1063 char *buf1, *buf2;
1064 1064
1065 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", message); 1065 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", message);
1066 buf1 = escape_text(message); 1066 buf1 = escape_text(message);
1069 return -E2BIG; 1069 return -E2BIG;
1070 } 1070 }
1071 1071
1072 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", buf1); 1072 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", buf1);
1073 buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", normalize(name), buf1, 1073 buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", normalize(name), buf1,
1074 ((flags & IM_FLAG_AWAY) ? " auto" : "")); 1074 ((flags & GAIM_IM_AUTO_RESP) ? " auto" : ""));
1075 g_free(buf1); 1075 g_free(buf1);
1076 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", buf2); 1076 gaim_debug(GAIM_DEBUG_ERROR, "xxx", "1 - Sending message %s\n", buf2);
1077 sflap_send(gc, buf2, -1, TYPE_DATA); 1077 sflap_send(gc, buf2, -1, TYPE_DATA);
1078 g_free(buf2); 1078 g_free(buf2);
1079 1079