changeset 1407:9f356885a77a

[gaim-migrate @ 1417] bah committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 14 Jan 2001 20:50:41 +0000
parents cabde2947ba4
children 815e3000467e
files src/idle.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/idle.c	Sat Jan 13 09:05:41 2001 +0000
+++ b/src/idle.c	Sun Jan 14 20:50:41 2001 +0000
@@ -69,13 +69,19 @@
 
 	if ((general_options & OPT_GEN_AUTO_AWAY) && (idle_time > (60 * auto_away)) &&
 			(!gc->away) && (!gc->is_auto_away)) {
+		debug_printf("making %s away automatically\n", gc->username);
 		set_default_away((GtkWidget*)NULL, (gpointer)g_slist_index(away_messages, default_away));
 		serv_set_away(gc, GAIM_AWAY_CUSTOM, default_away->message);
 		gc->is_auto_away = TRUE;
 	} else if (gc->is_auto_away && idle_time < 60 * auto_away) {
 		gc->is_auto_away = FALSE;
-		if (awaymessage != NULL)
+		if (awaymessage == NULL) {
+			debug_printf("removing auto-away message for %s\n", gc->username);
 			serv_set_away(gc, GAIM_AWAY_CUSTOM, NULL);
+		} else {
+			debug_printf("replacing auto-away with global for %s\n", gc->username);
+			serv_set_away(gc, GAIM_AWAY_CUSTOM, awaymessage->message);
+		}
 	}