diff mcabber/src/histolog.c @ 635:d4119cb85aeb

New "load_muc_logs" option
author Mikael Berthe <mikael@lilotux.net>
date Sun, 25 Dec 2005 23:41:09 +0100
parents fed6d1e4d7a9
children ee03b56b93ee
line wrap: on
line diff
--- a/mcabber/src/histolog.c	Sun Dec 25 20:51:20 2005 +0100
+++ b/mcabber/src/histolog.c	Sun Dec 25 23:41:09 2005 +0100
@@ -32,6 +32,7 @@
 #include "jabglue.h"
 #include "utils.h"
 #include "logprint.h"
+#include "settings.h"
 
 static guint UseFileLogging;
 static guint FileLoadLogs;
@@ -132,6 +133,10 @@
 
   if (!FileLoadLogs) return;
 
+  if ((roster_gettype(jid) & ROSTER_TYPE_ROOM) &&
+      (settings_opt_get_int("load_muc_logs") != 1))
+    return;
+
   data = g_new(char, HBB_BLOCKSIZE+32);
   if (!data) {
     scr_LogPrint(LPRINT_LOGNORM, "Not enough memory to read history file");