From b506b948e3a37ccf334d1cb2367b7dd6f0879e61 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Wed, 27 Jul 2016 08:53:52 +0200 Subject: Add setting to only use tags in imcb_log and other --- protocols/nogaim.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index ab11508b..c742a64d 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -298,18 +298,22 @@ static void serv_got_crap(struct im_connection *ic, char *format, ...) strip_html(text); } - /* Try to find a different connection on the same protocol. */ - for (a = ic->bee->accounts; a; a = a->next) { - if (a->prpl == ic->acc->prpl && a->ic != ic) { - break; - } - } - - /* If we found one, include the screenname in the message. */ - if (a) { + if (set_getbool(&ic->bee->set, "only_log_tags")) { ic->bee->ui->log(ic->bee, ic->acc->tag, text); } else { - ic->bee->ui->log(ic->bee, ic->acc->prpl->name, text); + /* Try to find a different connection on the same protocol. */ + for (a = ic->bee->accounts; a; a = a->next) { + if (a->prpl == ic->acc->prpl && a->ic != ic) { + break; + } + } + + /* If we found one, include the screenname in the message. */ + if (a) { + ic->bee->ui->log(ic->bee, ic->acc->tag, text); + } else { + ic->bee->ui->log(ic->bee, ic->acc->prpl->name, text); + } } g_free(text); -- cgit v1.2.3