1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 22:24:47 +02:00

Compare commits

...

395 Commits

Author SHA1 Message Date
Sébastien Helleu d4ed290a37 core: always write all options in theme files
Theme files saved with /theme save and automatic backups now always
contain every themable option (full snapshot), so a theme file is
self-contained and round-trips exactly regardless of the current
configuration. The diff-only mode and the "-full" argument of
/theme save are removed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu a98568788b core: fix description of automatic theme backup 2026-06-08 09:39:22 +02:00
Sébastien Helleu 215fdfc0a7 core: add /theme rename to rename a user theme file 2026-06-08 09:39:22 +02:00
Sébastien Helleu deedaed1f9 core: auto-detect terminal background and apply light theme on first start
Detect the terminal background (via COLORFGBG or an OSC 11 query) before
GUI init and, on the first start, automatically apply the built-in
"light" theme when a light terminal is detected.

The function gui_term_theme_is_light returns an int (1 if light, 0 otherwise,
0 being the safe value when detection is unsure).
2026-06-08 09:39:22 +02:00
Sébastien Helleu fb220e1afd core: fix style in comments 2026-06-08 09:39:22 +02:00
Sébastien Helleu afd7e08691 core: display path to theme written with /theme save <name> 2026-06-08 09:39:22 +02:00
Sébastien Helleu 0fb0b3bb07 core: add /theme reset to restore original themable defaults 2026-06-08 09:39:22 +02:00
Sébastien Helleu ecec47c633 tests: cover apply edge cases for /theme command 2026-06-08 09:39:22 +02:00
Sébastien Helleu 3f64975a72 doc: add ChangeLog entry for /theme command and built-in light theme
Add six entries to the "Added" section of Version 4.10.0 in
CHANGELOG.md:

- the /theme command with its subcommands (list/apply/save/delete/
  info) and the automatic backup mechanism, plus the shipped
  "light" built-in theme;
- the themable flag on configuration options;
- the weechat.look.theme and weechat.look.theme_backup options;
- the theme_register plugin/script API function;
- the t:themable filter in fset.

No UPGRADING.md entry: the change is purely additive — default option
values are unchanged, so existing users see no visible difference
until they explicitly /theme apply light. weechat.look.theme is a new
option (empty by default at first launch) and weechat.look.theme_backup
defaults to "on".
2026-06-08 09:39:22 +02:00
Sébastien Helleu b970962bdb doc: document /theme command and theme file format
Add the "Themes" section to user guides and plugin API references in
every language where the corresponding adoc exists.

User guide (10 files): English (the new prose) and French (a full
translation, with section title "Thèmes"). For the other languages —
German, Italian, Japanese, Polish, Serbian — the body is the English
text with only the section title localized where the existing Colors
section is localized (Themen / Motywy / Теме); Italian and Japanese
keep the English "Themes" title to match their existing English-only
section titles. Coverage by file:

  - doc/en/weechat_user.en.adoc       (new English section)
  - doc/fr/weechat_user.fr.adoc       (full French translation)
  - doc/de/weechat_user.de.adoc       (English body, "Themen" title)
  - doc/it/weechat_user.it.adoc       (English body and title)
  - doc/ja/weechat_user.ja.adoc       (English body and title)
  - doc/pl/weechat_user.pl.adoc       (English body, "Motywy" title)
  - doc/sr/weechat_user.sr.adoc       (English body, "Теме" title)

Plugin API reference (5 files): same approach — English plus full
French translation; Italian, Japanese and Serbian keep the English
body with their conventional section title:

  - doc/en/weechat_plugin_api.en.adoc (new English section)
  - doc/fr/weechat_plugin_api.fr.adoc (full French translation)
  - doc/it/weechat_plugin_api.it.adoc (English body and title)
  - doc/ja/weechat_plugin_api.ja.adoc (English body and title)
  - doc/sr/weechat_plugin_api.sr.adoc (English body, "Теме" title)

User-guide content covers themable options, /theme apply with the
automatic backup mechanism, /theme save and /theme delete with the
reserved-name rules, the .theme file format with a sample, and the
user-file-shadows-built-in resolution order. The API-reference content
documents weechat_theme_register (prototype, arguments, return value,
C example, Python example) with notes on the themable flag and
per-script auto-cleanup on script unload.

The /theme command's CMD_ARGS_DESC help text and the cmdline option
descriptions are picked up automatically by the doc generator
(doc-autogen), so no manual entries are needed there.
2026-06-08 09:39:22 +02:00
Sébastien Helleu d56e46908f script: track per-script theme contributions and purge on script unload
Make individual scripts the unit of ownership for theme contributions
so that loading a script that calls weechat.theme_register(...) and
later unloading it correctly removes the script's overrides.

Plugin API addition (weechat-plugin.h):

  - new function pointer t_weechat_plugin.theme_unregister_script
    delegates to core's theme_unregister_script.
  - new convenience macro weechat_theme_unregister_script(script).
  - WEECHAT_PLUGIN_API_VERSION bumped to 20260527-02.

Script API additions (plugin-script-api.{c,h}):

  - new plugin_script_api_theme_register (plugin, script, name,
    overrides) forwards to the plugin API with the script pointer
    as the contribution owner, so contributions are tracked
    per-script (not per script-language plugin).

Lifecycle wiring (plugin-script.c):

  - new file-local plugin_script_remove_themes (plugin, script)
    calls weechat_theme_unregister_script.
  - plugin_script_remove now calls it alongside the other
    plugin_script_remove_* helpers, so script-unload tears down
    everything (configs, bar items, themes, hooks).

Eight language bindings updated to call
plugin_script_api_theme_register instead of weechat_theme_register
directly, so they pass the script pointer as owner:

  - python, perl, ruby, lua, tcl, javascript, php, guile.

