src/status.c

changeset 12145
25b628495c37
parent 12123
a5890e156848
child 12164
b39dc890f640
--- a/src/status.c	Sat Nov 19 00:34:04 2005 +0000
+++ b/src/status.c	Sat Nov 19 01:19:51 2005 +0000
@@ -1342,22 +1342,25 @@
 	else if(gaim_presence_get_context(presence) == GAIM_PRESENCE_CONTEXT_ACCOUNT)
 	{
 		GaimAccount *account;
-		GaimLog *log;
-		char *msg;
 		GaimConnection *gc;
 		GaimPluginProtocolInfo *prpl_info = NULL;
 
 		account = gaim_presence_get_account(presence);
-		log = gaim_account_get_log(account);
+
+		if (gaim_prefs_get_bool("/core/logging/log_system"))
+		{
+			GaimLog *log = gaim_account_get_log(account);
+			char *msg;
 
-		if (idle)
-			msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account));
-		else
-			msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account));
-		gaim_log_write(log, GAIM_MESSAGE_SYSTEM,
-					   gaim_account_get_username(account),
-					   idle_time, msg);
-		g_free(msg);
+			if (idle)
+				msg = g_strdup_printf(_("+++ %s became idle"), gaim_account_get_username(account));
+			else
+				msg = g_strdup_printf(_("+++ %s became unidle"), gaim_account_get_username(account));
+			gaim_log_write(log, GAIM_MESSAGE_SYSTEM,
+						   gaim_account_get_username(account),
+						   idle_time, msg);
+			g_free(msg);
+		}
 
 		gc = gaim_account_get_connection(account);
 

mercurial