diff mcabber/src/main.c @ 177:a51ce78a0e2a

[/trunk] Changeset 189 by mikael * Add a "load_logs" variable to enable logs reading. (Actual reading is not implemented yet...)
author mikael
date Thu, 05 May 2005 08:53:49 +0000
parents ea5e101fd29e
children 7604e3cdbb86
line wrap: on
line diff
--- a/mcabber/src/main.c	Thu May 05 08:52:40 2005 +0000
+++ b/mcabber/src/main.c	Thu May 05 08:53:49 2005 +0000
@@ -90,7 +90,8 @@
   char *username, *password, *resource;
   char *servername, *portstring;
   char *jid;
-  char *optstring;
+  char *optstring, *optstring2;
+  int optval, optval2;
   int key;
   unsigned int port;
   unsigned int ping;
@@ -167,9 +168,12 @@
   ut_WriteLog("Drawing main window...\n");
   scr_DrawMainWindow(TRUE);
 
-  optstring = cfg_read("logging");
-  if (optstring && (atoi(optstring) > 0))
-    hlog_enable(TRUE, cfg_read("logging_dir"));
+  optstring  = cfg_read("logging");
+  optstring2 = cfg_read("load_logs");
+  optval     = (optstring && (atoi(optstring) > 0));
+  optval2    = (optstring2 && (atoi(optstring2) > 0));
+  if (optval || optval2)
+    hlog_enable(optval, cfg_read("logging_dir"), optval2);
 
   if ((optstring = cfg_read("events_command")) != NULL)
     hk_ext_cmd_init(optstring);