1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-21 03:14:16 -04:00

Merge pull request #1107 from ailin-nemui/extended-join

make extended account info visible and formattable
This commit is contained in:
ailin-nemui 2019-08-26 23:02:20 +02:00 committed by GitHub
commit 447e357e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View File

@ -356,8 +356,17 @@ static void sig_message_join(SERVER_REC *server, const char *channel,
ignore_check_plus(server, nick, address, channel, NULL, &level, FALSE);
printformat(server, channel, level,
TXT_JOIN, nick, address, channel, account, realname);
if (settings_get_bool("show_extended_join")) {
int txt;
if (*account == '\0') txt = TXT_JOIN;
else if (g_strcmp0("*", account) == 0) txt = TXT_JOIN_EXTENDED;
else txt = TXT_JOIN_EXTENDED_ACCOUNT;
printformat(server, channel, level,
txt, nick, address, channel, account, realname);
} else {
printformat(server, channel, level,
TXT_JOIN, nick, address, channel, account, realname);
}
}
static void sig_message_part(SERVER_REC *server, const char *channel,
@ -787,6 +796,7 @@ void fe_messages_init(void)
settings_add_bool("lookandfeel", "show_quit_once", FALSE);
settings_add_bool("lookandfeel", "show_own_nickchange_once", FALSE);
settings_add_bool("lookandfeel", "away_notify_public", FALSE);
settings_add_bool("lookandfeel", "show_extended_join", FALSE);
settings_add_bool("lookandfeel", "show_account_notify", FALSE);
signal_add_last("message public", (SIGNAL_FUNC) sig_message_public);

View File

@ -95,6 +95,8 @@ FORMAT_REC fecommon_core_formats[] = {
{ NULL, "Channels", 0 },
{ "join", "{channick_hilight $0} {chanhost_hilight $1} has joined {channel $2}", 5, { 0, 0, 0, 0, 0 } },
{ "join_extended", "{channick_hilight $0} {chanhost_hilight $1} has joined {channel $2} {comment realname {reason $4}}", 5, { 0, 0, 0, 0, 0 } },
{ "join_extended_account", "{channick_hilight $0} {chanhost_hilight $1} has joined {channel $2} {reason account {hilight $3}} {comment realname {reason $4}}", 5, { 0, 0, 0, 0, 0 } },
{ "host_changed", "{channick_hilight $0} {chanhost_hilight $1} has changed host", 4, { 0, 0, 0, 0 } },
{ "logged_out", "{channick $0} {chanhost $1} has logged out of their account", 4, { 0, 0, 0, 0 } },
{ "logged_in", "{channick_hilight $0} {chanhost_hilight $1} has logged in to account {hilight $2}", 4, { 0, 0, 0, 0 } },

View File

@ -71,6 +71,8 @@ enum {
TXT_FILL_3,
TXT_JOIN,
TXT_JOIN_EXTENDED,
TXT_JOIN_EXTENDED_ACCOUNT,
TXT_HOST_CHANGED,
TXT_LOGGED_OUT,
TXT_LOGGED_IN,