diff mcabber/src/main.c @ 113:8ac67e951eab

[/trunk] Changeset 127 by mikael * Add a "hooks" layer. Hooks are used when multiples operations should be done when an event araises. For example message in/out, status change... 2 more files; Makefile updated. * Logging is ready. * Add 2 options: - "logging" (bool): enable/disable history logging - "logging_dir" (char): root dir for logging files * Document pinginterval (keepalive) in the sample config file. * Send keepalive only when online.
author mikael
date Sun, 24 Apr 2005 20:24:18 +0000
parents edb5591e2e64
children cfd3df636d5f
line wrap: on
line diff
--- a/mcabber/src/main.c	Sun Apr 24 17:38:48 2005 +0000
+++ b/mcabber/src/main.c	Sun Apr 24 20:24:18 2005 +0000
@@ -11,6 +11,7 @@
 #include "parsecfg.h"
 #include "roster.h"
 #include "commands.h"
+#include "histolog.h"
 #include "lang.h"
 #include "utils.h"
 #include "harddefines.h"
@@ -149,6 +150,10 @@
   ut_WriteLog("Drawing main window...\n");
   scr_DrawMainWindow();
 
+  optstring = cfg_read("logging");
+  if (optstring && (atoi(optstring) > 0))
+    hlog_enable(TRUE, cfg_read("logging_dir"));
+
   ssl = 0;
   optstring = cfg_read("ssl");
   if (optstring && (atoi(optstring) > 0))