Mercurial > hg
changeset 635:d4119cb85aeb
New "load_muc_logs" option
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 25 Dec 2005 23:41:09 +0100 |
parents | f3c05d5fe459 |
children | f84cce8382e8 |
files | mcabber/mcabberrc.example mcabber/src/histolog.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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");