1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/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
This commit is contained in:
Timo Sirainen 2000-12-03 01:13:05 +00:00 committed by cras
parent 3a6fef78a2
commit f436a34f61

View File

@ -38,16 +38,19 @@
static char *get_nickmode(CHANNEL_REC *channel, const char *nick)
{
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);