The behavior change is end-to-end visible only at script unload:
before, an unloaded script's theme overrides lingered in the
registry forever and would be re-applied on the next /theme apply;
after, they vanish when the script unloads. /plugin unload of an
entire script-language plugin already worked via commit 24's hook
in plugin_remove (which drops both plugin-only contributions and
their script-owned children when the language plugin itself goes
away, because the contribution's plugin pointer matches).

No new unit tests in this commit: the underlying theme_unregister_script
function is covered by TEST(CoreTheme, UnregisterByOwner), and the
remaining changes are plumbing.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 8b19d3b0a4 core: auto-purge plugin contributions on plugin unload
Call theme_unregister_plugin (plugin) from plugin_remove, right after
config_file_free_all_plugin and before unhook_all_plugin. This drops
every theme contribution whose plugin pointer matches the plugin being
unloaded, so subsequent /theme apply runs no longer try to set
options for an unloaded plugin and per-plugin contributions don't
outlive the plugin.

Script-owned contributions (plugin != NULL && script != NULL) are
left intact - they are cleaned up per-script in the next commit.

This commit is wiring only: the underlying theme_unregister_plugin
function and its semantics are already covered by
TEST(CoreTheme, UnregisterByOwner) in the previous commit.
2026-06-08 09:39:22 +02:00
Sébastien Helleu fcf439dfa0 core: track per-contributor overrides in theme registry
Refactor the theme registry to store one sub-table per contributor
instead of a single merged hashtable. Each registered theme now holds
a linked list of t_theme_contribution entries:

  struct t_theme_contribution {
      struct t_weechat_plugin *plugin;  /* NULL = core */
      const void *script;               /* NULL for non-script */
      struct t_hashtable *overrides;
      ...
  };

Identity of a contributor is the (plugin, script) pair:

  - (NULL, NULL)     -> core (theme_builtin_init)
  - (plugin, NULL)   -> plugin-level contribution
  - (plugin, script) -> individual script (filled in by next commit)

theme_register is now (plugin, script, name, overrides). It searches
the existing contributions for a matching (plugin, script) and merges
the new overrides into it; otherwise it appends a fresh contribution.
The public macro weechat_theme_register(name, overrides) still takes
two args - it now expands to pass weechat_plugin and NULL for script.

theme_apply iterates contributions in list order, calling
config_file_option_set for each entry; later contributions naturally
win for duplicate keys.

Two new internal helpers prepare for the lifecycle work in the next
two commits:

  - theme_unregister_plugin (plugin): drops every contribution owned
    by that plugin (with script == NULL).
  - theme_unregister_script (plugin, script): drops every contribution
    owned by that script.

Neither is called yet; the auto-purge wiring lands in commits 24
(plugin_unloaded signal) and 25 (script API + script-unload hook).

Other touched code:

  - core-theme-builtin.c switches to theme_register (NULL, NULL, ...).
  - core-command.c /theme info uses theme_overrides_count helper
    instead of reaching into theme->overrides (which no longer
    exists).
  - WEECHAT_PLUGIN_API_VERSION bumped to 20260527-01 (function-pointer
    signature change).

Two new tests cover the new semantics:

  - UnregisterByOwner: registers four contributions from distinct
    (plugin, script) pairs, then prunes by plugin and by script,
    asserting per-contribution removal.
  - RegisterMergesPerContributor: two successive register calls from
    the same (plugin, script) merge into a single contribution with
    later keys overriding earlier ones.

Existing tests are updated to use the new theme_register signature,
theme_overrides_count, and theme_get_override (replacing direct
access to theme->overrides->items_count and hashtable_get on
theme->overrides). No plugin or script call sites change - the
public weechat_theme_register macro keeps the same shape.
2026-06-08 09:39:22 +02:00
Sébastien Helleu e4a2a6d3f2 trigger: contribute "light" theme overrides
Add trigger-theme.{c,h} with the trigger plugin contribution to the
built-in "light" theme: 6 entries (flag_command, flag_conditions,
flag_post_action, flag_regex, flag_return_code, regex) tuned for a
light-background terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 7051d7e08b spell: contribute "light" theme overrides
Add spell-theme.{c,h} with the spell plugin contribution to the
built-in "light" theme: 1 entry (spell.color.misspelled=red) tuned for
a light-background terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 36d09a2ba6 script: contribute "light" theme overrides
Add script-theme.{c,h} with the script plugin contribution to the
built-in "light" theme: 24 entries on script.color.* (status_* and
text_*) tuned for a light-background terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu ee799c9032 relay: contribute "light" theme overrides
Add relay-theme.{c,h} with the relay plugin contribution to the
built-in "light" theme: 5 entries (status_auth_failed, status_authenticating,
status_connecting, status_disconnected, text_selected) tuned for a
light-background terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 797d3c0db2 logger: contribute "light" theme overrides
Add logger-theme.{c,h} with the logger plugin contribution to the
built-in "light" theme: 2 entries (logger.color.backlog_end=darkgray,
logger.color.backlog_line=darkgray) tuned for a light-background
terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 91223591e9 exec: contribute "light" theme overrides
Add exec-theme.{c,h} with the exec plugin contribution to the built-in
"light" theme: 2 entries (exec.color.flag_finished=red,
exec.color.flag_running=green) tuned for a light-background terminal.

Same 2D-array pattern as the other plugin contributions.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu f50b91a6d9 xfer: contribute "light" theme overrides
Add xfer-theme.{c,h} with the xfer plugin contribution to the built-in
"light" theme: 7 overrides on xfer.color.* (status_aborted,
status_active, status_connecting, status_done, status_failed,
status_waiting, text_selected) tuned for a light-background terminal.

Same NULL-terminated 2D-array pattern as the irc, fset and buflist
contributions; xfer_theme_init() is called once from
weechat_plugin_init after xfer_config_init / xfer_config_read.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu d2d490146c buflist: contribute "light" theme overrides
Add buflist-theme.{c,h} with the buflist plugin contribution to the
built-in "light" theme: 5 overrides on buflist.format.* options
(buffer_current, hotlist_low, hotlist_message, lag, number) tuned for
a light-background terminal. Each target is a "string|themable" option
holding an evaluated format expression with embedded ${color:...}
references.

Follows the same pattern as the irc and fset contributions: a
NULL-terminated 2D string table consumed by a tiny local register
helper that builds a hashtable and calls weechat_theme_register;
buflist_theme_init() is called once from weechat_plugin_init after
buflist_config_init / buflist_config_read.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu f587a9dcaf fset: contribute "light" theme overrides
Add fset-theme.{c,h} with the fset plugin contribution to the built-in
"light" theme: 47 overrides on fset.color.* options (line backgrounds,
selected-row tuning, title and value colors) tuned for a
light-background terminal.

The table is a NULL-terminated 2-column array of strings (no struct
wrapper, matching the pattern adopted for the irc contribution).
fset_theme_register builds a hashtable from the table and calls
weechat_theme_register; fset_theme_init() is called once from
weechat_plugin_init after fset_config_init / fset_config_read.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 54b0753aab irc: contribute "light" theme overrides
Add irc-theme.{c,h} with the IRC plugin contribution to the built-in
"light" theme: 9 overrides on irc.color.* options tuned for a
light-background terminal (input_nick, item_lag_finished,
item_tls_version_deprecated, list_buffer_line_selected,
message_chghost, message_setname, nick_prefixes, topic_new, topic_old).

The registration is a small wrapper around weechat_theme_register that
builds a hashtable from a static (option, value) table and frees it
after the call. irc_theme_init() is called from weechat_plugin_init
after irc_config_init/read so the option names are already created
when the theme registry references them.

Default option values are NOT changed.
2026-06-08 09:39:22 +02:00
Sébastien Helleu d189ca7f19 core: register built-in "light" theme
Add a small core-theme-builtin.c module containing the core
contribution to the "light" theme: 33 overrides for
"weechat.bar.{status,title}.color_*" and "weechat.color.*" tuned for
light-background terminals.

theme_builtin_init() builds a hashtable from the static entry table and
calls theme_register("light", overrides), then frees the temporary
hashtable. It is called once from weechat_init right after theme_init.
Calling it twice is a no-op (the registry merges identical keys).

Default option values are NOT changed. Existing configs render exactly
as before; users opt in with "/theme apply light".

Add TEST(CoreTheme, BuiltinInit) covering:
  - the "light" theme is absent before theme_builtin_init();
  - it is present after, with >= 30 overrides;
  - three spot-checked values match the source table;
  - calling theme_builtin_init() a second time does not change the
    override count.

Plugins contribute their own "light" overrides via weechat_theme_register
in subsequent commits.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 86d8bec433 script: expose theme_register to python, perl, ruby, lua, tcl, javascript, php, guile
Add weechat.theme_register (name, overrides) to all eight script
languages. Each binding is a mechanical translation of the same
signature:

  - name:      string
  - overrides: language-native dict / hash / associative array of
               full_option_name -> value strings
  - returns:   pointer-as-string of the registered t_theme (empty
               string on failure)

Each binding converts the dict to a struct t_hashtable using the
existing per-language helper (weechat_python_dict_to_hashtable,
weechat_perl_hash_to_hashtable, weechat_ruby_hash_to_hashtable,
weechat_lua_tohashtable, weechat_tcl_dict_to_hashtable,
weechat_js_object_to_hashtable, weechat_php_array_to_hashtable,
weechat_guile_alist_to_hashtable), calls weechat_theme_register,
frees the temporary hashtable, and returns the result. The new
function is registered right after the config_* functions so the API
listing stays grouped by topic.

PHP also receives a new arginfo entry (string, array -> string) in
both weechat-php_arginfo.h and weechat-php_legacy_arginfo.h.

This is plumbing only - the underlying theme_register function is
already covered by tests/unit/core/test-core-theme.cpp
(TEST(CoreTheme, Register)). No script-side tests are added here.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 53db79aa5f api: expose theme_register to plugins
Add a single new entry point to the plugin API:

  struct t_theme *weechat_theme_register (const char *name,
                                          struct t_hashtable *overrides);

Plugins call this at init time to contribute their per-theme color (or
other themable) overrides for a built-in theme like "dark". The
overrides hashtable maps full option names ("irc.color.input_nick") to
their string values; the caller retains ownership and may free it
right after the call. Repeated calls with the same theme name merge
into the existing registry entry, so each plugin can declare its own
contributions independently of core and of other plugins.

Wiring:

- struct t_theme forward-declared in weechat-plugin.h alongside the
  other opaque types.
- theme_register function pointer added to t_weechat_plugin.
- weechat_theme_register convenience macro added.
- plugin.c initializes the pointer to core's theme_register.
- WEECHAT_PLUGIN_API_VERSION bumped to 20260526-01.

This commit is plumbing only: the underlying theme_register function
already has unit-test coverage in tests/unit/core/test-core-theme.cpp
(TEST(CoreTheme, Register)), so no new tests are added here.
2026-06-08 09:39:22 +02:00
Sébastien Helleu b994a645e3 core: add theme name completion
Add two completion items hooked alongside "layouts_names":

- "theme_themes_all": all theme names (built-ins from the registry
  plus every *.theme file in <weechat_config_dir>/themes/, including
  backup-*.theme). Used by tab-complete on /theme apply and
  /theme info.
- "theme_themes_user": user theme files only (excludes built-ins
  and backup-*.theme). Used by tab-complete on /theme save and
  /theme delete, so users cannot accidentally try to overwrite a
  built-in name or save a name colliding with the reserved backup
  prefix.

Both callbacks share a small dir_exec_on_files-based helper to filter
the themes directory. The /theme command's completion template in
core-command.c is updated to reference these new items.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 64f17761f1 core: implement /theme save and /theme delete
Add two complementary subcommands:

  /theme save <name> [-full]: writes a user theme file at
    ${weechat_config_dir}/themes/<name>.theme containing the current
    themable options. By default only options whose value differs from
    their default (config_file_option_has_changed) are written, which
    keeps the file small and focused. Pass "-full" to write every
    themable option (matches the format used by automatic backups).

    Name validation: refuses any name matching a built-in theme (those
    are reserved for in-memory registrations) and any name starting
    with "backup-" (reserved for /theme apply backups). Both checks
    print an error and abort without writing.

  /theme delete <name>: removes ${weechat_config_dir}/themes/<name>.theme
    via unlink. Refuses to delete a name registered as a built-in
    theme (a built-in has no file on disk to delete, even if the user
    has a shadowing file of the same name they cannot remove it this
    way; they can rename or delete it manually).

The full-snapshot writer used by /theme apply backups is refactored
into theme_write_file (name, description, diff_only). It is reused
by theme_make_backup (diff_only=0) and theme_save (diff_only inverted
from the user's -full flag).

Bug fix while at it: the writer was previously calling
config_file_option_value_to_string (ptr_option, 0, 1, 0); the third
and fourth arguments are "use_colors" and "use_delimiters", so the
call inserted GUI color escape codes into the file output and skipped
quoting strings. Corrected to (ptr_option, 0, 0, 1) so plain text
with proper string quoting is written; the change also fixes the
content of files produced by theme_make_backup in the previous commit.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 3bdb31bbf6 core: implement theme file parsing and transient file reads in /theme apply
Add a small INI-style parser for *.theme files and wire it into the
/theme command so user themes living in directory "themes" inside the
WeeChat configuration directory can be applied (and inspected) without
ever being cached.

Parser (theme_file_parse in core-theme.c) accepts two sections:

  [info]
  name = "..."          \ shown by /theme info; ignored for apply
  description = "..."   |
  date = "..."          |
  weechat = "..."       /
  (unknown keys are ignored with a warning)

  [options]
  full.option.name = "value"

Surrounding single or double quotes around a value are stripped (same
rule used by the regular config file reader). The parsed result is a
heap-allocated t_theme; the caller frees with theme_free.

Resolution rule in theme_apply: if the path
"${weechat_config_dir}/themes/<name>.theme" is readable it is parsed
and used (file shadows any built-in of the same name); otherwise the
built-in registry is consulted. The transient t_theme is freed before
the final refresh, so user themes have no steady-state memory
footprint regardless of how many .theme files have accumulated.

/theme list now also scans the themes directory and appends user
files to the listing (each marked "(file)"). backup-*.theme are
hidden by default; pass "-backups" to include them.

/theme info <name> works for both sources: file path is shown when the
information comes from disk; "built-in (in-memory)" otherwise.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 7f1f9462f4 core: implement /theme apply with themable enforcement and auto-backup
Implement /theme apply <name> for themes currently in the in-memory
registry. The file-shadowing branch (read a .theme file from
${weechat_config_dir}/themes/ when no built-in matches) is added in
the next commit together with the parser.

Apply algorithm (theme_apply in core-theme.c):

- Look up the theme in the registry; abort with an error if unknown.
- If weechat.look.theme_backup is on and the target name does not
  begin with "backup-", write a full snapshot of every themable
  option to ${weechat_config_dir}/themes/backup-<timestamp>.theme
  via theme_make_backup; abort the apply if the backup cannot be
  written, so the user can always undo.
- Iterate the theme's overrides with theme_applying=1 so the
  per-option config_change_color skips its gui refresh; for each
  entry look up the option, refuse it if missing or non-themable
  (warning to core buffer), otherwise call config_file_option_set.
- Perform a single gui_color_init_weechat + gui_window_ask_refresh
  at the end.
- Persist the active label in weechat.look.theme and send signal
  "theme_applied" with the name as data.

Add the new option weechat.look.theme_backup (boolean, default on)
which controls the backup-or-abort behaviour described above.

Wire the new /theme apply subcommand into core-command.c with the
existing /theme registration; update help text accordingly.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 9fbc81dc54 core: add /theme command with list and info subcommands
Add the /theme command with two read-only subcommands for now:

- /theme  (or  /theme list): list registered themes; the active theme
  (matching weechat.look.theme) is marked with "->".
- /theme info <name>: show name, description, creation date, WeeChat
  version and override count of a theme.

Both subcommands only consider themes present in the in-memory
registry (registered via core/plugins/scripts). User theme files on
disk are not yet handled: the file parser and transient file reads
land in a later commit together with /theme apply.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 4550c3e33a core: add weechat.look.theme option and theme_applying guard
Add a new string option "weechat.look.theme" holding the name of the
last theme applied via the upcoming /theme command. It is set
automatically by /theme apply and persisted on disk for /theme info to
display after restart; it is NOT re-applied at startup (the user's
saved color values win to avoid clobbering manual post-apply tweaks).

Amend config_change_color so it skips the gui_color_init_weechat ()
and gui_window_ask_refresh (1) calls when theme_applying is set.
/theme apply will set this flag while iterating overrides so the N
individual option changes do not trigger N redundant screen refreshes;
the apply path then performs a single refresh at the end.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 7e2b9ffa9a core: add core-theme skeleton and theme registry
Introduce a new module (core-theme.{c,h}) holding the in-memory registry
of built-in themes used by the upcoming /theme command:

- struct t_theme stores name, description, date and weechat version
  captured at registration time, plus a hashtable of overrides keyed by
  full option name (file.section.option) -> value string.
- theme_register (name, overrides) creates a new theme or merges the
  given overrides into an existing one (later calls override duplicate
  keys); this is the API plugins and scripts will use to contribute
  per-theme color values.
- theme_search and theme_list provide lookup and ordered enumeration.
- theme_init / theme_end are called from weechat_init / weechat_end.

The theme_applying flag is declared here but not yet consumed (it will
gate config_change_color in the next commit to avoid N redundant
window refreshes during /theme apply).

User theme files are not handled by this module: they are read
transiently inside /theme apply (a later commit) and never cached.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 04f817814f fset: add "t:themable" filter
Extend the "t:" filter so the special value "themable" matches every
option whose new themable flag is set, regardless of type (color,
string, integer, boolean, enum). This makes the flag interactively
discoverable in the fset buffer and is the natural way to inspect the
surface area that an upcoming /theme command will be allowed to touch.

The themable flag of an option is now mirrored on struct t_fset_option,
exposed via hdata ("themable", integer) and infolist ("themable",
integer), and printed in the log.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 0315c53a9e core: add themable flag to configuration options
Add an "int themable" field on struct t_config_option. The flag is set
automatically for every CONFIG_OPTION_TYPE_COLOR option, and may be set
explicitly on any other type by suffixing the type argument with
"|themable" in the call to config_file_new_option (e.g. "string|themable"
for a string option whose value contains "${color:...}" references).

Opt in the relevant string options in core (buffer_time_format,
day_change_message_*, item_time_format, nick_color_force, prefix_*,
chat_nick_colors, eval_syntax_colors, color palette aliases) and in the
buflist, fset, irc, relay plugins.

The flag is exposed via hdata, infolist, and print_log so scripts and
/debug can read it. This is the foundation for an upcoming /theme
command that will only be allowed to modify themable options.
2026-06-08 09:39:22 +02:00
Sébastien Helleu 3aeaa70e64 ci: bump poexam to version 0.0.11 2026-06-07 21:56:22 +02:00
Sébastien Helleu 66e633e27e core: add version 4.9.2 2026-06-07 11:51:55 +02:00
Sébastien Helleu 436bbeceff tests: increase buffer size for injection of fake IRC message 2026-06-07 08:47:36 +02:00
Sébastien Helleu c307087e2d core: update ChangeLog (#2324) 2026-06-06 11:19:14 +02:00
aizu-m 51a1149852 relay: fix out-of-bounds read in relay_http_print_log_request (#2324) 2026-06-06 11:18:06 +02:00
Sébastien Helleu d74993a42c relay: limit size of partial message received while reading an HTTP request to prevent memory exhaustion
A relay client could send data with no end-of-line (an unterminated method
or header line) and dribble its payload, making WeeChat accumulate it in the
partial message buffer that grew without limit, until all memory was
exhausted. This path is reachable before authentication during websocket
initialization with the "weechat" and "irc" protocols.

The accumulated partial message is now bounded by
RELAY_HTTP_PARTIAL_MESSAGE_MAX_LENGTH: once the limit is reached, the extra
data is ignored.
2026-06-06 09:36:22 +02:00
Sébastien Helleu 51464e400f core: add links to issues in ChangeLog (#2321, #2322) 2026-06-06 07:20:41 +02:00
Sébastien Helleu 1c5e6c3fc2 core: update ChangeLog (#2323) 2026-06-06 07:20:38 +02:00
Sébastien Helleu e563dfc903 doc: add build of Serbian API Relay doc 2026-06-06 07:09:04 +02:00
Sébastien Helleu befbcceb7f relay/api: add field "last_read_line_id" in GET /api/buffers 2026-06-06 07:04:46 +02:00
aizu-m 56f9ad68fb xfer: fix out-of-bounds read in xfer_chat_recv_cb on empty line (#2323) 2026-06-06 07:01:18 +02:00
aizu-m 328f86affc irc: fix out-of-bounds read in DCC command with quoted filename 2026-06-04 23:17:58 +02:00
Sébastien Helleu f4dc30ec58 tests: add tests on function xfer_file_find_filename 2026-06-04 23:17:58 +02:00
aizu-m 23291acb7b xfer: replace directory separator in remote nick by underscore in download filename 2026-06-04 22:38:08 +02:00
Sébastien Helleu b802681230 api: fix infinite loop in function string_replace when the search string is empty 2026-06-03 21:15:16 +02:00
Sébastien Helleu 3687ce0f0f relay: limit size of received websocket frame and HTTP body to prevent memory exhaustion
A relay client could announce a huge websocket frame (or HTTP body via
"Content-Length") and dribble its payload, making WeeChat accumulate it
in a buffer that grew without limit, until all memory was exhausted. The
websocket frame path is reachable before authentication with the
"weechat" and "irc" protocols.

The announced websocket frame length and HTTP "Content-Length" are now
bounded by WEBSOCKET_FRAME_MAX_LENGTH and RELAY_HTTP_BODY_MAX_LENGTH: an
oversized websocket frame closes the connection, and an oversized body is
rejected.
2026-06-01 21:56:34 +02:00
Sébastien Helleu 1211510ded irc: limit size of data received from the server to prevent memory exhaustion
A malicious or compromised IRC server could send data with no end-of-line
(or a flood of "005" messages), making WeeChat accumulate it in a buffer
that grew without limit, until all memory was exhausted.

The unterminated received message and the accumulated "005" (ISUPPORT)
data are now bounded by IRC_SERVER_RECV_MSG_MAX_LENGTH and
IRC_SERVER_ISUPPORT_MAX_LENGTH: extra data is ignored once the limit is
reached.
2026-06-01 21:53:03 +02:00
aizu-m 07871f123f core: fix possible integer truncation in function eval_string_split (#2320) 2026-06-01 10:25:35 +02:00
Sébastien Helleu a0cf82d4a6 core: replace Bash/Ubuntu with WSL in README 2026-05-31 17:24:41 +02:00
Sébastien Helleu 13291b6b9a core: add missing trailing slash to Ruby scripts URL in README 2026-05-31 17:24:24 +02:00
Sébastien Helleu 76d652a513 core: fix multi-protocol feature wording in README 2026-05-31 17:24:13 +02:00
Sébastien Helleu ff9b698665 core: improve wording of semantic versioning section in README 2026-05-31 17:24:01 +02:00
Sébastien Helleu d5c985eb11 core: add security policy in SECURITY.md 2026-05-31 16:04:33 +02:00
Sébastien Helleu b29f464322 ci: enable ruby 3.3 module on Rocky Linux 9 2026-05-31 15:13:43 +02:00
Sébastien Helleu 171a9a9fc4 ci: install dnf-plugins-core on Rocky Linux 9 for dnf config-manager 2026-05-31 15:13:43 +02:00
Sébastien Helleu d7bc041098 core: add version 4.9.1 2026-05-31 15:09:01 +02:00
Sébastien Helleu 43a118ac47 core: fix timing attack on TOTP validation (GHSA-vhv8-g2r9-cwcc)
weecrypto_totp_validate compared the generated and client-supplied OTPs
with strcmp and broke out of the time-window loop on the first match.
Both choices leaked information via response timing: strcmp leaked the
expected OTP digit-by-digit (shrinking the brute-force search from
~10^digits to a handful of guesses within the 30-second window), and
the early break leaked which window offset matched.

Compare in constant time with string_memcmp_constant_time and always
iterate the full window, OR-ing the result into otp_ok without an
early exit.

This affects both relay protocols (which call totp_validate via the
public info hook) and any other caller of the info hook.
2026-05-31 09:16:46 +02:00
Sébastien Helleu e540d7a2cf relay/irc: fix timing attack on PASS command (GHSA-vhv8-g2r9-cwcc)
The IRC relay protocol's PASS handler compared the server password with
the client-supplied value using strcmp, leaking the password byte-by-byte
via response timing. This is the same class of bug fixed for the api and
weechat protocols, on a separate code path that did not go through
relay_auth_check_password_plain.

Extract the HMAC-then-constant-time-compare logic from
relay_auth_check_password_plain into relay_auth_password_equals, then
use it in both the plain-auth wrapper and the IRC PASS handler.
2026-05-31 09:16:36 +02:00
Sébastien Helleu 6948aea626 relay: fix timing attack on password authentication (GHSA-vhv8-g2r9-cwcc)
The relay authentication used non-constant-time comparisons (strcasecmp,
strcmp) to verify password hashes and plaintext passwords, allowing an
attacker to derive the expected hash byte-by-byte from response timing
and then authenticate without knowing the password.

- SHA/PBKDF2 hex hash comparisons: normalize the client-supplied hash to
  uppercase and compare in constant time over the fixed expected length.
- Plaintext password comparison: HMAC-SHA256 both passwords with a fresh
  per-call random key and compare the fixed-size MACs in constant time,
  hiding both per-byte timing and the password length.

Add string_memcmp_constant_time helper in core, exposed via the plugin
API. Bump WEECHAT_PLUGIN_API_VERSION accordingly.
2026-05-31 09:16:15 +02:00
Sébastien Helleu 5dbb96b66a relay: limit size of decompressed websocket frame to prevent memory exhaustion (GHSA-v2v4-45wm-5cr3)
An authenticated relay client using the permessage-deflate websocket
extension could send a small compressed frame that decompresses to an
unbounded amount of data, exhausting all memory and crashing WeeChat.

The output buffer in relay_websocket_inflate is now capped to
WEBSOCKET_INFLATE_MAX_SIZE: frames decompressing beyond this limit are
rejected and the connection is closed.
2026-05-31 09:16:06 +02:00
Sébastien Helleu 4fdcbf8f93 irc: fix description of info "irc_nick_from_host"
This fixes the following warning from xgettext:

src/plugins/irc/irc-info.c:1361: warning: Message contains an embedded email address.  Better move it out of the translatable string, see https://www.gnu.org/software/gettext/manual/html_node/No-embedded-URLs.html
2026-05-30 15:36:26 +02:00
Sébastien Helleu e4b70ad252 core: update translations 2026-05-30 14:00:43 +02:00
Sébastien Helleu d7fd2b7b0b core: define author name/email as constants
This fixes the following compiler warning:

src/core/core-args.c:180: warning: Message contains an embedded email address.  Better move it out of the translatable string, see https://www.gnu.org/software/gettext/manual/html_node/No-embedded-URLs.html
2026-05-30 13:39:45 +02:00
Sébastien Helleu 73cf57742e doc: make pygmentize optional at build time
If pygmentize is not found, the build now emits a CMake warning and
proceeds with an empty dark theme stylesheet rather than aborting.
A non-zero exit from pygmentize is also downgraded from SEND_ERROR to
WARNING for the same reason. This restores the pre-existing behavior
where the documentation could be built without any pygments tooling
installed (Asciidoctor then renders code blocks as plain text).
2026-05-24 18:03:12 +02:00
Sébastien Helleu bf7b8484cd doc: switch syntax highlighting to automatic light/dark theme with bevel on code blocks
Syntax highlighting now follows the user's `prefers-color-scheme`:

- Light theme uses the pygments `default` style, embedded by Asciidoctor as before.
- Dark theme uses the pygments `monokai` style, generated at CMake
  configure time via `pygmentize` and injected into the docinfo through a
  `@PYGMENTS_DARK_CSS@` placeholder, scoped under
  `@media (prefers-color-scheme: dark)`.

To support template substitution, `doc/docinfo.html` is renamed to
`docinfo.html.in` and produced into the build directory via
`configure_file`; all HTML targets now depend on the generated docinfo
and the `docinfodir` attribute points to the binary dir.

Code blocks also gain a subtle 3D bevel:

- `pre` borders use theme-specific bevel colors (`--pre-bevel-light` on
  top/left, `--pre-bevel-dark` on bottom/right) for a raised look in both
  themes.
- A shared `--pre-bevel-bg` surface color is applied to literalblock,
  listingblock and `pre.pygments`, so all code blocks sit on the same
  background regardless of the pygments style.
- `pre { line-height: 1.25 }` is forced to keep line spacing consistent
  between light (Asciidoctor base `1.45`) and dark (pygments `125%`).

`python3-pygments` is added to the documented build dependencies (the
`pygmentize` binary it provides is required at configure time).
2026-05-24 16:46:36 +02:00
weechatter 86f51b66b3 core: update German translations 2026-05-23 21:42:48 +02:00
Sébastien Helleu 1400b6c197 core: add fix of IRC tag in ChangeLog 2026-05-23 13:23:26 +02:00
Sébastien Helleu c71978c0b3 core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals (closes #1742) 2026-05-23 12:15:04 +02:00
Sébastien Helleu 4c38ce050b irc, script: display all input actions and in the same way in /list and /script buffers title 2026-05-22 07:56:31 +02:00
Sébastien Helleu 5520ed1950 fset: remove error displayed in core buffer when clicking with the mouse below the last option displayed 2026-05-21 13:55:15 +02:00
Sébastien Helleu ad35aef1f4 core: fix French translations 2026-05-20 21:56:45 +02:00
Sébastien Helleu 88f0070674 irc: fix tag in message with list of tags when joining a channel
The message with list of nicks on the channel has now tag irc_353 instead of
irc_366.
2026-05-20 20:24:06 +02:00
Sébastien Helleu 7683287f71 relay: add "api" protocol in help on options relay.network.password_hash_algo and relay.network.password_hash_iterations 2026-05-20 20:19:30 +02:00
Sébastien Helleu 33adaef85c core: add missing word in French translation of the welcome message 2026-05-20 20:13:26 +02:00
Sébastien Helleu 6f3c804379 core: add missing word in French translation of /help upgrade 2026-05-20 20:12:37 +02:00
Sébastien Helleu 617b4e4dee core: fix option name in French translation of /help buffer 2026-05-20 08:31:55 +02:00
Sébastien Helleu ea1eb76b2d core: fix trailing punctuation in German translation of /help script.look.use_keys 2026-05-17 20:59:07 +02:00
weechatter ad12925d6c core: update German translations 2026-05-13 21:04:45 +02:00
Sébastien Helleu a5fcf898b9 ci: bump poexam to version 0.0.10 2026-05-13 07:43:47 +02:00
Ivan Pešić 14d544be39 core: update Serbian translation (#2318) 2026-05-12 22:40:12 +02:00
Sébastien Helleu 3e994996c6 core: set max curl version to 8.21.0 for symbol CURLAUTH_DIGEST_IE 2026-05-12 13:12:12 +02:00
Sébastien Helleu 3341b9a2d2 core: remove zero width spaces (U+200B) in German translation of /help pipe 2026-05-10 19:28:25 +02:00
Sébastien Helleu 815640b840 relay: add option relay.network.unix_socket_permissions (closes #2317) 2026-05-10 19:22:57 +02:00
Sébastien Helleu acd3d91318 core: fix "Language" field in German translations
Country code is unnecessary: language "de" is equivalent to "de_DE".
2026-05-10 10:04:21 +02:00
Sébastien Helleu ef5f4d8ee6 core: fix "Language-Team" field in gettext file headers 2026-05-10 10:04:19 +02:00
weechatter d40217d1e6 core: update German translations 2026-05-06 15:59:20 +02:00
Sébastien Helleu 17b593325a core: complete /help away by mentioning the option irc.look.display_away 2026-05-04 18:47:04 +02:00
weechatter 3456e848da core: update German translations 2026-04-30 14:33:33 +02:00
Sébastien Helleu 723232ac35 ci: bump Lua from 5.3 to 5.4 2026-04-30 00:17:54 +02:00
Sébastien Helleu 5f5f9f35e7 debian: bump Lua from 5.3 to 5.4 2026-04-30 00:17:23 +02:00
Sébastien Helleu 86a6c4f5ff debian: remove patch for build of Debian packages on Ubuntu Focal 2026-04-29 23:58:22 +02:00
Sébastien Helleu 3082c2e4e5 core: add condition on connected relay api clients in default value of option weechat.look.hotlist_add_conditions 2026-04-28 21:30:51 +02:00
Sébastien Helleu 062109e33d relay: add protocol "api" in description of info "relay_client_count" 2026-04-28 21:22:38 +02:00
Sébastien Helleu fd88c9a45b relay: remove protocols from the plugin description 2026-04-28 21:19:10 +02:00
Sébastien Helleu a8c4d5604e ci: bump poexam to version 0.0.9 2026-04-16 20:32:06 +02:00
Emir SARI ef4c657157 core: update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2026-04-15 13:20:06 +02:00
Sébastien Helleu 0c29e5a630 core: fix possible integer truncation in functions eval_string_cut and eval_string_repeat 2026-04-10 21:48:56 +02:00
Sébastien Helleu 77a0dbfd44 core: remove dead code 2026-04-10 21:48:37 +02:00
weechatter afa42ec851 core: update German translations 2026-04-06 11:29:02 +02:00
Sébastien Helleu 8da86431da logger: fix file size example in /help logger.file.rotation_size_max 2026-04-05 21:50:41 +02:00
Sébastien Helleu 3d7f988973 core: use util functions to parse integers in bar functions 2026-04-05 16:53:05 +02:00
Sébastien Helleu 5ed21d7dad core: use util functions to parse integers in gui curses functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 54eff44d74 core: check error ERANGE after call to strtoul in function util_version_number 2026-04-05 15:33:33 +02:00
Sébastien Helleu 83d760deae core: check error ERANGE after call to strtoull in function util_parse_delay 2026-04-05 15:33:33 +02:00
Sébastien Helleu 5147b19e51 core: use function util_parse_longlong in function util_parse_time 2026-04-05 15:33:33 +02:00
Sébastien Helleu 50959eeb01 core: use function util_parse_longlong in upgrade functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu ac2ed69c0b core: use function util_parse_longlong in function sys_setrlimit 2026-04-05 15:33:33 +02:00
Sébastien Helleu 2f7f707df0 core: use function util_parse_longlong in function string_parse_size 2026-04-05 15:33:33 +02:00
Sébastien Helleu 94e5de4836 core: use function util_parse_int in function string_get_priority_and_name 2026-04-05 15:33:33 +02:00
Sébastien Helleu 38f9a5587f core: use util functions to parse integers in function network_connect_child_read_cb 2026-04-05 15:33:33 +02:00
Sébastien Helleu 6432711798 core: use util functions to parse integers in hook functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 81c23a5134 core: use util functions to parse integers in hdata functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 6336c22293 core: use util functions to parse integers in eval functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 6658122b03 core: use util functions to parse integers in config functions 2026-04-05 15:33:33 +02:00
Sébastien Helleu 7e8f8b5178 core: use util functions to parse integers in core commands 2026-04-05 15:33:33 +02:00
Sébastien Helleu d00e334738 core: add missing non-breaking spaces in French translations 2026-04-05 09:58:44 +02:00
Sébastien Helleu f48b0bae2e core: fix URL in /help relay.network.websocket_allowed_origins (Polish) 2026-04-02 19:59:25 +02:00
Sébastien Helleu d3d18cd4c2 core: add missing double quotes in /help relay.network.websocket_allowed_origins (German) 2026-04-02 19:30:28 +02:00
Sébastien Helleu cead39b52f core: add /mute in default command for key alt+"=" (toggle filters)
Since v4.8.0 and commit d0298b4738, toggling
filters with `/filter toggle` displays a message on core buffer.

This is OK when running the command manually, but not when pressing the key
alt+"=".
2026-03-31 19:12:46 +02:00
Emil Velikov 7d88e53182 Bump required zstd to v1.4.0
Bump the requirement to v1.4.0, which means we can remove all the ifdef
guards.

It was released over 6 years ago, with latest release being 1.5.7.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 1.4.4 and 1.4.8 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-03-29 18:39:02 +02:00
Luc Schrijvers 8fe741e057 Build fix for Haiku 2026-03-29 18:31:27 +02:00
LuK1337 b6ef936cca cmake: enable position independent code (PIE)
Fixes the following build error when compiling Fedora 45 RPM:

/usr/bin/ld.bfd: tests/unit/CMakeFiles/tests.dir/tests.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

See: https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
     https://cmake.org/cmake/help/latest/policy/CMP0083.html
2026-03-29 18:28:48 +02:00
Sébastien Helleu 7c2bae9faf ci: add tests with Fedora 43 2026-03-29 12:36:30 +02:00
Sébastien Helleu 2b48eba784 Version 4.10.0-dev 2026-03-29 10:24:55 +02:00
Sébastien Helleu 5969f9faf6 Version 4.9.0 2026-03-29 10:20:23 +02:00
Sébastien Helleu b70b484f5f debian: update changelog 2026-03-28 22:31:27 +01:00
Sébastien Helleu b250d71608 debian: remove redundant priority optional field from control 2026-03-28 22:29:00 +01:00
Sébastien Helleu 94457f8313 debian: bump Standards-Version to 4.7.3 2026-03-28 22:27:09 +01:00
Sébastien Helleu 0cd0e7be6a core: remove link to Diaspora* from README 2026-03-27 19:22:37 +01:00
Sébastien Helleu 2ececc1184 core: remove link to Slant from README 2026-03-27 19:21:55 +01:00
Sébastien Helleu b8bef1c3e1 irc: fix display of CTCP query sent multiple times to the same user when capability echo-message is enabled (closes #2309) 2026-03-27 18:32:31 +01:00
Sébastien Helleu d9e56c3df8 ci: add check of gettext files with poexam 2026-03-25 21:49:02 +01:00
Emir SARI dc28050b8b core: update Turkish translations 2026-03-25 08:46:52 +01:00
Sébastien Helleu f53e7fb9ef core, plugins: fix typos in comments on functions, use imperative 2026-03-23 20:45:36 +01:00
Sébastien Helleu d34eb40187 core: set max curl version to 8.20.0 for RTMP symbols
rtmp support has been dropped in curl, see:
https://github.com/curl/curl/commit/ceae02db040de3cf7ae4c3f8ec99e8286b568c2e
2026-03-21 17:59:48 +01:00
Sébastien Helleu 2cbbb677f3 core: replace "motdepasse" by "mot_de_passe" in French translations and docs 2026-03-21 17:30:12 +01:00
Sébastien Helleu f7267bc992 core: replace "mypassword" by "my_password" in /help secure 2026-03-21 17:27:02 +01:00
Sébastien Helleu 147d5b3f88 core: replace "mynick" by "andrew" in /help secure 2026-03-21 17:22:20 +01:00
Sébastien Helleu da4881959e core: replace "proxyname" by "proxy_name" in /help proxy 2026-03-21 13:28:38 +01:00
Sébastien Helleu 5e963c7546 core: replace "barname" by "bar_name" in /help bar 2026-03-21 13:23:55 +01:00
Sébastien Helleu 41d8e06394 ci: fix branch for Homebrew/actions/setup-homebrew 2026-03-21 12:01:08 +01:00
Sébastien Helleu 52d1245bad ci: bump actions/checkout to v6 2026-03-21 11:46:30 +01:00
Sébastien Helleu 961dc515a0 ci: add new job "checks" to check gettext files, shell and Python scripts, Python stub file and Curl symbols 2026-03-21 11:44:24 +01:00
Sébastien Helleu 73ec7c0641 ci: reorder and rename jobs 2026-03-21 11:28:11 +01:00
Sébastien Helleu c60a5fde14 ci: remove temporary fix for brew install 2026-03-21 10:15:14 +01:00
Eli Schwartz 0bbae498c9 python: fix archaic and soft-deprecated use of raw cmake vars
In commit 9a9a262ea1 we moved from
pkg-config to find_package() to work around a deficiency in the pkgsrc
package manager, which does not ship pkg-config files as intended by
CPython.

Modern CMake discourages use of "FOO_LIBRARIES" in all cases, when
imported "interface" libraries can and should be used instead. The meson
equivalent is `dependency()` versus `cc.find_library()`, so this is
certainly a general trend among modern build systems.

An imported interface target, such as the previous PkgConfig::PYTHON,
carries with it the various internal properties such as DEFINITIONS,
INCLUDE_DIRS, or LIBRARIES, and batch applies them. It also avoids
leaking across cmake 2.x style whole-directory scopes.

Use the documented cmake imported interface target for embedding Python
and avoid `add_definitions(${Python_DEFINITIONS})` and similar. As a
bonus, it's also shorter and more concise.

Fixes: 9a9a262ea1
Fixes: https://github.com/weechat/weechat/pull/2251
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2026-03-21 08:53:48 +01:00
Eli Schwartz 4c79e870af python: fix broken usage of FindPython.cmake breaking python selection
In commit 9a9a262ea1 we moved from
pkg-config to find_package() to work around a deficiency in the pkgsrc
package manager, which does not ship pkg-config files as intended by
CPython. In the process, Gentoo and other platforms that, unlike pkgsrc,
publicly support multiple versions of python installed in parallel, had
python version selection broken. Consequently, weechat linked to the
wrong python, which happened to be installed in build chroots but was
not the versioned python package that the weechat package listed as a
dependency. Attempting to install weechat then broke on some systems
(which installed one version of python as a dependency but actually
linked to a totally different one).

This happens due to a design bug in upstream CMake. It is never
conceptually reasonable to use

```
find_package(Python COMPONENTS ...)
```

and omit the "Interpreter" component; if you do, CMake will ignore its
own documentation on how to control the build to use a specific python,
and choose one randomly (== "latest version available"). If, and only
if, the Interpreter component is checked, the development headers /
libraries for python will be guaranteed consistent with the documented
lookup variables from FindPython.cmake's documentation.

Bug: https://bugs.gentoo.org/968814
Fixes: 9a9a262ea1
Fixes: https://github.com/weechat/weechat/pull/2251
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2026-03-21 08:29:54 +01:00
weechatter dc4df8b9aa core: update German translations 2026-03-19 11:10:26 +01:00
Sébastien Helleu 6bc11571b5 xfer: evaluate option xfer.network.own_ip 2026-03-18 18:26:06 +01:00
Sébastien Helleu d1b71a8562 core: fix typo in German translation 2026-03-17 23:26:27 +01:00
weechatter 19a6591410 core: update German translations 2026-03-17 16:28:04 +01:00
Sébastien Helleu 25e0809c55 doc/user: fix French translation of title 2026-03-16 21:20:51 +01:00
Sébastien Helleu e8d0399623 irc: fix translations of /help irc.look.list_buffer_sort 2026-03-16 13:23:52 +01:00
Sébastien Helleu c41d73e417 irc: fix typo on field name in /help irc.look.list_buffer_sort 2026-03-16 13:16:44 +01:00
Sébastien Helleu 1532efea6d core: fix style in ChangeLog 2026-03-14 00:12:17 +01:00
Sébastien Helleu 9bf2d51493 core: add option -e to evaluate all commands before executing them in command /eval 2026-03-14 00:03:27 +01:00
Sébastien Helleu 27ae6ca789 core: fix crash with /eval when the current buffer is closed in a command 2026-03-13 23:11:00 +01:00
Sébastien Helleu 916c59d8f0 doc/faq: fix key to search text in current buffer
Since WeeChat 4.2.0, Ctrl+r has been replaced by Ctrl+s.
2026-03-13 21:57:12 +01:00
Sébastien Helleu 37bdf6586b core: remove extra pipe in German translation 2026-03-12 20:38:54 +01:00
Sébastien Helleu 13e9381e19 core: fix typo in French translation: "repertoire" -> "répertoire" 2026-03-12 20:31:40 +01:00
Sébastien Helleu b94e4af67e core: fix typo in French translation: "attentus" -> "attendus" 2026-03-12 20:29:51 +01:00
Sébastien Helleu 431d9ad64a irc: fix typo: "acknowledgement" -> "acknowledgment" 2026-03-12 20:26:22 +01:00
Sébastien Helleu f5bbe35cfb irc, relay: replace "cancelled" by "canceled" in auto-reconnection message 2026-03-12 20:24:53 +01:00
Sébastien Helleu b82ce33c6c core: fix quotes in upgrade error message 2026-03-12 20:16:49 +01:00
Sébastien Helleu 87a683ebdb typing: add option typing.look.item_text (closes #2305) 2026-03-09 23:58:11 +01:00
Sébastien Helleu f048ea9eac relay: add missing info in French translation of /help relay 2026-03-09 23:31:19 +01:00
Sébastien Helleu fc0fb05ec0 irc: add missing angle brackets in French translation of /help cycle and /help part 2026-03-09 23:28:26 +01:00
Sébastien Helleu 835e0b9549 irc: replace simple by double quotes in French translation of /help server 2026-03-09 23:25:56 +01:00
Sébastien Helleu 507f172dae fset: fix French help on parameter "-format" in /help fset 2026-03-09 23:24:39 +01:00
Sébastien Helleu fc595afd08 irc: add missing double quotes in French error message 2026-03-09 23:21:54 +01:00
Sébastien Helleu 2f5305dc82 core: fix French translation of /help upgrade 2026-03-09 23:17:21 +01:00
Sébastien Helleu 9f2b9c4ea9 core: fix double quote in French output of /sys get rlimit 2026-03-09 23:15:11 +01:00
Sébastien Helleu aea8421e49 core: add missing "(by default)" in French translation of /help weechat.look.buffer_position 2026-03-09 23:11:09 +01:00
Sébastien Helleu 81834c45ae core: add missing "raw" parameter in French translation of /help window 2026-03-09 23:07:03 +01:00
Sébastien Helleu 01d2887b13 core: replace ellipsis by "etc." in /help secure 2026-03-09 23:01:29 +01:00
Sébastien Helleu 8b30d9a7d7 core: add missing double quotes in French translation of /help secure 2026-03-09 22:59:02 +01:00
Sébastien Helleu 92327871d2 core: add missing info in French translation of /help secure 2026-03-09 22:57:17 +01:00
Sébastien Helleu b2556f99f4 core: add missing key context "default" in French translations 2026-03-09 22:54:48 +01:00
Sébastien Helleu ec6372f4df core: add missing double quote in /help hotlist 2026-03-09 22:51:20 +01:00
Sébastien Helleu abb74ac178 core: add missing double quote in French translation of /help buffer 2026-03-09 22:47:46 +01:00
Sébastien Helleu 71329fd595 core: remove double quotes around buffer number in error message 2026-03-09 22:45:30 +01:00
Sébastien Helleu 106fe6ca7c core: update copyright dates 2026-03-08 10:37:15 +01:00
Sébastien Helleu 630f2e2e7c core: translate command line options separately in output of weechat --help 2026-03-08 09:10:29 +01:00
Sébastien Helleu eb0b01f62a core: move functions on command-line arguments to a separate source 2026-03-07 12:47:11 +01:00
Sébastien Helleu fb00b7055c core: add "noqa" on Japanese translation reusing multiple times the same format string 2026-03-07 09:09:11 +01:00
Sébastien Helleu 58b1f5c62b core: add "noqa" on Polish translations where extra backslashes are used 2026-03-07 09:08:37 +01:00
Sébastien Helleu d663070b02 core: fix punctuation errors in translations 2026-03-07 08:56:19 +01:00
Sébastien Helleu 8ff7d63744 core: fix "noqa" markers in Turkish translations 2026-03-07 08:55:27 +01:00
Sébastien Helleu 5eb3bca47b core: add version 4.8.2 2026-03-07 08:19:52 +01:00
Sébastien Helleu d0478bdc04 core: update copyright date 2026-03-07 00:02:34 +01:00
Krzysztof Korościk d7fc65e282 doc: updated Polish translation 2026-03-06 21:56:05 +01:00
Krzysztof Korościk 0d737349be core: updated Polish translation 2026-03-04 23:50:47 +01:00
Sébastien Helleu dc94251b33 core: disable "fuzzing" phase in schemathesis config 2026-02-21 21:40:58 +01:00
Sébastien Helleu 306155aa48 relay/api: fix memory leak in receive of message from remote WeeChat 2026-02-16 18:57:14 +01:00
Sébastien Helleu 238f8cbc7e relay/api: fix memory leaks in resources "ping" and "sync" 2026-02-16 18:33:03 +01:00
Sébastien Helleu fa043644cb core: add missing pipes in translations 2026-02-09 21:37:22 +01:00
Sébastien Helleu e06b3c1d7e core: add missing closing parenthesis in /help buflist 2026-02-07 22:09:16 +01:00
Sébastien Helleu 5b052532ec core: remove double spaces in translations 2026-02-07 21:55:49 +01:00
Sébastien Helleu 18bce9e8c4 core: remove trailing backslash in German translation of /help buflist.look.add_newline 2026-02-04 23:06:22 +01:00
Sébastien Helleu 886042a875 core: replace real tab by \t in German translation of /help filter
This was causing a display issue because the tab char is used to separate
prefix from message.
2026-02-04 23:05:00 +01:00
Sébastien Helleu fca4ee28e0 core: update German translations 2026-02-04 23:00:48 +01:00
Emil Velikov 7c37eced93 cmake: plugins: remove no longer used include()s
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov a413d16038 cmake: plugins: simplify dependency handling
Move the requirement checks within the respective plugin cmakefile.
Use REQUIRED instead of the manual FOUND check and error handling.

Note: the tcl check was only moved, since using REQUIRED  explodes in
CI.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 440907e1cd cmake: simplify tests handling
Move the requirement checking and the dummy test where they are used.
Use REQUIRED instead of the manual FOUND check and error handling.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov cb08473bdc cmake: remove explicit fPIC handling
With CMP0083 introduced with cmake 3.14, as we set the variable
CMAKE_POSITION_INDEPENDENT_CODE we can rely on the build system to do
the correct thing, across all the targets.

Since we require 3.18 (or 3.16 in the patched Debian/Ubuntu version),
which sets the policy to NEW we're all set.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 71ef7e286c cmake: remove implicitly enabled cmake policy handling
Whenever cmake_minimum_required() is used, all the policies available in
the specified version are toggled to NEW. Thus we no longer need to
manually change them.

The highest policy - CMP0017 - has been around circa cmake 2.8.4, while
we require 3.x.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 2a234b3bfe cmake: reuse CMAKE_DL_LIBS
The token has been available since cmake 3.0 (at least), so might as
well use it instead of our ad-hoc check.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 6442b938eb cmake: move zstd/cjson include handling
Move the respective include_directories() stansas to the top-level
cmakefile. While this technically adds them to targets where they are
not needed, there is no harm is having them.

This maskes the find_dependency/use_includes/use_libs more consistent
across the board and helps it stand out where it's forgotten. Fixes for
which will be coming at a later date.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov c8d2b4448a cmake: inline a few variables as needed
Avoid creating/appending variables and effectively deviating from the
style used across the project.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 3918efd8e9 cmake: remove CMAKE_REQUIRED_* instances
The tcl ones has not been required for over a decade since commit
ffdba5b24 ("Remove check of Tcl_CreateNamespace in cmake build (not used
any more) (bug #27119)").

While the top-level one, with the EXTRA_LIBS reshuffle/consolidation a
few commits ago.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 4decd2c386 cmake: remove Darwin/resolv quirks
Since commit e98a32373 ("core: check if res_init requires linking with
libresolv") we detect if/when we should be linking against libresolv.

The detection seems a bit clunky (to me), although it's better to keep
things consolidated/consistent across tree. Swap the Darwin checks with
the new token LIBRESOLV_HAS_RES_INIT.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov 323ab8810e cmake: consolidate non-linux library handling
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.

Note that final handling varies a bit, namely:
 - OpenBSD/intl should be handled via the existing cmake/FindGettext.cmake
 - Darwin/resolv should not be needed since commit e98a32373 ("core: check
   if res_init requires linking with libresolv")
 - the backtrace/execinfo handling has been consolidated and moved

In the unlikely case of unwanted over-linking, the platforms can add
`-Wl,--as-needed` to their linker flags. Something which is strongly
encouraged and has been the default across multiple (linux) distros for
years.

Alternatively, if move quirks are needed they should be handled in a
single place.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov fc6003c74e cmake: consolidate libm library handling
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.

This change technically adds an extra link for the unit tests, which
seemingly was omitted by mistake. Alternatively, the extra over-linking
won't be an issue in practise.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:26 +01:00
Emil Velikov ae54c3ef65 cmake: consolidate iconv/gettext library handling
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:25 +01:00
Emil Velikov b38c00bb0d cmake: consolidate zlib/zstd library handling
Move the handling to the top-level, adding it _once_ to EXTRA_LIBS.
Thus avoiding some duplication across the board.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:25 +01:00
Emil Velikov 20a7affb70 cmake: remove unnecessary add_dependencies()
In a handful of places we explicitly use add_dependencies() where the
exact same libraries are also (implicitly) added as dependencies via
target_link_libraries().

Remove the folder, which helps us remove some duplication with follow-up
patches.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2026-02-04 22:21:25 +01:00
Ivan Pešić 150e6ecd82 core: update Serbian translation 2026-02-03 13:46:22 +01:00
weechatter 87ef578ad2 core: update German translations 2026-02-03 10:59:40 +01:00
Sébastien Helleu ef5f197a4a irc: fix unit of server option anti_flood from seconds to milliseconds in output of /server listfull 2026-01-30 13:49:23 +01:00
Sébastien Helleu 250db946b0 core: fix typos in French translation of /help weechat.look.hotlist_add_conditions 2026-01-21 21:23:02 +01:00
Sébastien Helleu f0160bf5ab core: add missing context in English message when a key is added with /key missing 2026-01-21 20:53:25 +01:00
Sébastien Helleu 7d51a1331b core: fix typos in /help allchan, /help allpv and /help allserv 2026-01-21 20:38:37 +01:00
Sébastien Helleu 22b335ce86 core: fix typo in /help help 2026-01-21 20:28:07 +01:00
Sébastien Helleu f26f73f283 core: fix line wrapping in German translations 2026-01-21 20:24:55 +01:00
Sébastien Helleu 323c9e2bfe core: remove obsolete comments in Polish translations 2026-01-21 20:24:42 +01:00
Sébastien Helleu 894df0e9e6 core: fix typo in French translation of /help remote 2026-01-19 23:56:32 +01:00
Sébastien Helleu ead76532de core: fix typo in French and Polish translations of /help exec 2026-01-19 23:54:10 +01:00
Sébastien Helleu da2f506f2e core: fix typo in French and Serbian translations of /help plugin 2026-01-19 23:46:46 +01:00
Sébastien Helleu e42e811c95 core: fix typo in French translation of /help filter 2026-01-19 23:39:16 +01:00
Sébastien Helleu 889450fb31 core: fix typos in translations of /help buffer 2026-01-16 13:41:30 +01:00
Ivan Pešić 3c11e09c30 core/doc: update Serbian translation 2026-01-16 13:39:36 +01:00
Sébastien Helleu 616daecdd0 core: fix typos in French translations 2025-12-21 12:07:50 +01:00
Sébastien Helleu 9b4fd66de7 irc: ignore self join if the channel is already joined (closes #2291)
There is an issue with some IRC servers that may send a JOIN with self nick
once already on the channel, this results in a clear of the nicklist on the
second JOIN received.

This fix silently ignores the second self JOIN if the channel is already
joined (with at least one nick).
2025-12-14 14:29:47 +01:00
Sébastien Helleu b42f7a400e ci: remove useless install of msgcheck in CodeQL analysis 2025-12-07 16:24:14 +01:00
Sébastien Helleu 9e814860ae ci: switch from bandit/flake8/pylint to ruff in CI for Python scripts 2025-12-07 16:24:14 +01:00
Sébastien Helleu a2a71b4d33 tests: improve concatenation of Python lists 2025-12-07 09:37:40 +01:00
weechatter 7d6b8f6943 core: update German translations 2025-12-06 00:33:30 +01:00
Krzysztof Korościk 3b4a5bbb09 core: updated Polish translation 2025-12-02 21:49:13 +01:00
Krzysztof Korościk 58b7ec59e9 core: updated Polish translation 2025-12-02 00:59:57 +01:00
Sébastien Helleu 518b9ab381 core: add version 4.8.1 2025-12-01 20:17:07 +01:00
Sébastien Helleu a9e48d33c6 core: add IRC SASL EXTERNAL in upgrade guidelines for version 4.8.0 2025-12-01 18:01:33 +01:00
Sébastien Helleu 1ff001994c irc: fix creation of irc.msgbuffer option without a server name
The regression was introduced by commit
1b669cd13c, which allowed a server name with
upper case but rejected a name or alias with upper case.

This commit fixed the creation of the option when the server name is not given,
so this command works again:

  /set irc.msgbuffer.whois current
2025-12-01 07:48:58 +01:00
Sébastien Helleu 234a37df6f ci: add build with type "Release" and gcc hardened options in matrix 2025-11-30 13:53:44 +01:00
Sébastien Helleu 6bcc6ef65f core: update ChangeLog (issue #2289) 2025-11-30 13:34:05 +01:00
Sébastien Helleu d5e6c94246 core: fix compiler warning on possible buffer overflow in function util_parse_time (closes #2289) 2025-11-30 11:21:42 +01:00
Sébastien Helleu 63b6dee311 core: fix order of sections in ChangeLog 2025-11-30 09:16:42 +01:00
Sébastien Helleu 34697cf5ce Version 4.9.0-dev 2025-11-30 09:11:53 +01:00
Sébastien Helleu 2534976281 Version 4.8.0 2025-11-30 09:09:35 +01:00
Sébastien Helleu c3f2252385 core: add missing links to upgrade guidelines in ChangeLog 2025-11-30 09:00:26 +01:00
Sébastien Helleu 83e3e6973c debian: update changelog 2025-11-30 08:32:23 +01:00
Sébastien Helleu c56389d12e debian: update watch to version 5 2025-11-30 08:29:10 +01:00
Sébastien Helleu 12717ff689 core: add upgrade guidelines for version 4.8.0 2025-11-30 08:23:56 +01:00
Sébastien Helleu d8569ffe27 buflist: add variable ${index_displayed} 2025-11-28 18:45:22 +01:00
Sébastien Helleu 62c99f8938 core: update translations 2025-11-28 18:40:59 +01:00
Sébastien Helleu a3f733d29a core: fix styles in ChangeLog 2025-11-28 17:36:30 +01:00
Ivan Pešić c9c402d202 core/doc: update Serbian translation 2025-11-24 11:40:36 +01:00
Krzysztof Korościk 7ce1e8c05f core: updated Polish translation 2025-11-24 00:16:02 +01:00
Krzysztof Korościk 0be2d45f6a doc: updated Polish translations 2025-11-23 23:58:06 +01:00
Sébastien Helleu 4e0cc14b79 ci: disable schemathesis output sanitization 2025-11-23 15:01:34 +01:00
Sébastien Helleu c18d8ecc1d core: add version 4.7.2 2025-11-23 14:17:25 +01:00
Sébastien Helleu dd454dfc50 tests: merge tests of buffer set functions into gui_buffer_set 2025-11-23 10:36:21 +01:00
Sébastien Helleu 1f0d8d3849 core: add condition on new_tags in functions gui_buffer_set_highlight_tags_restrict and gui_buffer_set_highlight_tags 2025-11-23 10:36:21 +01:00
Sébastien Helleu c248aa42ce core: simplify code in gui_buffer_set functions 2025-11-23 10:36:21 +01:00
Sébastien Helleu 2832ef333e core: do not add/remove highlight words if value is empty in call to gui_buffer_set() 2025-11-23 10:36:21 +01:00
Sébastien Helleu 5543bc236b tests: add tests on gui buffer set functions 2025-11-23 10:35:43 +01:00
Sébastien Helleu 953ede1200 irc: add tags "irc_cap" and "log3" in client capability request and SASL not supported messages 2025-11-22 16:00:32 +01:00
Sébastien Helleu c2ff484995 core, irc, relay: add tag "tls" in gnutls messages 2025-11-22 14:52:02 +01:00
Sébastien Helleu b8048b1666 irc: fix reset of color when multiple modes are set with command /mode 2025-11-22 12:31:37 +01:00
Sébastien Helleu e33ed57b47 irc: fix colors in MODE message (issue #2286) 2025-11-22 10:32:44 +01:00
Sébastien Helleu 790ce13843 tests: add colors in username for tests of messages 367 and 728 2025-11-22 10:32:44 +01:00
Emir SARI 4ecf2cb6b8 Update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2025-11-22 10:14:22 +01:00
Sébastien Helleu d23a7a6105 irc: fix colors in ban mask (message 367) and quiet mask (message 728) (closes #2286) 2025-11-22 10:02:47 +01:00
Sébastien Helleu da12df6b73 core: free highlight_disable_regex if the regex is invalid in function gui_buffer_set_highlight_disable_regex 2025-11-18 22:27:15 +01:00
Sébastien Helleu 3176e2a6b7 core: free highlight_regex if the regex is invalid in function gui_buffer_set_highlight_regex 2025-11-18 22:27:15 +01:00
Sébastien Helleu 4555f9a58a core: fix typo in comment 2025-11-15 20:15:32 +01:00
Sébastien Helleu e261cadce3 doc/api: add "error_code" and "error_code_pthread" in hook_url output hashtable (issue #2284) 2025-11-15 17:29:08 +01:00
Sébastien Helleu 3e49b73117 api: fix file descriptor leak in hook_url (closes #2284)
This can happen after a timeout or if the hook is removed during the transfer.
2025-11-15 17:28:44 +01:00
Sébastien Helleu 898213b4f2 relay/api: return HTTP error 400 in case of invalid body in resource ping 2025-11-13 20:35:58 +01:00
Sébastien Helleu e6646d1ef1 relay/api: return HTTP error 404 instead of 400 when the buffer is not found in resources completion and input 2025-11-13 07:12:55 +01:00
Sébastien Helleu 69d47b68f5 core: update ChangeLog 2025-11-13 07:08:23 +01:00
Sébastien Helleu 48d2c5fd01 core: update translations 2025-11-12 20:44:24 +01:00
Sébastien Helleu 1c53d3d466 api: add functions to parse integer numbers
New functions:

- util_parse_int
- util_parse_long
- util_parse_longlong
2025-11-12 20:24:00 +01:00
Sébastien Helleu 4ab11b7705 tests: add unit tests on command /window 2025-11-12 20:20:04 +01:00
Sébastien Helleu 8032ca1433 core: display an error message in case of invalid size with commands /window splith and /window splitv 2025-11-12 07:26:01 +01:00
Sébastien Helleu ac69288ed7 core: display an error message in case of invalid size with command /window resize 2025-11-12 07:22:12 +01:00
Sébastien Helleu 0930976456 core: display an error if parameters are missing in command /window resize 2025-11-12 07:18:06 +01:00
Sébastien Helleu d5bfe35245 core: display an error if parameters are missing or if the buffer is not with "free content" in command /window scroll_horiz 2025-11-12 07:12:00 +01:00
Sébastien Helleu 90a42ee213 core: display an error if parameters are missing in command /window scroll 2025-11-12 07:08:33 +01:00
Sébastien Helleu 6981f9f204 core: display an error message if the window number is not found with command /window xxx -window N 2025-11-12 07:05:56 +01:00
Sébastien Helleu b9f1145d03 core: fix screen size in macro getmaxyx when using fake ncurses 2025-11-12 13:45:27 +01:00
Sébastien Helleu f3a8068109 core: fix use of window->coords by checking size of array before using it 2025-11-12 13:45:27 +01:00
Sébastien Helleu 1ffc96955e tests: add unit tests on command /sys 2025-11-12 13:45:27 +01:00
Sébastien Helleu 8316745061 tests: add unit tests on command /repeat 2025-11-12 13:45:27 +01:00
Sébastien Helleu b18190b4c0 doc/quickstart: add link to key bindings in user's guide 2025-11-12 13:35:52 +01:00
Sébastien Helleu 753475f530 tests: add unit tests on command /proxy 2025-11-11 11:27:34 +01:00
Sébastien Helleu 237b07575b core: fix typo in comment 2025-11-11 10:57:51 +01:00
Sébastien Helleu dacd29b1d7 tests: add unit tests on command /print 2025-11-11 10:57:51 +01:00
Sébastien Helleu cfcadd155d core: display an error message if the date can not be parsed with command /print -date 2025-11-11 10:41:55 +01:00
Sébastien Helleu e5285c5545 tests: remove duplicate test 2025-11-11 10:39:30 +01:00
Sébastien Helleu 538b95d405 core: fix typo in French translation of /help debug 2025-11-10 20:54:30 +01:00
Sébastien Helleu 1bfd744249 tests: add unit tests on command /hotlist 2025-11-10 20:48:24 +01:00
Sébastien Helleu cd20c0e843 tests: add unit tests on command /history 2025-11-10 15:06:44 +01:00
Sébastien Helleu 16245f44ae tests: add unit tests on command /help 2025-11-10 15:06:44 +01:00
Sébastien Helleu 2f8393d504 tests: add unit tests on command /filter 2025-11-10 15:06:44 +01:00
Sébastien Helleu d0298b4738 core: display a message with command /filter toggle
The command has now the same output as `/filter enable` or `/filter disable`:

  /filter toggle  =>  "Message filtering disabled"
  /filter toggle  =>  "Message filtering enabled"
2025-11-10 15:06:44 +01:00
Sébastien Helleu c34d26dd70 tests: add unit tests on command /eval 2025-11-10 15:06:44 +01:00
Sébastien Helleu 96e225ac39 tests: add unit tests on command /debug 2025-11-10 15:06:44 +01:00
Sébastien Helleu e570d76c53 tests: add macros to search messages using a regex 2025-11-10 15:06:44 +01:00
Sébastien Helleu 5f0eebc0df tests: add a function to search a message displayed with a regex 2025-11-10 15:06:44 +01:00
Sébastien Helleu 3a3dec985d tests: add missing include of string.h 2025-11-10 13:39:03 +01:00
Sébastien Helleu 7051dd4351 tests: add unit tests on command /cursor 2025-11-10 09:05:36 +01:00
Sébastien Helleu c0116febe5 core: display an error message in case of invalid parameters with command /cursor 2025-11-10 09:05:36 +01:00
Sébastien Helleu 1094e70de2 tests: add unit tests on command /command 2025-11-10 09:04:13 +01:00
Sébastien Helleu 08545facb6 tests: add unit tests on command /color 2025-11-10 09:04:13 +01:00
Sébastien Helleu 2c4ede614e tests: add unit tests on command /buffer 2025-11-10 09:04:13 +01:00
Sébastien Helleu 8c6e6bb383 core: display full buffer name in output of command /buffer listvar 2025-11-10 09:04:13 +01:00
Sébastien Helleu c9d4dd48a0 core: display an error message if the buffer is not found with command /buffer listvar 2025-11-10 09:04:13 +01:00
Sébastien Helleu af41184889 core: fix return code of command /buffer renumber when the start number is invalid 2025-11-10 09:04:13 +01:00
Sébastien Helleu a89d5302fd tests: add unit tests on command /bar 2025-11-10 09:04:13 +01:00
Sébastien Helleu b61dca7d2d tests: add unit tests on command /allbuf 2025-11-10 09:04:13 +01:00
Sébastien Helleu 4232123ca3 tests: add macros to test errors with commands 2025-11-10 09:04:13 +01:00
Sébastien Helleu 6d7dd46015 core: display an error message if the bar is not found with command /bar scroll 2025-11-10 09:04:13 +01:00
Sébastien Helleu 93c0ee57c8 plugins: move description of weechat-plugin.h below the copyright and license 2025-11-09 13:02:08 +01:00
weechatter 5433d25889 doc: update German documentation 2025-11-09 11:23:44 +01:00
weechatter 3ed6726625 core: update German translations 2025-11-09 11:01:20 +01:00
Sébastien Helleu 8143d44e44 buflist: replace hardcoded "buflist" by constant in error message 2025-11-01 16:10:11 +01:00
Sébastien Helleu 0dab9b9257 irc: display a warning for each unknown or invalid server option in commands /connect and /server 2025-11-01 16:02:53 +01:00
Sébastien Helleu 07ef353b1b irc: remove temporary servers and option irc.look.temporary_servers 2025-11-01 09:15:54 +01:00
Ivan Pešić 234244f8d5 core: update Serbian translation 2025-10-31 23:17:49 +01:00
Sébastien Helleu 063aa86978 core: disable "stateful" phase in schemathesis config 2025-10-26 20:23:58 +01:00
Sébastien Helleu 93d73d234f relay/api: consider boolean/long query string parameters as invalid if they are empty 2025-10-26 18:12:02 +01:00
Sébastien Helleu df3232fc80 core: move entries in ChangeLog 2025-10-26 18:11:39 +01:00
Sébastien Helleu d05b83d03f relay/api: return an error 401 when header "x-weechat-totp" is received with empty value 2025-10-26 10:11:10 +01:00
Sébastien Helleu 0009732f78 relay/api: return an error 401 when header "x-weechat-totp" has an invalid value 2025-10-26 09:19:43 +01:00
Sébastien Helleu e637e0de1c relay/api: return an error 400 when URL parameters "nicks", "lines" and "lines_free" have an invalid value 2025-10-26 08:07:23 +01:00
Sébastien Helleu 58c873809b relay/api: return an error 400 when URL parameter "colors" has an invalid value 2025-10-26 07:22:10 +01:00
weechatter 8eed89c43c core: update German translations 2025-10-24 18:20:06 +02:00
Sébastien Helleu 1b669cd13c irc: fix warning on creation of irc.msgbuffer option when the server name contains upper case letters (closes #2281)
Now the following command is OK without warning:

  /set irc.msgbuffer.TEST.notice current

And the following command returns an error instead of a warning (that means the
option is NOT created):

  /set irc.msgbuffer.TEST.NOTICE current
2025-10-14 22:56:41 +02:00
Sébastien Helleu f854db17ff core: add hdata for hooks
New hooks:

- hook
- hook_command
- hook_command_run
- hook_completion
- hook_config
- hook_connect
- hook_fd
- hook_focus
- hook_hdata
- hook_hsignal
- hook_info
- hook_info_hashtable
- hook_infolist
- hook_line
- hook_modifier
- hook_print
- hook_process
- hook_signal
- hook_timer
- hook_url

New lists (for hooks of type "hook"):

- weechat_hooks_command, last_weechat_hook_command
- weechat_hooks_command_run, last_weechat_hook_command_run
- weechat_hooks_completion, last_weechat_hook_completion
- weechat_hooks_config, last_weechat_hook_config
- weechat_hooks_connect, last_weechat_hook_connect
- weechat_hooks_fd, last_weechat_hook_fd
- weechat_hooks_focus, last_weechat_hook_focus
- weechat_hooks_hdata, last_weechat_hook_hdata
- weechat_hooks_hsignal, last_weechat_hook_hsignal
- weechat_hooks_info, last_weechat_hook_info
- weechat_hooks_info_hashtable, last_weechat_hook_info_hashtable
- weechat_hooks_infolist, last_weechat_hook_infolist
- weechat_hooks_line, last_weechat_hook_line
- weechat_hooks_modifier, last_weechat_hook_modifier
- weechat_hooks_print, last_weechat_hook_print
- weechat_hooks_process, last_weechat_hook_process
- weechat_hooks_signal, last_weechat_hook_signal
- weechat_hooks_timer, last_weechat_hook_timer
- weechat_hooks_url, last_weechat_hook_url
2025-10-12 17:37:24 +02:00
Sébastien Helleu 72b2242135 irc: send SASL username with mechanism EXTERNAL (closes #2270)
The SASL username is sent if set, otherwise "+" is still sent.
2025-10-12 16:11:33 +02:00
Sébastien Helleu b066f713d7 tests: fix memory leak in tests on SASL PLAIN authentication mechanism 2025-10-12 16:07:52 +02:00
Sébastien Helleu 63313468c9 xfer: add buffer local variable "server" in DCC CHAT buffers 2025-10-04 13:19:01 +02:00
Sébastien Helleu d9ba00223b irc: request and perform SASL authentication when the server advertises SASL support with message "CAP NEW" (closes #2277)
The SASL authentication is done only if not already authenticated with SASL.
2025-10-03 10:26:04 +02:00
Ivan Pešić ae5b74549c core: update Serbian translations
Update Serbian messages and documentation translations.
2025-09-23 12:46:01 +02:00
Sébastien Helleu 222cb4876e core: set max version for Curl symbol CURLOPT_KRBLEVEL 2025-09-23 12:13:33 +02:00
Sébastien Helleu dc22d70dd4 core: fix style in ChangeLog 2025-09-20 10:45:32 +02:00
weechatter 949f860267 core: update German translations 2025-09-16 21:08:27 +02:00
Sébastien Helleu e2ae308e3b core: add option weechat.completion.cycle 2025-09-11 21:10:52 +02:00
Sébastien Helleu 767ea84909 core: add issue #886 in ChangeLog 2025-09-02 23:02:17 +02:00
Sébastien Helleu 665773b119 doc/api: add supported date/time format in function util_parse_time 2025-08-31 12:15:33 +02:00
Sébastien Helleu 21a958423e logger: change default time format to "%@%F %T.%fZ" (UTC) 2025-08-31 12:15:33 +02:00
Sébastien Helleu 1c09118fe1 api: allow lower characters "t" and "z" in function util_parse_time
The following dates are now parsed with the same result:

  2025-08-30T20:12:55.866643Z
  2025-08-30t20:12:55.866643z
2025-08-31 12:15:33 +02:00
Sébastien Helleu 47c1128fb9 logger: improve parsing of date/time in log files to display backlog
The function `util_parse_time` is now first used to parse the date/time,
allowing to auto-detect the format (not based on the option
logger.file.time_format).

If the parsing fails, then we fallback on the call to `strptime`, using the
format in option logger.file.time_format (legacy behavior).

This allows to change the option logger.file.time_format without impact on the
display of the backlog.
2025-08-31 12:15:33 +02:00
Sébastien Helleu 1038f0de24 logger: remove unused include 2025-08-31 12:15:33 +02:00
Sébastien Helleu 5acbfe9b7d api: fix parsing of date/times with timezone offset in function util_parse_time 2025-08-31 12:15:33 +02:00
Sébastien Helleu 7980a6d100 api: add support of date like ISO 8601 but with spaces in function util_parse_time
So for example the format "2024-01-04 22:01:02.123456 +0100" is supported in
addition to ""2024-01-04T22:01:02.123456+0100".
2025-08-31 12:15:33 +02:00
Sébastien Helleu f630c36af0 core: remove obsolete Curl options CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_HTTPPOST (issue #2268) 2025-08-31 12:14:50 +02:00
Sébastien Helleu 8e4ce78c97 core: update ChangeLog (issue #2268) 2025-08-31 11:58:53 +02:00
Emil Velikov b2d9ad9e22 Bump required enchant to v2, use pkg_check_modules()
Bump the requirement to v2, which means we can remove the
HAVE_ENCHANT_GET_VERSION workaround.

It was released over 8 years ago, with 8 new feature releases since
then and dozens of bugfix releases throughout.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 2.2.8 and 2.2.15 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2025-08-31 10:36:20 +02:00
Emil Velikov c48485bc46 Bump required lua to v5.3
Bump the requirement to v5.3, which means we can remove all the ifdef
guards.

It was released over 10 years ago, with 2 new feature releases since
then and half a dozen of bugfix releases in the 5.3 branch.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 5.3.3 and 5.4.2 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2025-08-31 10:36:20 +02:00
Emil Velikov f48e6ee81d Bump required (lib)gcrypt to v1.8.0
Bump the requirement to v1.8.0, which means we can remove ~70% of the
ifdef guard.

It was released over 8 years ago, with 3 new feature releases since
then and dozen of bugfix releases in the 1.8 branch.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 1.8.5 and 1.8.7 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2025-08-31 10:36:20 +02:00
Emil Velikov 87eb6cc7e1 Bump required gnutls to v3.6.3
Bump the requirement to v3.6.3, which means we can remove the final
ifdef guard and all the builds have TLS 1.3 support.

It was released over 7 years ago, with 2 new feature releases since
then and dozen of bugfix releases in the 3.6 branch.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 3.6.13 and 3.7.1 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2025-08-31 10:36:20 +02:00
Emil Velikov 8c372c0c01 Bump required (lib)curl to v7.68.0
Bump the requirement to v7.68.0, which means we can remove ~70% of the
ifdef guards. It was released over 5 years ago, with 30+ new curl
releases since then and dozens of CVEs fixed.

The oldest distributions we target Ubuntu 20.04 and Debian Bullseye,
have 7.68.0 and 7.74.0 respectively.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2025-08-31 10:36:20 +02:00
Sébastien Helleu def60c1e1c core: cast Curl proxy port option to long
This fixes this warning with clang:

src/core/core-url.c:1017:5: warning: call to '_curl_easy_setopt_err_long' declared with 'warning' attribute: curl_easy_setopt expects a long argument [-Wattribute-warning]
 1017 |     curl_easy_setopt (curl, CURLOPT_PROXYPORT,
      |     ^
/usr/include/x86_64-linux-gnu/curl/typecheck-gcc.h:50:15: note: expanded from macro 'curl_easy_setopt'
   50 |               _curl_easy_setopt_err_long();                             \
      |               ^
2025-08-31 10:10:15 +02:00
Sébastien Helleu 08651ba820 core: add version 4.7.1 2025-08-16 22:00:21 +02:00
Sébastien Helleu bff910cae3 relay/api: fix crash when an invalid HTTP request is received from a client
When invalid data is received (not an HTTP request), client->http_req->method
is NULL, so we have to check it's not NULL before comparing it to the supported
methods.

This fixes a regression introduced in commit
93ec10b563.
2025-08-16 21:19:43 +02:00
Sébastien Helleu 0861716ae1 core: fix link to issue in ChangeLog 2025-07-19 12:22:46 +02:00
Sébastien Helleu 627862218a Version 4.8.0-dev 2025-07-19 12:05:24 +02:00
Sébastien Helleu 285a6b8ce4 Version 4.7.0 2025-07-19 12:01:43 +02:00
Ivan Pešić be8e94f3cd core: update Serbian translations 2025-07-13 22:19:17 +02:00
Emir SARI db7ecc1af1 core: Update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2025-07-13 22:18:39 +02:00
Sébastien Helleu 74a4b3e249 core: move parameter "continue-on-failure" on the global level in schemathesis config 2025-07-02 22:53:00 +02:00
Sébastien Helleu be78d185ea relay/api: bump API version to 0.4.1 2025-07-02 20:52:42 +02:00
Sébastien Helleu 58067431de relay/api: process HTTP request received as soon as a NULL char is received
This fixes the API probe made by schemathesis, so it detects immediately that
such NULL byte is not allowed by WeeChat, instead of timing out after 10
seconds:

   API capabilities:

     Supports NULL byte in headers:    ✘
2025-07-02 20:32:09 +02:00
Sébastien Helleu 87e84d9053 ci: replace script tools/test_relay_api.sh by configuration file schemathesis.toml 2025-07-02 20:32:09 +02:00
Sébastien Helleu 902332c3e6 relay/api: move resource bodies into their paths in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu 0b82429b39 relay/api: add example of value for the parameter buffer_id in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu 8b2165d441 relay/api: fix example of ping data in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu fca2412424 relay/api: fix example of completion list in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu d279a80733 relay/api: remove extra double quote in example of line date (OpenAPI document) 2025-07-02 20:32:09 +02:00
Sébastien Helleu 4444addf4d relay/api: fix operationId of completion resource in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu 4ce74403dc relay/api: fix typo in OpenAPI document 2025-07-02 20:32:09 +02:00
Sébastien Helleu 1db29cb1ed relay/api: reject any invalid or unknown password hash algorithm in handshake resource 2025-07-02 20:32:09 +02:00
Sébastien Helleu d8baabd250 relay/api: use "buffer_name" first if received, then "buffer_id" in completion and input resources
This fixes some tests done by shemathesis, which sends "buffer_id" to
0 (unknown buffer) and "buffer_name" to a valid buffer name.
2025-07-02 20:32:09 +02:00
Sébastien Helleu 4348036e2e tests: remove duplicated "HTTP/1.1" in some relay API tests 2025-07-02 20:32:09 +02:00
Sébastien Helleu 93ec10b563 relay/api: return HTTP error 405 (Method Not Allowed) when the method received is not allowed 2025-07-02 20:32:09 +02:00
Sébastien Helleu cd0486d5bb ci: set password hash iterations to 100 for API tests
This is much faster than the default number of iterations which is 100000).
2025-07-02 20:32:09 +02:00
Sébastien Helleu b4f28ed2d4 ci: set unlimited number of relay clients for API tests 2025-07-02 20:32:09 +02:00
Sébastien Helleu 323f80e914 core: add option weechat.completion.partial_completion_auto_expand (closes #2253) 2025-06-30 18:52:58 +02:00
Sébastien Helleu 56903738b5 core: always enable partial completion for templates in option weechat.completion.partial_completion_templates (issue #2253)
Previous behavior was to reverse the partial completion, which was confusing
when option like weechat.completion.partial_completion_command_arg was enabled
as well.
2025-06-30 18:52:58 +02:00
820 changed files with 33490 additions and 17753 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@gmail.com>
# SPDX-FileCopyrightText: 2024-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2024-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2013-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2013-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2019-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2019-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2023-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2020-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2020-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2023-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2023-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+260 -187
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2020-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2020-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -11,6 +11,14 @@ on:
- cron: '22 9 * * 2'
env:
CHECK_DEPS_UBUNTU: >-
curl
gettext
hunspell
hunspell-en-us
hunspell-fr
pipx
shellcheck
WEECHAT_DEPS_UBUNTU: >-
asciidoctor
build-essential
@@ -18,7 +26,6 @@ env:
curl
devscripts
equivs
flake8
gem2deb
guile-3.0-dev
lcov
@@ -29,7 +36,7 @@ env:
libcurl4-gnutls-dev
libgcrypt20-dev
libgnutls28-dev
liblua5.3-dev
liblua5.4-dev
libncurses-dev
libperl-dev
libphp-embed
@@ -40,14 +47,11 @@ env:
php-dev
pipx
pkgconf
pylint
python3-bandit
python3-dev
ruby-pygments.rb
shellcheck
tcl8.6-dev
zlib1g-dev
WEECHAT_DEPS_ROCKYLINUX: >-
WEECHAT_DEPS_REDHAT: >-
asciidoctor
aspell-devel
cjson-devel
@@ -98,10 +102,53 @@ env:
sudo
tcl86
zstd
WEECHAT_DEPS_MACOS: >-
asciidoctor
aspell
cjson
guile
lua
pkg-config
ruby
jobs:
tests_ubuntu:
checks:
strategy:
matrix:
os:
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get --yes --no-install-recommends install ${{ env.CHECK_DEPS_UBUNTU }}
pipx install msgcheck ruff
cargo install --version 0.0.11 poexam
- name: Check gettext files (msgcheck)
run: msgcheck po/*.po
- name: Check gettext files (poexam)
run: poexam check --file-stats --rule-stats
- name: Check shell and Python scripts
run: ./tools/check_scripts.sh
- name: Check Python stub file
run: ./tools/generate_python_stub.py | diff src/plugins/python/weechat.pyi -
- name: Check Curl symbols
run: curl --silent --show-error --fail --retry 10 https://raw.githubusercontent.com/curl/curl/master/docs/libcurl/symbols-in-versions | ./tools/check_curl_symbols.py
install:
strategy:
matrix:
@@ -116,6 +163,10 @@ jobs:
cc: "gcc"
cxx: "g++"
buildargs: "-G Ninja -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "gcc_release_hardened"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=\"-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3\" -DCMAKE_CXX_FLAGS=\"-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3\""
- name: "gcc_no_nls"
cc: "gcc"
cxx: "g++"
@@ -141,12 +192,12 @@ jobs:
cxx: "clang++"
buildargs: "-DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "${{ matrix.os }} (${{ matrix.config.name }})"
name: "install (${{ matrix.os }}, ${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install dependencies
run: |
@@ -154,19 +205,7 @@ jobs:
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPS_UBUNTU }}
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
sudo apt-get --yes purge php8.3-imagick
pipx install msgcheck schemathesis
- name: Check gettext files
run: msgcheck po/*.po
- name: Check shell and Python scripts
run: ./tools/check_scripts.sh
- name: Check Python stub file
run: ./tools/generate_python_stub.py | diff src/plugins/python/weechat.pyi -
- name: Check Curl symbols
run: curl --silent --show-error --fail --retry 10 https://raw.githubusercontent.com/curl/curl/master/docs/libcurl/symbols-in-versions | ./tools/check_curl_symbols.py
pipx install schemathesis
- name: Build and run tests
env:
@@ -194,11 +233,13 @@ jobs:
weechat-headless \
--dir /tmp/weechat-test-api \
--run-command '/set relay.network.password "${{ env.RELAY_PASSWORD }}"' \
--run-command '/set relay.network.password_hash_iterations 100' \
--run-command '/set relay.network.max_clients 0' \
--run-command '/relay add api 9000' \
--daemon \
;
sleep 5
./tools/test_relay_api.sh http://localhost:9000
schemathesis run --url http://localhost:9000/api ./src/plugins/relay/api/weechat-relay-api.yaml
echo '*/quit' >/tmp/weechat-test-api/weechat_fifo_*
- name: Code coverage
@@ -212,6 +253,198 @@ jobs:
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo 'Codecov error'
install_fedora:
strategy:
matrix:
os:
- ubuntu-24.04
config:
- name: "gcc"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "install (fedora:43, ${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
container:
image: fedora:43
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: dnf install -y ${{ env.WEECHAT_DEPS_REDHAT }}
- name: Build and run tests
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
env:
TERM: xterm-256color
run: |
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
install_rockylinux:
strategy:
matrix:
os:
- ubuntu-24.04
config:
- name: "gcc"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "install (rockylinux:9, ${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
container:
image: rockylinux:9
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: |
dnf install -y epel-release dnf-plugins-core
dnf config-manager --set-enabled crb
# pin a working ruby stream (ruby:4.0 has broken module metadata on Rocky 9.8)
dnf module enable -y ruby:3.3
dnf install -y ${{ env.WEECHAT_DEPS_REDHAT }}
- name: Build and run tests
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
env:
TERM: xterm-256color
run: |
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
install_freebsd:
strategy:
matrix:
os:
- ubuntu-24.04
config:
# - name: "gcc"
# cc: "gcc"
# cxx: "g++"
# buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "install (freebsd, ${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install dependencies, build and run tests, run WeeChat
uses: vmactions/freebsd-vm@v1
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
TERM: xterm-256color
with:
envs: "CC CXX TERM"
usesh: true
prepare: pkg install -y ${{ env.WEECHAT_DEPS_FREEBSD }}
run: |
./tools/build_test.sh ${{ matrix.config.buildargs }}
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
install_macos:
strategy:
matrix:
os:
- macos-14
config:
- name: "gcc"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON -DENABLE_PHP=OFF -DENABLE_TESTS=OFF"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON -DENABLE_PHP=OFF -DENABLE_TESTS=OFF"
name: "install (${{ matrix.os }}, ${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
steps:
- name: Setup Homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@main
- name: Install dependencies
run: |
brew update
brew install ${{ env.WEECHAT_DEPS_MACOS }}
- uses: actions/checkout@v6
- name: Build
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
RUN_TESTS: "0"
JOBS: "2"
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
env:
TERM: xterm-256color
run: |
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
build_debian:
strategy:
@@ -219,12 +452,11 @@ jobs:
os:
- ubuntu-24.04
name: "${{ matrix.os }} (build Debian)"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install dependencies
run: |
@@ -250,14 +482,13 @@ jobs:
weechat --build-info
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
codeql-analysis:
codeql_analysis:
strategy:
matrix:
os:
- ubuntu-24.04
name: "${{ matrix.os }} (CodeQL)"
runs-on: ${{ matrix.os }}
permissions:
@@ -268,7 +499,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install dependencies
run: |
@@ -276,7 +507,6 @@ jobs:
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPS_UBUNTU }}
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
sudo apt-get --yes purge php8.3-imagick
pipx install msgcheck
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
@@ -290,160 +520,3 @@ jobs:
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"
tests_rockylinux:
strategy:
matrix:
os:
- ubuntu-24.04
config:
- name: "gcc"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "rockylinux-9 (${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
container:
image: rockylinux:9
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dnf install -y epel-release
dnf config-manager --set-enabled crb
dnf install -y ${{ env.WEECHAT_DEPS_ROCKYLINUX }}
- name: Build and run tests
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
env:
TERM: xterm-256color
run: |
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
tests_freebsd:
strategy:
matrix:
os:
- ubuntu-24.04
config:
# - name: "gcc"
# cc: "gcc"
# cxx: "g++"
# buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON -DENABLE_CODE_COVERAGE=ON -DENABLE_FUZZ=ON"
name: "freebsd-14 (${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies, build and run tests, run WeeChat
uses: vmactions/freebsd-vm@v1
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
TERM: xterm-256color
with:
envs: "CC CXX TERM"
usesh: true
prepare: pkg install -y ${{ env.WEECHAT_DEPS_FREEBSD }}
run: |
./tools/build_test.sh ${{ matrix.config.buildargs }}
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
tests_macos:
strategy:
matrix:
os:
- macos-14
config:
- name: "gcc"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON -DENABLE_PHP=OFF -DENABLE_TESTS=OFF"
- name: "clang"
cc: "clang"
cxx: "clang++"
buildargs: "-DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_DOC_INCOMPLETE=ON -DENABLE_PHP=OFF -DENABLE_TESTS=OFF"
name: "${{ matrix.os }} (${{ matrix.config.name }})"
runs-on: ${{ matrix.os }}
steps:
- name: Setup Homebrew
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install dependencies
run: |
brew update
# temporary fix, see: https://github.com/actions/setup-python/issues/577
rm -f \
/usr/local/bin/2to3 \
/usr/local/bin/idle3 \
/usr/local/bin/pydoc3 \
/usr/local/bin/python3 \
/usr/local/bin/python3-config \
/usr/local/bin/2to3-3.11 \
/usr/local/bin/idle3.11 \
/usr/local/bin/pydoc3.11 \
/usr/local/bin/python3.11 \
/usr/local/bin/python3.11-config \
;
brew install asciidoctor aspell cjson guile lua pkg-config ruby
- uses: actions/checkout@v4
- name: Build
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
RUN_TESTS: "0"
JOBS: "2"
run: ./tools/build_test.sh ${{ matrix.config.buildargs }}
- name: Run WeeChat
env:
TERM: xterm-256color
run: |
weechat --help
weechat-curses --help
weechat --version
weechat --build-info
weechat --colors
weechat --license
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
+2 -2
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2025-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v4
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2007-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2007-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2014-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+281
View File
@@ -0,0 +1,281 @@
Atheme
Autojoin
Charset
Diffie-Hellman
Esc
FlashCode
GnuTLS
Hashtable
Helleu
IPs
Sébastien
WeeChat
Xfer
abc
ack
acks
addcompletion
addinput
addoff
addraw
addreplace
addreplacecompletion
addword
algo
allchan
allpv
alnum
andrew
ansi
api
args
argsN
aspell
autoconnect
autojoin
autoload
autoloaded
autoreconnect
autorejoin
bg
bindctxt
bitlbee
bkl
blocksize
bool
buflist
cJSON
calc
ccc
charset
charsets
chghost
chmod
cleartext
clientinfo
cmd
codepoint
concat
cond
config
crypted
ctcp
ctrl
ctrl-
ctrl-c
ctrl-h
ctrl-n
ctrl-x
ctrl-y
cutscr
cxx
darkgray
deinit
deldict
deloutq
delvar
dhkey
dirs
dlclose
eg
enum
enums
env
esc
eval
fd
ffff
fg
fifo
flashcode
flashtux
freebsd
fset
fsync
gcrypt
getrlimit
getrusage
gnutls
grayscale
gui
gzip
halfop
halfops
hashtable
hdata
hh
horiz
hostname
hostnames
hotlist
hsignal
http
https
hup
ident
ie
il
inclose
infolist
infolists
infos
installremove
irc
ison
javascript
json
kf
kickban
killall
lengthscr
libera
libgcrypt
libs
lightblue
lightcyan
lightgreen
lightmagenta
lightred
linux
listdefault
listdict
listdiff
listfull
listitems
listrelay
listvar
lua
mallinfo
malloc
mirc
modelist
msg
msgN
msgbuffer
multiline
ncurses
newbuffer
nf
nickbot
nicklist
nickserv
nl
noautoload
nobg
nocl
noflush
nohelp
nojoin
noln
nonblock
nooption
norc
nostdin
nosw
noswitch
notls
num
oc
oerr
oftc
ok
ol
osinfo
outqueue
ovh
paramN
params
perl
permessage-deflate
pgdn
pgup
pid
prev
privmsg
ptr
pv
py
quickstart
rc
realname
recv
reinitializing
reop
resetall
resetctxt
revindex
revscr
rgb
rlimit
rusage
rw-rw-r--
sasl
setauto
setdict
setname
setnew
setrlimit
setvar
signon
skipempty
sockaddr
splith
splitv
stderr
stdin
stdout
strcasecmp
strftime
strftimeval
strlen
sublist
subplugin
sw
sys
tThe
tcl
tg
tls
tlscertkey
toggleautoload
togglecmd
toto
totp
truncature
un
unalias
unban
unbindctxt
undef
unescaped
unhide
unhold
unicode
unix
unmark
unmerge
unzoom
uptime
url
urlserver
usec
userhost-in-names
usr
util
valgrind
versiongit
waitpid
wcswidth
wctype
wcwidth
websocket
websockets
weechat
whois
www
xdigit
xfer
xyz
yy
zlib
zstd
+612
View File
@@ -0,0 +1,612 @@
Atheme
Autojoin
Curl
Curses
Debug
Dec
Diffie-Hellman
Filter
FlashCode
GnuTLS
Guile
Helleu
IPs
Lag
Ping
Protocol
Relay
Remote
Reop
Tab
Trigger
Triggers
Typing
URLs
Wallops
WeeChat
Xfer
account
account-
account-notify
account-tag
ack
acks
add
addcompletion
addinput
addoff
addraw
addreplace
addreplacecompletion
addresse
addword
align
all
allchan
allow
allowed
allpv
alnum
alt
alt-c
alt-k
alt-s
alt-v
alt-z
andrew
ansi
apply
area
args
argsN
aspell
attributes
auth
autoconnect
autojoin
autoload
autorejoin
away
away-notify
backspace
bare
bash
beep
before
beginning
beyond
bg
bin
bind
bindctxt
bitlbee
bkl
blue
bold
bool
boolean
both
bottom
bracketed
brown
buflist
cJSON
calc
callbacks
cap-notify
capabilities
capability
ccc
cert
certs
changed
channel
charset
charsets
check
chghost
chmod
cipher
clear
clientinfo
clipboard
cmd
color
colors
command
commands
complete
completion
concat
cond
confirm
connect
connected
connecting
control
copy
core
count
crypt
ctcp
ctrl
ctrl-
ctrl-c
ctrl-h
ctrl-n
ctrl-x
ctrl-y
curl
current
cursor
cut
cutscr
cxx
d'ignore
d'infolist
daemon
darkgray
days
debug
decode
decrypt
default
define
deinit
del
deldict
delete
deloutq
delvar
desc
describe
dhkey
dict
diff
dim
dir
dirs
disable
discard
disconnect
disconnected
display
displayed
dlclose
doc-gen
down
download
draft
dummy
dump
eat
echo-message
edge
emphasized
empty
enable
enabled
end
enum
error
esc
eval
example
exclude
exec
extended-join
external
exts
fail
failed
fast
fd
ffff
fifo
filter
fingerprint
first
flashcode
flashtux
foo
formatted
free
freebsd
fset
fsync
gcrypt
get
getrlimit
getrusage
ghost
giga-octets
git
glitch
gnutls
grab
group
gzip
halfop
halfops
handshake
hash
hashtable
hdata
he
headless
help
here
hexa
hh
hidden
hide
highest
highlight
highlights
history
hold
hook
hooks
horiz
host
hotlist
hsignal
hup
ident
identify
ids
ignored
inclose
include
indent
infolist
infolistes
infolists
init
install
installremove
int
integer
interval
invite-notify
irc
ison
iterations
javascript
join
json
jump
keep
key
keys
kf
kickban
kill
killall
l'autojoin
l'id
lag
last
layout
leave
left
legacy
length
lengthscr
level
lib
libera
libgcrypt
libs
lightblue
lightcyan
lightgreen
lightmagenta
lightred
limit
line
lines
linux
list
listdefault
listdict
listdiff
listen
listfull
listitems
listrelay
listvar
load
logger
loggers
lower
lowest
ls
lua
mallinfo
malloc
marked
mask
memory
merge
merged
meta
meta-
method
mirc
missing
modified
mouse
move
msg
msgN
msgbuffer
multi-prefix
multiline
my
n-
name
names
ncurses
near
network
newbuffer
newline
next
nf
nick
nickbot
nicklist
nicks
nickserv
no-connect
noautoload
nobg
nocl
noflush
nohelp
nojoin
noln
nonblock
nooption
norc
nosh
nostdin
nosw
noswitch
notify
notls
null
num
number
numeric
object
oerr
of
offline
oftc
ok
ol
ops
osinfo
ovh
paramN
params
parted
pass
passphrase
password
password-store
paste
path
paused
pct
pending
perl
permessage-deflate
pgdn
pgup
pid
ping
pong
pos
prefix
prev
previous
print
priority
private
privmsg
property
ptr
py
quit
quoted
rafraichie
rafraichir
rafraichissement
random
raw
rc
realname
reconnect
recreate
recv
red
redirected
redo
refresh
regex
register
relay
reload
remote
remove
rename
renumber
reorder
rep
repeat
reply
req
reset
resetall
resetctxt
resize
restart
restore
return
rev
revindex
revscr
rgb
right
rlimit
root
ruby
run
run-command
runtime
rusage
rw-rw-r--
réinit
safe
sasl
save
scheme
screen
scroll
search
secure
selected
send
server
server-time
setauto
setdict
setname
setnew
setrlimit
setvar
sh
share
shift
shift-
shift-Tab
size
skipempty
sockaddr
sorted
space
speaking
spell
split
splith
splitv
ss
start
status
stderr
stdin
stdout
str
strcasecmp
strftime
strftimeval
strip
strlen
sucks
suffix
suggest
sum
sw
switch
sys
tLe
tab
target
tcl
term
text
tg
time
timeout
timer
tiny
title
tls
tlscertkey
to
toggle
toggleautoload
togglecmd
topic
totp
trigger
triggers
trim
typing
téra-octets
unalias
unavailable
unban
unbind
unbindctxt
undef
undo
unhide
unicode
unix
unload
unmerge
unread
unset
up
update
upper
url
urlserver
usec
userhost-in-names
username
users
usr
util
valer
valgrind
verbose
verify
versiongit
visited
voice
wait
waiting
waitpid
wallops
wcswidth
wctype
wcwidth
websocket
websockets
weechat
where
white
whitespace
whois
width
window
windows
without
word
words
xdigit
xfer
xxx
xyz
yellow
yes
yy
zero
zlib
zstd
Échap
+24
View File
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: 2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
[check]
select = [
"checks",
]
ignore = [
"acronyms",
"brackets",
"double-quotes",
"double-words",
"functions",
"html-tags",
"paths",
"unchanged",
"urls",
]
path_words = "."
langs = [
"en_US",
"fr",
]
+1 -1
View File
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
+169 -3
View File
@@ -1,19 +1,179 @@
<!--
SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
# WeeChat ChangeLog
## Version 4.7.0 (under dev)
## Version 4.10.0 (under dev)
### Changed
- core: add condition on connected relay api clients in default value of option weechat.look.hotlist_add_conditions
- core: add `/mute` in default command for key `Alt`+`=` (toggle filters)
- relay/api: add field "last_read_line_id" in GET /api/buffers
### Added
- core: add `/theme` command with subcommands `list`, `apply`, `reset`, `save`, `rename`, `delete`, `info`, automatic backup of current themable options before apply, and built-in "light" theme
- core: detect terminal background on first start and automatically apply the built-in "light" theme when a light terminal is detected
- core: add `themable` flag on configuration options (auto-set for color options; explicit opt-in for string options containing `${color:...}` references via the `type|themable` syntax)
- core: add option weechat.look.theme (informational, set by `/theme apply`)
- core: add option weechat.look.theme_backup (boolean, default `on`)
- api: add function `theme_register` (available to plugins and to all script languages)
- fset: add filter `t:themable` (matches every themable option regardless of type)
- relay: add option relay.network.unix_socket_permissions ([#2317](https://github.com/weechat/weechat/issues/2317))
### Fixed
- core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals ([#1742](https://github.com/weechat/weechat/issues/1742))
- api: fix infinite loop in function string_replace when the search string is empty
- irc: fix tag in message with list of names when joining a channel
- fset: remove error displayed in core buffer when clicking with the mouse below the last option displayed
- irc: limit size of data received from the server to prevent memory exhaustion
- irc: fix out-of-bounds read on incoming DCC command with a quoted filename ending the message ([#2322](https://github.com/weechat/weechat/issues/2322))
- relay: limit size of decompressed websocket frame with permessage-deflate to prevent memory exhaustion ([GHSA-v2v4-45wm-5cr3](https://github.com/weechat/weechat/security/advisories/GHSA-v2v4-45wm-5cr3))
- relay: limit size of received websocket frame and HTTP body to prevent memory exhaustion
- relay: limit size of partial message received while reading an HTTP request to prevent memory exhaustion
- relay: fix timing attack on password authentication ([GHSA-vhv8-g2r9-cwcc](https://github.com/weechat/weechat/security/advisories/GHSA-vhv8-g2r9-cwcc))
- relay: fix out-of-bounds read in dump of data ([#2324](https://github.com/weechat/weechat/issues/2324))
- api, relay: fix timing attack on TOTP validation ([GHSA-vhv8-g2r9-cwcc](https://github.com/weechat/weechat/security/advisories/GHSA-vhv8-g2r9-cwcc))
- xfer: replace directory separator in remote nick by underscore in download filename to prevent writing the file outside the download directory ([#2321](https://github.com/weechat/weechat/issues/2321))
- xfer: fix out-of-bounds read when receiving empty line in DCC chat ([#2323](https://github.com/weechat/weechat/issues/2323))
## Version 4.9.2 (2026-06-07)
### Fixed
- api: fix infinite loop in function string_replace when the search string is empty
- irc: limit size of data received from the server to prevent memory exhaustion
- irc: fix out-of-bounds read on incoming DCC command with a quoted filename ending the message ([#2322](https://github.com/weechat/weechat/issues/2322))
- relay: limit size of received websocket frame and HTTP body to prevent memory exhaustion
- relay: limit size of partial message received while reading an HTTP request to prevent memory exhaustion
- relay: fix out-of-bounds read in dump of data ([#2324](https://github.com/weechat/weechat/issues/2324))
- xfer: replace directory separator in remote nick by underscore in download filename to prevent writing the file outside the download directory ([#2321](https://github.com/weechat/weechat/issues/2321))
- xfer: fix out-of-bounds read when receiving empty line in DCC chat ([#2323](https://github.com/weechat/weechat/issues/2323))
## Version 4.9.1 (2026-05-31)
### Fixed
- core: fix option weechat.look.color_real_white not applied when color is "white" on 16+ colors terminals ([#1742](https://github.com/weechat/weechat/issues/1742))
- irc: fix tag in message with list of names when joining a channel
- relay: limit size of decompressed websocket frame with permessage-deflate to prevent memory exhaustion ([GHSA-v2v4-45wm-5cr3](https://github.com/weechat/weechat/security/advisories/GHSA-v2v4-45wm-5cr3))
- relay: fix timing attack on password authentication ([GHSA-vhv8-g2r9-cwcc](https://github.com/weechat/weechat/security/advisories/GHSA-vhv8-g2r9-cwcc))
- api, relay: fix timing attack on TOTP validation ([GHSA-vhv8-g2r9-cwcc](https://github.com/weechat/weechat/security/advisories/GHSA-vhv8-g2r9-cwcc))
## Version 4.9.0 (2026-03-29)
### Changed
- core: add option `-e` to evaluate all commands before executing them in command `/eval`
- xfer: evaluate option xfer.network.own_ip
### Added
- typing: add option typing.look.item_text ([#2305](https://github.com/weechat/weechat/issues/2305))
### Fixed
- core: fix crash with `/eval` when the current buffer is closed in a command
- core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests
- irc: fix display of CTCP query sent multiple times to the same user when capability echo-message is enabled ([#2309](https://github.com/weechat/weechat/issues/2309))
- irc: fix unit of server option `anti_flood` from seconds to milliseconds in output of `/server listfull`
- irc: fix creation of irc.msgbuffer option without a server name
- irc: ignore self join if the channel is already joined ([#2291](https://github.com/weechat/weechat/issues/2291))
- relay/api: fix memory leaks in resources "ping" and "sync"
- relay/api: fix memory leak in receive of message from remote WeeChat
## Version 4.8.2 (2026-03-06)
### Fixed
- irc: ignore self join if the channel is already joined ([#2291](https://github.com/weechat/weechat/issues/2291))
- relay/api: fix memory leaks in resources "ping" and "sync"
- relay/api: fix memory leak in receive of message from remote WeeChat
## Version 4.8.1 (2025-12-01)
### Fixed
- core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests
- irc: fix creation of irc.msgbuffer option without a server name
## Version 4.8.0 (2025-11-30)
_If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
### Removed
- irc: remove temporary servers and option irc.look.temporary_servers
### Changed
- api: add support of date like ISO 8601 but with spaces and lower `t` and `z` in function util_parse_time ([#886](https://github.com/weechat/weechat/issues/886))
- irc: request and perform SASL authentication when the server advertises SASL support with message "CAP NEW" ([#2277](https://github.com/weechat/weechat/issues/2277))
- irc: send SASL username with mechanism EXTERNAL ([#2270](https://github.com/weechat/weechat/issues/2270))
- logger: change default time format to `%@%F %T.%fZ` (UTC) ([#886](https://github.com/weechat/weechat/issues/886))
- logger: use function util_parse_time to parse date/time in log files ([#886](https://github.com/weechat/weechat/issues/886))
- relay/api: return an error 400 (Bad Request) when URL parameters "colors", "nicks", "lines" and "lines_free" have an invalid value
- relay/api: return an error 401 (Unauthorized) when header "x-weechat-totp" has an invalid value
- xfer: add buffer local variable "server" in DCC CHAT buffers
- core, irc, relay: add tag "tls" in gnutls messages
- irc: add tags "irc_cap" and "log3" in client capability request and SASL not supported messages
- build: require Curl ≥ 7.68.0 ([#2268](https://github.com/weechat/weechat/issues/2268))
- build: require GnuTLS ≥ 3.6.3 ([#2268](https://github.com/weechat/weechat/issues/2268))
- build: require libgcrypt ≥ 1.8.0 ([#2268](https://github.com/weechat/weechat/issues/2268))
- build: require Enchant v2 ([#2268](https://github.com/weechat/weechat/issues/2268))
- build: require Lua ≥ 5.3 ([#2268](https://github.com/weechat/weechat/issues/2268))
### Added
- core: add option weechat.completion.cycle
- core: add hdata for hooks
- api: add functions util_parse_int, util_parse_long and util_parse_longlong
- buflist: add variable `${index_displayed}`
### Fixed
- core: display an error message in case of invalid parameters in commands `/bar`, `/buffer`, `/cursor`, `/print` and `/window`
- api: fix file descriptor leak in hook_url when a timeout occurs or if the hook is removed during the transfer ([#2284](https://github.com/weechat/weechat/issues/2284))
- api: fix parsing of date/times with timezone offset in function util_parse_time
- irc: fix warning on creation of irc.msgbuffer option when the server name contains upper case letters ([#2281](https://github.com/weechat/weechat/issues/2281))
- irc: display a warning for each unknown or invalid server option in commands `/connect` and `/server`
- irc: fix colors in messages 367 (ban mask), 728 (quiet mask) and MODE ([#2286](https://github.com/weechat/weechat/issues/2286))
- irc: fix reset of color when multiple modes are set with command `/mode`
- relay/api: fix crash when an invalid HTTP request is received from a client
- relay/api: return HTTP error 404 instead of 400 when the buffer is not found in resources completion and input
- relay/api: return HTTP error 400 in case of invalid body in resource ping
## Version 4.7.2 (2025-11-23)
### Fixed
- api: fix file descriptor leak in hook_url when a timeout occurs or if the hook is removed during the transfer ([#2284](https://github.com/weechat/weechat/issues/2284))
- irc: fix colors in messages 367 (ban mask), 728 (quiet mask) and MODE ([#2286](https://github.com/weechat/weechat/issues/2286))
- irc: fix reset of color when multiple modes are set with command `/mode`
## Version 4.7.1 (2025-08-16)
### Fixed
- relay/api: fix crash when an invalid HTTP request is received from a client
## Version 4.7.0 (2025-07-19)
_If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
### Changed
- **breaking:** core: fix buffer overflow in function utf8_next_char and return NULL for empty string
- **breaking:** core: fix integer overflow and return "unsigned long" in function util_version_number
- core: write configuration files on disk only if there are changes ([#2250](https://github.com/weechat/weechat/issues/2250))
- core: always enable partial completion for templates in option weechat.completion.partial_completion_templates, add option weechat.completion.partial_completion_auto_expand to expand word on new completion ([#2253](https://github.com/weechat/weechat/issues/2253))
- core: add script name in output of `/debug hooks <plugin>`
- relay/api: return HTTP error 405 (Method Not Allowed) when the method received is not allowed
### Added
@@ -36,11 +196,15 @@ SPDX-License-Identifier: GPL-3.0-or-later
- core: fix memory leak in function util_parse_delay
- irc: display nick changes and quit messages when option irc.look.ignore_tag_messages is enabled ([#2241](https://github.com/weechat/weechat/issues/2241))
- perl: fix build when multiplicity is not available ([#2243](https://github.com/weechat/weechat/issues/2243))
- relay/api: reject any invalid or unknown password hash algorithm in handshake resource
- relay/api: process HTTP request received as soon as a NULL char is received
- relay/weechat: fix empty buffers in client when WeeChat is running on Solaris/illumos
- build: fix build on Solaris/illumos (issue #2251)
- build: fix build on Solaris/illumos ([#2251](https://github.com/weechat/weechat/issues/2251))
## Version 4.6.3 (2025-05-11)
_If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
### Fixed
- core: fix integer overflow with decimal numbers in calculation of expression
@@ -3528,6 +3692,8 @@ _If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
## Version 0.3.1.1 (2010-01-31)
_If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
### Bug fixes
- irc: fix crash with SSL connection if option ssl_cert is set ([bug #28752](https://savannah.nongnu.org/bugs/?28752))
+39 -41
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2007-2008 Julien Louis <ptitlouis@sysif.net>
# SPDX-FileCopyrightText: 2008-2009 Emmanuel Bouthenot <kolter@openics.org>
#
@@ -28,6 +28,7 @@ project(weechat C)
# CMake options
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_SKIP_RPATH ON)
# compiler options
@@ -52,16 +53,8 @@ else()
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
endif()
# license
set(LICENSE "GPL3")
# add definitions for version and license
if(COMMAND cmake_policy)
cmake_policy(SET CMP0005 NEW)
add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}")
else()
add_definitions(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"')
endif()
add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="GPL3")
# package string
set(PKG_STRING "${PROJECT_NAME} ${VERSION}")
@@ -192,15 +185,6 @@ set(WEECHAT_HOME "${WEECHAT_HOME}" CACHE
FORCE)
mark_as_advanced(CLEAR WEECHAT_HOME)
if(COMMAND cmake_policy)
if(POLICY CMP0003)
cmake_policy(SET CMP0003 NEW)
endif()
if(POLICY CMP0017)
cmake_policy(SET CMP0017 NEW)
endif()
endif()
add_definitions(-DHAVE_CONFIG_H)
include(FindPkgConfig)
@@ -247,54 +231,58 @@ if(CMAKE_HOST_SOLARIS)
endif()
# Check for libgcrypt
pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt)
pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt>=1.8.0)
include_directories(${LIBGCRYPT_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${LIBGCRYPT_LDFLAGS})
# Check for GnuTLS
pkg_check_modules(GNUTLS REQUIRED gnutls>=3.3.0)
pkg_check_modules(GNUTLS REQUIRED gnutls>=3.6.3)
include_directories(${GNUTLS_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${GNUTLS_LDFLAGS})
# Check for zlib
find_package(ZLIB REQUIRED)
list(APPEND EXTRA_LIBS ${ZLIB_LIBRARY})
# Check for zstd
if(ENABLE_ZSTD)
pkg_check_modules(LIBZSTD REQUIRED libzstd)
pkg_check_modules(LIBZSTD REQUIRED libzstd>=1.4.0)
include_directories(${LIBZSTD_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${LIBZSTD_LDFLAGS})
add_definitions(-DHAVE_ZSTD)
endif()
# Check for cJSON
if(ENABLE_CJSON)
pkg_check_modules(LIBCJSON REQUIRED libcjson)
include_directories(${LIBCJSON_INCLUDE_DIRS})
add_definitions(-DHAVE_CJSON)
endif()
# Check for iconv
find_package(Iconv)
if(ICONV_FOUND)
if(ICONV_LIBRARY)
list(APPEND EXTRA_LIBS ${ICONV_LIBRARY})
endif()
add_definitions(-DHAVE_ICONV)
endif()
# Check for CURL
# NOTE: keep version in sync with tools/check_curl_symbols.py
pkg_check_modules(LIBCURL REQUIRED libcurl>=7.47.0)
pkg_check_modules(LIBCURL REQUIRED libcurl>=7.68.0)
include_directories(${LIBCURL_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${LIBCURL_LDFLAGS})
find_library(DL_LIBRARY
NAMES dl
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
)
if(DL_LIBRARY)
list(APPEND EXTRA_LIBS ${DL_LIBRARY})
endif()
list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
add_subdirectory(icons)
if(ENABLE_NLS)
find_package(Gettext REQUIRED)
if(LIBINTL_LIBRARY)
list(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
endif()
find_package(Intl REQUIRED)
include_directories(${Intl_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
@@ -303,20 +291,30 @@ else()
add_custom_target(translations COMMAND true)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
find_library(EXECINFO_LIB_PATH execinfo /usr/local/lib)
check_function_exists(backtrace HAVE_BACKTRACE)
list(APPEND EXTRA_LIBS "execinfo")
else()
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Haiku")
list(APPEND EXTRA_LIBS "network")
else()
list(APPEND EXTRA_LIBS "pthread")
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
list(APPEND EXTRA_LIBS "socket" "nsl")
endif()
list(APPEND EXTRA_LIBS "m")
add_subdirectory(src)
add_subdirectory(doc)
if(ENABLE_TESTS)
find_package(CppUTest)
if(CPPUTEST_FOUND)
enable_testing()
else()
message(SEND_ERROR "CppUTest not found")
endif()
else()
enable_testing()
add_test(NAME notests COMMAND true)
endif()
enable_testing()
add_subdirectory(tests)
configure_file(config.h.cmake config.h @ONLY)
+2 -3
View File
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2014-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
@@ -19,8 +19,7 @@ First, some basic things:
### Security reports
Please **DO NOT** file a GitHub issue for security related problems, but send an
email to [security@weechat.org](mailto:security@weechat.org) instead.
Please **DO NOT** file a GitHub issue for security related problems; see [SECURITY.md](SECURITY.md) instead.
### Required info
-11
View File
@@ -1,11 +0,0 @@
Copyright (c) <year> <owner>.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+6 -8
View File
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
@@ -11,10 +11,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
</p>
[![Mastodon](https://img.shields.io/badge/mastodon-follow-blue.svg)](https://hostux.social/@weechat)
[![Diaspora*](https://img.shields.io/badge/diaspora*-follow-blue.svg)](https://diasp.eu/u/weechat)
[![X](https://img.shields.io/badge/x-follow-blue.svg)](https://x.com/WeeChatClient)
[![Devel blog](https://img.shields.io/badge/devel%20blog-follow-blue.svg)](https://blog.weechat.org/)
[![Slant](https://img.shields.io/badge/slant-recommend-28acad.svg)](https://www.slant.co/topics/1323/~best-irc-clients-for-linux)
[![Donate](https://img.shields.io/badge/help-donate%20%E2%9D%A4-ff69b4.svg)](https://weechat.org/donate/)
[![CI](https://github.com/weechat/weechat/workflows/CI/badge.svg)](https://github.com/weechat/weechat/actions)
@@ -29,11 +27,11 @@ Homepage: [https://weechat.org/](https://weechat.org/)
## Features
- **Modular chat client**: WeeChat has a lightweight core and optional [plugins](https://weechat.org/doc/weechat/user/#plugins). All plugins (including [IRC](https://weechat.org/doc/weechat/user/#irc)) are independent and can be unloaded.
- **Multi-platform**: WeeChat runs on GNU/Linux, *BSD, GNU/Hurd, Haiku, macOS and Windows (Bash/Ubuntu and Cygwin).
- **Multi-protocols**: WeeChat is designed to support multiple protocols by plugins, like IRC.
- **Multi-platform**: WeeChat runs on GNU/Linux, *BSD, GNU/Hurd, Haiku, macOS and Windows (WSL and Cygwin).
- **Multi-protocol**: WeeChat is designed to support multiple protocols via plugins, like IRC.
- **Standards-compliant**: the IRC plugin is compliant with RFCs [1459](https://datatracker.ietf.org/doc/html/rfc1459), [2810](https://datatracker.ietf.org/doc/html/rfc2810), [2811](https://datatracker.ietf.org/doc/html/rfc2811), [2812](https://datatracker.ietf.org/doc/html/rfc2812), [2813](https://datatracker.ietf.org/doc/html/rfc2813) and [7194](https://datatracker.ietf.org/doc/html/rfc7194).
- **Small, fast, and very light**: the core is and should stay as light and fast as possible.
- **Customizable and extensible**: there are a lot of options to customize WeeChat, and it is extensible with C plugins and [scripts](https://weechat.org/scripts/) ([Perl](https://weechat.org/scripts/language/perl/), [Python](https://weechat.org/scripts/language/python/), [Ruby](https://weechat.org/scripts/language/ruby), [Lua](https://weechat.org/scripts/language/lua/), [Tcl](https://weechat.org/scripts/language/tcl/), [Scheme](https://weechat.org/scripts/language/guile/), [JavaScript](https://weechat.org/scripts/language/javascript/) and [PHP](https://weechat.org/scripts/language/php/)).
- **Customizable and extensible**: there are a lot of options to customize WeeChat, and it is extensible with C plugins and [scripts](https://weechat.org/scripts/) ([Perl](https://weechat.org/scripts/language/perl/), [Python](https://weechat.org/scripts/language/python/), [Ruby](https://weechat.org/scripts/language/ruby/), [Lua](https://weechat.org/scripts/language/lua/), [Tcl](https://weechat.org/scripts/language/tcl/), [Scheme](https://weechat.org/scripts/language/guile/), [JavaScript](https://weechat.org/scripts/language/javascript/) and [PHP](https://weechat.org/scripts/language/php/)).
- **Fully documented**: there is comprehensive [documentation](https://weechat.org/doc/weechat/), which is [translated](https://weechat.org/doc/weechat/dev/#translations) into several languages.
- **Developed from scratch**: WeeChat was built from scratch and is not based on any other client.
- **Free software**: WeeChat is released under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).
@@ -51,12 +49,12 @@ For detailed instructions, please check the [WeeChat user's guide](https://weech
## Semantic versioning
WeeChat is following a "practical" semantic versioning, see file [CONTRIBUTING.md](CONTRIBUTING.md#semantic-versioning).
WeeChat follows "practical" semantic versioning; see [CONTRIBUTING.md](CONTRIBUTING.md#semantic-versioning).
## Copyright
<!-- REUSE-IgnoreStart -->
Copyright © 2003-2025 [Sébastien Helleu](https://github.com/flashcode)
Copyright © 2003-2026 [Sébastien Helleu](https://github.com/flashcode)
This file is part of WeeChat, the extensible chat client.
+10 -2
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2025-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -17,5 +17,13 @@ path = [
"weechat.pc.in",
]
precedence = "override"
SPDX-FileCopyrightText = "2003-2025 Sébastien Helleu <flashcode@flashtux.org>"
SPDX-FileCopyrightText = "2003-2026 Sébastien Helleu <flashcode@flashtux.org>"
SPDX-License-Identifier = "GPL-3.0-or-later"
[[annotations]]
path = [
".poexam/*.dic",
]
precedence = "override"
SPDX-FileCopyrightText = "2026 Sébastien Helleu <flashcode@flashtux.org>"
SPDX-License-Identifier = "GPL-3.0-or-later"
+26
View File
@@ -0,0 +1,26 @@
<!--
SPDX-FileCopyrightText: 2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
# Security Policy
## Supported versions
Only the latest stable version of WeeChat is supported.
| Version | Supported | Notes |
| -------------- | ------------------ | --------------------------------------------------- |
| Latest stable | :white_check_mark: | Fully supported. |
| Older releases | :x: | Not supported. Contact us in case of specific need. |
However, we may help to backport fixes on older versions, especially when they are used in released distributions with no way to upgrade to the latest stable release (please contact us).
## Reporting a vulnerability
Please report security issues using <https://github.com/weechat/weechat/security/advisories/new>.
Alternatively, if you are not able to use this form, you can send an email to [security@weechat.org](mailto:security@weechat.org) instead.
We will investigate all legitimate reports and do our best to quickly fix the problem.
+53 -1
View File
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
@@ -13,6 +13,58 @@ When upgrading from version X to Y, please read and apply all instructions from
For a list of all changes in each version, please see [CHANGELOG.md](CHANGELOG.md).
## Version 4.10.0
### Command on mouse click in fset buffer
The command executed when clicking in the fset buffer has been updated to prevent
errors on the core buffer when the click is done below the last option.
To reset the key and use the new default command:
```text
/reset weechat.key_mouse.@chat(fset.fset):button1
```
## Version 4.8.0
### IRC temporary servers
The IRC temporary server feature has been removed.
When upgrading from an old version with `/upgrade`, any temporary server is
converted to a standard server, and thus is saved in configuration file `irc.conf`.
Servers can easily be removed with `/server del <name>`.
### IRC SASL EXTERNAL
When server option `sasl_mechanism` is set to `external`, WeeChat now sends the
username defined in option `sasl_username` to the IRC server
(see issue [#2270](https://github.com/weechat/weechat/issues/2270)).
If you use the EXTERNAL mechanism and the username is set, you could either:
- reset `sasl_username` to an empty string, if the username is **not** needed on this server:
`/reset irc.server.xxx.sasl_username`
- set `sasl_username` to your actual username, if the username **is** required on this server:
`/set irc.server.xxx.sasl_username "user"`
### New time format in log files
The time format used in log files now uses UTC and precision of microsecond
by default: option `logger.file.time_format` has new default value: `%@%F %T.%fZ`.
Only the default value for the option has changed, so when upgrading from
an old version, you keep your old format, even if it was the default one used
in previous versions.
To use the new default value, you can reset the option:
```text
/reset logger.file.time_format
```
## Version 4.7.0
### API functions utf8_next_char and utf8_char_size
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2014-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2014-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
-51
View File
@@ -1,51 +0,0 @@
# SPDX-FileCopyrightText: 2006 Zack Rusin <zack@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# - Try to find the Enchant spell checker
# Once done this will define
#
# ENCHANT_FOUND - system has ENCHANT
# ENCHANT_INCLUDE_DIR - the ENCHANT include directory
# ENCHANT_LIBRARIES - Link these to use ENCHANT
# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT
if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
# in cache already
set(ENCHANT_FOUND TRUE)
else()
if(NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_ENCHANT enchant)
set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER})
endif()
find_path(ENCHANT_INCLUDE_DIR
NAMES enchant++.h
HINTS ${PC_ENCHANT_INCLUDEDIR} ${PC_ENCHANT_INCLUDE_DIRS}
PATH_SUFFIXES enchant-2 enchant
)
find_library(ENCHANT_LIBRARIES
NAMES enchant-2 enchant
HINTS ${PC_ENCHANT_LIBDIR}
${PC_ENCHANT_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES)
# check if function enchant_get_version() exists
set(CMAKE_REQUIRED_INCLUDES ${ENCHANT_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ENCHANT_LIBRARIES})
check_symbol_exists(enchant_get_version "enchant.h" HAVE_ENCHANT_GET_VERSION)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
endif()
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2007 Julien Louis <ptitlouis@sysif.net>
# SPDX-FileCopyrightText: 2009 Emmanuel Bouthenot <kolter@openics.org>
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2011-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2011-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+2 -2
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
@@ -37,5 +37,5 @@ endif()
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_search_module(LUA lua lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua-5.0 lua5.0 lua50)
pkg_search_module(LUA lua lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53)
endif()
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,6 +1,6 @@
#
# SPDX-FileCopyrightText: 2017 Adam Saponara <as@php.net>
# SPDX-FileCopyrightText: 2017-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2017-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2015-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2015-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -1
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
+1 -2
View File
@@ -1,5 +1,5 @@
/*
SPDX-FileCopyrightText: 2007-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2007-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
*/
@@ -52,7 +52,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
#cmakedefine HAVE_HTONLL
#cmakedefine HAVE_EAT_NEWLINE_GLITCH
#cmakedefine HAVE_ASPELL_VERSION_STRING
#cmakedefine HAVE_ENCHANT_GET_VERSION
#cmakedefine HAVE_GUILE_GMP_MEMORY_FUNCTIONS
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
+2 -3
View File
@@ -1,6 +1,5 @@
Source: weechat-devel
Section: net
Priority: optional
Maintainer: Sébastien Helleu <flashcode@flashtux.org>
Build-Depends:
asciidoctor (>= 1.5.4),
@@ -13,7 +12,7 @@ Build-Depends:
libperl-dev,
python3-dev,
libaspell-dev,
liblua5.3-dev,
liblua5.4-dev,
tcl8.6-dev,
guile-3.0-dev,
php-dev, libphp-embed, libargon2-dev, libsodium-dev,
@@ -24,7 +23,7 @@ Build-Depends:
libzstd-dev,
zlib1g-dev,
libcjson-dev
Standards-Version: 4.7.2
Standards-Version: 4.7.3
Homepage: https://weechat.org/
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
Vcs-Browser: https://salsa.debian.org/kolter/weechat
+30
View File
@@ -1,3 +1,27 @@
weechat (4.8.1-1) unstable; urgency=medium
* New upstream release
* Bump Standards-Version to 4.7.3
* Update debian/copyright file (new year)
* Remove redundant priority optional field from debian/control
-- Emmanuel Bouthenot <kolter@debian.org> Fri, 23 Jan 2026 22:02:31 +0000
weechat (4.7.2-1) unstable; urgency=medium
* New upstream release (Closes: #1119787)
* Update debian/watch to version 5
* Remove useless 'Rules-Requires-Root: no' from debian/control
-- Emmanuel Bouthenot <kolter@debian.org> Sat, 29 Nov 2025 08:53:10 +0000
weechat (4.6.3-1) unstable; urgency=medium
* New upstream release
- fixes multiple security vulnerabilities (Closes: #1104554)
-- Emmanuel Bouthenot <kolter@debian.org> Sat, 17 May 2025 05:49:46 +0000
weechat (4.6.1-1) unstable; urgency=medium
* New upstream release (Closes: #1102450, #1098090)
@@ -25,6 +49,12 @@ weechat (4.4.2-1) unstable; urgency=medium
* New upstream release
- fix crash where exiting (Closes: #1076532)
- fix a minor security issue (Closes: #1081942)
* Fix possible privacy breach with html documentation which includes
stylesheets and fonts (font-awesome) hosted on remote CDN (Cloudflare)
by replacing them during build process by the ones provided in
fonts-font-awesome package (also added as dependency on weechat-doc).
* Refresh weechat-doc with minor changes and add some documentation in
Serbian and Czech.
* Bump Standards-Version to 4.7.0
-- Emmanuel Bouthenot <kolter@debian.org> Sun, 22 Sep 2024 13:08:28 +0000
+2 -3
View File
@@ -1,6 +1,5 @@
Source: weechat
Section: net
Priority: optional
Maintainer: Emmanuel Bouthenot <kolter@debian.org>
Build-Depends:
asciidoctor (>= 1.5.4),
@@ -13,7 +12,7 @@ Build-Depends:
libperl-dev,
python3-dev,
libaspell-dev,
liblua5.3-dev,
liblua5.4-dev,
tcl8.6-dev,
guile-3.0-dev,
php-dev, libphp-embed, libargon2-dev, libsodium-dev,
@@ -24,7 +23,7 @@ Build-Depends:
libzstd-dev,
zlib1g-dev,
libcjson-dev
Standards-Version: 4.7.2
Standards-Version: 4.7.3
Homepage: https://weechat.org/
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
Vcs-Browser: https://salsa.debian.org/kolter/weechat
+1 -1
View File
@@ -4,7 +4,7 @@ Upstream-Contact: Sébastien Helleu <flashcode@flashtux.org>
Source: https://weechat.org/
Files: *
Copyright: 2003-2025, Sébastien Helleu <flashcode@flashtux.org>
Copyright: 2003-2026, Sébastien Helleu <flashcode@flashtux.org>
License: GPL-3+
Files: src/core/core-command.c
+4 -2
View File
@@ -1,2 +1,4 @@
version=4
opts=pgpsigurlmangle=s/$/.asc/ https://weechat.org/download/ /files/src/weechat-(\d.*)\.tar\.xz
Version: 5
Source: https://weechat.org/download/
Matching-Pattern: /files/src/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
Pgp-Mode: auto
+37 -12
View File
@@ -1,5 +1,5 @@
#
# SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
# SPDX-FileCopyrightText: 2009 Emmanuel Bouthenot <kolter@openics.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@@ -30,12 +30,37 @@ if(ENABLE_MAN OR ENABLE_DOC)
set(SCRIPTING_LANG de en fr it ja pl sr)
set(FAQ_LANG de en es fr it ja pl sr)
set(QUICKSTART_LANG cs de en es fr it ja pl ru sr)
set(RELAY_API_LANG en fr)
set(RELAY_API_LANG en fr sr)
set(RELAY_WEECHAT_LANG en fr ja sr)
set(DEV_LANG en fr ja sr)
find_package(Asciidoctor)
if(ASCIIDOCTOR_FOUND)
# Asciidoctor embeds the light style automatically; the dark stylesheet
# is generated below and scoped via @media in docinfo.html.in.
set(PYGMENTS_LIGHT_STYLE "default")
set(PYGMENTS_DARK_STYLE "monokai")
find_program(PYGMENTIZE_EXECUTABLE pygmentize)
set(PYGMENTS_DARK_CSS "")
if(PYGMENTIZE_EXECUTABLE)
execute_process(
COMMAND "${PYGMENTIZE_EXECUTABLE}" -O "classprefix=tok-" -f html -a "pre.pygments" -S "${PYGMENTS_DARK_STYLE}"
OUTPUT_VARIABLE PYGMENTS_DARK_CSS
RESULT_VARIABLE _pygmentize_result
)
if(NOT _pygmentize_result EQUAL 0)
message(WARNING "Failed to generate pygments CSS for dark theme (style: ${PYGMENTS_DARK_STYLE}); doc will be built without dark theme syntax highlighting")
set(PYGMENTS_DARK_CSS "")
endif()
else()
message(WARNING "pygmentize not found (install python3-pygments); doc will be built without syntax highlighting colors")
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html.in"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
@ONLY
)
# common asciidoctor arguments
set(ASCIIDOCTOR_ARGS
-v
@@ -46,8 +71,8 @@ if(ENABLE_MAN OR ENABLE_DOC)
-a revnumber="${VERSION}"
-a sectanchors
-a source-highlighter=pygments
-a pygments-style=native
-a docinfodir="${CMAKE_CURRENT_SOURCE_DIR}"
-a pygments-style=${PYGMENTS_LIGHT_STYLE}
-a docinfodir="${CMAKE_CURRENT_BINARY_DIR}"
-a autogendir="${CMAKE_CURRENT_BINARY_DIR}/autogen"
)
@@ -205,7 +230,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_user.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_USER_ARGS} -o "weechat_user.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_user.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_user.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/cmdline_options.${lang}.adoc"
@@ -226,7 +251,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_plugin_api.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_PLUGIN_API_ARGS} -o "weechat_plugin_api.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_plugin_api.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_plugin_api.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
doc-autogen
@@ -250,7 +275,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_scripting.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_SCRIPTING_ARGS} -o "weechat_scripting.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_scripting.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_scripting.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
doc-autogen
@@ -268,7 +293,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_faq.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_FAQ_ARGS} -o "weechat_faq.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_faq.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_faq.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
@@ -283,7 +308,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_quickstart.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_QUICKSTART_ARGS} -o "weechat_quickstart.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_quickstart.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_quickstart.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
@@ -298,7 +323,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_api.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_RELAY_API_ARGS} -o "weechat_relay_api.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_relay_api.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_relay_api.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/relay.${lang}.adoc"
@@ -314,7 +339,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_relay_weechat.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_RELAY_WEECHAT_ARGS} -o "weechat_relay_weechat.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_relay_weechat.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_relay_weechat.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/relay.${lang}.adoc"
@@ -330,7 +355,7 @@ if(ENABLE_MAN OR ENABLE_DOC)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/weechat_dev.${lang}.html"
COMMAND "${ASCIIDOCTOR_EXECUTABLE}" ARGS ${ASCIIDOCTOR_ARGS} ${ASCIIDOCTOR_DEV_ARGS} -o "weechat_dev.${lang}.html" "${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_dev.${lang}.adoc"
DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
"${CMAKE_CURRENT_BINARY_DIR}/docinfo.html"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_dev.${lang}.adoc"
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/includes/attributes-${lang}.adoc"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2005-2011 Jiri Golembiovsky <golemj@gmail.com>
// SPDX-FileCopyrightText: 2015-2017 Ondřej Súkup <mimi.vx@gmail.com>
//
+4 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2005-2011 Jiri Golembiovsky <golemj@gmail.com>
// SPDX-FileCopyrightText: 2015-2017 Ondřej Súkup <mimi.vx@gmail.com>
//
@@ -8,7 +8,8 @@
Pro kompletní dokumentaci nastavení pluginů a jejich volby podívejte se na
https://weechat.org/doc/[WeeChat user's guide].
S irc pluginem se můžete doččasně připojit na server s URL jako:
// TRANSLATION MISSING
With irc plugin, you can connect to a server with an URL like:
irc[6][s]://[[nickname][:password]@]server[:port][/#channel1[,#channel2...]]
@@ -106,7 +107,7 @@ WeeChat je napsán Sébastienem Helleu a přispěvovateli (kompletní seznam je
souboru AUTHORS.md).
// REUSE-IgnoreStart
Copyright (C) 2003-2025 {author}
Copyright (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2005-2011 Jiri Golembiovsky <golemj@gmail.com>
// SPDX-FileCopyrightText: 2015-2017 Ondřej Súkup <mimi.vx@gmail.com>
//
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2005-2011 Jiri Golembiovsky <golemj@gmail.com>
// SPDX-FileCopyrightText: 2015-2017 Ondřej Súkup <mimi.vx@gmail.com>
//
+5 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2015-2017 Ondřej Súkup <mimi.vx@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -351,8 +351,10 @@ To remove the split:
[[key_bindings]]
== Předvoblby klávesových zkratek
WeeChat používá ve výchozím nastavení mnoho klávesových zkratek, Všechny
najdete v dokumentaci, ale je dobré znát alespoň pár těchto důležitých:
// TRANSLATION MISSING
WeeChat používá ve výchozím nastavení mnoho klávesových zkratek, Všechny najdete v dokumentaci
(link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^]),
ale je dobré znát alespoň pár těchto důležitých:
- kbd:[Alt+←] / kbd:[Alt+→] nebo kbd:[F5] / kbd:[F6]: přepnout na předchozí/další bufer
// TRANSLATION MISSING
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+3 -4
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -7,8 +7,7 @@
Um eine vollständige Dokumentation der Optionen zu erhalten, siehe
https://weechat.org/doc/[WeeChat user's guide].
Mittels der IRC Erweiterung kann man sich zu einen temporären Server verbinden lassen,
indem man eine URL verwendet:
Mit der IRC-Erweiterung können Sie sich mit einer URL wie der folgenden mit einem Server verbinden:
irc[6][s]://[[nickname][:password]@]server[:port][/#channel1[,#channel2...]]
@@ -106,7 +105,7 @@ WeeChat wird programmiert von Sébastien Helleu und weiteren Beteiligten (eine v
findet man in der AUTHORS.md Datei).
// REUSE-IgnoreStart
Copyright (C) 2003-2025 {author}
Copyright (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+2 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009 Juergen Descher <jhdl@gmx.net>
// SPDX-FileCopyrightText: 2009-2025 Nils Görs <weechatter@arcor.de>
//
@@ -458,7 +458,7 @@ für weitere Informationen die das Farbmanagement betreffen.
[[search_text]]
=== Wie kann ich in einem Buffer nach einem Text suchen (vergleichbar /lastlog in irssi)?
Die Standardtastenbelegung lautet kbd:[Ctrl+r]
Die Standardtastenbelegung lautet kbd:[Ctrl+s]
(der dazugehörige Befehl: `+/input search_text_here+`).
Um zu Highlight-Nachrichten zu springen:
kbd:[Alt+p] für vorherige, kbd:[Alt+n] für die nächste Nachricht.
+3 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2006 Frank Zacharias <frank_zacharias@web.de>
// SPDX-FileCopyrightText: 2009 Juergen Descher <jhdl@gmx.net>
// SPDX-FileCopyrightText: 2009-2025 Nils Görs <weechatter@arcor.de>
@@ -370,7 +370,8 @@ Um die Teilung des Bildschirms rückgängig zu machen:
== Tastaturbelegung
WeeChat verwendet viele Standardtasten.
Alle Tastenbelegungen sind in der Dokumentation beschrieben.
Alle Tastenbelegungen sind in der Dokumentation beschrieben
(link:weechat_user.de.html#key_bindings[Benutzerhandbuch / Tastenbelegungen ^↗^^]).
Im Folgenden werden die wichtigsten Tastenbelegungen kurz erläutert:
- kbd:[Alt+←] / kbd:[Alt+→] oder kbd:[F5] / kbd:[F6]: Wechsel zum
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+148 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2025 Nils Görs <weechatter@arcor.de>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -212,7 +212,7 @@ WeeChat optional sind:
| asciidoctor | ≥ 1.5.4
| zum Erstellen der man page und der Dokumentation.
| ruby-pygments.rb |
| python3-pygments, ruby-pygments.rb |
| Build Dokumentation.
| libcpputest-dev | ≥ 3.4
@@ -2197,6 +2197,152 @@ Um der Vordergrundfarbe des Terminals das Attribut "fett" zuzuordnen:
/set weechat.color.status_time *99999
----
// TRANSLATION MISSING
[[themes]]
=== Themen
A theme is a named bundle of option overrides that can be applied with
the <<command_weechat_theme,/theme>> command. WeeChat ships a built-in
`"light"` theme tuned for light-background terminals and supports
user-defined themes loaded transiently from files.
[[themes_themable_options]]
==== Themable options
Themes can only set options marked as _themable_. All `*.color.*`
options are themable by default; a few string options that hold format
expressions with `+${color:...}+` references (such as
`+weechat.color.chat_nick_colors+`, `+weechat.look.prefix_error+` or the
`+buflist.format.*+` formats) are explicitly opted in.
You can list the full themable surface area from the
<<command_fset_fset,/fset>> buffer with the `+t:themable+` filter.
[[themes_apply]]
==== Applying a theme
To switch to the built-in light-background theme:
----
/theme apply light
----
The current state of every themable option is saved beforehand to a
backup theme file named like `+backup-YYYYMMDD-HHMMSS-uuuuuu+` in
directory `+themes+` inside the WeeChat configuration directory, so the
previous look can be restored at any time with:
----
/theme apply backup-YYYYMMDD-HHMMSS-uuuuuu
----
Backup creation can be disabled (not recommended):
----
/set weechat.look.theme_backup off
----
If backup is enabled and the backup file cannot be written, the apply
is aborted before any option is changed.
The name of the last applied theme is stored in
`+weechat.look.theme+` (informational only; not re-applied at startup).
[[themes_reset]]
==== Resetting to defaults
To restore the look shipped with WeeChat, reset every themable option
to its default value:
----
/theme reset
----
A backup is written first (same gate as `+/theme apply+`); on backup
failure the reset is aborted before any option is changed.
`+weechat.look.theme+` is cleared too.
[[themes_save_delete]]
==== Saving and deleting user themes
Save the current themable options as a new user theme file:
----
/theme save mytheme
----
Every themable option is written, so the file is self-contained and
applies the exact same look on any WeeChat, regardless of its current
configuration.
Reserved names (built-in theme names like `+light+` and any name
starting with `+backup-+`) are refused. Files live at
`+${weechat_config_dir}/themes/<name>.theme+`.
Rename a user theme (typical use: keep a useful automatic backup
under a meaningful name):
----
/theme rename backup-20260525-094210-123456 mybackup
----
Built-in themes have no file and cannot be renamed; the target name
cannot match a built-in name or start with `+backup-+`, and the
target file must not already exist. The `+[info]+` `+name+` field
inside the file is rewritten so `/theme info` reports the new name
consistently.
Delete a user theme:
----
/theme delete mytheme
----
This removes the file on disk; built-in themes cannot be deleted.
[[themes_file_format]]
==== Theme file format
A theme file is INI-like with two sections:
----
[info]
name = "solarized_light"
description = "Light-background theme inspired by Solarized"
date = "2026-05-25 09:42:10"
weechat = "4.10.0-dev"
[options]
weechat.color.chat = "darkgray"
weechat.color.separator = "blue"
irc.color.input_nick = "magenta"
buflist.format.number = "${color:28}${number}${if:${number_displayed}?.: }"
----
`+[info]+` is informational metadata shown by `/theme info`. `+[options]+`
holds the actual overrides; keys are the full option names that would
appear in `/set`. String values can be enclosed in double or single
quotes; quotes are stripped at parse time. Non-themable options listed
in a theme file are refused at apply time and logged to the core
buffer (so a `.theme` file imported from an untrusted source cannot
overwrite passwords, autoload lists, or startup commands).
User theme files are never cached: on every `/theme apply <name>` the
file is parsed, applied, and freed.
[[themes_resolution]]
==== Resolution order
When `+/theme apply <name>+` is run:
* If `+${weechat_config_dir}/themes/<name>.theme+` exists, the file
is parsed and used (it shadows any built-in with the same name).
* Otherwise the built-in theme registry is consulted; built-ins are
registered programmatically by core, plugins and scripts (see the
plugin and scripting documentation for `+weechat_theme_register+`).
If neither source provides the name, the apply is refused.
[[charset]]
=== Charset
+14 -27
View File
@@ -1,5 +1,5 @@
<!--
SPDX-FileCopyrightText: 2016-2025 Sébastien Helleu <flashcode@flashtux.org>
SPDX-FileCopyrightText: 2016-2026 Sébastien Helleu <flashcode@flashtux.org>
SPDX-License-Identifier: GPL-3.0-or-later
-->
@@ -26,9 +26,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
--header-details-color: #aaa;
--border: 1px solid #444;
--code-bg-color: #252525;
--pre-color: #ddd;
--pre-bg-color: #202020;
--pre-code-bg-color: #202020;
--keyseq-color: #777;
--kbd-bg-color: #252525;
--kbd-border: 1px solid #333;
@@ -39,7 +36,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
--icon-caution-color: #bf3400;
--icon-important-color: #f44336;
--mark-bg-color: #007;
--pre-bevel-light: #3e3e3e;
--pre-bevel-dark: #2a2a2a;
--pre-bevel-bg: #1f1f1f;
}
@PYGMENTS_DARK_CSS@
}
@media (not (prefers-color-scheme: dark)), (prefers-color-scheme: light) {
@@ -59,9 +60,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
--border: 1px solid #dddddf;
--code-bg-color: #f7f7f8;
--keyseq-color: #333c;
--pre-color: #353535;
--pre-bg-color: #f7f7f8;
--pre-code-bg-color: #202020;
--kbd-bg-color: #f7f7f7;
--kbd-border: 1px solid #ccc;
--kbd-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 0 0 .1em #fff;
@@ -71,6 +69,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
--icon-caution-color: #ff0000;
--icon-important-color: #bf0000;
--mark-bg-color: #9df;
--pre-bevel-light: #e5e5e7;
--pre-bevel-dark: #b4b4b8;
--pre-bevel-bg: #f6f6f7;
}
}
@@ -145,6 +146,10 @@ code, .prettyprint {
pre {
color: var(--pre-color) !important;
border: 1px solid;
border-color: var(--pre-bevel-light) var(--pre-bevel-dark) var(--pre-bevel-dark) var(--pre-bevel-light);
border-radius: 3px;
line-height: 1.25;
}
pre > code {
@@ -162,8 +167,8 @@ kbd {
color: var(--body-color);
}
.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "] {
background-color: var(--pre-bg-color);
.literalblock pre, .listingblock > .content > pre:not(.highlight), .listingblock > .content > pre[class="highlight"], .listingblock > .content > pre[class^="highlight "], pre.pygments {
background-color: var(--pre-bg-color, var(--pre-bevel-bg));
color: var(--body-color);
}
@@ -200,24 +205,6 @@ mark {
color: var(--body-color);
}
/* syntax highlighting tuning */
pre.pygments {
color: #ddd !important;
}
pre.pygments .tok-cp {
color: #44cfaf;
}
pre.pygments .tok-nc, pre.pygments .tok-nf {
color: #649fef;
}
pre.pygments .tok-gu, pre.pygments .tok-nc, pre.pygments .tok-nn {
text-decoration: none;
}
/* asciidoctor styles tuning */
#header, #content, #footnotes, #footer {
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+3 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -6,7 +6,7 @@
For complete doc on plugin options, please look at plugins documentation in
https://weechat.org/doc/[WeeChat user's guide].
With irc plugin, you can connect to temporary server with an URL like:
With irc plugin, you can connect to a server with an URL like:
irc[6][s]://[[nickname][:password]@]server[:port][/#channel1[,#channel2...]]
@@ -105,7 +105,7 @@ WeeChat is written by Sébastien Helleu and contributors (complete list is in
the AUTHORS.md file).
// REUSE-IgnoreStart
Copyright (C) 2003-2025 {author}
Copyright (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+7 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -128,6 +128,7 @@ WeeChat "core" is located in following directories:
|===
| Path/file | Description
| core/ | Core functions: entry point, internal structures.
|    core-args.c | Command-line arguments.
|    core-arraylist.c | Array lists.
|    core-backtrace.c | Display a backtrace after a crash.
|    core-calc.c | Calculate result of expressions.
@@ -615,7 +616,7 @@ Example in C:
[source,c]
----
/*
* SPDX-FileCopyrightText: 2025 Your Name <your@email.com>
* SPDX-FileCopyrightText: 2026 Your Name <your@email.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
@@ -655,9 +656,9 @@ Example:
[source,c]
----
/*
* Checks if a string with boolean value is valid.
* Check if a string with boolean value is valid.
*
* Returns:
* Return:
* 1: boolean value is valid
* 0: boolean value is NOT valid
*/
@@ -932,9 +933,9 @@ Example: creation of a new window (from _src/gui/gui-window.c_):
[source,c]
----
/*
* Creates a new window.
* Create a new window.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *
+2 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -441,7 +441,7 @@ for more information about colors management.
[[search_text]]
=== How can I search text in buffer (like /lastlog in irssi)?
The default key is kbd:[Ctrl+r] (command is: `+/input search_text_here+`).
The default key is kbd:[Ctrl+s] (command is: `+/input search_text_here+`).
And jump to highlights: kbd:[Alt+p] / kbd:[Alt+n].
See link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^]
+338 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -4666,6 +4666,159 @@ This function is not available in scripting API.
Some useful functions.
==== util_parse_int
_WeeChat ≥ 4.8.0._
Parse an integer number of type "int" in a string.
Prototype:
[source,c]
----
int weechat_util_parse_int (const char *string, int base, int *result);
----
Arguments:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Return value:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < INT_MIN (min value for a variable of type "int")
* number > INT_MAX (max value for a variable of type "int")
* invalid integer for the given _base_
C examples:
[source,c]
----
int number;
if (weechat_util_parse_int ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_int ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
This function is not available in scripting API.
==== util_parse_long
_WeeChat ≥ 4.8.0._
Parse an integer number of type "long" in a string.
Prototype:
[source,c]
----
int weechat_util_parse_long (const char *string, int base, long *result);
----
Arguments:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Return value:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < LONG_MIN (min value for a variable of type "long")
* number > LONG_MAX (max value for a variable of type "long")
* invalid integer for the given _base_
C examples:
[source,c]
----
long number;
if (weechat_util_parse_long ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_long ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
This function is not available in scripting API.
==== util_parse_longlong
_WeeChat ≥ 4.8.0._
Parse an integer number of type "long long" in a string.
Prototype:
[source,c]
----
int weechat_util_parse_longlong (const char *string, int base, long long *result);
----
Arguments:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Return value:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < LLONG_MIN (min value for a variable of type "long long")
* number > LLONG_MAX (max value for a variable of type "long long")
* invalid integer for the given _base_
C examples:
[source,c]
----
long long number;
if (weechat_util_parse_longlong ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_longlong ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
This function is not available in scripting API.
==== util_timeval_cmp
Compare two "timeval" structures.
@@ -4847,7 +5000,7 @@ This function is not available in scripting API.
==== util_parse_time
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, updated in 4.8.0._
Parse date/time with support of microseconds.
@@ -4860,20 +5013,106 @@ int util_parse_time (const char *datetime, struct timeval *tv);
Arguments:
* _date_: date/time
* _date_: date/time (see supported formats below)
* _tv_: parsed date/time ("timeval" structure)
Supported date/time format (supposing the current time is `2025-08-30 21:04:55`
(Europe/Paris), so with timezone offset `+02:00`, UTC time being `19:04:55`):
[width="70%",cols="5,6m",options="header"]
|===
| Format | Examples
| Date (midnight)
| 2025-08-30
| ISO 8601, date + local time
| 2025-08-30T21:04:55 +
2025-08-30T21:04:55.123456
| ISO 8601, date + local time + offset
| 2025-08-30T16:04:55-03 +
2025-08-30T16:04:55-0300 +
2025-08-30T21:04:55+0200 +
2025-08-30T21:04:55+02:00 +
2025-08-30T21:04:55.123456+0200
| ISO 8601, date + UTC time
| 2025-08-30T19:04:55Z +
2025-08-30T19:04:55.123456Z
| RFC 3339, date + local time
| 2025-08-30 21:04:55 +
2025-08-30 21:04:55.123456
| RFC 3339, date + local time + offset
| 2025-08-30 16:04:55-03 +
2025-08-30 16:04:55-0300 +
2025-08-30 21:04:55+0200 +
2025-08-30 21:04:55 +0200 +
2025-08-30 21:04:55+02:00 +
2025-08-30 21:04:55 +02:00 +
2025-08-30 21:04:55.123456+0200 +
2025-08-30 21:04:55.123456 +02:00
| RFC 3339, date + UTC time
| 2025-08-30 19:04:55Z +
2025-08-30 19:04:55.123456Z
| Local time
| 21:04:55 +
21:04:55.123456
| Local time + offset
| 16:04:55-03 +
16:04:55-0300 +
21:04:55+0200 +
21:04:55 +0200 +
21:04:55+02:00 +
21:04:55 +02:00 +
21:04:55.123456+0200 +
21:04:55.123456 +02:00
| UTC time
| 19:04:55Z +
19:04:55.123456Z
| Timestamp date
| 1756580695 +
1756580695.123456 +
1756580695,123456
|===
Notes:
* For ISO 8601, the separator between date and time is `T` (upper case) or `t` (lower case).
* For UTC time, the final char is `Z` (upper case) or `z` (lower case).
* The timezone offset format is one of:
** `++[+/-]hh:mm++` (hours and minutes)
** `++[+/-]hhmm++` (hours and minutes)
** `++[+/-]hh++` (hours).
* Precision after seconds can be from one-tenth of second (1 digit, for example
`21:04:55.1`) to one microsecond (6 digits, for example `21:04:55.123456`). +
A dot (`.`) or comma (`,`) can separate seconds from the other digits.
Return value:
* 1 if OK, 0 if error
C example:
C examples:
[source,c]
----
struct timeval tv;
weechat_util_parse_time ("2023-12-25T10:29:09.456789Z", &tv); /* == 1 */
/* result: tv.tv_sec == 1703500149, tv.tv_usec = 456789 */
weechat_util_parse_time ("2025-08-30T19:04:55.123456Z", &tv); /* == 1 */
/* result: tv.tv_sec == 1756580695, tv.tv_usec = 123456 */
weechat_util_parse_time ("2025-08-30 21:04:55.123456 +02:00", &tv); /* == 1 */
/* same result */
weechat_util_parse_time ("21:04:55.123456", &tv); /* == 1 */
/* same result */
----
[NOTE]
@@ -9388,6 +9627,89 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR:
# ...
----
[[themes]]
=== Themes
Functions to contribute color (and other themable option) overrides to
built-in themes. See the
link:weechat_user.en.html#themes[user's guide / Themes] section for the
end-user side and the `+/theme+` command.
==== theme_register
_WeeChat ≥ 4.10.0._
Register a contribution of option overrides under a named theme. The
caller's plugin is the owner of the contribution; subsequent calls
with the same theme name from the same plugin merge into the existing
contribution (later keys win for duplicates).
When the calling plugin is unloaded, all its contributions are
automatically dropped from every theme.
Prototype:
[source,c]
----
struct t_theme *weechat_theme_register (const char *name,
struct t_hashtable *overrides);
----
Arguments:
* _name_: theme name (for example `+light+` or a custom name)
* _overrides_: hashtable mapping full option names
(e.g. `+irc.color.input_nick+`) to their string values; the caller
retains ownership and may free the hashtable right after the call
Return value:
* pointer to the registered theme (existing or newly created), NULL on
error
C example:
[source,c]
----
struct t_hashtable *overrides = weechat_hashtable_new (
8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
if (overrides)
{
weechat_hashtable_set (overrides, "irc.color.input_nick", "cyan");
weechat_hashtable_set (overrides, "irc.color.topic_old", "darkgray");
weechat_theme_register ("light", overrides);
weechat_hashtable_free (overrides);
}
----
Script (Python):
[source,python]
----
# prototype
def theme_register(name: str, overrides: Dict[str, str]) -> str: ...
# example
weechat.theme_register("light", {
"irc.color.input_nick": "cyan",
"irc.color.topic_old": "darkgray",
})
----
[NOTE]
Only options that have the _themable_ flag will be set by `/theme apply`.
All `*.color.*` options are themable by default; string options that
hold `+${color:...}+` references are explicitly opted in. Entries
targeting non-themable options are silently skipped at apply-time with
a warning logged to the _core_ buffer.
[NOTE]
When called from a script, the contribution is automatically dropped
when the script unloads (no manual cleanup is needed).
[[key_bindings]]
=== Key bindings
@@ -11064,6 +11386,16 @@ Arguments:
*** _headers_: HTTP headers in response
*** _output_: standard output (set only if _file_out_ was not set in options)
*** _error_: error message (set only in case of error)
*** _error_code_: error code (integer, set only in case of error):
**** `1`: invalid URL
**** `2`: transfer error (Curl error)
**** `3`: not enough memory
**** `4`: file error
**** `5`: transfer stopped (hook removed during the transfer)
**** `6`: transfer timeout
**** `100`: thread creation error
*** _error_code_pthread_: return code of function _pthread_create_
(integer, set only if _error_code_ is `100`)
** return value:
*** _WEECHAT_RC_OK_
*** _WEECHAT_RC_ERROR_
+3 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -329,7 +329,8 @@ To remove the split:
[[key_bindings]]
== Key bindings
WeeChat uses many keys by default. All these keys are in the documentation,
WeeChat uses many keys by default. All these keys are in the documentation
(link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^]),
but you should know at least some vital keys:
- kbd:[Alt+←] / kbd:[Alt+→] or kbd:[F5] / kbd:[F6]: switch to previous/next
+12 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -541,7 +541,8 @@ HTTP/1.1 200 OK
"plugin": "core",
"name": "weechat"
},
"keys": []
"keys": [],
"last_read_line_id": -1
},
{
"id": 1709932823423765,
@@ -571,7 +572,8 @@ HTTP/1.1 200 OK
"tls_version": "TLS1.3",
"host": "~alice@example.com"
},
"keys": []
"keys": [],
"last_read_line_id": -1
},
{
"id": 1709932823649069,
@@ -599,7 +601,8 @@ HTTP/1.1 200 OK
"nick": "alice",
"host": "~alice@example.com"
},
"keys": []
"keys": [],
"last_read_line_id": -1
}
]
----
@@ -655,7 +658,8 @@ HTTP/1.1 200 OK
"message": "Plugins loaded: alias, buflist, charset, exec, fifo, fset, guile, irc, javascript, logger, lua, perl, php, python, relay, ruby, script, spell, tcl, trigger, typing, xfer",
"tags": []
}
]
],
"last_read_line_id": -1
}
----
@@ -702,6 +706,7 @@ HTTP/1.1 200 OK
"host": "~alice@example.com"
},
"keys": [],
"last_read_line_id": -1,
"nicklist_root": {
"id": 0,
"parent_group_id": -1,
@@ -900,7 +905,8 @@ HTTP/1.1 200 OK
"key": "up",
"command": "/fset -up"
}
]
],
"last_read_line_id": -1
}
----
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+147 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -210,7 +210,7 @@ WeeChat:
| asciidoctor | ≥ 1.5.4
| Build man page and documentation.
| ruby-pygments.rb |
| python3-pygments, ruby-pygments.rb |
| Build documentation.
| libcpputest-dev | ≥ 3.4
@@ -2185,6 +2185,151 @@ Example of bold with terminal foreground color:
/set weechat.color.status_time *99999
----
[[themes]]
=== Themes
A theme is a named bundle of option overrides that can be applied with
the <<command_weechat_theme,/theme>> command. WeeChat ships a built-in
`"light"` theme tuned for light-background terminals and supports
user-defined themes loaded transiently from files.
[[themes_themable_options]]
==== Themable options
Themes can only set options marked as _themable_. All `*.color.*`
options are themable by default; a few string options that hold format
expressions with `+${color:...}+` references (such as
`+weechat.color.chat_nick_colors+`, `+weechat.look.prefix_error+` or the
`+buflist.format.*+` formats) are explicitly opted in.
You can list the full themable surface area from the
<<command_fset_fset,/fset>> buffer with the `+t:themable+` filter.
[[themes_apply]]
==== Applying a theme
To switch to the built-in light-background theme:
----
/theme apply light
----
The current state of every themable option is saved beforehand to a
backup theme file named like `+backup-YYYYMMDD-HHMMSS-uuuuuu+` in
directory `+themes+` inside the WeeChat configuration directory, so the
previous look can be restored at any time with:
----
/theme apply backup-YYYYMMDD-HHMMSS-uuuuuu
----
Backup creation can be disabled (not recommended):
----
/set weechat.look.theme_backup off
----
If backup is enabled and the backup file cannot be written, the apply
is aborted before any option is changed.
The name of the last applied theme is stored in
`+weechat.look.theme+` (informational only; not re-applied at startup).
[[themes_reset]]
==== Resetting to defaults
To restore the look shipped with WeeChat, reset every themable option
to its default value:
----
/theme reset
----
A backup is written first (same gate as `+/theme apply+`); on backup
failure the reset is aborted before any option is changed.
`+weechat.look.theme+` is cleared too.
[[themes_save_delete]]
==== Saving and deleting user themes
Save the current themable options as a new user theme file:
----
/theme save mytheme
----
Every themable option is written, so the file is self-contained and
applies the exact same look on any WeeChat, regardless of its current
configuration.
Reserved names (built-in theme names like `+light+` and any name
starting with `+backup-+`) are refused. Files live at
`+${weechat_config_dir}/themes/<name>.theme+`.
Rename a user theme (typical use: keep a useful automatic backup
under a meaningful name):
----
/theme rename backup-20260525-094210-123456 mybackup
----
Built-in themes have no file and cannot be renamed; the target name
cannot match a built-in name or start with `+backup-+`, and the
target file must not already exist. The `+[info]+` `+name+` field
inside the file is rewritten so `/theme info` reports the new name
consistently.
Delete a user theme:
----
/theme delete mytheme
----
This removes the file on disk; built-in themes cannot be deleted.
[[themes_file_format]]
==== Theme file format
A theme file is INI-like with two sections:
----
[info]
name = "solarized_light"
description = "Light-background theme inspired by Solarized"
date = "2026-05-25 09:42:10"
weechat = "4.10.0-dev"
[options]
weechat.color.chat = "darkgray"
weechat.color.separator = "blue"
irc.color.input_nick = "magenta"
buflist.format.number = "${color:28}${number}${if:${number_displayed}?.: }"
----
`+[info]+` is informational metadata shown by `/theme info`. `+[options]+`
holds the actual overrides; keys are the full option names that would
appear in `/set`. String values can be enclosed in double or single
quotes; quotes are stripped at parse time. Non-themable options listed
in a theme file are refused at apply time and logged to the core
buffer (so a `.theme` file imported from an untrusted source cannot
overwrite passwords, autoload lists, or startup commands).
User theme files are never cached: on every `/theme apply <name>` the
file is parsed, applied, and freed.
[[themes_resolution]]
==== Resolution order
When `+/theme apply <name>+` is run:
* If `+${weechat_config_dir}/themes/<name>.theme+` exists, the file
is parsed and used (it shadows any built-in with the same name).
* Otherwise the built-in theme registry is consulted; built-ins are
registered programmatically by core, plugins and scripts (see the
plugin and scripting documentation for `+weechat_theme_register+`).
If neither source provides the name, the apply is refused.
[[charset]]
=== Charset
+2 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2021 Victorhck <victorhck.mailbox.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -454,7 +454,7 @@ información sobre la gestión de los colores.
[[search_text]]
=== ¿Cómo busco texto en un buffer (como /lastlog en irssi)?
La tecla predeterminada es kbd:[Ctrl+r] (el comando es: `+/input texto_a_buscar_aquí+`).
La tecla predeterminada es kbd:[Ctrl+s] (el comando es: `+/input texto_a_buscar_aquí+`).
Y para saltar a los textos resaltados: kbd:[Alt+p] / kbd:[Alt+n].
Vea la link:weechat_user.en.html#key_bindings[Guía del usuario / Atajos de teclado ^↗^^]
+5 -4
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012 Lázaro A. <uranio-235@myopera.com>
// SPDX-FileCopyrightText: 2021 Victorhck <victorhck@mailbox.org>
//
@@ -342,9 +342,10 @@ Para eliminar esa división:
[[key_bindings]]
== Atajos de teclado
WeeChat usa muchas teclas por defecto. Éstas, están bien
explicadas en la documentación pero debe conocer al menos la mas
importantes.
// TRANSLATION MISSING
WeeChat usa muchas teclas por defecto. Éstas, están bien explicadas en la documentación
(link:weechat_user.en.html#key_bindings[User's guide / Key bindings ^↗^^]),
pero debe conocer al menos la mas importantes.
- kbd:[Alt+←] / kbd:[Alt+→] o kbd:[F5] / kbd:[F6]: Cambiará al buffer
siguiente/anterior
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+4 -5
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -7,10 +7,9 @@ Pour une documentation complète sur les options des extensions, merci de
consulter la documentation des extensions dans le
https://weechat.org/doc/[guide utilisateur de WeeChat].
Avec l'extension irc, vous pouvez vous connecter à un serveur de manière
temporaire avec une URL, comme ceci :
Avec l'extension irc, vous pouvez vous connecter à un serveur avec une URL, comme ceci :
irc[6][s]://[[pseudo][:motdepasse]@]serveur[:port][/#canal1[,#canal2...]]
irc[6][s]://[[pseudo][:mot_de_passe]@]serveur[:port][/#canal1[,#canal2...]]
Pour rejoindre le canal IRC de support WeeChat avec le pseudo "monpseudo" :
@@ -107,7 +106,7 @@ WeeChat est écrit par Sébastien Helleu et des contributeurs (la liste complèt
est dans le fichier AUTHORS.md).
// REUSE-IgnoreStart
Copyright (C) 2003-2025 {author}
Copyright (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+7 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -129,6 +129,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|===
| Chemin/fichier | Description
| core/ | Fonctions du cœur : point d'entrée, structures internes.
|    core-args.c | Paramètres de ligne de commande.
|    core-arraylist.c | Listes avec tableau (« arraylists »).
|    core-backtrace.c | Afficher une trace après un plantage.
|    core-calc.c | Calcul du résultat d'expressions.
@@ -616,7 +617,7 @@ Exemple en C :
[source,c]
----
/*
* SPDX-FileCopyrightText: 2025 Your Name <your@email.com>
* SPDX-FileCopyrightText: 2026 Your Name <your@email.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
@@ -659,9 +660,9 @@ Exemple :
[source,c]
----
/*
* Checks if a string with boolean value is valid.
* Check if a string with boolean value is valid.
*
* Returns:
* Return:
* 1: boolean value is valid
* 0: boolean value is NOT valid
*/
@@ -942,9 +943,9 @@ Exemple : création d'une nouvelle fenêtre (de _src/gui/gui-window.c_) :
[source,c]
----
/*
* Creates a new window.
* Create a new window.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *
+2 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -457,7 +457,7 @@ pour plus d'information sur la gestion des couleurs.
[[search_text]]
=== Comment puis-je chercher du texte dans le tampon (comme /lastlog dans irssi) ?
La touche par défaut est kbd:[Ctrl+r] (la commande est : `+/input search_text_here+`).
La touche par défaut est kbd:[Ctrl+s] (la commande est : `+/input search_text_here+`).
Et sauter aux highlights : kbd:[Alt+p] / kbd:[Alt+n].
Voir le link:weechat_user.fr.html#key_bindings[Guide utilisateur / Raccourcis clavier par défaut ^↗^^]
+346 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -4745,6 +4745,159 @@ This function is not available in scripting API.
Quelques fonctions utiles.
==== util_parse_int
_WeeChat ≥ 4.8.0._
Analyser un nombre entier de type "int" dans une chaîne.
Prototype:
[source,c]
----
int weechat_util_parse_int (const char *string, int base, int *result);
----
Paramètres:
* _string_: chaîne à analyser
* _base_: peut être 0 (automatique) ou un entier entre 2 et 36 (inclus)
* _result_: pointeur vers une variable mise à jour si la chaîne est correctement analysée
(si le pointeur est NULL, le nombre trouvé n'est pas retourné)
Valeur de retour:
* 1: OK
* 0: erreur
Les chaînes suivantes sont invalides et la fonction retourne 0:
* chaîne vide
* nombre avec des caractères non numériques après
* nombre < INT_MIN (valeur minimale pour une variable de type "int")
* nombre > INT_MAX (valeur maximale pour une variable de type "int")
* entier invalide pour la _base_ donnée
Exemples en C:
[source,c]
----
int nombre;
if (weechat_util_parse_int ("1234", 10, &nombre))
{
/* nombre == 1234 */
}
if (!weechat_util_parse_int ("abc", 10, &nombre))
{
/* erreur d'analyse, nombre est inchangé */
}
----
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
==== util_parse_long
_WeeChat ≥ 4.8.0._
Analyser un nombre entier de type "long" dans une chaîne.
Prototype:
[source,c]
----
int weechat_util_parse_long (const char *string, int base, long *result);
----
Paramètres:
* _string_: chaîne à analyser
* _base_: peut être 0 (automatique) ou un entier entre 2 et 36 (inclus)
* _result_: pointeur vers une variable mise à jour si la chaîne est correctement analysée
(si le pointeur est NULL, le nombre trouvé n'est pas retourné)
Valeur de retour:
* 1: OK
* 0: erreur
Les chaînes suivantes sont invalides et la fonction retourne 0:
* chaîne vide
* nombre avec des caractères non numériques après
* nombre < LONG_MIN (valeur minimale pour une variable de type "long")
* nombre > LONG_MAX (valeur maximale pour une variable de type "long")
* entier invalide pour la _base_ donnée
Exemples en C:
[source,c]
----
long nombre;
if (weechat_util_parse_long ("1234", 10, &nombre))
{
/* nombre == 1234 */
}
if (!weechat_util_parse_long ("abc", 10, &nombre))
{
/* erreur d'analyse, nombre est inchangé */
}
----
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
==== util_parse_longlong
_WeeChat ≥ 4.8.0._
Analyser un nombre entier de type "long long" dans une chaîne.
Prototype:
[source,c]
----
int weechat_util_parse_longlong (const char *string, int base, long long *result);
----
Paramètres:
* _string_: chaîne à analyser
* _base_: peut être 0 (automatique) ou un entier entre 2 et 36 (inclus)
* _result_: pointeur vers une variable mise à jour si la chaîne est correctement analysée
(si le pointeur est NULL, le nombre trouvé n'est pas retourné)
Valeur de retour:
* 1: OK
* 0: erreur
Les chaînes suivantes sont invalides et la fonction retourne 0:
* chaîne vide
* nombre avec des caractères non numériques après
* nombre < LLONG_MIN (valeur minimale pour une variable de type "long long")
* nombre > LLONG_MAX (valeur maximale pour une variable de type "long long")
* entier invalide pour la _base_ donnée
Exemples en C:
[source,c]
----
long long nombre;
if (weechat_util_parse_longlong ("1234", 10, &nombre))
{
/* nombre == 1234 */
}
if (!weechat_util_parse_longlong ("abc", 10, &nombre))
{
/* erreur d'analyse, nombre est inchangé */
}
----
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
==== util_timeval_cmp
Comparer deux structures "timeval".
@@ -4928,7 +5081,7 @@ Cette fonction n'est pas disponible dans l'API script.
==== util_parse_time
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, mis à jour dans la 4.8.0._
Analyser la date/heure avec le support des microsecondes.
@@ -4941,20 +5094,108 @@ int util_parse_time (const char *datetime, struct timeval *tv);
Paramètres :
* _date_ : date/heure
* _date_ : date/heure (voir les formats supportés ci-dessous)
* _tv_: date/heure analysée (structure "timeval")
Les formats supportés pour la date/heure (en supposant que l'heure courante est
`2025-08-30 21:04:55` (Europe/Paris), donc avec le décalage horaire `+02:00`,
l'heure UTC étant `19:04:55`):
[width="70%",cols="5,6m",options="header"]
|===
| Format | Exemples
| Date (minuit)
| 2025-08-30
| ISO 8601, date + heure locale
| 2025-08-30T21:04:55 +
2025-08-30T21:04:55.123456
| ISO 8601, date + heure locale + décalage horaire
| 2025-08-30T16:04:55-03 +
2025-08-30T16:04:55-0300 +
2025-08-30T21:04:55+0200 +
2025-08-30T21:04:55+02:00 +
2025-08-30T21:04:55.123456+0200
| ISO 8601, date + heure UTC
| 2025-08-30T19:04:55Z +
2025-08-30T19:04:55.123456Z
| RFC 3339, date + heure locale
| 2025-08-30 21:04:55 +
2025-08-30 21:04:55.123456
| RFC 3339, date + heure locale + décalage horaire
| 2025-08-30 16:04:55-03 +
2025-08-30 16:04:55-0300 +
2025-08-30 21:04:55+0200 +
2025-08-30 21:04:55 +0200 +
2025-08-30 21:04:55+02:00 +
2025-08-30 21:04:55 +02:00 +
2025-08-30 21:04:55.123456+0200 +
2025-08-30 21:04:55.123456 +02:00
| RFC 3339, date + heure UTC
| 2025-08-30 19:04:55Z +
2025-08-30 19:04:55.123456Z
| Heure locale
| 21:04:55 +
21:04:55.123456
| Heure locale + décalage horaire
| 16:04:55-03 +
16:04:55-0300 +
21:04:55+0200 +
21:04:55 +0200 +
21:04:55+02:00 +
21:04:55 +02:00 +
21:04:55.123456+0200 +
21:04:55.123456 +02:00
| Heure UTC
| 19:04:55Z +
19:04:55.123456Z
| Date d'horodatage
| 1756580695 +
1756580695.123456 +
1756580695,123456
|===
Notes:
* Pour ISO 8601, le séparateur entre la date et l'heure est `T` (majuscule) ou
`t` (minuscule).
* Pour l'heure UTC, le caractère final est `Z` (majuscule) ou `z` (minuscule).
* Le format du décalage horaire est l'un des suivants:
** `++[+/-]hh:mm++` (heures et minutes)
** `++[+/-]hhmm++` (heures et minutes)
** `++[+/-]hh++` (heures).
* La précision après les secondes peut aller d'un dixième de seconde (1 chiffre,
par exemple `21:04:55.1`) à une microseconde (6 chiffres, par exemple `21:04:55.123456`). +
Un point (`.`) ou une virgule (`,`) peut séparer les secondes des autres chiffres.
Valeur de retour :
* 1 si OK, 0 si erreur
Exemple en C :
Exemples en C :
[source,c]
----
struct timeval tv;
weechat_util_parse_time ("2023-12-25T10:29:09.456789Z", &tv); /* == 1 */
/* result: tv.tv_sec == 1703500149, tv.tv_usec = 456789 */
weechat_util_parse_time ("2025-08-30T19:04:55.123456Z", &tv); /* == 1 */
/* résultat: tv.tv_sec == 1756580695, tv.tv_usec = 123456 */
weechat_util_parse_time ("2025-08-30 21:04:55.123456 +02:00", &tv); /* == 1 */
/* même résultat */
weechat_util_parse_time ("21:04:55.123456", &tv); /* == 1 */
/* même résultat */
----
[NOTE]
@@ -9530,6 +9771,95 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR:
# ...
----
[[themes]]
=== Thèmes
Fonctions permettant de contribuer des surcharges d'options de couleur
(et autres options modifiables par un thème) à des thèmes intégrés.
Voir la section
link:weechat_user.fr.html#themes[guide utilisateur / Thèmes] pour le
côté utilisateur final et la commande `+/theme+`.
==== theme_register
_WeeChat ≥ 4.10.0._
Enregistrer une contribution de surcharges d'options sous un thème
nommé. L'extension appelante est le propriétaire de la contribution ;
les appels suivants avec le même nom de thème depuis la même extension
sont fusionnés dans la contribution existante (en cas de doublons, les
dernières clés gagnent).
Lorsque l'extension appelante est déchargée, toutes ses contributions
sont automatiquement retirées de tous les thèmes.
Prototype :
[source,c]
----
struct t_theme *weechat_theme_register (const char *name,
struct t_hashtable *overrides);
----
Paramètres :
* _name_ : nom du thème (par exemple `+light+` ou un nom personnalisé)
* _overrides_ : table de hachage associant des noms d'options complets
(par exemple `+irc.color.input_nick+`) à leurs valeurs chaîne ;
l'appelant en conserve la propriété et peut la libérer juste après
l'appel
Valeur de retour :
* pointeur vers le thème enregistré (existant ou nouvellement créé),
NULL en cas d'erreur
Exemple en C :
[source,c]
----
struct t_hashtable *overrides = weechat_hashtable_new (
8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
if (overrides)
{
weechat_hashtable_set (overrides, "irc.color.input_nick", "cyan");
weechat_hashtable_set (overrides, "irc.color.topic_old", "darkgray");
weechat_theme_register ("light", overrides);
weechat_hashtable_free (overrides);
}
----
Script (Python) :
[source,python]
----
# prototype
def theme_register(name: str, overrides: Dict[str, str]) -> str: ...
# exemple
weechat.theme_register("light", {
"irc.color.input_nick": "cyan",
"irc.color.topic_old": "darkgray",
})
----
[NOTE]
Seules les options possédant le flag _themable_ seront modifiées par
`/theme apply`. Toutes les options `*.color.*` sont modifiables par
défaut ; les options de type chaîne contenant des références
`+${color:...}+` sont explicitement déclarées comme modifiables. Les
entrées ciblant des options non modifiables sont silencieusement
ignorées au moment de l'application avec un avertissement écrit sur
le tampon _core_.
[NOTE]
Lorsqu'elle est appelée depuis un script, la contribution est
automatiquement retirée lorsque le script est déchargé (aucun nettoyage
manuel n'est nécessaire).
[[key_bindings]]
=== Associations de touches
@@ -11270,6 +11600,16 @@ Paramètres :
*** _output_ : sortie standard (défini seulement si _file_out_ n'était pas défini
dans les options)
*** _error_ : message d'erreur (défini seulement en cas d'erreur)
*** _error_code_: code d'erreur (entier, défini seulement en cas d'erreur):
**** `1`: URL invalide
**** `2`: erreur de transfert (erreur Curl)
**** `3`: mémoire insuffisante
**** `4`: erreur de fichier
**** `5`: transfert stoppé (hook supprimé durant le transfert)
**** `6`: délai d'attente dépassé pour le transfert ("timeout")
**** `100`: erreur de création du thread
*** _error_code_pthread_: code retour de la fonction _pthread_create_
(entier, défini seulement si _error_code_ vaut `100`)
** valeur de retour :
*** _WEECHAT_RC_OK_
*** _WEECHAT_RC_ERROR_
+4 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -338,8 +338,9 @@ Pour supprimer le découpage :
== Raccourcis clavier
WeeChat utilise un certain nombre de touches par défaut. Toutes ces
touches sont dans la documentation, mais vous devriez connaître au moins
les touches vitales :
touches sont dans la documentation
(link:weechat_user.fr.html#key_bindings[Guide utilisateur / Raccourcis clavier ^↗^^]),
mais vous devriez connaître au moins les touches vitales :
- kbd:[Alt+←] / kbd:[Alt+→] ou kbd:[F5] / kbd:[F6] : aller au tampon précédent/suivant
- kbd:[F1] / kbd:[F2] : faire défiler la barre avec la liste des tampons ("buflist")
+12 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -551,7 +551,8 @@ HTTP/1.1 200 OK
"plugin": "core",
"name": "weechat"
},
"keys": []
"keys": [],
"last_read_line_id": -1
},
{
"id": 1709932823423765,
@@ -580,7 +581,8 @@ HTTP/1.1 200 OK
"tls_version": "TLS1.3",
"host": "~alice@example.com"
},
"keys": []
"keys": [],
"last_read_line_id": -1
},
{
"id": 1709932823649069,
@@ -607,7 +609,8 @@ HTTP/1.1 200 OK
"nick": "alice",
"host": "~alice@example.com"
},
"keys": []
"keys": [],
"last_read_line_id": -1
}
]
----
@@ -663,7 +666,8 @@ HTTP/1.1 200 OK
"message": "Plugins loaded: alias, buflist, charset, exec, fifo, fset, guile, irc, javascript, logger, lua, perl, php, python, relay, ruby, script, spell, tcl, trigger, typing, xfer",
"tags": []
}
]
],
"last_read_line_id": -1
}
----
@@ -709,6 +713,7 @@ HTTP/1.1 200 OK
"host": "~alice@example.com"
},
"keys": [],
"last_read_line_id": -1,
"nicklist_root": {
"id": 0,
"parent_group_id": -1,
@@ -906,7 +911,8 @@ HTTP/1.1 200 OK
"key": "up",
"command": "/fset -up"
}
]
],
"last_read_line_id": -1
}
----
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+170 -10
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -208,7 +208,7 @@ Le tableau suivant liste les paquets optionnels pour compiler WeeChat :
| asciidoctor | ≥ 1.5.4
| Construction de la page man et de la documentation.
| ruby-pygments.rb |
| python3-pygments, ruby-pygments.rb |
| Construction de la documentation.
| libcpputest-dev | ≥ 3.4
@@ -2227,6 +2227,166 @@ Exemple de gras avec la couleur de texte du terminal :
/set weechat.color.status_time *99999
----
[[themes]]
=== Thèmes
Un thème est un ensemble nommé de surcharges d'options qui peut être
appliqué par la commande <<command_weechat_theme,/theme>>. WeeChat est
livré avec un thème intégré `"light"` adapté aux terminaux à fond clair
et permet de charger temporairement des thèmes utilisateur depuis des
fichiers.
[[themes_themable_options]]
==== Options modifiables par un thème
Les thèmes ne peuvent modifier que les options marquées comme
_themable_ (modifiables par un thème). Toutes les options `*.color.*`
le sont par défaut ; certaines options de type chaîne contenant des
références `+${color:...}+` (par exemple
`+weechat.color.chat_nick_colors+`, `+weechat.look.prefix_error+` ou les
formats `+buflist.format.*+`) sont explicitement déclarées comme
modifiables.
La liste complète des options modifiables peut être affichée depuis le
tampon <<command_fset_fset,/fset>> avec le filtre `+t:themable+`.
[[themes_apply]]
==== Appliquer un thème
Pour basculer vers le thème intégré pour fond clair :
----
/theme apply light
----
L'état actuel de toutes les options modifiables est sauvegardé au
préalable dans un fichier de sauvegarde nommé
`+backup-AAAAMMJJ-HHMMSS-uuuuuu+` dans le répertoire `+themes+` du
répertoire de configuration de WeeChat. L'apparence précédente peut
ainsi être restaurée à tout moment avec :
----
/theme apply backup-AAAAMMJJ-HHMMSS-uuuuuu
----
La création de la sauvegarde peut être désactivée (déconseillé) :
----
/set weechat.look.theme_backup off
----
Si la sauvegarde est activée et que le fichier ne peut pas être écrit,
l'application est annulée avant qu'aucune option ne soit modifiée.
Le nom du dernier thème appliqué est conservé dans
`+weechat.look.theme+` (à titre informatif uniquement ; il n'est pas
ré-appliqué au démarrage).
[[themes_reset]]
==== Réinitialiser aux valeurs par défaut
Pour rétablir l'apparence d'origine livrée avec WeeChat, réinitialiser
toutes les options modifiables à leur valeur par défaut :
----
/theme reset
----
Une sauvegarde est écrite au préalable (même garde-fou que
`+/theme apply+`) ; si la sauvegarde échoue, la réinitialisation est
annulée avant qu'aucune option ne soit modifiée. L'option
`+weechat.look.theme+` est également remise à vide.
[[themes_save_delete]]
==== Sauvegarder et supprimer des thèmes utilisateur
Sauvegarder l'état actuel des options modifiables en tant que nouveau
thème utilisateur :
----
/theme save monTheme
----
Toutes les options modifiables sont écrites, donc le fichier est
autonome et applique exactement le même aspect sur n'importe quel
WeeChat, quelle que soit sa configuration actuelle.
Les noms réservés (noms de thèmes intégrés comme `+light+` et tout nom
commençant par `+backup-+`) sont refusés. Les fichiers sont placés
dans `+${weechat_config_dir}/themes/<nom>.theme+`.
Renommer un thème utilisateur (usage typique : conserver une
sauvegarde automatique utile sous un nom plus parlant) :
----
/theme rename backup-20260525-094210-123456 maSauvegarde
----
Les thèmes intégrés n'ont pas de fichier et ne peuvent pas être
renommés ; le nom cible ne peut pas correspondre à un nom intégré ni
commencer par `+backup-+`, et le fichier cible ne doit pas déjà
exister. Le champ `+name+` de la section `+[info]+` à l'intérieur du
fichier est réécrit afin que `/theme info` affiche le nouveau nom de
manière cohérente.
Supprimer un thème utilisateur :
----
/theme delete monTheme
----
Cela supprime le fichier sur le disque ; les thèmes intégrés ne
peuvent pas être supprimés.
[[themes_file_format]]
==== Format du fichier de thème
Un fichier de thème est de type INI avec deux sections :
----
[info]
name = "solarized_light"
description = "Thème fond clair inspiré de Solarized"
date = "2026-05-25 09:42:10"
weechat = "4.10.0-dev"
[options]
weechat.color.chat = "darkgray"
weechat.color.separator = "blue"
irc.color.input_nick = "magenta"
buflist.format.number = "${color:28}${number}${if:${number_displayed}?.: }"
----
`+[info]+` est une section de métadonnées informatives affichées par
`/theme info`. `+[options]+` contient les surcharges réelles ; les clés
sont les noms complets d'options tels qu'affichés par `/set`. Les
valeurs de type chaîne peuvent être encadrées par des guillemets
simples ou doubles ; les guillemets sont retirés à l'analyse. Les
options non modifiables par un thème listées dans un fichier sont
refusées au moment de l'application et signalées sur le tampon _core_
(ainsi, un fichier `.theme` importé depuis une source non fiable ne
peut pas écraser des mots de passe, des listes d'auto-chargement ou
des commandes de démarrage).
Les fichiers de thème utilisateur ne sont jamais mis en cache : à
chaque `/theme apply <nom>`, le fichier est analysé, appliqué, puis
libéré.
[[themes_resolution]]
==== Ordre de résolution
Lors de l'exécution de `+/theme apply <nom>+` :
* Si `+${weechat_config_dir}/themes/<nom>.theme+` existe, le fichier
est analysé et utilisé (il masque tout thème intégré du même nom).
* Sinon, le registre des thèmes intégrés est consulté ; les thèmes
intégrés sont enregistrés par programmation par le cœur, les
extensions et les scripts (voir la documentation des extensions et
des scripts pour `+weechat_theme_register+`).
Si aucune des deux sources ne fournit le nom, l'application est
refusée.
[[charset]]
=== Charset
@@ -3351,7 +3511,7 @@ Pour ajouter une donnée sécurisée, utilisez la commande `/secure set`, par
exemple un mot de passe pour le serveur IRC _libera_ :
----
/secure set libera motdepasse
/secure set libera mot_de_passe
----
Pour plus de confort, les données sécurisées peuvent être affichées dans un
@@ -4712,7 +4872,7 @@ Il est fortement recommandé de définir un mot de passe pour le relai, avec ces
commandes :
----
/secure set relay motdepasse
/secure set relay mot_de_passe
/set relay.network.password "${sec.data.relay}"
----
@@ -4793,7 +4953,7 @@ le nom interne du serveur dans la commande IRC "PASS", avec le format
(voir l'exemple ci-dessous) :
----
PASS serveur:motdepasse
PASS serveur:mot_de_passe
----
Exemple : proxy IRC avec TLS pour tout serveur (le client choisira) :
@@ -4809,7 +4969,7 @@ Exemple : proxy IRC sans TLS seulement pour le serveur "libera" :
----
Maintenant vous pouvez vous connecter sur le port 8000 avec n'importe quel
client IRC en utilisant le mot de passe "motdepasse" (ou "libera:motdepasse"
client IRC en utilisant le mot de passe "mot_de_passe" (ou "libera:mot_de_passe"
si aucun serveur n'a été spécifié dans le relai).
Par exemple si vous utilisez WeeChat comme client IRC du relai, avec un serveur
@@ -4822,7 +4982,7 @@ avec ces commandes :
----
[[relay_api_protocol]]
=== API protocol
=== Protocole API
L'extension Relay peut envoyer les données à un autre WeeChat ou une interface
distante avec un protocol HTTP de type API REST.
@@ -4840,12 +5000,12 @@ Par exemple :
----
Maintenant vous pouvez vous connecter sur le port 9000 avec une interface
distante en utilisant le mot de passe "motdepasse".
distante en utilisant le mot de passe "mot_de_passe".
Pour vous connecter à un relai _api_ avec WeeChat :
----
/remote add weechat http://localhost:9000 -password=motdepasse
/remote add weechat http://localhost:9000 -password=mot_de_passe
/remote connect weechat
----
@@ -4882,7 +5042,7 @@ Par exemple :
----
Maintenant vous pouvez vous connecter sur le port 9500 avec une interface
distante en utilisant le mot de passe "motdepasse".
distante en utilisant le mot de passe "mot_de_passe".
[[relay_websocket]]
=== WebSocket
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2012 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+3 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -7,7 +7,7 @@
For complete doc on plugin options, please look at plugins documentation in
https://weechat.org/doc/[WeeChat user's guide].
With irc plugin, you can connect to temporary server with an URL like:
With irc plugin, you can connect to a server with an URL like:
irc[6][s]://[[nickname][:password]@]server[:port][/#channel1[,#channel2...]]
@@ -108,7 +108,7 @@ WeeChat is written by Sébastien Helleu and contributors (complete list is in
the AUTHORS.md file).
// REUSE-IgnoreStart
Copyright (C) 2003-2025 {author}
Copyright (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat is free software; you can redistribute it and/or modify
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2012 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2012 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+2 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2013 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -490,7 +490,7 @@ for more information about colors management.
[[search_text]]
=== Come posso cercare testo nel buffer (come /lastlog con irssi)?
Il tasto predefinito è kbd:[Ctrl+r] (il comando è: `+/input search_text_here+`).
Il tasto predefinito è kbd:[Ctrl+s] (il comando è: `+/input search_text_here+`).
E per passare alle notifiche: kbd:[Alt+p] / kbd:[Alt+n].
// TRANSLATION MISSING
+342 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2012 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -4874,6 +4874,162 @@ Questa funzione non è disponibile nelle API per lo scripting.
Alcune funzioni utili.
// TRANSLATION MISSING
==== util_parse_int
_WeeChat ≥ 4.8.0._
Parse an integer number of type "int" in a string.
Prototipo:
[source,c]
----
int weechat_util_parse_int (const char *string, int base, int *result);
----
Argomenti:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Valore restituito:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < INT_MIN (min value for a variable of type "int")
* number > INT_MAX (max value for a variable of type "int")
* invalid integer for the given _base_
Esempi in C:
[source,c]
----
int number;
if (weechat_util_parse_int ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_int ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
==== util_parse_long
_WeeChat ≥ 4.8.0._
Parse an integer number of type "long" in a string.
Prototipo:
[source,c]
----
int weechat_util_parse_long (const char *string, int base, long *result);
----
Argomenti:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Valore restituito:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < LONG_MIN (min value for a variable of type "long")
* number > LONG_MAX (max value for a variable of type "long")
* invalid integer for the given _base_
Esempi in C:
[source,c]
----
long number;
if (weechat_util_parse_long ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_long ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
==== util_parse_longlong
_WeeChat ≥ 4.8.0._
Parse an integer number of type "long long" in a string.
Prototipo:
[source,c]
----
int weechat_util_parse_longlong (const char *string, int base, long long *result);
----
Argomenti:
* _string_: string to parse
* _base_: can be 0 (automatic) or an integer between 2 and 36 (inclusive)
* _result_: pointer to a variable updated if the string is correctly parsed
(if pointer is NULL, the number found is not returned)
Valore restituito:
* 1: OK
* 0: error
The following strings are invalid and the function returns 0:
* empty string
* number with extra non-digits after
* number < LLONG_MIN (min value for a variable of type "long long")
* number > LLONG_MAX (max value for a variable of type "long long")
* invalid integer for the given _base_
Esempi in C:
[source,c]
----
long long number;
if (weechat_util_parse_longlong ("1234", 10, &number))
{
/* number == 1234 */
}
if (!weechat_util_parse_longlong ("abc", 10, &number))
{
/* parsing error, number is unchanged */
}
----
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
==== util_timeval_cmp
Confronta due strutture "timeval".
@@ -5068,7 +5224,7 @@ Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
==== util_parse_time
_WeeChat ≥ 4.2.0._
_WeeChat ≥ 4.2.0, updated in 4.8.0._
Parse date/time with support of microseconds.
@@ -5081,20 +5237,106 @@ int util_parse_time (const char *datetime, struct timeval *tv);
Arguments:
* _date_: date/time
* _date_: date/time (see supported formats below)
* _tv_: parsed date/time ("timeval" structure)
Supported date/time format (supposing the current time is `2025-08-30 21:04:55`
(Europe/Paris), so with timezone offset `+02:00`, UTC time being `19:04:55`):
[width="70%",cols="5,6m",options="header"]
|===
| Format | Examples
| Date (midnight)
| 2025-08-30
| ISO 8601, date + local time
| 2025-08-30T21:04:55 +
2025-08-30T21:04:55.123456
| ISO 8601, date + local time + offset
| 2025-08-30T16:04:55-03 +
2025-08-30T16:04:55-0300 +
2025-08-30T21:04:55+0200 +
2025-08-30T21:04:55+02:00 +
2025-08-30T21:04:55.123456+0200
| ISO 8601, date + UTC time
| 2025-08-30T19:04:55Z +
2025-08-30T19:04:55.123456Z
| RFC 3339, date + local time
| 2025-08-30 21:04:55 +
2025-08-30 21:04:55.123456
| RFC 3339, date + local time + offset
| 2025-08-30 16:04:55-03 +
2025-08-30 16:04:55-0300 +
2025-08-30 21:04:55+0200 +
2025-08-30 21:04:55 +0200 +
2025-08-30 21:04:55+02:00 +
2025-08-30 21:04:55 +02:00 +
2025-08-30 21:04:55.123456+0200 +
2025-08-30 21:04:55.123456 +02:00
| RFC 3339, date + UTC time
| 2025-08-30 19:04:55Z +
2025-08-30 19:04:55.123456Z
| Local time
| 21:04:55 +
21:04:55.123456
| Local time + offset
| 16:04:55-03 +
16:04:55-0300 +
21:04:55+0200 +
21:04:55 +0200 +
21:04:55+02:00 +
21:04:55 +02:00 +
21:04:55.123456+0200 +
21:04:55.123456 +02:00
| UTC time
| 19:04:55Z +
19:04:55.123456Z
| Timestamp date
| 1756580695 +
1756580695.123456 +
1756580695,123456
|===
Notes:
* For ISO 8601, the separator between date and time is `T` (upper case) or `t` (lower case).
* For UTC time, the final char is `Z` (upper case) or `z` (lower case).
* The timezone offset format is one of:
** `++[+/-]hh:mm++` (hours and minutes)
** `++[+/-]hhmm++` (hours and minutes)
** `++[+/-]hh++` (hours).
* Precision after seconds can be from one-tenth of second (1 digit, for example
`21:04:55.1`) to one microsecond (6 digits, for example `21:04:55.123456`). +
A dot (`.`) or comma (`,`) can separate seconds from the other digits.
Return value:
* 1 if OK, 0 if error
C example:
C examples:
[source,c]
----
struct timeval tv;
weechat_util_parse_time ("2023-12-25T10:29:09.456789Z", &tv); /* == 1 */
/* result: tv.tv_sec == 1703500149, tv.tv_usec = 456789 */
weechat_util_parse_time ("2025-08-30T19:04:55.123456Z", &tv); /* == 1 */
/* result: tv.tv_sec == 1756580695, tv.tv_usec = 123456 */
weechat_util_parse_time ("2025-08-30 21:04:55.123456 +02:00", &tv); /* == 1 */
/* same result */
weechat_util_parse_time ("21:04:55.123456", &tv); /* == 1 */
/* same result */
----
[NOTE]
@@ -9725,6 +9967,90 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR:
# ...
----
// TRANSLATION MISSING
[[themes]]
=== Themes
Functions to contribute color (and other themable option) overrides to
built-in themes. See the
link:weechat_user.it.html#themes[user's guide / Themes] section for the
end-user side and the `+/theme+` command.
==== theme_register
_WeeChat ≥ 4.10.0._
Register a contribution of option overrides under a named theme. The
caller's plugin is the owner of the contribution; subsequent calls
with the same theme name from the same plugin merge into the existing
contribution (later keys win for duplicates).
When the calling plugin is unloaded, all its contributions are
automatically dropped from every theme.
Prototype:
[source,c]
----
struct t_theme *weechat_theme_register (const char *name,
struct t_hashtable *overrides);
----
Arguments:
* _name_: theme name (for example `+light+` or a custom name)
* _overrides_: hashtable mapping full option names
(e.g. `+irc.color.input_nick+`) to their string values; the caller
retains ownership and may free the hashtable right after the call
Return value:
* pointer to the registered theme (existing or newly created), NULL on
error
C example:
[source,c]
----
struct t_hashtable *overrides = weechat_hashtable_new (
8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
if (overrides)
{
weechat_hashtable_set (overrides, "irc.color.input_nick", "cyan");
weechat_hashtable_set (overrides, "irc.color.topic_old", "darkgray");
weechat_theme_register ("light", overrides);
weechat_hashtable_free (overrides);
}
----
Script (Python):
[source,python]
----
# prototype
def theme_register(name: str, overrides: Dict[str, str]) -> str: ...
# example
weechat.theme_register("light", {
"irc.color.input_nick": "cyan",
"irc.color.topic_old": "darkgray",
})
----
[NOTE]
Only options that have the _themable_ flag will be set by `/theme apply`.
All `*.color.*` options are themable by default; string options that
hold `+${color:...}+` references are explicitly opted in. Entries
targeting non-themable options are silently skipped at apply-time with
a warning logged to the _core_ buffer.
[NOTE]
When called from a script, the contribution is automatically dropped
when the script unloads (no manual cleanup is needed).
[[key_bindings]]
=== Combinazione tasti
@@ -11475,6 +11801,16 @@ Argomenti:
*** _headers_: HTTP headers in response
*** _output_: standard output (set only if _file_out_ was not set in options)
*** _error_: error message (set only in case of error)
*** _error_code_: error code (integer, set only in case of error):
**** `1`: invalid URL
**** `2`: transfer error (Curl error)
**** `3`: not enough memory
**** `4`: file error
**** `5`: transfer stopped (hook removed during the transfer)
**** `6`: transfer timeout
**** `100`: thread creation error
*** _error_code_pthread_: return code of function _pthread_create_
(integer, set only if _error_code_ is `100`)
** return value:
*** _WEECHAT_RC_OK_
*** _WEECHAT_RC_ERROR_
+4 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2013 Marco Paolone <marcopaolone@gmail.com>
// SPDX-FileCopyrightText: 2023 Mattia Ronchi <ronchimattia03@gmail.com>
//
@@ -338,7 +338,9 @@ Per rimuovere la divisione:
[[key_bindings]]
== Associazione tasti
WeeChat usa molti tasti. Essi sono tutti presenti nella documentazione,
// TRANSLATION MISSING
WeeChat usa molti tasti. Essi sono tutti presenti nella documentazione
(link:weechat_user.it.html#key_bindings[Guida per l'Utente / Key bindings ^↗^^]),
ma si dovrebbero conoscere almeno quelli vitali:
- kbd:[Alt+←] / kbd:[Alt+→] oppure kbd:[F5] / kbd:[F6]: passa al buffer
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2010-2013 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+148 -2
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2009-2012 Marco Paolone <marcopaolone@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -245,7 +245,7 @@ WeeChat:
| Build man page and documentation.
// TRANSLATION MISSING
| ruby-pygments.rb |
| python3-pygments, ruby-pygments.rb |
| Build documentation.
// TRANSLATION MISSING
@@ -2439,6 +2439,152 @@ Esempio di grassetto con il colore di primo piano del terminale:
/set weechat.color.status_time *99999
----
// TRANSLATION MISSING
[[themes]]
=== Themes
A theme is a named bundle of option overrides that can be applied with
the <<command_weechat_theme,/theme>> command. WeeChat ships a built-in
`"light"` theme tuned for light-background terminals and supports
user-defined themes loaded transiently from files.
[[themes_themable_options]]
==== Themable options
Themes can only set options marked as _themable_. All `*.color.*`
options are themable by default; a few string options that hold format
expressions with `+${color:...}+` references (such as
`+weechat.color.chat_nick_colors+`, `+weechat.look.prefix_error+` or the
`+buflist.format.*+` formats) are explicitly opted in.
You can list the full themable surface area from the
<<command_fset_fset,/fset>> buffer with the `+t:themable+` filter.
[[themes_apply]]
==== Applying a theme
To switch to the built-in light-background theme:
----
/theme apply light
----
The current state of every themable option is saved beforehand to a
backup theme file named like `+backup-YYYYMMDD-HHMMSS-uuuuuu+` in
directory `+themes+` inside the WeeChat configuration directory, so the
previous look can be restored at any time with:
----
/theme apply backup-YYYYMMDD-HHMMSS-uuuuuu
----
Backup creation can be disabled (not recommended):
----
/set weechat.look.theme_backup off
----
If backup is enabled and the backup file cannot be written, the apply
is aborted before any option is changed.
The name of the last applied theme is stored in
`+weechat.look.theme+` (informational only; not re-applied at startup).
[[themes_reset]]
==== Resetting to defaults
To restore the look shipped with WeeChat, reset every themable option
to its default value:
----
/theme reset
----
A backup is written first (same gate as `+/theme apply+`); on backup
failure the reset is aborted before any option is changed.
`+weechat.look.theme+` is cleared too.
[[themes_save_delete]]
==== Saving and deleting user themes
Save the current themable options as a new user theme file:
----
/theme save mytheme
----
Every themable option is written, so the file is self-contained and
applies the exact same look on any WeeChat, regardless of its current
configuration.
Reserved names (built-in theme names like `+light+` and any name
starting with `+backup-+`) are refused. Files live at
`+${weechat_config_dir}/themes/<name>.theme+`.
Rename a user theme (typical use: keep a useful automatic backup
under a meaningful name):
----
/theme rename backup-20260525-094210-123456 mybackup
----
Built-in themes have no file and cannot be renamed; the target name
cannot match a built-in name or start with `+backup-+`, and the
target file must not already exist. The `+[info]+` `+name+` field
inside the file is rewritten so `/theme info` reports the new name
consistently.
Delete a user theme:
----
/theme delete mytheme
----
This removes the file on disk; built-in themes cannot be deleted.
[[themes_file_format]]
==== Theme file format
A theme file is INI-like with two sections:
----
[info]
name = "solarized_light"
description = "Light-background theme inspired by Solarized"
date = "2026-05-25 09:42:10"
weechat = "4.10.0-dev"
[options]
weechat.color.chat = "darkgray"
weechat.color.separator = "blue"
irc.color.input_nick = "magenta"
buflist.format.number = "${color:28}${number}${if:${number_displayed}?.: }"
----
`+[info]+` is informational metadata shown by `/theme info`. `+[options]+`
holds the actual overrides; keys are the full option names that would
appear in `/set`. String values can be enclosed in double or single
quotes; quotes are stripped at parse time. Non-themable options listed
in a theme file are refused at apply time and logged to the core
buffer (so a `.theme` file imported from an untrusted source cannot
overwrite passwords, autoload lists, or startup commands).
User theme files are never cached: on every `/theme apply <name>` the
file is parsed, applied, and freed.
[[themes_resolution]]
==== Resolution order
When `+/theme apply <name>+` is run:
* If `+${weechat_config_dir}/themes/<name>.theme+` exists, the file
is parsed and used (it shadows any built-in with the same name).
* Otherwise the built-in theme registry is consulted; built-ins are
registered programmatically by core, plugins and scripts (see the
plugin and scripting documentation for `+weechat_theme_register+`).
If neither source provides the name, the apply is refused.
[[charset]]
=== Charset
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+4 -3
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -7,7 +7,8 @@
プラグインオプションに関する完全な文書は
https://weechat.org/doc[WeeChat ユーザーズガイド] のプラグインの章を参照してください。
irc プラグインでは以下の様な URL で一時的なサーバに接続することができます:
// TRANSLATION MISSING
With irc plugin, you can connect to a server with an URL like:
irc[6][s]://[[nickname][:password]@]server[:port][/#channel1[,#channel2...]]
@@ -106,7 +107,7 @@ WeeChat は Sébastien Helleu さんと貢献者によって作成されてい
(完全なリストは AUTHORS.md ファイルを参照してください)。
// REUSE-IgnoreStart
著作権 (C) 2003-2025 {author}
著作権 (C) 2003-2026 {author}
// REUSE-IgnoreEnd
WeeChat はフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行された
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+1 -1
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2012-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
+8 -6
View File
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2003-2025 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2003-2026 Sébastien Helleu <flashcode@flashtux.org>
// SPDX-FileCopyrightText: 2014-2019 Ryuunosuke Ayanokouzi <i38w7i3@yahoo.co.jp>
//
// SPDX-License-Identifier: GPL-3.0-or-later
@@ -140,6 +140,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|===
| パス/ファイル名 | 説明
| core/ | コア関数: エントリポイント、内部構造体
// TRANSLATION MISSING
|    core-args.c | Command-line arguments.
|    core-arraylist.c | 配列リスト
|    core-backtrace.c | クラッシュした際にバックトレースを表示
// TRANSLATION MISSING
@@ -766,7 +768,7 @@ Example in C:
[source,c]
----
/*
* SPDX-FileCopyrightText: 2025 Your Name <your@email.com>
* SPDX-FileCopyrightText: 2026 Your Name <your@email.com>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
@@ -808,9 +810,9 @@ C 言語のコードを書く際には以下の基本的なルールを *必ず*
[source,c]
----
/*
* Checks if a string with boolean value is valid.
* Check if a string with boolean value is valid.
*
* Returns:
* Return:
* 1: boolean value is valid
* 0: boolean value is NOT valid
*/
@@ -1083,9 +1085,9 @@ struct t_gui_window *gui_current_window = NULL; /* current window */
[source,c]
----
/*
* Creates a new window.
* Create a new window.
*
* Returns pointer to new window, NULL if error.
* Return pointer to new window, NULL if error.
*/
struct t_gui_window *

Some files were not shown because too many files have changed in this diff Show More