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:
parent
3a6fef78a2
commit
f436a34f61
@ -38,16 +38,19 @@
|
|||||||
static char *get_nickmode(CHANNEL_REC *channel, const char *nick)
|
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);
|
g_return_val_if_fail(nick != NULL, NULL);
|
||||||
|
|
||||||
if (!settings_get_bool("show_nickmode"))
|
if (!settings_get_bool("show_nickmode"))
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
emptystr = settings_get_bool("show_nickmode_empty") ? " " : "";
|
||||||
|
|
||||||
nickrec = channel == NULL ? NULL :
|
nickrec = channel == NULL ? NULL :
|
||||||
nicklist_find(channel, nick);
|
nicklist_find(channel, nick);
|
||||||
return nickrec == NULL ? " " :
|
return nickrec == NULL ? emptystr :
|
||||||
(nickrec->op ? "@" : (nickrec->voice ? "+" : " "));
|
(nickrec->op ? "@" : (nickrec->voice ? "+" : emptystr));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sig_message_public(SERVER_REC *server, const char *msg,
|
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)
|
void fe_messages_init(void)
|
||||||
{
|
{
|
||||||
settings_add_bool("lookandfeel", "show_nickmode", TRUE);
|
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", "print_active_channel", FALSE);
|
||||||
settings_add_bool("lookandfeel", "show_quit_once", FALSE);
|
settings_add_bool("lookandfeel", "show_quit_once", FALSE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user