summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-12-03 01:13:05 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-12-03 01:13:05 +0000
commitf436a34f61758b05652206cca99a072a40f0030e (patch)
treeab1bdda07cc768feb7a9326cd66009e00f490d80 /src
parent3a6fef78a2321b4b1ced39b068dd22b85cfeca60 (diff)
downloadirssi-f436a34f61758b05652206cca99a072a40f0030e.zip
/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
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/fe-messages.c10
1 files 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);