Commit 71db8309 authored by Romain Bignon's avatar Romain Bignon

conf option to enable the purple conv logging (refs #187)

parent 21ca52fb
......@@ -108,4 +108,10 @@ logging {
# Wether to log errors and warning to syslog
to_syslog = true
# Enable conversation logging
# We consider that it's the IRC client job, but if you use the same
# purple directory with an other purple client, you'd want to keep
# logs at the same place.
conv_logs = false
}
......@@ -67,6 +67,7 @@ Minbif::Minbif()
section = conf.AddSection("logging", "Log information", false);
section->AddItem(new ConfigItem_string("level", "Logging level"));
section->AddItem(new ConfigItem_bool("to_syslog", "Log error and warnings to syslog"));
section->AddItem(new ConfigItem_bool("conv_logs", "Enable conversation logging"));
}
......
......@@ -32,6 +32,7 @@
#include "core/version.h"
#include "core/log.h"
#include "core/util.h"
#include "core/config.h"
namespace im {
......@@ -161,9 +162,10 @@ void Purple::inited()
irc::BuddyIcon* bi = new irc::BuddyIcon(getIM(), irc);
irc->addNick(bi);
purple_prefs_set_bool("/purple/logging/log_ims", false);
purple_prefs_set_bool("/purple/logging/log_chats", false);
purple_prefs_set_bool("/purple/logging/log_system", false);
bool conv_logs = conf.GetSection("logging")->GetItem("conv_logs")->Boolean(),
purple_prefs_set_bool("/purple/logging/log_ims", conv_logs);
purple_prefs_set_bool("/purple/logging/log_chats", conv_logs);
purple_prefs_set_bool("/purple/logging/log_system", conv_logs);
}
void Purple::uninit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment