diff options
author | Yorhel <git@yorhel.nl> | 2014-10-10 09:56:33 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2014-10-10 09:56:33 +0200 |
commit | dd4d05ecc14730b0e4266477664245d809bf9e07 (patch) | |
tree | b8926e0db0c2a1aff1c5a47ca5796c598996f885 | |
parent | c25bb3418c76f4766d25bd0078414ca635cfcb43 (diff) |
Add 'log_hubchat' setting to disable logging of the main chat
Kinda annoying how this requires reopening the hub tab, but fixing that
is a bit ugly.
-rw-r--r-- | src/doc.h | 4 | ||||
-rw-r--r-- | src/uit_hub.c | 4 | ||||
-rw-r--r-- | src/vars.c | 1 |
3 files changed, 8 insertions, 1 deletions
@@ -479,6 +479,10 @@ static const doc_set_t doc_sets[] = { { "log_downloads", 0, "<boolean>", "Log downloaded files to transfers.log." }, +{ "log_hubchat", 1, "<boolean>", + "Log the main hub chat. Note that changing this requires any affected hub" + " tabs to be closed and reopened before the change is effective." +}, { "log_uploads", 0, "<boolean>", "Log file uploads to transfers.log." }, diff --git a/src/uit_hub.c b/src/uit_hub.c index 171e31b..8cda11e 100644 --- a/src/uit_hub.c +++ b/src/uit_hub.c @@ -70,7 +70,9 @@ ui_tab_t *uit_hub_create(const char *name, gboolean conn) { t->tab.name = g_strdup_printf("#%s", name); t->tab.type = uit_hub; t->tab.hub = hub_create((ui_tab_t *)t); - t->tab.log = ui_logwindow_create(t->tab.name, var_get_int(t->tab.hub->id, VAR_backlog)); + t->tab.log = ui_logwindow_create( + var_get_bool(t->tab.hub->id, VAR_log_hubchat) ? t->tab.name : NULL, + var_get_int(t->tab.hub->id, VAR_backlog)); t->tab.log->handle = t; t->tab.log->checkchat = uit_hub_log_checkchat; @@ -972,6 +972,7 @@ struct var_t { V(local_address, 1,1, f_id, p_ip, su_old, NULL, s_active_conf, db_vars_get(0, "active_bind"))\ V(log_debug, 1,0, f_bool, p_bool, su_bool, NULL, s_log_debug, i_log_debug())\ V(log_downloads, 1,0, f_bool, p_bool, su_bool, NULL, NULL, "true")\ + V(log_hubchat, 1,1, f_bool, p_bool, su_bool, NULL, NULL, "true")\ V(log_uploads, 1,0, f_bool, p_bool, su_bool, NULL, NULL, "true")\ V(minislots, 1,0, f_int, p_int_ge1, NULL, NULL, NULL, "3")\ V(minislot_size, 1,0, f_minislot_size,p_minislot_size, NULL, NULL, NULL, "65536")\ |