comparison 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
comparison
equal deleted inserted replaced
634:f3c05d5fe459 635:d4119cb85aeb
30 #include "histolog.h" 30 #include "histolog.h"
31 #include "hbuf.h" 31 #include "hbuf.h"
32 #include "jabglue.h" 32 #include "jabglue.h"
33 #include "utils.h" 33 #include "utils.h"
34 #include "logprint.h" 34 #include "logprint.h"
35 #include "settings.h"
35 36
36 static guint UseFileLogging; 37 static guint UseFileLogging;
37 static guint FileLoadLogs; 38 static guint FileLoadLogs;
38 static char *RootDir; 39 static char *RootDir;
39 40
130 guint err = 0; 131 guint err = 0;
131 guint ln = 0; // line number 132 guint ln = 0; // line number
132 133
133 if (!FileLoadLogs) return; 134 if (!FileLoadLogs) return;
134 135
136 if ((roster_gettype(jid) & ROSTER_TYPE_ROOM) &&
137 (settings_opt_get_int("load_muc_logs") != 1))
138 return;
139
135 data = g_new(char, HBB_BLOCKSIZE+32); 140 data = g_new(char, HBB_BLOCKSIZE+32);
136 if (!data) { 141 if (!data) {
137 scr_LogPrint(LPRINT_LOGNORM, "Not enough memory to read history file"); 142 scr_LogPrint(LPRINT_LOGNORM, "Not enough memory to read history file");
138 return; 143 return;
139 } 144 }