comparison src/protocols/oscar/oscar.c @ 6371:8f94cce8faa5

[gaim-migrate @ 6876] I think I touched almost every file. Here's what happened. I started off fixing up the Makefile.am and configure.ac files to help with the core/UI split some. Then I got annoyed with the build_{allow,deny}_list() functions that everything used, and decided to core/UI split privacy. While doing that, I decided to redesign the dialog. So now, a lot has changed, but not really so much. Just that most files got affected. Oh yeah, and the UI stuff was taken out of internal.h and moved to gtkinternal.h. If you use this, please be aware of this change. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 05 Aug 2003 10:55:04 +0000
parents 34c07f5f34a0
children 01289157fc37
comparison
equal deleted inserted replaced
6370:a4b83df2165b 6371:8f94cce8faa5
41 #include "html.h" 41 #include "html.h"
42 42
43 #include "aim.h" 43 #include "aim.h"
44 #include "md5.h" 44 #include "md5.h"
45 45
46 /* XXX */ 46 /* XXX CORE/UI */
47 #include "gtkinternal.h"
47 #include "gaim.h" 48 #include "gaim.h"
48 #include "ui.h" 49 #include "ui.h"
49 50
50 51
51 #define UC_AOL 0x02 52 #define UC_AOL 0x02
1071 /* connecting too frequently */ 1072 /* connecting too frequently */
1072 gaim_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer.")); 1073 gaim_connection_error(gc, _("You have been connecting and disconnecting too frequently. Wait ten minutes and try again. If you continue to try, you will need to wait even longer."));
1073 break; 1074 break;
1074 case 0x1c: 1075 case 0x1c:
1075 /* client too old */ 1076 /* client too old */
1076 g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), WEBSITE); 1077 g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), GAIM_WEBSITE);
1077 gaim_connection_error(gc, buf); 1078 gaim_connection_error(gc, buf);
1078 break; 1079 break;
1079 default: 1080 default:
1080 gaim_connection_error(gc, _("Authentication Failed")); 1081 gaim_connection_error(gc, _("Authentication Failed"));
1081 break; 1082 break;
1206 in = '\0'; 1207 in = '\0';
1207 } 1208 }
1208 if (in != '\n') { 1209 if (in != '\n') {
1209 char buf[256]; 1210 char buf[256];
1210 g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly. You may want to use TOC until " 1211 g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly. You may want to use TOC until "
1211 "this is fixed. Check %s for updates."), WEBSITE); 1212 "this is fixed. Check %s for updates."), GAIM_WEBSITE);
1212 gaim_notify_warning(pos->gc, NULL, 1213 gaim_notify_warning(pos->gc, NULL,
1213 _("Gaim was Unable to get a valid AIM login hash."), 1214 _("Gaim was Unable to get a valid AIM login hash."),
1214 buf); 1215 buf);
1215 gaim_input_remove(pos->inpa); 1216 gaim_input_remove(pos->inpa);
1216 close(pos->fd); 1217 close(pos->fd);
1236 1237
1237 pos->fd = source; 1238 pos->fd = source;
1238 1239
1239 if (source < 0) { 1240 if (source < 0) {
1240 buf = g_strdup_printf(_("You may be disconnected shortly. You may want to use TOC until " 1241 buf = g_strdup_printf(_("You may be disconnected shortly. You may want to use TOC until "
1241 "this is fixed. Check %s for updates."), WEBSITE); 1242 "this is fixed. Check %s for updates."), GAIM_WEBSITE);
1242 gaim_notify_warning(pos->gc, NULL, 1243 gaim_notify_warning(pos->gc, NULL,
1243 _("Gaim was Unable to get a valid AIM login hash."), 1244 _("Gaim was Unable to get a valid AIM login hash."),
1244 buf); 1245 buf);
1245 g_free(buf); 1246 g_free(buf);
1246 if (pos->modname) 1247 if (pos->modname)
1324 char buf[256]; 1325 char buf[256];
1325 if (pos->modname) 1326 if (pos->modname)
1326 g_free(pos->modname); 1327 g_free(pos->modname);
1327 g_free(pos); 1328 g_free(pos);
1328 g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly. You may want to use TOC until " 1329 g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly. You may want to use TOC until "
1329 "this is fixed. Check %s for updates."), WEBSITE); 1330 "this is fixed. Check %s for updates."), GAIM_WEBSITE);
1330 gaim_notify_warning(pos->gc, NULL, 1331 gaim_notify_warning(pos->gc, NULL,
1331 _("Gaim was Unable to get a valid login hash."), 1332 _("Gaim was Unable to get a valid login hash."),
1332 buf); 1333 buf);
1333 } 1334 }
1334 1335
4259 struct oscar_data *od = (struct oscar_data *)gc->proto_data; 4260 struct oscar_data *od = (struct oscar_data *)gc->proto_data;
4260 struct direct_im *dim = find_direct_im(od, name); 4261 struct direct_im *dim = find_direct_im(od, name);
4261 int ret = 0; 4262 int ret = 0;
4262 GError *err = NULL; 4263 GError *err = NULL;
4263 const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); 4264 const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
4264 char *tmpmsg; 4265 char *tmpmsg = NULL;
4265 4266
4266 if (dim && dim->connected) { 4267 if (dim && dim->connected) {
4267 /* If we're directly connected, send a direct IM */ 4268 /* If we're directly connected, send a direct IM */
4268 /* XXX - The last parameter below is the encoding. Let Paco-Paco do something with it. */ 4269 /* XXX - The last parameter below is the encoding. Let Paco-Paco do something with it. */
4269 if (imflags & IM_FLAG_AWAY) 4270 if (imflags & IM_FLAG_AWAY)
4885 for (list=account->permit; (list && aim_sncmp(curitem->name, list->data)); list=list->next); 4886 for (list=account->permit; (list && aim_sncmp(curitem->name, list->data)); list=list->next);
4886 if (!list) { 4887 if (!list) {
4887 gaim_debug(GAIM_DEBUG_INFO, "oscar", 4888 gaim_debug(GAIM_DEBUG_INFO, "oscar",
4888 "ssi: adding permit buddy %s to local list\n", curitem->name); 4889 "ssi: adding permit buddy %s to local list\n", curitem->name);
4889 gaim_privacy_permit_add(account, curitem->name); 4890 gaim_privacy_permit_add(account, curitem->name);
4890 build_allow_list();
4891 export = TRUE; 4891 export = TRUE;
4892 } 4892 }
4893 } 4893 }
4894 } break; 4894 } break;
4895 4895
4899 for (list=account->deny; (list && aim_sncmp(curitem->name, list->data)); list=list->next); 4899 for (list=account->deny; (list && aim_sncmp(curitem->name, list->data)); list=list->next);
4900 if (!list) { 4900 if (!list) {
4901 gaim_debug(GAIM_DEBUG_INFO, "oscar", 4901 gaim_debug(GAIM_DEBUG_INFO, "oscar",
4902 "ssi: adding deny buddy %s to local list\n", curitem->name); 4902 "ssi: adding deny buddy %s to local list\n", curitem->name);
4903 gaim_privacy_deny_add(account, curitem->name); 4903 gaim_privacy_deny_add(account, curitem->name);
4904 build_block_list();
4905 export = TRUE; 4904 export = TRUE;
4906 } 4905 }
4907 } 4906 }
4908 } break; 4907 } break;
4909 4908
6317 /** summary */ 6316 /** summary */
6318 N_("AIM/ICQ Protocol Plugin"), 6317 N_("AIM/ICQ Protocol Plugin"),
6319 /** description */ 6318 /** description */
6320 N_("AIM/ICQ Protocol Plugin"), 6319 N_("AIM/ICQ Protocol Plugin"),
6321 NULL, /**< author */ 6320 NULL, /**< author */
6322 WEBSITE, /**< homepage */ 6321 GAIM_WEBSITE, /**< homepage */
6323 6322
6324 NULL, /**< load */ 6323 NULL, /**< load */
6325 NULL, /**< unload */ 6324 NULL, /**< unload */
6326 NULL, /**< destroy */ 6325 NULL, /**< destroy */
6327 6326