Commit graph

4,874 commits

Author SHA1 Message Date
kofany
68214e5f20 feat: Revert to 'irssi' branding and add installer script
This single commit performs two major actions:

1.  Reverts all instances of the 'irssip' custom branding back to the original 'irssi' naming. This includes a comprehensive and precise update of the binary name, default home directory, configuration files, documentation, tests, and all internal #include paths. The 'irssiproxy' module name is intentionally left unchanged.

2.  Introduces 'configure.sh', a portable shell script that guides the user through the installation process, offering side-by-side installation to prevent conflicts.

This approach ensures a clean, atomic change that prepares the branch for both upstream pull requests and user-friendly installation.
2025-08-26 01:29:38 +02:00
kofany
25f2b16544 Apply clang-format to sidepanel related files
Formatted all sidepanel-related files according to irssi's .clang-format rules:
- src/fe-text/sidepanels.c (772 lines reformatted)
- src/fe-text/mainwindows.c (462 lines reformatted)
- src/fe-text/gui-readline.c (228 lines reformatted)
- src/fe-text/mainwindows-layout.c (83 lines reformatted)
- src/fe-text/irssi.c (37 lines reformatted)
- src/fe-text/mainwindows.h (29 lines reformatted)
- src/fe-text/module-formats.h (27 lines reformatted)

Key formatting changes applied:
- Indentation: spaces → tabs (IndentWidth: 8, UseTab: ForIndentation)
- Line breaking: ColumnLimit: 100, BreakBeforeBraces: Linux
- Alignment: AlignAfterOpenBracket: Align, AlignTrailingComments: true
- Spacing: proper spacing around operators and parentheses
- Pointer alignment: PointerAlignment: Right

Total: 905 insertions, 733 deletions across 7 files
Code functionality unchanged - purely cosmetic formatting
to match irssi project standards.

Timestamp: 2025-01-25 02:43
2025-08-25 02:47:41 +02:00
kofany
781d27e245 Apply clang-format to nick column code
Formatted all modified files according to irssi's .clang-format rules:
- src/fe-common/core/fe-expandos.c
- src/fe-common/core/formats.c
- src/fe-common/core/fe-messages.c

Key formatting changes:
- Indentation: spaces → tabs (IndentWidth: 8, UseTab: ForIndentation)
- Line breaking: ColumnLimit: 100, BreakBeforeBraces: Linux
- Alignment: AlignAfterOpenBracket: Align
- Spacing: proper spacing around operators and parentheses

Code functionality unchanged - purely cosmetic formatting
to match irssi project standards.

Timestamp: 2025-01-25 02:40
2025-08-25 02:45:12 +02:00
kofany
507d9dd865 Remove all debug code - nick column feature is complete
Removed:
- All debug printtext() calls from formats.c and fe-expandos.c
- debug_nick_column setting from fe-messages.c and config_dev
- Debug includes and dependencies

Reason: Debug was causing crashes due to timestamp formatting issues
in different window contexts. Feature works correctly without debug.

Final working state:
- Nick alignment and truncation working properly
- No crashes or segfaults
- Clean production code without debug overhead

Timestamp: 2025-01-25 02:36
2025-08-25 02:43:03 +02:00
kofany
5a8392f9d8 Fix debug output target: Send to current window not status
Problem: Debug printtext(NULL, NULL, ...) was sending debug messages
to status window, which caused crashes when status window tried to
format timestamps for debug messages.

Root cause: Status window environment/context different from chat windows,
causing crashes in expando_time() -> getenv() during timestamp formatting.

Solution: Use printtext_window() to send debug to current dest->window
or active_win instead of status window.

This prevents crashes when debugging nick formatting while focus is
on status window or when sending debug to inappropriate window contexts.

Timestamp: 2025-01-25 02:32
2025-08-25 02:33:00 +02:00
kofany
716384cf62 PROPER FIX: Add recursion protection to nick column formatting
Previous fix only avoided the symptom by using printf() instead of printtext().

Real problem: format_get_text_theme_charargs() was applying nick formatting
to ALL formats including timestamps, causing recursion when timestamp
formatting called back into format_get_text_theme_charargs().

Proper solution:
1. Restrict nick formatting to actual message formats only
2. Add formatting_depth counter to prevent recursion
3. Only apply formatting when formatting_depth == 0

This prevents the root cause of recursion rather than just avoiding
the debug output symptom.

Timestamp: 2025-01-25 01:25
2025-08-25 02:21:38 +02:00
kofany
0a40fac215 CRITICAL FIX: Resolve infinite recursion causing segfault
Problem: Debug printtext() in format_get_text_theme_charargs() caused infinite recursion:
1. format_get_text_theme_charargs() calls printtext() for debug
2. printtext() formats timestamp calling textbuffer_line_get_text()
3. textbuffer_line_get_text() calls format_get_text_theme_charargs() again
4. Infinite recursion → stack overflow → segfault

Solution: Replace printtext() with printf() in format debug to avoid recursion

Stack trace showed 100+ recursive calls to format_get_text_theme_charargs()
This explains segfaults during highlights when focus was on status window.

