comparison src/gaimrc.c @ 3309:6e876221ec82

[gaim-migrate @ 3327] Can now have reserved chars in IM and proxy passwords. (Ref: bug I.D. [ 555752 ] Proxy pass socks and } character) committer: Tailor Script <tailor@pidgin.im>
author Jim Seymour <jseymour>
date Sat, 15 Jun 2002 15:43:03 +0000
parents 332df87cf3d6
children 3b00d97d59aa
comparison
equal deleted inserted replaced
3308:daf97db3b28e 3309:6e876221ec82
553 553
554 static void gaimrc_write_user(FILE *f, struct aim_user *u) 554 static void gaimrc_write_user(FILE *f, struct aim_user *u)
555 { 555 {
556 char *c; 556 char *c;
557 int nl = 1, i; 557 int nl = 1, i;
558 if (u->options & OPT_USR_REM_PASS) 558
559 fprintf(f, "\t\tident { %s } { %s }\n", u->username, u->password); 559 if (u->options & OPT_USR_REM_PASS) {
560 else 560 fprintf(f, "\t\tident { %s } { %s }\n", u->username, (c = escape_text2(u->password)));
561 free(c);
562 } else {
561 fprintf(f, "\t\tident { %s } { }\n", u->username); 563 fprintf(f, "\t\tident { %s } { }\n", u->username);
564 }
562 fprintf(f, "\t\tuser_info {"); 565 fprintf(f, "\t\tuser_info {");
563 c = u->user_info; 566 c = u->user_info;
564 while (*c) { 567 while (*c) {
565 /* This is not as silly as it looks. */ 568 /* This is not as silly as it looks. */
566 if (*c == '\n') { 569 if (*c == '\n') {
970 } 973 }
971 } 974 }
972 975
973 static void gaimrc_write_proxy(FILE *f) 976 static void gaimrc_write_proxy(FILE *f)
974 { 977 {
978 char *str;
979
975 fprintf(f, "proxy {\n"); 980 fprintf(f, "proxy {\n");
976 fprintf(f, "\thost { %s }\n", proxyhost); 981 fprintf(f, "\thost { %s }\n", proxyhost);
977 fprintf(f, "\tport { %d }\n", proxyport); 982 fprintf(f, "\tport { %d }\n", proxyport);
978 fprintf(f, "\ttype { %d }\n", proxytype); 983 fprintf(f, "\ttype { %d }\n", proxytype);
979 fprintf(f, "\tuser { %s }\n", proxyuser); 984 fprintf(f, "\tuser { %s }\n", proxyuser);
980 fprintf(f, "\tpass { %s }\n", proxypass); 985 fprintf(f, "\tpass { %s }\n", (str = escape_text2(proxypass)));
986 free(str);
981 fprintf(f, "}\n"); 987 fprintf(f, "}\n");
982 } 988 }
983 989
984 990
985 static void set_defaults() 991 static void set_defaults()