mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 17:42:49 +02:00
[2025-08-24 21:35:00] PRZYCINANIE NICKÓW - dodano >> dla długich nicków, build OK
This commit is contained in:
parent
9f0d05e573
commit
1fa2f42b6f
3 changed files with 28 additions and 14 deletions
|
|
@ -318,6 +318,8 @@ settings = {
|
||||||
print_active_channel = "yes";
|
print_active_channel = "yes";
|
||||||
theme = "default.theme";
|
theme = "default.theme";
|
||||||
nick_column_enabled = "yes";
|
nick_column_enabled = "yes";
|
||||||
|
nick_column_width = "10";
|
||||||
|
debug_nick_column = "no";
|
||||||
};
|
};
|
||||||
"fe-text" = {
|
"fe-text" = {
|
||||||
lag_min_show = "1s";
|
lag_min_show = "1s";
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,23 @@ static char *expando_nickalign(SERVER_REC *server, void *item, int *free_ret)
|
||||||
nick_chars = count_nick_chars(current_nick);
|
nick_chars = count_nick_chars(current_nick);
|
||||||
total_chars = mode_chars + nick_chars;
|
total_chars = mode_chars + nick_chars;
|
||||||
|
|
||||||
|
if (total_chars > width) {
|
||||||
|
/* Nick za długi - przytnij z >> */
|
||||||
|
int available_for_nick = width - mode_chars - 2; /* -2 dla >> */
|
||||||
|
if (available_for_nick > 0) {
|
||||||
|
/* Przytnij nick i dodaj >> */
|
||||||
|
char *truncated = g_strndup(current_nick, available_for_nick);
|
||||||
|
g_free(current_nick);
|
||||||
|
current_nick = g_strdup_printf("%s>>", truncated);
|
||||||
|
g_free(truncated);
|
||||||
|
} else {
|
||||||
|
/* Mode sam za długi */
|
||||||
|
g_free(current_nick);
|
||||||
|
current_nick = g_strdup(">>");
|
||||||
|
}
|
||||||
|
padding = 0;
|
||||||
|
} else {
|
||||||
padding = width - total_chars;
|
padding = width - total_chars;
|
||||||
if (padding < 0) {
|
|
||||||
padding = 0; /* Nie może być ujemny */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Debug output */
|
/* Debug output */
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ abstracts = {
|
||||||
ownnick = "%_%Y$*%n";
|
ownnick = "%_%Y$*%n";
|
||||||
|
|
||||||
# public message in channel, $0 = nick mode, $1 = nick
|
# public message in channel, $0 = nick mode, $1 = nick
|
||||||
pubmsgnick = "{msgnick %M$0%N $1%n }";
|
pubmsgnick = "{msgnick %M$0%N$1-%n}";
|
||||||
pubnick = "%G$*%n";
|
pubnick = "%G$*%n";
|
||||||
|
|
||||||
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
# public message in channel meant for me, $0 = nick mode, $1 = nick
|
||||||
|
|
@ -307,15 +307,13 @@ formats = {
|
||||||
"fe-common/core" = {
|
"fe-common/core" = {
|
||||||
|
|
||||||
own_msg = "$nickalign{ownmsgnick $2 {ownnick $0}}$1";
|
own_msg = "$nickalign{ownmsgnick $2 {ownnick $0}}$1";
|
||||||
own_msg_channel = "{ownmsgnick $3 {ownnick $0}{msgchannel $1}}$2";
|
own_msg_channel = "$nickalign{ownmsgnick $3 {ownnick $0}{msgchannel $1}}$2";
|
||||||
own_msg_private = "{ownprivmsg msg $0}$1";
|
pubmsg_me = "$nickalign{pubmsgmenick $2 {menick $0}}$1";
|
||||||
own_msg_private_query = "{ownprivmsgnick {ownprivnick $2}}$1";
|
pubmsg_me_channel = "$nickalign{pubmsgmenick $3 {menick $0}{msgchannel $1}}$2";
|
||||||
pubmsg_me = "{pubmsgmenick $2 {menick $0}}$1";
|
pubmsg_hilight = "$nickalign{pubmsghinick $0 $3 $1}$2";
|
||||||
pubmsg_me_channel = "{pubmsgmenick $3 {menick $0}{msgchannel $1}}$2";
|
pubmsg_hilight_channel = "$nickalign{pubmsghinick $0 $4 $1{msgchannel $2}}$3";
|
||||||
pubmsg_hilight = "{pubmsghinick $0 $3 $1}$2";
|
|
||||||
pubmsg_hilight_channel = "{pubmsghinick $0 $4 $1{msgchannel $2}}$3";
|
|
||||||
pubmsg = "$nickalign{pubmsgnick $2 {pubnick $0}}$1";
|
pubmsg = "$nickalign{pubmsgnick $2 {pubnick $0}}$1";
|
||||||
pubmsg_channel = "{pubmsgnick $3 {pubnick $0}{msgchannel $1}}$2";
|
pubmsg_channel = "$nickalign{pubmsgnick $3 {pubnick $0}{msgchannel $1}}$2";
|
||||||
msg_private = "{privmsg $0 $1}$2";
|
msg_private = "{privmsg $0 $1}$2";
|
||||||
msg_private_query = "{privmsgnick $0}$2";
|
msg_private_query = "{privmsgnick $0}$2";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue