From ed1b4e69a9eec2c70e78b8be593ec8225606a0fb Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 27 Oct 2000 01:19:15 +0000 Subject: [PATCH] If nick isn't found from channel (for whatever reason), print the nick mode as " ", not "". git-svn-id: http://svn.irssi.org/repos/irssi/trunk@786 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-messages.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 1f10d3a8..1a074f31 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -40,10 +40,13 @@ static char *get_nickmode(CHANNEL_REC *channel, const char *nick) g_return_val_if_fail(nick != NULL, NULL); + if (!settings_get_bool("show_nickmode")) + return ""; + nickrec = channel == NULL ? NULL : nicklist_find(channel, nick); - return (nickrec == NULL || !settings_get_bool("show_nickmode")) ? - "" : (nickrec->op ? "@" : (nickrec->voice ? "+" : " ")); + return nickrec == NULL ? " " : + (nickrec->op ? "@" : (nickrec->voice ? "+" : " ")); } static void sig_message_public(SERVER_REC *server, const char *msg,