Timestamp: 2025-01-25 01:15
2025-08-25 02:12:26 +02:00
kofany
ad0d88b123 Implement automatic nick column formatting 'on-the-fly'
Major improvement: No theme modification required!

Features:
- When nick_column_enabled=OFF: Normal theme behavior
- When nick_column_enabled=ON: Automatic formatting applied

Changes:
1. Enhanced expandos to handle OFF state:
   - expando_nickalign() returns '' when disabled
   - expando_nicktrunc() returns original nick when disabled

2. Added automatic format modification in format_get_text_theme_charargs():
   - Detects message formats (own_msg, pubmsg, etc.)
   - Automatically adds $nickalign prefix
   - Replaces {ownnick $0} with {ownnick $nicktrunc}
   - Replaces {pubnick $0} with {pubnick $nicktrunc}
   - Replaces {menick $0} with {menick $nicktrunc}

3. Restored original theme format:
   - own_msg = '{ownmsgnick $2 {ownnick $0}}$1'
   - No manual $nickalign/$nicktrunc needed

Result: Clean theme compatibility + automatic nick column when enabled

Timestamp: 2025-01-25 00:20
2025-08-25 00:32:00 +02:00
kofany
cf9af2298e Fix nick character counting: Add missing underscore and pipe chars
- Add missing '_' (underscore) and '|' (pipe) to count_nick_chars()
- Now matches isnickchar definition from fe-messages.c
- Fixes issue where nicks like 'big_Fat_boy' weren't truncated properly
- Nick counting now includes: alphanumeric + `-_[]{}|\^

Test case: 'big_Fat_boy' (11 chars) should now be truncated to 'big_Fat_b>>'
with width=10

Timestamp: 2025-01-25 00:08
2025-08-25 00:12:16 +02:00
kofany
f69e40e745 Fix nick truncation: Add nicktrunc expando and separate logic
- Add expando_nicktrunc() that returns truncated nick with >> indicator
- Keep expando_nickalign() for padding only (no nick modification)
- Update theme to use $nicktrunc instead of $0 for nick display
- Fix logic: nickalign returns spaces, nicktrunc returns truncated nick
- This resolves issue where long nicks weren't being truncated

Timestamp: 2025-01-24 23:50
2025-08-25 00:01:39 +02:00
kofany
1fa2f42b6f [2025-08-24 21:35:00] PRZYCINANIE NICKÓW - dodano >> dla długich nicków, build OK 2025-08-24 23:28:05 +02:00
kofany
9f0d05e573 [2025-08-24 21:25:00] POPRAWKA - nickalign zamiast nickaligned, zwraca tylko padding, działa jak nm2 2025-08-24 22:36:04 +02:00
kofany
31f9ef1d6b [2025-08-24 21:15:00] PLAN 4 COMPLETE - Nick Column expandos implementacja gotowa do testów 2025-08-24 21:25:39 +02:00
kofany
7bb2ee96ca Zmiana irssi -> irssip dla bezkonfliktowych testów
- Zmiana incdir z 'irssi' na 'irssip' w meson.build
- Zmiana nazwy binarja z 'irssi' na 'irssip'
- Zmiana katalogu config z ~/.irssi na ~/.irssip
- Aktualizacja wszystkich include paths z <irssi/> na <irssip/>
- Przywrócenie nazw plików źródłowych do oryginalnych 'irssi*'

Teraz może być instalowane w /opt/irssip bez konfliktów z systemowym irssi:
- Binarka: /opt/irssip/bin/irssip
- Konfiguracja: ~/.irssip/
- Moduły Perl: /opt/irssip/lib/irssip/perl/Irssi.pm
- Separacja modułów: systemowy irssi nie znajdzie naszych modułów w @INC
2025-08-22 20:24:12 +02:00
kofany
0d6d366955 Add sidepanels feature with window and nicklist panels
Introduces left and right sidepanels to the text UI, including new source files, theme formats, and main window layout logic. Adds mouse support, activity-based coloring, and dynamic panel reservation. Updates build scripts and headers to support the new feature.
2025-08-22 08:01:22 +02:00
kofany
49f819ea8a
Add option to print WHOIS replies in active window (#1)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: appandsync <appandsync@gmail.com>
2025-08-10 10:57:28 +02:00
Ailin Nemui
8eee36d1ea replace str->str & g_string_free with g_string_free_and_steal
solving unused warning in GLib 2.76
2025-07-22 12:03:49 +02:00
ailin-nemui
995e77c30d
Merge pull request #1575 from irssi/hilight_syntax_update
Add -priority to hilight syntax line
2025-07-21 16:51:55 +00:00
Ailin Nemui
9f0b2bc50d detect third argument type of puts 2025-07-21 18:35:09 +02:00
Jari Matilainen
7681cb7585
Add -priority to hilight syntax line 2025-07-20 22:40:59 +02:00
Ailin Nemui
838f8d179e fix _GNU_SOURCE redefined warning due to perl ccflags 2025-07-13 19:33:52 +02:00
Christian Carey
f12ed4ff54 Resolve issue #1513. 2025-05-02 00:02:46 -04:00
Ailin Nemui
9fd6df2a15 add missing include for wcwidth thread test 2025-04-29 22:27:14 +02:00
Ailin Nemui
c7c8d074bd up abi 2025-04-27 14:31:53 +02:00
Ailin Nemui
8acda3f9eb make bitfields unsigned 2025-04-27 14:31:01 +02:00
Emil Engler
32adf7c1dd fe-text: remove const for better Darwin support
This commit removes the `const` qualifier from certain member fields,
as the Darwin version of several `<term.h>` related functions only
accept a `char *` rather than a `const char *`, thereby resulting in
dozens of compiler warnings.
2025-04-14 18:16:04 +02:00
ailin-nemui
a5441f62b9
Merge pull request #1542 from sortie/HOST_NOT_FOUND
Fix using HOST_NOT_FOUND instead of EAI_NONAME.
2025-04-14 13:36:51 +00:00
ailin-nemui
a1c8edfa44
Merge pull request #1541 from sortie/inet_aton
Replace obsolescent inet_addr(3)/inet_aton(3) with inet_pton(3).
2025-04-14 13:36:44 +00:00
Jonas 'Sortie' Termansen
f24d859c80 Fix using HOST_NOT_FOUND instead of EAI_NONAME.
HOST_NOT_FOUND is a gethostbyname(3) error condition rather than a
getaddrinfo(3) error condition and cannot be passed to net_gethosterror
as documented as it calls gai_strerror(3). EAI_NONAME is the appropriate
similar error condition as standardized by POSIX for getaddrinfo(3).
2025-04-14 15:09:27 +02:00
Jonas 'Sortie' Termansen
38440cf340 Replace obsolescent inet_addr(3)/inet_aton(3) with inet_pton(3).
inet_addr has become obsolescent as of POSIX-1.2024 and is not available
on strict POSIX 2024 libc implementations.

inet_pton(3) is the standard and portable replacement available on all
POSIX-1.2001 systems.
2025-04-14 15:08:55 +02:00
Jonas 'Sortie' Termansen
4b2951c828 Include <sys/select.h> to get select(3).
This is the header required by POSIX-1.2024.

This change is needed to build irssi on operating systems such as Sortix
that have a strict libc without obsolete behaviors.
2025-04-14 15:08:02 +02:00
Ailin Nemui
382bde9ab3 namespace TERM_REC functions (conflict with curses.h) 2025-04-08 09:03:00 +02:00
Ailin Nemui
7bac5eb762 include curses.h when needed 2025-04-08 09:03:00 +02:00
ailin-nemui
fca3e83e68
Merge pull request #1543 from Steering7253/master
add ipaddr and family to perl SERVER_REC (and connrec)
2025-04-08 06:05:42 +00:00
ailin-nemui
23ec63ae39
Merge pull request #1556 from Steering7253/fix_sasl_multi_cap
fix irssi SASL negotiation with multiple CAP ACK
2025-04-07 20:37:18 +00:00
steering7253
99c37387a4
bump ABI_VERSION 2025-04-07 14:36:10 -06:00
steering7253
49d7302e98
fix irssi SASL negotiation with multiple CAP ACK
when attempting SASL, if multiple CAP ACK were received (for example,
because a script sent an additional CAP REQ), then any not containing
`sasl` would cause SASL to fail (immediately aborting the connection
with no message, depending on sasl_disconnect_on_failure setting)

check not only if SASL is set in this line, but also if we've already
seen it in a previous line.
2025-04-07 13:53:39 -06:00
steering7253
26fd0585cd
add ipaddr and family to connrec and perl SERVER_REC 2025-04-07 13:51:49 -06:00
Ailin Nemui
d6c146a1fa initialise memory in ctcp ping reply 2025-03-24 08:54:01 +01:00
Ailin Nemui
19e7d3f6b8 up abi 2024-04-12 23:00:52 +02:00
Ailin Nemui
822fd50132 fix /ban command 2024-04-12 22:55:20 +02:00
ailin-nemui
4b48cdce65
Merge pull request #1523 from irssi/from-codeberg
From codeberg
2024-04-02 06:29:49 +00:00
Doug Freed
9d0787fc10 Ensure all files have newlines at the end 2024-04-02 05:23:10 +00:00
ailin-nemui
89f3e1acf5
Merge pull request #1519 from ailin-nemui/openssl3
deprecated openssl3 function
2024-04-01 20:36:00 +00:00
Ailin Nemui
455dcb18ec deprecated openssl3 function 2024-04-01 22:31:53 +02:00
Ailin Nemui
e13df83dc8 new code for g_module_open which might work with apple dylibs given new enough glib 2024-04-01 17:38:30 +02:00
Ailin Nemui
2f2fa029f9 up abi 2024-04-01 16:37:35 +02:00
Ailin Nemui
08bb648850 proper sasl mechanism variable initialisation 2024-04-01 16:33:57 +02:00
Ailin Nemui
98b391f62e minor cleanup 2024-04-01 16:33:36 +02:00
Patrick Okraku
f2b97631e1 Added support for SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512 2024-04-01 15:12:01 +02:00