# HG changeset patch # User Rob Flynn # Date 953806682 0 # Node ID b9cc0a3a68b2b46af6346d5ad8b1913843a134c3 # Parent d5119dc662843e2c64d24ef4803a66f5981840ed [gaim-migrate @ 24] Fixed problem with away messages. committer: Tailor Script diff -r d5119dc66284 -r b9cc0a3a68b2 ChangeLog --- a/ChangeLog Thu Mar 23 09:53:31 2000 +0000 +++ b/ChangeLog Thu Mar 23 10:18:02 2000 +0000 @@ -8,6 +8,8 @@ (thanks to Eric Warmenhoven for the patch) * Support for displaying true type fonts * Fixed the Lag-Meter Option + * Fixed problem with saving away messages which contain spaces + and numbers. version 0.9.11: * Strike Tag Support :-) diff -r d5119dc66284 -r b9cc0a3a68b2 src/gaimrc.c --- a/src/gaimrc.c Thu Mar 23 09:53:31 2000 +0000 +++ b/src/gaimrc.c Thu Mar 23 10:18:02 2000 +0000 @@ -183,12 +183,15 @@ return; p = parse_line(buf); - a = g_new0(struct away_message, 1); + if (!strcmp(p->option, "message")) + { + a = g_new0(struct away_message, 1); - g_snprintf(a->name, sizeof(a->name), "%s", p->option); - g_snprintf(a->message, sizeof(a->message), "%s", p->value[0]); - filter_break(a->message); - away_messages = g_list_append(away_messages, a); + g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); + g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); + filter_break(a->message); + away_messages = g_list_append(away_messages, a); + } } } @@ -201,9 +204,7 @@ while (awy) { a = (struct away_message *)awy->data; - // escape_text(a->name); - // escape_text(a->message); - fprintf(f, "\t%s { %s }\n", escape_text2(a->name), escape_text2(a->message)); + fprintf(f, "\tmessage { %s } { %s }\n", escape_text2(a->name), escape_text2(a->message)); awy = awy->next; } @@ -474,7 +475,7 @@ if ((f = fopen(buf,"r"))) { fgets(buf, sizeof(buf), f); sscanf(buf, "# .gaimrc v%d", &ver); - if ( (ver <= 0) || (buf[0] != '#')) { + if ( (ver <= 1) || (buf[0] != '#')) { fclose(f); set_defaults(); save_prefs(); @@ -514,7 +515,7 @@ if (getenv("HOME")) { g_snprintf(buf, sizeof(buf), "%s/.gaimrc", getenv("HOME")); if ((f = fopen(buf,"w"))) { - fprintf(f, "# .gaimrc v%d\n", 1); + fprintf(f, "# .gaimrc v%d\n", 2); gaimrc_write_users(f); gaimrc_write_options(f); gaimrc_write_away(f);