diff src/gaimrc.c @ 1109:c73736fa0b7c

[gaim-migrate @ 1119] Auto-Away, courtesy BMiller. damn cool. i'm impressed. also minor touch-ups, mostly to indicate what all the FIXME's mean. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 20 Nov 2000 10:37:40 +0000
parents 18a14e6dd0af
children 5b5d03dfa48a
line wrap: on
line diff
--- a/src/gaimrc.c	Mon Nov 20 08:35:25 2000 +0000
+++ b/src/gaimrc.c	Mon Nov 20 10:37:40 2000 +0000
@@ -206,6 +206,12 @@
 			filter_break(a->message);
 			away_messages = g_slist_append(away_messages, a);
 		}
+		/* auto { time } { default message } */
+		else if (!strcmp(p->option, "auto"))
+		{
+			auto_away = atoi(p->value[0]);
+			default_away = atoi(p->value[1]);
+		}
 	}
 }
 
@@ -234,9 +240,13 @@
 	
 			awy = g_slist_next(awy);
 		}
+		fprintf(f, "\tauto { %d } { %d }\n", auto_away, default_away);
 	}
 	else
+	{
 		fprintf(f, "\tmessage { boring default } { %s }\n", BORING_DEFAULT_AWAY_MSG);
+		fprintf(f, "\tauto { 0 } { 0 }\n");
+	}
 
 	fprintf(f, "}\n");
 }
@@ -757,6 +767,8 @@
         	sound_options = OPT_SOUND_LOGIN | OPT_SOUND_LOGOUT | OPT_SOUND_RECV | OPT_SOUND_SEND | OPT_SOUND_SILENT_SIGNON;
         	report_idle = IDLE_SCREENSAVER;
         	web_browser = BROWSER_NETSCAPE;
+		auto_away = 10;
+		default_away = 0;
         
         	g_snprintf(web_command, sizeof(web_command), "xterm -e lynx %%s");
         	blist_pos.width = 0;