# HG changeset patch # User Mikael Berthe # Date 1135550469 -3600 # Node ID d4119cb85aeb5ceb34654b521df008db2216dd68 # Parent f3c05d5fe45953393d7f6cc6e63ee60faea7a073 New "load_muc_logs" option diff -r f3c05d5fe459 -r d4119cb85aeb mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Sun Dec 25 20:51:20 2005 +0100 +++ b/mcabber/mcabberrc.example Sun Dec 25 23:41:09 2005 +0100 @@ -53,7 +53,11 @@ #set logging_dir = /home/mikael/.mcabber/histo/ # Set log_muc_conf to 1 to enable MUC chatrooms logging (default = 0) -# set log_muc_conf = 1 +#set log_muc_conf = 1 +# Set load_muc_logs to 1 to read MUC chatrooms logs (default = 0). These +# logs will be displayed in the buffer window _before_ any history received +# from the server. +#set load_muc_logs = 0 # IQ settings # Set iq_version_hide_os to 1 if you do not want to allow people to retrieve diff -r f3c05d5fe459 -r d4119cb85aeb mcabber/src/histolog.c --- 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");