From f436a34f61758b05652206cca99a072a40f0030e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 3 Dec 2000 01:13:05 +0000 Subject: [PATCH] /SET show_nickmode_empty - when mode is empty, should we display " " or "" git-svn-id: http://svn.irssi.org/repos/irssi/trunk@929 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-messages.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 934f01b8..650e017f 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -37,17 +37,20 @@ static char *get_nickmode(CHANNEL_REC *channel, const char *nick) { - NICK_REC *nickrec; + NICK_REC *nickrec; + char *emptystr; g_return_val_if_fail(nick != NULL, NULL); if (!settings_get_bool("show_nickmode")) return ""; + emptystr = settings_get_bool("show_nickmode_empty") ? " " : ""; + nickrec = channel == NULL ? NULL : nicklist_find(channel, nick); - return nickrec == NULL ? " " : - (nickrec->op ? "@" : (nickrec->voice ? "+" : " ")); + return nickrec == NULL ? emptystr : + (nickrec->op ? "@" : (nickrec->voice ? "+" : emptystr)); } static void sig_message_public(SERVER_REC *server, const char *msg, @@ -380,6 +383,7 @@ static void sig_message_topic(SERVER_REC *server, const char *channel, void fe_messages_init(void) { settings_add_bool("lookandfeel", "show_nickmode", TRUE); + settings_add_bool("lookandfeel", "show_nickmode_empty", TRUE); settings_add_bool("lookandfeel", "print_active_channel", FALSE); settings_add_bool("lookandfeel", "show_quit_once", FALSE);