diff options
-rw-r--r-- | irc.c | 1 | ||||
-rw-r--r-- | protocols/nogaim.c | 24 |
2 files changed, 15 insertions, 10 deletions
@@ -137,6 +137,7 @@ irc_t *irc_new(int fd) s = set_add(&b->set, "typing_notice", "false", set_eval_bool, irc); s = set_add(&b->set, "utf8_nicks", "false", set_eval_utf8_nicks, irc); s = set_add(&b->set, "strict_away", "false", set_eval_bool, irc); + s = set_add(&b->set, "only_log_tags", "false", set_eval_bool, irc); #ifdef WITH_GNUTLS if (global.conf->ssl) { s = set_add(&b->set, "_certfp", NULL, set_eval_certfp, irc); 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); |