mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 22:24:47 +02:00
Compare commits
75 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e6687759a | |||
| f968bb9c91 | |||
| 6b1d55203b | |||
| 65cdc2603a | |||
| 7640273c30 | |||
| e87d2b4717 | |||
| b80c58fb39 | |||
| b06e3ed68e | |||
| c3c2609acd | |||
| 6247e437c0 | |||
| 195af30e7d | |||
| dd3032171a | |||
| 2ced34f803 | |||
| 62fced3213 | |||
| da256bbad7 | |||
| 43bb20c4c3 | |||
| 86e1af7ab9 | |||
| ad66bba2f8 | |||
| 5ba6c7a0d2 | |||
| f9c3d0ae0a | |||
| 83749f491c | |||
| d79342dafd | |||
| 999ba00ac6 | |||
| df7a428454 | |||
| 1d6eb273c6 | |||
| ae93fa1fef | |||
| 7fabd8068f | |||
| a48dd9d481 | |||
| 2ee71c7699 | |||
| c7cf41c357 | |||
| 7c21c6b993 | |||
| 563654901c | |||
| 517c04ae65 | |||
| a317d0823a | |||
| a399d3f68c | |||
| b0e4e20205 | |||
| 5df21f38f3 | |||
| 90e7857e62 | |||
| 480d603eb5 | |||
| 3184bb92e6 | |||
| 753a2adffc | |||
| 020c8145b6 | |||
| a33f0d2132 | |||
| 7a3ae654be | |||
| 64403cefc1 | |||
| 9621c4381b | |||
| 0ff08971aa | |||
| 19bb049325 | |||
| e33da6292d | |||
| be6b27c8f9 | |||
| 2d9b133c77 | |||
| 6c36836182 | |||
| 15214f9538 | |||
| 7f13bdb51a | |||
| 49bbc53d7c | |||
| eb17fa24ee | |||
| c7d03668f1 | |||
| 8575546aa2 | |||
| 2c716e8154 | |||
| 49b1cb06b5 | |||
| 75a0755107 | |||
| 79b03d0680 | |||
| f43ed913f5 | |||
| 1fcbdb3bd9 | |||
| 1aab82f20b | |||
| 58141bde79 | |||
| 7f6e626122 | |||
| 15860532f3 | |||
| 8b7513e883 | |||
| 2566fca78c | |||
| a82bfa0e7e | |||
| 48d33521dc | |||
| e3f6dab366 | |||
| 1a05f89586 | |||
| c811072bdf |
@@ -33,6 +33,8 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
|
||||
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
|
||||
sudo apt-get --yes purge php8.1-imagick
|
||||
sudo -H pip3 install --ignore-installed msgcheck
|
||||
|
||||
- name: Check gettext files
|
||||
@@ -82,7 +84,6 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- macos-12
|
||||
- macos-11
|
||||
config:
|
||||
- { name: "gcc", cc: "gcc", cxx: "g++" }
|
||||
- { name: "clang", cc: "clang", cxx: "clang++" }
|
||||
|
||||
+6
-14
@@ -200,20 +200,6 @@ if(ENABLE_LARGEFILE)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES)
|
||||
endif()
|
||||
|
||||
# Check for Gettext
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext)
|
||||
if(GETTEXT_FOUND)
|
||||
add_definitions(-DENABLE_NLS)
|
||||
find_package(Intl)
|
||||
if(Intl_FOUND)
|
||||
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
|
||||
endif()
|
||||
else()
|
||||
message(SEND_ERROR "Gettext not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for libgcrypt
|
||||
find_package(GCRYPT REQUIRED)
|
||||
add_definitions(-DHAVE_GCRYPT)
|
||||
@@ -258,7 +244,13 @@ endif()
|
||||
add_subdirectory(icons)
|
||||
|
||||
if(ENABLE_NLS)
|
||||
find_package(Gettext REQUIRED)
|
||||
add_definitions(-DENABLE_NLS)
|
||||
find_package(Intl REQUIRED)
|
||||
list(APPEND EXTRA_LIBS "${Intl_LIBRARIES}")
|
||||
add_subdirectory(po)
|
||||
else()
|
||||
add_custom_target(translations COMMAND true)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
+85
-4
@@ -10,6 +10,87 @@ This document lists all the changes for each version. +
|
||||
For a list of important changes that require manual actions, please look at release notes.
|
||||
|
||||
|
||||
[[v4.0.9]]
|
||||
== Version 4.0.9 (under dev)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core, relay: fix include directory of libzstd
|
||||
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
|
||||
* irc: fix crash in split of IRC message containing a newline if the server is not given
|
||||
* python: fix truncation of unsigned long long integer returned by function string_parse_size
|
||||
* script: always display list of scripts when searching scripts with `/script search` (issue #2077)
|
||||
* tcl: fix truncation of long integer returned by function hdata_long
|
||||
* trigger: fix memory leak when adding a new trigger with `/trigger` command
|
||||
|
||||
Build::
|
||||
|
||||
* ruby: add detection of Ruby 3.3
|
||||
|
||||
[[v4.0.8]]
|
||||
== Version 4.0.8 (2024-01-20)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix crash on plugin reload when using musl libc (issue #2052)
|
||||
* core: fix infinite loop in display when the chat area is too small (issue #2053)
|
||||
* irc: check if arguments are not NULL in some infos
|
||||
* irc: fix info "irc_is_message_ignored" (issue #2059)
|
||||
* irc: fix display of self messages when the message split fails due to inconsistent max lengths sent by the server in message 005
|
||||
|
||||
[[v4.0.7]]
|
||||
== Version 4.0.7 (2023-12-03)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix value of buffer variable "num_history" when the value defined in option weechat.history.max_commands is reached
|
||||
* core: remove incorrect warning when binding keys kbd:[F10] to kbd:[F20] (issue #2039)
|
||||
* core: fix memory leak when config version is invalid or not supported
|
||||
* core: fix crash when "config_version" is present in a configuration file without a value
|
||||
* core: display an error on startup if environment variable "HOME" is not set
|
||||
* irc: remove trailing "\r\n" in signals "irc_out" and "irc_outtags" when messages are queued
|
||||
* irc: fix target buffer of IRC message 337 (whois reply: "is hiding their idle time")
|
||||
* relay: close properly connection with the IRC client in case of server disconnection (issue #2038)
|
||||
* ruby: fix use of NULL variable when displaying exception
|
||||
|
||||
[[v4.0.6]]
|
||||
== Version 4.0.6 (2023-10-26)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix crash when a custom bar item name is already used by a default bar item (issue #2034)
|
||||
* core: fix generation of TOTP on Big Endian systems (issue #2021)
|
||||
* irc: move value `-all` at the end of completions for command `/ignore del`
|
||||
* irc: fix memory leak when joining channels with keys
|
||||
|
||||
Build::
|
||||
|
||||
* core: fix build error if CMake option ENABLE_NLS is turned to off or if required dependencies are not found (issue #2026, issue #2031)
|
||||
|
||||
[[v4.0.5]]
|
||||
== Version 4.0.5 (2023-09-24)
|
||||
|
||||
New features::
|
||||
|
||||
* core: automatically backup config file read if it has an unsupported version (issue #2013)
|
||||
* core: display a message when a configuration file is updated to a newer version
|
||||
* python: make stub (weechat.pyi) compatible with Python 3.8 and 3.9 (issue #2006)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: add option irc.look.open_pv_buffer_echo_msg to open private buffer on self message when capability echo-message is enabled (issue #2016)
|
||||
* irc: fix title of private buffers wrongly set to own address when capability echo-message is enabled (issue #2016)
|
||||
* irc: fix autojoin of channels when private buffers are opened (issue #2012)
|
||||
* irc: fix string comparison when CASEMAPPING is set to "ascii"
|
||||
* script: fix removal of script in system directory while trying to install a script (issue #2019)
|
||||
* script: fix autoload of multiple scripts at once with `/script autoload` (issue #2018)
|
||||
* script: fix crash when a `/script` command triggers another `/script` command (issue #923)
|
||||
* xfer: fix memory leak on plugin unload
|
||||
|
||||
Tests::
|
||||
|
||||
* irc: add tests on server functions
|
||||
|
||||
[[v4.0.4]]
|
||||
== Version 4.0.4 (2023-08-22)
|
||||
|
||||
@@ -55,8 +136,8 @@ Bug fixes::
|
||||
* core: fix renaming of options with command `/item rename` (issue #1978)
|
||||
* core: don't send "key_pressed" signal again for the same key press (issue #1976)
|
||||
* core: don't send "key_combo_*" signals for incomplete keys (issue #1976)
|
||||
* core: add key ctrl-backspace in /help key (issue #1975)
|
||||
* core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version
|
||||
* core: add key kbd:[Ctrl+Backspace] in /help key (issue #1975)
|
||||
* core: keep keys `ctrl-H` and `ctrl-?` (in lower case) if they were manually bound to custom commands in a previous version
|
||||
|
||||
Tests::
|
||||
|
||||
@@ -94,7 +175,7 @@ New features::
|
||||
* core: insert multiple pasted lines in input instead of sending immediately, add keys to move and delete in a single line and whole input, add option weechat.look.input_multiline_lead_linebreak (issue #1502, issue #1503, issue #1504)
|
||||
* core: render newline characters in chat line messages (issue #1908)
|
||||
* core: don't split on newline characters in printf_date_tags when input_multiline is set (issue #1909)
|
||||
* core: add key @kbd:[l] in cursor mode to quote line, add variable "_chat_focused_line" in function hashtable sent to hook_focus callback (issue #1913, issue #1914)
|
||||
* core: add key kbd:[l] (lower `L`) in cursor mode to quote line, add variable "_chat_focused_line" in function hashtable sent to hook_focus callback (issue #1913, issue #1914)
|
||||
* core: add option `split_return` in command `/input` (issue #1916)
|
||||
* core: send all command line parameters not beginning with a dash to all plugins
|
||||
* core: add command `/reset` to reset options to their default values
|
||||
@@ -1708,7 +1789,7 @@ New features::
|
||||
* core: add option weechat.look.hotlist_add_conditions, remove option weechat.look.hotlist_add_buffer_if_away
|
||||
* core: add option weechat.look.hotlist_remove (issue #99)
|
||||
* core: add options `-beep` and `-current` in command `/print`
|
||||
* core: add bare display mode for easy text selection and click on URLs, new key: kbd:[Alt+l] (`L`), new option "bare" in command `/window`, new options: weechat.look.bare_display_exit_on_input and weechat.look.bare_display_time_format
|
||||
* core: add bare display mode for easy text selection and click on URLs, new key: kbd:[Alt+l] (lower `L`), new option "bare" in command `/window`, new options: weechat.look.bare_display_exit_on_input and weechat.look.bare_display_time_format
|
||||
* core: add signals "key_combo_{default|search|cursor}"
|
||||
* core: add terabyte unit for size displayed
|
||||
* core: display a warning in case of inconsistency between the options weechat.look.save_{config|layout}_on_exit
|
||||
|
||||
@@ -11,6 +11,34 @@ It is recommended to read it when upgrading to a new stable version. +
|
||||
For a complete list of changes, please look at ChangeLog.
|
||||
|
||||
|
||||
[[v4.0.8]]
|
||||
== Version 4.0.8 (2024-01-20)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.7]]
|
||||
== Version 4.0.7 (2023-12-03)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.6]]
|
||||
== Version 4.0.6 (2023-10-26)
|
||||
|
||||
[[v4.0.6_custom_bar_items]]
|
||||
=== Custom bar items
|
||||
|
||||
Custom bar items must now have a different name than default bar items
|
||||
(for example the custom bar item name `time` is now forbidden).
|
||||
|
||||
If you have such names in your config, WeeChat will now fail to load them
|
||||
(this should not happen anyway, since such bar items can not be properly used
|
||||
and can cause a crash of WeeChat).
|
||||
|
||||
[[v4.0.5]]
|
||||
== Version 4.0.5 (2023-09-24)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.0.4]]
|
||||
== Version 4.0.4 (2023-08-22)
|
||||
|
||||
|
||||
+22
-20
@@ -45,26 +45,28 @@ set(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
|
||||
|
||||
check_include_files(libintl.h HAVE_LIBINTL_H)
|
||||
|
||||
if(HAVE_LIBINTL_H)
|
||||
check_function_exists(dgettext LIBC_HAS_DGETTEXT)
|
||||
if(LIBC_HAS_DGETTEXT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
else()
|
||||
find_library(LIBINTL_LIBRARY NAMES intl
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
if(LIBINTL_LIBRARY)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "iconv")
|
||||
check_library_exists(${LIBINTL_LIBRARY} "libintl_dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
else()
|
||||
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
endif()
|
||||
if(LIBINTL_HAS_DGETTEXT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
endif()
|
||||
if(NOT HAVE_LIBINTL_H)
|
||||
message(SEND_ERROR "Header libintl.h not found, required if ENABLE_NLS is enabled")
|
||||
endif()
|
||||
|
||||
check_function_exists(dgettext LIBC_HAS_DGETTEXT)
|
||||
if(LIBC_HAS_DGETTEXT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
else()
|
||||
find_library(LIBINTL_LIBRARY NAMES intl
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
if(LIBINTL_LIBRARY)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "iconv")
|
||||
check_library_exists(${LIBINTL_LIBRARY} "libintl_dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
else()
|
||||
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
endif()
|
||||
if(LIBINTL_HAS_DGETTEXT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -37,7 +37,7 @@ if(PKG_CONFIG_FOUND)
|
||||
# set specific search path for macOS
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/ruby/lib/pkgconfig")
|
||||
endif()
|
||||
pkg_search_module(RUBY ruby-3.2 ruby-3.1 ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ruby-2.4 ruby-2.3 ruby-2.2 ruby-2.1 ruby-2.0 ruby-1.9 ruby)
|
||||
pkg_search_module(RUBY ruby-3.3 ruby-3.2 ruby-3.1 ruby-3.0 ruby-2.7 ruby-2.6 ruby-2.5 ruby-2.4 ruby-2.3 ruby-2.2 ruby-2.1 ruby-2.0 ruby-1.9 ruby)
|
||||
if(RUBY_FOUND AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# FIXME: weird hack: hardcoding the Ruby lib location on macOS
|
||||
set(RUBY_LDFLAGS "${RUBY_LDFLAGS} -L/usr/local/opt/ruby/lib")
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#cmakedefine HAVE_LIBINTL_H
|
||||
#cmakedefine HAVE_SYS_RESOURCE_H
|
||||
#cmakedefine HAVE_FLOCK
|
||||
#cmakedefine HAVE_LANGINFO_CODESET
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
weechat (4.0.5-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sun, 24 Sep 2023 07:49:41 +0000
|
||||
|
||||
weechat (4.0.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (Closes: #1040248)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sat, 22 Jul 2023 05:48:35 +0000
|
||||
|
||||
weechat (4.0.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Remove NEWS file, no longer required
|
||||
* Update build dependency from libncursesw5-dev to libncurses-dev
|
||||
* Bump Standards-Version to 4.6.2
|
||||
* Remove all patches (no longer required)
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Tue, 04 Jul 2023 19:02:41 +0000
|
||||
|
||||
weechat (3.8-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
|
||||
@@ -6796,7 +6796,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# example
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6815,7 +6815,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7056,7 +7056,7 @@ Script (Python):
|
||||
# prototype
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
@@ -6819,9 +6819,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6911,7 +6912,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6930,7 +6931,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7176,7 +7177,7 @@ Script (Python) :
|
||||
# prototype
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
@@ -6980,9 +6980,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -7072,7 +7073,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# esempio
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7091,7 +7092,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7337,7 +7338,7 @@ Script (Python):
|
||||
# prototipo
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
@@ -6784,9 +6784,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6876,7 +6877,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# 例
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6895,7 +6896,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -7136,7 +7137,7 @@ struct t_config_option *option5 =
|
||||
# プロトタイプ
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ STUB_HEADER = """\
|
||||
# DO NOT EDIT BY HAND!
|
||||
#
|
||||
|
||||
from typing import Dict
|
||||
from typing import Dict, Union
|
||||
"""
|
||||
|
||||
CONSTANT_RE = (
|
||||
|
||||
@@ -6509,9 +6509,10 @@ my_section_read_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* ... */
|
||||
|
||||
return WEECHAT_CONFIG_READ_OK;
|
||||
/* return WEECHAT_CONFIG_READ_MEMORY_ERROR; */
|
||||
/* return WEECHAT_CONFIG_READ_FILE_NOT_FOUND; */
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_CHANGED;
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_ERROR; */
|
||||
/* return WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND; */
|
||||
}
|
||||
|
||||
int
|
||||
@@ -6601,7 +6602,7 @@ def config_new_section(config_file: str, name: str,
|
||||
callback_delete_option: str, callback_delete_option_data: str) -> str: ...
|
||||
|
||||
# пример
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6620,7 +6621,7 @@ def my_section_write_default_cb(data: str, config_file: str, section_name: str)
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -6844,7 +6845,7 @@ struct t_config_option *option5 =
|
||||
# прототип
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str: ...
|
||||
|
||||
+52
-56
@@ -17,6 +17,11 @@
|
||||
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Check for programs xgettext, msgmerge and msgfmt
|
||||
find_program(XGETTEXT_EXECUTABLE xgettext REQUIRED)
|
||||
find_program(MSGMERGE_EXECUTABLE msgmerge REQUIRED)
|
||||
find_program(MSGFMT_EXECUTABLE msgfmt REQUIRED)
|
||||
|
||||
set(PO_FILES
|
||||
cs.po
|
||||
de.po
|
||||
@@ -39,70 +44,61 @@ set(POT_FILE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${POT_FILE}")
|
||||
|
||||
include(srcfiles.cmake)
|
||||
|
||||
# Looking for xgettext, msgmerge and msgfmt
|
||||
find_program(XGETTEXT_EXECUTABLE xgettext)
|
||||
find_program(MSGMERGE_EXECUTABLE msgmerge)
|
||||
find_program(MSGFMT_EXECUTABLE msgfmt)
|
||||
# Create PO template file weechat.pot
|
||||
set(SRC_FILES)
|
||||
set(POT_DEPENDS)
|
||||
|
||||
if(XGETTEXT_EXECUTABLE AND MSGMERGE_EXECUTABLE AND MSGFMT_EXECUTABLE)
|
||||
foreach(srcfile ${WEECHAT_SOURCES})
|
||||
set(SRC_FILES ${SRC_FILES} ${srcfile})
|
||||
set(POT_DEPENDS ${POT_DEPENDS} "${CMAKE_SOURCE_DIR}/${srcfile}")
|
||||
endforeach()
|
||||
|
||||
# Create PO template file weechat.pot
|
||||
set(SRC_FILES)
|
||||
set(POT_DEPENDS)
|
||||
add_custom_command(
|
||||
OUTPUT "${POT_FILE_PATH}"
|
||||
COMMAND "${XGETTEXT_EXECUTABLE}"
|
||||
ARGS -o "${POT_FILE_PATH}" --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory="${CMAKE_SOURCE_DIR}" --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
|
||||
DEPENDS ${POT_DEPENDS}
|
||||
COMMENT "Generating ${POT_FILE}"
|
||||
)
|
||||
|
||||
foreach(srcfile ${WEECHAT_SOURCES})
|
||||
set(SRC_FILES ${SRC_FILES} ${srcfile})
|
||||
set(POT_DEPENDS ${POT_DEPENDS} "${CMAKE_SOURCE_DIR}/${srcfile}")
|
||||
endforeach()
|
||||
set(MO_FILES)
|
||||
set(UPDATE_PO_TARGETS)
|
||||
foreach(pofile ${PO_FILES})
|
||||
get_filename_component(polang ${pofile} NAME_WE)
|
||||
|
||||
# Compile .po files in build directory (to binary .mo files)
|
||||
set(modir "${CMAKE_CURRENT_BINARY_DIR}/${polang}/LC_MESSAGES")
|
||||
file(MAKE_DIRECTORY "${modir}")
|
||||
set(mofile "${modir}/${PROJECT_NAME}.mo")
|
||||
add_custom_command(
|
||||
OUTPUT "${POT_FILE_PATH}"
|
||||
COMMAND "${XGETTEXT_EXECUTABLE}"
|
||||
ARGS -o "${POT_FILE_PATH}" --add-comments='TRANSLATORS:' --keyword='_' --keyword='weechat_gettext' --keyword='N_' --keyword='NG_:1,2' --keyword='weechat_ngettext:1,2' --no-location --from-code=UTF-8 --directory="${CMAKE_SOURCE_DIR}" --package-name='WeeChat' --package-version=${VERSION} --msgid-bugs-address=${BUGS_ADDRESS} --copyright-holder='NAME' ${SRC_FILES}
|
||||
DEPENDS ${POT_DEPENDS}
|
||||
COMMENT "Generating ${POT_FILE}"
|
||||
OUTPUT "${mofile}"
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" ARGS --quiet -o "${CMAKE_CURRENT_BINARY_DIR}/${pofile}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" ${POT_FILE_PATH}
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -o "${mofile}" "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -c --statistics --verbose --output-file=/dev/null "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
DEPENDS "${POT_FILE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}"
|
||||
COMMENT "Compiling ${polang}.po"
|
||||
)
|
||||
|
||||
set(MO_FILES)
|
||||
set(UPDATE_PO_TARGETS)
|
||||
foreach(pofile ${PO_FILES})
|
||||
get_filename_component(polang ${pofile} NAME_WE)
|
||||
|
||||
# Compile .po files in build directory (to binary .mo files)
|
||||
set(modir "${CMAKE_CURRENT_BINARY_DIR}/${polang}/LC_MESSAGES")
|
||||
file(MAKE_DIRECTORY "${modir}")
|
||||
set(mofile "${modir}/${PROJECT_NAME}.mo")
|
||||
add_custom_command(
|
||||
OUTPUT "${mofile}"
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" ARGS --quiet -o "${CMAKE_CURRENT_BINARY_DIR}/${pofile}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" ${POT_FILE_PATH}
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -o "${mofile}" "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
COMMAND "${MSGFMT_EXECUTABLE}" ARGS -c --statistics --verbose --output-file=/dev/null "${CMAKE_CURRENT_BINARY_DIR}/${pofile}"
|
||||
DEPENDS "${POT_FILE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}"
|
||||
COMMENT "Compiling ${polang}.po"
|
||||
)
|
||||
|
||||
# Update .po files in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${pofile}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --previous --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${polang}.po"
|
||||
)
|
||||
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
|
||||
|
||||
install(FILES "${mofile}" DESTINATION "${LOCALEDIR}/${polang}/LC_MESSAGES")
|
||||
set(MO_FILES ${MO_FILES} ${mofile})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(translations ALL DEPENDS ${MO_FILES})
|
||||
|
||||
# Update weechat.pot in source directory (if needed)
|
||||
# Update .po files in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${POT_FILE}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${POT_FILE}"
|
||||
update-${pofile}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --previous --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${pofile}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${polang}.po"
|
||||
)
|
||||
set(UPDATE_PO_TARGETS ${UPDATE_PO_TARGETS} update-${pofile})
|
||||
|
||||
# Update all .po and weechat.pot in source directory (if needed)
|
||||
add_custom_target(update-po DEPENDS update-${POT_FILE} ${UPDATE_PO_TARGETS})
|
||||
install(FILES "${mofile}" DESTINATION "${LOCALEDIR}/${polang}/LC_MESSAGES")
|
||||
set(MO_FILES ${MO_FILES} ${mofile})
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
add_custom_target(translations ALL DEPENDS ${MO_FILES})
|
||||
|
||||
# Update weechat.pot in source directory (if needed)
|
||||
add_custom_target(
|
||||
update-${POT_FILE}
|
||||
COMMAND "${MSGMERGE_EXECUTABLE}" --quiet --update --backup=none "${CMAKE_CURRENT_SOURCE_DIR}/${POT_FILE}" "${POT_FILE_PATH}"
|
||||
COMMENT "Updating ${POT_FILE}"
|
||||
)
|
||||
|
||||
# Update all .po and weechat.pot in source directory (if needed)
|
||||
add_custom_target(update-po DEPENDS update-${POT_FILE} ${UPDATE_PO_TARGETS})
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4427,6 +4427,22 @@ msgstr "%sChyba: nemohu vytvořit soubor \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sChyba při zápisu konfiguračního souboru \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: server %s%s%s byl zkopírován do %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: nemůžu načíst soubor \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sVAROVÁNÍ: selhalo čtení konfiguračního souboru \"%s\" (%s)"
|
||||
@@ -4522,6 +4538,11 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s%s: nemohu vytvořit adresář pro logy (\"%s\")"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Proměnná prostředí \"%s\" není definována"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Chyba: domovský adresář (%s) není adresářem\n"
|
||||
@@ -9207,6 +9228,10 @@ msgstr ""
|
||||
"když se změní status nepřítomnosti přezdívky (výsledek příkazu whois), "
|
||||
"například: \"notify_highlight\", \"notify_message\" or \"notify_private\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "zavřít buffer, když je na kanálu spuštěn /part"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
@@ -5585,6 +5585,22 @@ msgid "%sError writing configuration file \"%s\""
|
||||
msgstr ""
|
||||
"%sEs ist ein Fehler beim Speichern der Konfigurationsdatei \"%s\" aufgetreten"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: Server %s%s%s wurde nach %s%s%s kopiert"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: Kann die Datei \"%s\" nicht laden"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sWARNUNG: Konfigurationsdatei \"%s\" konnte nicht geladen werden (%s)"
|
||||
@@ -5693,6 +5709,11 @@ msgstr ""
|
||||
"Fehler: es kann kein temporäres Heimatverzeichnis angelegt werden (mit "
|
||||
"Befehl: \"%s\")\n"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Umgebungsvariable \"%s\" ist nicht definiert"
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Fehler: \"%s\" ist kein Verzeichnis\n"
|
||||
@@ -11444,6 +11465,10 @@ msgstr ""
|
||||
"(Rückgabe durch Befehl whois), zum Beispiel: \"notify_message\", "
|
||||
"\"notify_private\" oder \"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "schließt den Buffer wenn \"/part\" im Kanal ausgeführt wird"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5052,6 +5052,22 @@ msgstr "%sError: no es posible crear el archivo \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sError al escribir el archivo de configuración \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: servidor %s%s%s copiado como %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: no es posible cargar el archivo \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Guardando archivo de configuración %s %s"
|
||||
@@ -5147,6 +5163,11 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s%s: imposible crear directorio para registros (\"%s\")"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Variable \"%s\" no definida"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Error: home (%s) no es un directorio\n"
|
||||
@@ -9906,6 +9927,10 @@ msgstr ""
|
||||
"cuando un apodo cambia su estado de ausencia (resultado del comando whois), "
|
||||
"por ejemplo: \"notify_highlight\", \"notify_message\" o \"notify_private\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "cerrar el buffer cuando /part es usado en un canal"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-10-30 23:23+0100\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -5452,6 +5452,22 @@ msgstr "%sImpossible de créer le fichier \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErreur d'écriture du fichier de configuration \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%sLe fichier %s a été sauvegardé sous le nom %s"
|
||||
|
||||
#, c-format
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%sErreur : impossible de sauvegarder le fichier %s"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
"%sImportant : le fichier %s a été mis à jour de la version %d à %d, il n'est "
|
||||
"plus compatible et ne peut plus être chargé avec toute version plus ancienne"
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sATTENTION : échec de lecture du fichier de configuration \"%s\" (%s)"
|
||||
@@ -5561,6 +5577,9 @@ msgstr ""
|
||||
"Erreur : impossible de créer le répertoire de base temporaire (en utilisant "
|
||||
"le modèle : \"%s\")\n"
|
||||
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Erreur : la variable d'environnement \"HOME\" n'est pas définie\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Erreur : \"%s\" n'est pas un répertoire\n"
|
||||
@@ -11226,6 +11245,12 @@ msgstr ""
|
||||
"de la commande whois), par exemple : \"notify_message\", \"notify_private\" "
|
||||
"ou \"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
"ouvrir un tampon privé sur son propre message quand la capacité echo-message "
|
||||
"est activée"
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "fermer le tampon lorsque /part est exécuté sur un canal"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3972,6 +3972,20 @@ msgstr "%s nem sikerült a \"%s\" fájlt létrehozni\n"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "szerver konfigurációs fájljának újraolvastatása"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "A %s%s%s szerver másolva lett %s%s néven\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "beállítások mentése kilépéskor"
|
||||
@@ -4066,6 +4080,10 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s nem sikerült a szervert létrehozni\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr " . típus: szám\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n"
|
||||
@@ -8666,6 +8684,10 @@ msgid ""
|
||||
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4689,6 +4689,22 @@ msgstr "%sErrore: impossibile creare il file \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErrore: impossibile scrivere sul file di configurazione \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: il server %s%s%s è stato copiato in %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: impossibile caricare il file \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Salvataggio del file di configurazione %s %s"
|
||||
@@ -4784,6 +4800,10 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s%s: impossibile creare la directory per i log (\"%s\")"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Variabili"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Errore: home (%s) non è una directory\n"
|
||||
@@ -9631,6 +9651,10 @@ msgstr ""
|
||||
"whois), ad esempio: \"notify_message\", \"notify_private\" o "
|
||||
"\"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "chiude buffer quando viene digitato /part nel canale"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@@ -5294,6 +5294,22 @@ msgstr "%sエラー: ファイル \"%s\" の作成に失敗"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%s設定ファイル \"%s\" の書き込み中にエラー"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: サーバ %s%s%s を %s%s%s にコピーしました"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: ファイル \"%s\" をロードできません"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%s警告: 設定ファイル \"%s\" (%s) の読み込みに失敗"
|
||||
@@ -5391,6 +5407,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"エラー: 一時的なホームディレクリ (テンプレート: \"%s\") を作成できません\n"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "環境変数 \"%s\" が定義されていません"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "エラー: ホーム (%s) はディレクトリではありません\n"
|
||||
@@ -10811,6 +10832,10 @@ msgstr ""
|
||||
"よって表示されたメッセージに使われたタグのコンマ区切りリスト、例: "
|
||||
"\"notify_message\"、\"notify_private\"、\"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "/part を実行した場合にバッファを閉じる"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
|
||||
@@ -5731,6 +5731,22 @@ msgstr "%sNie można utworzyć pliku \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sBłąd podczas zapisu pliku konfiguracyjnego \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: serwer %s%s%s został skopiowany do %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: nie można wczytać pliku \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sUWAGA: nie powiódł się odczyt pliku konfiguracyjnego \"%s\" (%s)"
|
||||
@@ -5834,6 +5850,11 @@ msgstr ""
|
||||
"Błąd: nie można utworzyć tymczasowego katalogu domowego (używając szablonu: "
|
||||
"\"%s\")\n"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Zmienna środowiskowa \"%s\" nie jest zdefiniowana"
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Błąd: „%s” nie jest katalogiem\n"
|
||||
@@ -11807,6 +11828,10 @@ msgstr ""
|
||||
"komendy whois), na przykład: \"notify_message\", \"notify_private\" or "
|
||||
"\"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "zamyka bufor, kiedy na kanale wykonamy /part"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
@@ -5324,6 +5324,22 @@ msgstr "%sErro: não é possível criar o ficheiro \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErro ao escrever o ficheiro de configuração \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: o servidor %s%s%s foi copiado para %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: não foi possível carregar o ficheiro \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sAVISO: falha ao ler o ficheiro de configuração \"%s\" (%s)"
|
||||
@@ -5421,6 +5437,11 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s%s: não foi possível criar diretório para registos (\"%s\")"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "A variável de ambiente \"%s\" não está definida"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Erro: a base (%s) não é um diretório\n"
|
||||
@@ -10578,6 +10599,10 @@ msgstr ""
|
||||
"whois), por exemplo: \"notify_message\", \"notify_private\" ou "
|
||||
"\"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "fechar o buffer ao executar /part num canal"
|
||||
|
||||
|
||||
+25
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4698,6 +4698,22 @@ msgstr "%sErro: não foi possível criar arquivo \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErro escrevendo arquivo de configuração \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "Layout \"%s\" has been renamed to \"%s\""
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "Disposição \"%s\" renomeado para \"%s\""
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: não foi possível carregar arquivo \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Escrevendo arquivo de configurações %s %s"
|
||||
@@ -4791,6 +4807,10 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Variáveis"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Erro: (%s) não é um diretório\n"
|
||||
@@ -9209,6 +9229,10 @@ msgid ""
|
||||
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "fechar buffer quando o comando /part é executado em um canal"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4000,6 +4000,20 @@ msgstr "%s не могу создать файл \"%s\"\n"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "перезагрузить конфигурационный файл сервера"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "Сервер %s%s%s скопирован в %s%s\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "Не могу записать лог-файл \"%s\"\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "сохранять конфигурационный файл при выходе"
|
||||
@@ -4094,6 +4108,10 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr "%s не могу создать сервер \"%s\"\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr " . тип: целочисленный\n"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "%s домашний каталог (%s) не является директорией\n"
|
||||
@@ -8698,6 +8716,10 @@ msgid ""
|
||||
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5377,6 +5377,22 @@ msgstr "%sНе може да се креира фајл „%s”"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sГрешка при уписивању конфигурационог фајла „%s”"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: сервер %s%s%s је копиран у %s%s%s"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: фајл „%s” не може да се учита"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sУПОЗОРЕЊЕ: није могао да се прочита конфигурациони фајл „%s” (%s)"
|
||||
@@ -5488,6 +5504,11 @@ msgstr ""
|
||||
"Грешка: не може да се креира привремени почетни директоријум (користећи "
|
||||
"шаблон: \"%s\")\n"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Није дефинисана променљива окружења „%s”"
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Грешка: „%s” није директоријум\n"
|
||||
@@ -11012,6 +11033,10 @@ msgstr ""
|
||||
"се статус одсуства надимка промени (резултат команде whois), на пример: "
|
||||
"„notify_message”, „notify_private” или „notify_highlight”"
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "затварање бафера када се на каналу изврши /part"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5375,6 +5375,22 @@ msgstr "%s\"%s\" dosyası oluşturulamıyor"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%s\"%s\" yapılandırma dosyası yazılırken hata"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s: server %s%s%s has been copied to %s%s%s"
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr "%s: %s%s%s sunucusu %s%s%s konumuna kopyalandı"
|
||||
|
||||
#, fuzzy, c-format
|
||||
#| msgid "%s%s: unable to load file \"%s\""
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr "%s%s: \"%s\" dosyası yüklenemiyor"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sUYARI: \"%s\" yapılandırma dosyası okunamadı (%s)"
|
||||
@@ -5472,6 +5488,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"Hata: Geçici bir ev dizini oluşturulamıyor (kullanılan şablon: \"%s\")\n"
|
||||
|
||||
#, fuzzy
|
||||
#| msgid "Environment variable \"%s\" is not defined"
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr "Ortam değişkeni \"%s\" tanımlanmamış"
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr "Hata: \"%s\" bir dizin değil\n"
|
||||
@@ -11377,6 +11398,10 @@ msgstr ""
|
||||
"kullanılan etiketlerin virgülle ayrılmış listesi (komut whois'inin sonucu); "
|
||||
"örneğin: \"notify_message\", \"notify_private\" veya \"notify_highlight\""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr "bir kanalda /part verildiğinde arabelleği kapat"
|
||||
|
||||
|
||||
+22
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-10-30 23:09+0100\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3624,6 +3624,20 @@ msgstr ""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sFile %s has been backed up as %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sError: unable to backup file %s"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr ""
|
||||
@@ -3716,6 +3730,9 @@ msgid ""
|
||||
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
|
||||
msgstr ""
|
||||
|
||||
msgid "Error: environment variable \"HOME\" is not defined\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Error: \"%s\" is not a directory\n"
|
||||
msgstr ""
|
||||
@@ -7775,6 +7792,10 @@ msgid ""
|
||||
"\"notify_message\", \"notify_private\" or \"notify_highlight\""
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"open a private buffer on self message when capability echo-message is enabled"
|
||||
msgstr ""
|
||||
|
||||
msgid "close buffer when /part is issued on a channel"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ include_directories(${GNUTLS_INCLUDE_PATH})
|
||||
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
add_library(weechat_core STATIC ${LIB_CORE_SRC})
|
||||
|
||||
@@ -146,6 +146,7 @@ hook_process_hashtable (struct t_weechat_plugin *plugin,
|
||||
ptr_value = hashtable_get (options, "buffer_flush");
|
||||
if (ptr_value && ptr_value[0])
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (ptr_value, &error, 10);
|
||||
if (error && !error[0]
|
||||
&& (number >= 1) && (number <= HOOK_PROCESS_BUFFER_SIZE))
|
||||
|
||||
@@ -736,6 +736,7 @@ COMMAND_CALLBACK(buffer)
|
||||
else
|
||||
{
|
||||
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
|
||||
error = NULL;
|
||||
(void) strtol (argv[i], &error, 10);
|
||||
clear_number = (error && !error[0]);
|
||||
}
|
||||
@@ -971,6 +972,7 @@ COMMAND_CALLBACK(buffer)
|
||||
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
error = NULL;
|
||||
(void) strtol (argv[i], &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
@@ -1009,6 +1011,7 @@ COMMAND_CALLBACK(buffer)
|
||||
ptr_buffer = gui_buffer_search_by_number_or_name (argv[i]);
|
||||
if (ptr_buffer)
|
||||
{
|
||||
error = NULL;
|
||||
(void) strtol (argv[i], &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
|
||||
+105
-5
@@ -37,6 +37,7 @@
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-dir.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
@@ -3154,6 +3155,10 @@ config_file_parse_version (const char *version)
|
||||
long number;
|
||||
char *error;
|
||||
|
||||
if (!version)
|
||||
return -1;
|
||||
|
||||
error = NULL;
|
||||
number = strtoll (version, &error, 10);
|
||||
if (!error || error[0])
|
||||
return -1;
|
||||
@@ -3161,6 +3166,66 @@ config_file_parse_version (const char *version)
|
||||
return (number < 1) ? -1 : (int)number;
|
||||
}
|
||||
|
||||
/*
|
||||
* Backups a configuration file if its version is unsupported and cannot be
|
||||
* loaded.
|
||||
*/
|
||||
|
||||
void
|
||||
config_file_backup (const char *filename)
|
||||
{
|
||||
char *filename_backup, str_time[32], str_index[32];
|
||||
int length, index;
|
||||
struct tm *local_time;
|
||||
time_t date;
|
||||
|
||||
if (!filename)
|
||||
return;
|
||||
|
||||
length = strlen (filename) + 128;
|
||||
|
||||
filename_backup = malloc (length);
|
||||
if (!filename_backup)
|
||||
return;
|
||||
|
||||
date = time (NULL);
|
||||
local_time = localtime (&date);
|
||||
if (strftime (str_time, sizeof (str_time), ".%Y%m%d.%H%M%S", local_time) == 0)
|
||||
str_time[0] = '\0';
|
||||
|
||||
index = 1;
|
||||
while (1)
|
||||
{
|
||||
if (index == 1)
|
||||
str_index[0] = '\0';
|
||||
else
|
||||
snprintf (str_index, sizeof (str_index), ".%d", index);
|
||||
snprintf (filename_backup, length,
|
||||
"%s.backup%s%s",
|
||||
filename, str_time, str_index);
|
||||
if (access (filename_backup, F_OK) != 0)
|
||||
break;
|
||||
index++;
|
||||
}
|
||||
|
||||
if (dir_file_copy (filename, filename_backup))
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sFile %s has been backed up as %s"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, filename_backup);
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sError: unable to backup file %s"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename);
|
||||
}
|
||||
|
||||
free (filename_backup);
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates data read from config file: either section or option + value.
|
||||
* The update callback (if defined in config) is called if the config version
|
||||
@@ -3173,16 +3238,22 @@ config_file_parse_version (const char *version)
|
||||
*
|
||||
* Section can be updated only if option and value are NULL (ie if we are
|
||||
* reading a section line like "[section]").
|
||||
*
|
||||
* Integer warning_update_displayed is set to 1 if a warning is displayed,
|
||||
* when the file is updated to a newer version (then it's not compatible any
|
||||
* more with previous versions).
|
||||
*/
|
||||
|
||||
void
|
||||
config_file_update_data_read (struct t_config_file *config_file,
|
||||
const char *filename,
|
||||
const char *section,
|
||||
const char *option,
|
||||
const char *value,
|
||||
char **ret_section,
|
||||
char **ret_option,
|
||||
char **ret_value)
|
||||
char **ret_value,
|
||||
int *warning_update_displayed)
|
||||
{
|
||||
struct t_hashtable *data_read, *hashtable;
|
||||
const char *ptr_section, *ptr_option, *ptr_value;
|
||||
@@ -3192,6 +3263,21 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
if (config_file->version_read >= config_file->version)
|
||||
return;
|
||||
|
||||
if (!*warning_update_displayed
|
||||
&& (config_file->version_read < config_file->version))
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sImportant: file %s has been updated from version %d to %d, "
|
||||
"it is not compatible and can not be loaded any more with any "
|
||||
"older version"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename,
|
||||
config_file->version_read,
|
||||
config_file->version);
|
||||
*warning_update_displayed = 1;
|
||||
}
|
||||
|
||||
/* do nothing if there's no update callback */
|
||||
if (!config_file->callback_update)
|
||||
return;
|
||||
@@ -3289,6 +3375,7 @@ int
|
||||
config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
{
|
||||
int filename_length, line_number, rc, length, version;
|
||||
int warning_update_displayed;
|
||||
char *filename, *section, *option, *value;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
@@ -3298,6 +3385,7 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
return WEECHAT_CONFIG_READ_FILE_NOT_FOUND;
|
||||
|
||||
config_file->version_read = 1;
|
||||
warning_update_displayed = 0;
|
||||
|
||||
/* build filename */
|
||||
filename_length = strlen (weechat_config_dir) + strlen (DIR_SEPARATOR) +
|
||||
@@ -3396,9 +3484,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
section = string_strndup (ptr_line + 1, pos - ptr_line - 1);
|
||||
if (section)
|
||||
{
|
||||
config_file_update_data_read (config_file,
|
||||
config_file_update_data_read (config_file, filename,
|
||||
section, NULL, NULL,
|
||||
§ion, NULL, NULL);
|
||||
§ion, NULL, NULL,
|
||||
&warning_update_displayed);
|
||||
ptr_section = config_file_search_section (config_file,
|
||||
section);
|
||||
if (!ptr_section)
|
||||
@@ -3480,6 +3569,11 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename, line_number,
|
||||
line);
|
||||
config_file_backup (filename);
|
||||
if (option)
|
||||
free (option);
|
||||
if (value)
|
||||
free (value);
|
||||
goto end_file;
|
||||
}
|
||||
else
|
||||
@@ -3496,6 +3590,11 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
filename,
|
||||
config_file->version_read,
|
||||
config_file->version);
|
||||
config_file_backup (filename);
|
||||
if (option)
|
||||
free (option);
|
||||
if (value)
|
||||
free (value);
|
||||
goto end_file;
|
||||
}
|
||||
}
|
||||
@@ -3513,9 +3612,10 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
goto end_line;
|
||||
}
|
||||
|
||||
config_file_update_data_read (config_file,
|
||||
config_file_update_data_read (config_file, filename,
|
||||
ptr_section->name, option, value,
|
||||
NULL, &option, &value);
|
||||
NULL, &option, &value,
|
||||
&warning_update_displayed);
|
||||
|
||||
/* option has been ignored by the update callback? */
|
||||
if (!option || !option[0])
|
||||
|
||||
+20
-10
@@ -2195,17 +2195,20 @@ config_weechat_custom_bar_item_read_cb (const void *pointer, void *data,
|
||||
if (!ptr_temp_item)
|
||||
{
|
||||
/* create new temporary custom bar item */
|
||||
ptr_temp_item = gui_bar_item_custom_alloc (item_name);
|
||||
if (ptr_temp_item)
|
||||
if (gui_bar_item_search_default (item_name) < 0)
|
||||
{
|
||||
/* add new custom bar item at the end */
|
||||
ptr_temp_item->prev_item = last_gui_temp_custom_bar_item;
|
||||
ptr_temp_item->next_item = NULL;
|
||||
if (last_gui_temp_custom_bar_item)
|
||||
last_gui_temp_custom_bar_item->next_item = ptr_temp_item;
|
||||
else
|
||||
gui_temp_custom_bar_items = ptr_temp_item;
|
||||
last_gui_temp_custom_bar_item = ptr_temp_item;
|
||||
ptr_temp_item = gui_bar_item_custom_alloc (item_name);
|
||||
if (ptr_temp_item)
|
||||
{
|
||||
/* add new custom bar item at the end */
|
||||
ptr_temp_item->prev_item = last_gui_temp_custom_bar_item;
|
||||
ptr_temp_item->next_item = NULL;
|
||||
if (last_gui_temp_custom_bar_item)
|
||||
last_gui_temp_custom_bar_item->next_item = ptr_temp_item;
|
||||
else
|
||||
gui_temp_custom_bar_items = ptr_temp_item;
|
||||
last_gui_temp_custom_bar_item = ptr_temp_item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2226,6 +2229,13 @@ config_weechat_custom_bar_item_read_cb (const void *pointer, void *data,
|
||||
section->name, option_name, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sUnable to add custom bar item \"%s\""),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
item_name);
|
||||
}
|
||||
|
||||
free (item_name);
|
||||
|
||||
|
||||
@@ -421,6 +421,10 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
|
||||
int rc, offset, length;
|
||||
unsigned long bin_code;
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
/* Big endian does not need to swap bytes here! */
|
||||
moving_factor_swapped = moving_factor;
|
||||
#else
|
||||
moving_factor_swapped = (moving_factor >> 56)
|
||||
| ((moving_factor << 40) & 0x00FF000000000000)
|
||||
| ((moving_factor << 24) & 0x0000FF0000000000)
|
||||
@@ -429,6 +433,7 @@ weecrypto_totp_generate_internal (const char *secret, int length_secret,
|
||||
| ((moving_factor >> 24) & 0x0000000000FF0000)
|
||||
| ((moving_factor >> 40) & 0x000000000000FF00)
|
||||
| (moving_factor << 56);
|
||||
#endif
|
||||
|
||||
rc = weecrypto_hmac (secret, length_secret,
|
||||
&moving_factor_swapped, sizeof (moving_factor_swapped),
|
||||
|
||||
+16
-5
@@ -440,6 +440,9 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
*runtime_dir = NULL;
|
||||
|
||||
ptr_home = getenv ("HOME");
|
||||
if (!ptr_home)
|
||||
goto error_home;
|
||||
|
||||
xdg_config_home = getenv ("XDG_CONFIG_HOME");
|
||||
xdg_data_home = getenv ("XDG_DATA_HOME");
|
||||
xdg_cache_home = getenv ("XDG_CACHE_HOME");
|
||||
@@ -460,7 +463,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
}
|
||||
*config_dir = strdup (path);
|
||||
if (!*config_dir)
|
||||
goto error;
|
||||
goto error_memory;
|
||||
|
||||
/* set data dir: $XDG_DATA_HOME/weechat or $HOME/.local/share/weechat */
|
||||
if (xdg_data_home && xdg_data_home[0])
|
||||
@@ -478,7 +481,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
}
|
||||
*data_dir = strdup (path);
|
||||
if (!*data_dir)
|
||||
goto error;
|
||||
goto error_memory;
|
||||
|
||||
/* set cache dir: $XDG_CACHE_HOME/weechat or $HOME/.cache/weechat */
|
||||
if (xdg_cache_home && xdg_cache_home[0])
|
||||
@@ -495,7 +498,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
}
|
||||
*cache_dir = strdup (path);
|
||||
if (!*cache_dir)
|
||||
goto error;
|
||||
goto error_memory;
|
||||
|
||||
/* set runtime dir: $XDG_RUNTIME_DIR/weechat or same as cache dir */
|
||||
if (xdg_runtime_dir && xdg_runtime_dir[0])
|
||||
@@ -510,10 +513,19 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
*runtime_dir = strdup (*cache_dir);
|
||||
}
|
||||
if (!*runtime_dir)
|
||||
goto error;
|
||||
goto error_memory;
|
||||
|
||||
return 1;
|
||||
|
||||
error_home:
|
||||
string_fprintf (stderr,
|
||||
_("Error: environment variable \"HOME\" is not defined\n"));
|
||||
goto error;
|
||||
|
||||
error_memory:
|
||||
string_fprintf (stderr, _("Error: not enough memory\n"));
|
||||
goto error;
|
||||
|
||||
error:
|
||||
if (*config_dir)
|
||||
{
|
||||
@@ -535,7 +547,6 @@ error:
|
||||
free (*runtime_dir);
|
||||
*runtime_dir = NULL;
|
||||
}
|
||||
string_fprintf (stderr, _("Error: not enough memory\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+9
-4
@@ -602,10 +602,13 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
free (default_value);
|
||||
}
|
||||
|
||||
string_fprintf (
|
||||
file,
|
||||
"// end::%s_options[]\n",
|
||||
old_config->name);
|
||||
if (old_config)
|
||||
{
|
||||
string_fprintf (
|
||||
file,
|
||||
"// end::%s_options[]\n",
|
||||
old_config->name);
|
||||
}
|
||||
|
||||
arraylist_free (list_options);
|
||||
|
||||
@@ -1662,9 +1665,11 @@ doc_generate (const char *path)
|
||||
* (this is used to generate documentation without installing WeeChat,
|
||||
* that means no need to run `make install`)
|
||||
*/
|
||||
#ifdef ENABLE_NLS
|
||||
localedir = getenv ("WEECHAT_DOCGEN_LOCALEDIR");
|
||||
if (localedir && localedir[0])
|
||||
bindtextdomain (PACKAGE, localedir);
|
||||
#endif /* ENABLE_NLS */
|
||||
|
||||
for (i = 0; locales[i]; i++)
|
||||
{
|
||||
|
||||
@@ -413,6 +413,7 @@ eval_string_cut (const char *text, int screen)
|
||||
if (!tmp)
|
||||
return strdup ("");
|
||||
|
||||
error = NULL;
|
||||
number = strtol (tmp, &error, 10);
|
||||
if (!error || error[0] || (number < 0))
|
||||
{
|
||||
@@ -453,6 +454,7 @@ eval_string_repeat (const char *text)
|
||||
if (!tmp)
|
||||
return strdup ("");
|
||||
|
||||
error = NULL;
|
||||
number = strtol (tmp, &error, 10);
|
||||
if (!error || error[0] || (number < 0))
|
||||
{
|
||||
@@ -538,6 +540,7 @@ eval_string_split (const char *text)
|
||||
}
|
||||
else
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (str_number, &error, 10);
|
||||
if (!error || error[0] || (number == 0))
|
||||
goto end;
|
||||
@@ -578,6 +581,7 @@ eval_string_split (const char *text)
|
||||
}
|
||||
else if (strncmp (list_flags[i], "max_items=", 10) == 0)
|
||||
{
|
||||
error = NULL;
|
||||
max_items = strtol (list_flags[i] + 10, &error, 10);
|
||||
if (!error || error[0] || (max_items < 0))
|
||||
goto end;
|
||||
@@ -686,6 +690,7 @@ eval_string_split_shell (const char *text)
|
||||
}
|
||||
else
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (str_number, &error, 10);
|
||||
if (!error || error[0] || (number == 0))
|
||||
goto end;
|
||||
@@ -766,6 +771,7 @@ eval_string_regex_group (const char *text, struct t_eval_context *eval_context)
|
||||
}
|
||||
else
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (text, &error, 10);
|
||||
if (!error || error[0])
|
||||
number = -1;
|
||||
@@ -897,6 +903,7 @@ eval_string_base_encode (const char *text)
|
||||
if (!base)
|
||||
goto end;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (base, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
@@ -946,6 +953,7 @@ eval_string_base_decode (const char *text)
|
||||
if (!base)
|
||||
goto end;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (base, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
@@ -1087,6 +1095,7 @@ eval_string_random (const char *text)
|
||||
tmp = string_strndup (text, pos - text);
|
||||
if (!tmp)
|
||||
goto error;
|
||||
error = NULL;
|
||||
min_number = strtoll (tmp, &error, 10);
|
||||
if (!error || error[0])
|
||||
{
|
||||
@@ -1095,6 +1104,7 @@ eval_string_random (const char *text)
|
||||
}
|
||||
free (tmp);
|
||||
|
||||
error = NULL;
|
||||
max_number = strtoll (pos + 1, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto error;
|
||||
@@ -2618,6 +2628,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
ptr_value = hashtable_get (options, "debug");
|
||||
if (ptr_value && ptr_value[0])
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (ptr_value, &error, 10);
|
||||
if (error && !error[0] && (number >= 1))
|
||||
{
|
||||
|
||||
@@ -3279,6 +3279,7 @@ string_parse_size (const char *size)
|
||||
if (!str_number)
|
||||
goto end;
|
||||
|
||||
error = NULL;
|
||||
number = strtoll (str_number, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
|
||||
+1
-5
@@ -33,11 +33,7 @@
|
||||
#include <locale.h>
|
||||
|
||||
#if defined(ENABLE_NLS) && !defined(_)
|
||||
#ifdef HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#else
|
||||
#include "../../intl/libintl.h"
|
||||
#endif /* HAVE_LIBINTL_H */
|
||||
#include <libintl.h>
|
||||
#define _(string) gettext(string)
|
||||
#define NG_(single,plural,number) ngettext(single,plural,number)
|
||||
#ifdef gettext_noop
|
||||
|
||||
@@ -643,6 +643,8 @@ gui_chat_display_word (struct t_gui_window *window,
|
||||
nick_offline);
|
||||
}
|
||||
ptr_data[pos_saved_char] = saved_char;
|
||||
if (pos_saved_char == 0)
|
||||
break;
|
||||
ptr_data += pos_saved_char;
|
||||
}
|
||||
else
|
||||
@@ -664,6 +666,8 @@ gui_chat_display_word (struct t_gui_window *window,
|
||||
apply_style_inactive,
|
||||
nick_offline);
|
||||
}
|
||||
if (!ptr_data[0])
|
||||
break;
|
||||
ptr_data += strlen (ptr_data);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,8 @@ char *gui_mouse_button_codes[][2] =
|
||||
{ "*", "alt-button2" },
|
||||
{ ")", "alt-button3" },
|
||||
{ "8", "alt-ctrl-button1" },
|
||||
{ ":", "alt-ctrl-button2" },
|
||||
{ "9", "alt-ctrl-button3" },
|
||||
{ NULL, NULL } };
|
||||
|
||||
|
||||
|
||||
@@ -439,31 +439,46 @@ gui_bar_item_custom_new (const char *name, const char *conditions,
|
||||
if (gui_bar_item_custom_search (name))
|
||||
return NULL;
|
||||
|
||||
if (gui_bar_item_search_default (name) >= 0)
|
||||
return NULL;
|
||||
|
||||
option_conditions = NULL;
|
||||
option_content = NULL;
|
||||
new_bar_item_custom = NULL;
|
||||
|
||||
option_conditions = gui_bar_item_custom_create_option (
|
||||
name,
|
||||
GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS,
|
||||
conditions);
|
||||
if (!option_conditions)
|
||||
return NULL;
|
||||
goto error;
|
||||
|
||||
option_content = gui_bar_item_custom_create_option (
|
||||
name,
|
||||
GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT,
|
||||
content);
|
||||
if (!option_content)
|
||||
{
|
||||
config_file_option_free (option_conditions, 0);
|
||||
return NULL;
|
||||
}
|
||||
goto error;
|
||||
|
||||
new_bar_item_custom = gui_bar_item_custom_new_with_options (
|
||||
name,
|
||||
option_conditions,
|
||||
option_content);
|
||||
if (!new_bar_item_custom)
|
||||
goto error;
|
||||
|
||||
gui_bar_item_custom_create_bar_item (new_bar_item_custom);
|
||||
if (!new_bar_item_custom->bar_item)
|
||||
goto error;
|
||||
|
||||
gui_bar_item_update (name);
|
||||
|
||||
return new_bar_item_custom;
|
||||
|
||||
error:
|
||||
if (new_bar_item_custom)
|
||||
{
|
||||
gui_bar_item_custom_create_bar_item (new_bar_item_custom);
|
||||
gui_bar_item_update (name);
|
||||
gui_bar_item_custom_free (new_bar_item_custom);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -472,8 +487,7 @@ gui_bar_item_custom_new (const char *name, const char *conditions,
|
||||
if (option_content)
|
||||
config_file_option_free (option_content, 0);
|
||||
}
|
||||
|
||||
return new_bar_item_custom;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -483,12 +497,13 @@ gui_bar_item_custom_new (const char *name, const char *conditions,
|
||||
void
|
||||
gui_bar_item_custom_use_temp_items ()
|
||||
{
|
||||
struct t_gui_bar_item_custom *ptr_temp_item;
|
||||
struct t_gui_bar_item_custom *ptr_temp_item, *ptr_next_temp_item;
|
||||
int i;
|
||||
|
||||
for (ptr_temp_item = gui_temp_custom_bar_items; ptr_temp_item;
|
||||
ptr_temp_item = ptr_temp_item->next_item)
|
||||
ptr_temp_item = gui_temp_custom_bar_items;
|
||||
while (ptr_temp_item)
|
||||
{
|
||||
ptr_next_temp_item = ptr_temp_item->next_item;
|
||||
for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++)
|
||||
{
|
||||
if (!ptr_temp_item->options[i])
|
||||
@@ -500,6 +515,20 @@ gui_bar_item_custom_use_temp_items ()
|
||||
}
|
||||
}
|
||||
gui_bar_item_custom_create_bar_item (ptr_temp_item);
|
||||
if (!ptr_temp_item->bar_item)
|
||||
{
|
||||
if (ptr_temp_item->prev_item)
|
||||
(ptr_temp_item->prev_item)->next_item = ptr_temp_item->next_item;
|
||||
if (ptr_temp_item->next_item)
|
||||
(ptr_temp_item->next_item)->prev_item = ptr_temp_item->prev_item;
|
||||
if (gui_temp_custom_bar_items == ptr_temp_item)
|
||||
gui_temp_custom_bar_items = ptr_temp_item->next_item;
|
||||
if (last_gui_temp_custom_bar_item == ptr_temp_item)
|
||||
last_gui_temp_custom_bar_item = ptr_temp_item->prev_item;
|
||||
gui_bar_item_custom_free_data (ptr_temp_item);
|
||||
free (ptr_temp_item);
|
||||
}
|
||||
ptr_temp_item = ptr_next_temp_item;
|
||||
}
|
||||
|
||||
/* remove any existing custom bar item */
|
||||
@@ -534,6 +563,9 @@ gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
|
||||
if (gui_bar_item_custom_search (new_name))
|
||||
return 0;
|
||||
|
||||
if (gui_bar_item_search_default (new_name) >= 0)
|
||||
return 0;
|
||||
|
||||
old_name = strdup (item->name);
|
||||
if (!old_name)
|
||||
return 0;
|
||||
@@ -570,6 +602,24 @@ gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Frees data in a custom bar item.*
|
||||
*/
|
||||
|
||||
void
|
||||
gui_bar_item_custom_free_data (struct t_gui_bar_item_custom *item)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (item->name)
|
||||
free (item->name);
|
||||
for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++)
|
||||
{
|
||||
if (item->options[i])
|
||||
config_file_option_free (item->options[i], 1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Deletes a custom bar item.
|
||||
*/
|
||||
@@ -578,7 +628,6 @@ void
|
||||
gui_bar_item_custom_free (struct t_gui_bar_item_custom *item)
|
||||
{
|
||||
char *name;
|
||||
int i;
|
||||
|
||||
if (!item)
|
||||
return;
|
||||
@@ -599,13 +648,7 @@ gui_bar_item_custom_free (struct t_gui_bar_item_custom *item)
|
||||
last_gui_custom_bar_item = item->prev_item;
|
||||
|
||||
/* free data */
|
||||
if (item->name)
|
||||
free (item->name);
|
||||
for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++)
|
||||
{
|
||||
if (item->options[i])
|
||||
config_file_option_free (item->options[i], 1);
|
||||
}
|
||||
gui_bar_item_custom_free_data (item);
|
||||
|
||||
free (item);
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ extern struct t_gui_bar_item_custom *gui_bar_item_custom_new (const char *name,
|
||||
extern void gui_bar_item_custom_use_temp_items ();
|
||||
extern int gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
|
||||
const char *new_name);
|
||||
extern void gui_bar_item_custom_free_data (struct t_gui_bar_item_custom *item);
|
||||
extern void gui_bar_item_custom_free (struct t_gui_bar_item_custom *item);
|
||||
extern void gui_bar_item_custom_free_all ();
|
||||
|
||||
|
||||
@@ -97,6 +97,30 @@ gui_bar_item_valid (struct t_gui_bar_item *bar_item)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Searches for a default bar item by name.
|
||||
*
|
||||
* Returns index in gui_bar_item_names[], -1 if not found.
|
||||
*/
|
||||
|
||||
int
|
||||
gui_bar_item_search_default (const char *item_name)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!item_name || !item_name[0])
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < GUI_BAR_NUM_ITEMS; i++)
|
||||
{
|
||||
if (strcmp (gui_bar_item_names[i], item_name) == 0)
|
||||
return i;
|
||||
}
|
||||
|
||||
/* default bar item not found */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Searches for a bar item by name.
|
||||
*/
|
||||
|
||||
@@ -89,6 +89,7 @@ extern char *gui_bar_item_names[];
|
||||
/* functions */
|
||||
|
||||
extern int gui_bar_item_valid (struct t_gui_bar_item *bar_item);
|
||||
extern int gui_bar_item_search_default (const char *item_name);
|
||||
extern struct t_gui_bar_item *gui_bar_item_search (const char *name);
|
||||
extern int gui_bar_item_used_in_bar (struct t_gui_bar *bar,
|
||||
const char *item_name,
|
||||
|
||||
@@ -2145,6 +2145,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
|
||||
else if (argument[0] == '-')
|
||||
{
|
||||
/* move the unread marker N lines towards the first line */
|
||||
error = NULL;
|
||||
number = strtol (argument, &error, 10);
|
||||
if (error && !error[0] && (number < 0))
|
||||
{
|
||||
@@ -2172,6 +2173,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
|
||||
else if (argument[0] == '+')
|
||||
{
|
||||
/* move the unread marker N lines towards the last line */
|
||||
error = NULL;
|
||||
number = strtol (argument, &error, 10);
|
||||
if (error && !error[0] && (number > 0))
|
||||
{
|
||||
@@ -2197,6 +2199,7 @@ gui_buffer_set_unread (struct t_gui_buffer *buffer, const char *argument)
|
||||
else
|
||||
{
|
||||
/* move the unread marker N lines from the end towards the first line */
|
||||
error = NULL;
|
||||
number = strtol (argument, &error, 10);
|
||||
if (error && !error[0] && (number > 0))
|
||||
{
|
||||
@@ -2885,6 +2888,7 @@ gui_buffer_search_by_number_or_name (const char *string)
|
||||
|
||||
ptr_buffer = NULL;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (string, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
|
||||
@@ -597,6 +597,9 @@ gui_chat_printf_date_tags_internal (struct t_gui_buffer *buffer,
|
||||
char *modifier_data, *string, *new_string, *pos_newline;
|
||||
struct t_gui_line *new_line;
|
||||
|
||||
if (!buffer)
|
||||
return;
|
||||
|
||||
new_line = NULL;
|
||||
string = NULL;
|
||||
modifier_data = NULL;
|
||||
@@ -1076,6 +1079,7 @@ gui_chat_hsignal_quote_line_cb (const void *pointer, void *data,
|
||||
hashtable_get (hashtable, "_chat_line_date") : NULL;
|
||||
if (date)
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (date, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
|
||||
@@ -363,7 +363,7 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
|
||||
{
|
||||
struct t_gui_filter *new_filter;
|
||||
regex_t *regex1, *regex2;
|
||||
char *pos_tab, *regex_prefix, buf[512], str_error[512];
|
||||
char *pos_tab, *regex_prefix, buf[512], str_error[1024];
|
||||
const char *ptr_start_regex, *pos_regex_message;
|
||||
int rc;
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ gui_history_buffer_add (struct t_gui_buffer *buffer, const char *string)
|
||||
free (buffer->last_history->text);
|
||||
free (buffer->last_history);
|
||||
buffer->last_history = ptr_history;
|
||||
buffer->num_history++;
|
||||
buffer->num_history--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -75,8 +75,8 @@ char *gui_key_modifier_list[] =
|
||||
{ "meta-", "ctrl-", "shift-", NULL };
|
||||
|
||||
char *gui_key_alias_list[] =
|
||||
{ "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11",
|
||||
"f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
|
||||
{ "f10", "f11", "f12", "f13", "f14", "f15", "f16", "f17", "f18", "f19", "f20",
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9",
|
||||
"home", "insert", "delete", "end", "backspace", "pgup", "pgdn",
|
||||
"up", "down", "right", "left", "tab", "return", "comma", "space", NULL };
|
||||
|
||||
|
||||
@@ -753,6 +753,7 @@ buflist_bar_item_end ()
|
||||
for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++)
|
||||
{
|
||||
weechat_bar_item_remove (buflist_bar_item_buflist[i]);
|
||||
buflist_bar_item_buflist[i] = NULL;
|
||||
}
|
||||
|
||||
weechat_hashtable_free (buflist_hashtable_pointers);
|
||||
|
||||
@@ -842,6 +842,7 @@ buflist_config_free ()
|
||||
int i;
|
||||
|
||||
weechat_config_free (buflist_config_file);
|
||||
buflist_config_file = NULL;
|
||||
|
||||
if (buflist_config_signals_refresh)
|
||||
buflist_config_free_signals_refresh ();
|
||||
@@ -857,9 +858,18 @@ buflist_config_free ()
|
||||
}
|
||||
|
||||
if (buflist_config_format_buffer_eval)
|
||||
{
|
||||
free (buflist_config_format_buffer_eval);
|
||||
buflist_config_format_buffer_eval = NULL;
|
||||
}
|
||||
if (buflist_config_format_buffer_current_eval)
|
||||
{
|
||||
free (buflist_config_format_buffer_current_eval);
|
||||
buflist_config_format_buffer_current_eval = NULL;
|
||||
}
|
||||
if (buflist_config_format_hotlist_eval)
|
||||
{
|
||||
free (buflist_config_format_hotlist_eval);
|
||||
buflist_config_format_hotlist_eval = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ buflist_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
|
||||
ptr_bar_item_line = weechat_hashtable_get (info, "_bar_item_line");
|
||||
if (!ptr_bar_item_line)
|
||||
goto end;
|
||||
error = NULL;
|
||||
item_line = strtol (ptr_bar_item_line, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
@@ -250,9 +251,11 @@ buflist_hsignal_cb (const void *pointer, void *data, const char *signal,
|
||||
return WEECHAT_RC_OK;
|
||||
ptr_buffer = (struct t_gui_buffer *)value;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (ptr_number, &error, 10);
|
||||
if (!error || error[0])
|
||||
return WEECHAT_RC_OK;
|
||||
error = NULL;
|
||||
number2 = strtol (ptr_number2, &error, 10);
|
||||
if (!error || error[0])
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
@@ -532,5 +532,12 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
buflist_config_write ();
|
||||
buflist_config_free ();
|
||||
|
||||
buflist_hdata_window = NULL;
|
||||
buflist_hdata_buffer = NULL;
|
||||
buflist_hdata_hotlist = NULL;
|
||||
buflist_hdata_bar = NULL;
|
||||
buflist_hdata_bar_item = NULL;
|
||||
buflist_hdata_bar_window = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -637,11 +637,18 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
charset_config_write ();
|
||||
|
||||
weechat_config_free (charset_config_file);
|
||||
charset_config_file = NULL;
|
||||
|
||||
if (charset_terminal)
|
||||
{
|
||||
free (charset_terminal);
|
||||
charset_terminal = NULL;
|
||||
}
|
||||
if (charset_internal)
|
||||
{
|
||||
free (charset_internal);
|
||||
charset_internal = NULL;
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -206,6 +206,7 @@ void
|
||||
exec_config_free ()
|
||||
{
|
||||
weechat_config_free (exec_config_file);
|
||||
exec_config_file = NULL;
|
||||
|
||||
if (exec_config_cmd_options)
|
||||
{
|
||||
|
||||
@@ -157,4 +157,5 @@ void
|
||||
fifo_config_free ()
|
||||
{
|
||||
weechat_config_free (fifo_config_file);
|
||||
fifo_config_file = NULL;
|
||||
}
|
||||
|
||||
@@ -367,6 +367,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_plugin = plugin;
|
||||
|
||||
fifo_quiet = 0;
|
||||
fifo_fd = -1;
|
||||
|
||||
if (!fifo_config_init ())
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
|
||||
@@ -241,4 +241,5 @@ void
|
||||
fset_bar_item_end ()
|
||||
{
|
||||
weechat_bar_item_remove (fset_bar_item_fset);
|
||||
fset_bar_item_fset = NULL;
|
||||
}
|
||||
|
||||
@@ -1626,9 +1626,21 @@ fset_buffer_init ()
|
||||
void
|
||||
fset_buffer_end ()
|
||||
{
|
||||
weechat_hashtable_free (fset_buffer_hashtable_pointers);
|
||||
fset_buffer_hashtable_pointers = NULL;
|
||||
if (fset_buffer)
|
||||
{
|
||||
weechat_buffer_close (fset_buffer);
|
||||
fset_buffer = NULL;
|
||||
}
|
||||
|
||||
weechat_hashtable_free (fset_buffer_hashtable_extra_vars);
|
||||
fset_buffer_hashtable_extra_vars = NULL;
|
||||
if (fset_buffer_hashtable_pointers)
|
||||
{
|
||||
weechat_hashtable_free (fset_buffer_hashtable_pointers);
|
||||
fset_buffer_hashtable_pointers = NULL;
|
||||
}
|
||||
|
||||
if (fset_buffer_hashtable_extra_vars)
|
||||
{
|
||||
weechat_hashtable_free (fset_buffer_hashtable_extra_vars);
|
||||
fset_buffer_hashtable_extra_vars = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1169,6 +1169,7 @@ void
|
||||
fset_config_free ()
|
||||
{
|
||||
weechat_config_free (fset_config_file);
|
||||
fset_config_file = NULL;
|
||||
|
||||
if (fset_config_auto_refresh)
|
||||
{
|
||||
|
||||
@@ -1878,4 +1878,9 @@ fset_option_end ()
|
||||
weechat_hashtable_free (fset_option_timer_options_changed);
|
||||
fset_option_timer_options_changed = NULL;
|
||||
}
|
||||
if (fset_option_timer_hook)
|
||||
{
|
||||
weechat_unhook (fset_option_timer_hook);
|
||||
fset_option_timer_hook = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -876,7 +876,7 @@ weechat_guile_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load guile script */
|
||||
path_script = plugin_script_search_path (weechat_guile_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_guile_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1258,6 +1258,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_guile_plugin = plugin;
|
||||
|
||||
guile_quiet = 0;
|
||||
guile_eval_mode = 0;
|
||||
guile_eval_send_input = 0;
|
||||
guile_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1354,12 +1359,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (guile_action_install_list)
|
||||
{
|
||||
free (guile_action_install_list);
|
||||
guile_action_install_list = NULL;
|
||||
}
|
||||
if (guile_action_remove_list)
|
||||
{
|
||||
free (guile_action_remove_list);
|
||||
guile_action_remove_list = NULL;
|
||||
}
|
||||
if (guile_action_autoload_list)
|
||||
{
|
||||
free (guile_action_autoload_list);
|
||||
guile_action_autoload_list = NULL;
|
||||
}
|
||||
weechat_string_dyn_free (guile_buffer_output, 1);
|
||||
guile_buffer_output = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -2907,11 +2907,13 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
|
||||
pos_keys++;
|
||||
}
|
||||
if (pos_keys[0])
|
||||
{
|
||||
keys = weechat_string_split (pos_keys, ",", NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
0, &num_keys);
|
||||
}
|
||||
}
|
||||
else
|
||||
new_args = strdup (arguments);
|
||||
@@ -3025,6 +3027,9 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
|
||||
}
|
||||
weechat_string_free_split (channels);
|
||||
}
|
||||
|
||||
if (keys)
|
||||
weechat_string_free_split (keys);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7076,7 +7081,7 @@ irc_command_init ()
|
||||
" /ignore add toto*@*.domain.com libera #weechat"),
|
||||
"list"
|
||||
" || add %(irc_channel_nicks_hosts) %(irc_servers) %(irc_channels) %-"
|
||||
" || del -all|%(irc_ignores_numbers) %-",
|
||||
" || del %(irc_ignores_numbers)|-all %-",
|
||||
&irc_command_ignore, NULL, NULL);
|
||||
weechat_hook_command (
|
||||
"info",
|
||||
|
||||
@@ -103,6 +103,7 @@ struct t_config_option *irc_config_look_notice_welcome_redirect = NULL;
|
||||
struct t_config_option *irc_config_look_notice_welcome_tags = NULL;
|
||||
struct t_config_option *irc_config_look_notify_tags_ison = NULL;
|
||||
struct t_config_option *irc_config_look_notify_tags_whois = NULL;
|
||||
struct t_config_option *irc_config_look_open_pv_buffer_echo_msg = NULL;
|
||||
struct t_config_option *irc_config_look_part_closes_buffer = NULL;
|
||||
struct t_config_option *irc_config_look_pv_buffer = NULL;
|
||||
struct t_config_option *irc_config_look_pv_tags = NULL;
|
||||
@@ -3266,6 +3267,13 @@ irc_config_init ()
|
||||
"\"notify_highlight\""),
|
||||
NULL, 0, 0, "notify_message", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_look_open_pv_buffer_echo_msg = weechat_config_new_option (
|
||||
irc_config_file, irc_config_section_look,
|
||||
"open_pv_buffer_echo_msg", "boolean",
|
||||
N_("open a private buffer on self message when capability "
|
||||
"echo-message is enabled"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
irc_config_look_part_closes_buffer = weechat_config_new_option (
|
||||
irc_config_file, irc_config_section_look,
|
||||
"part_closes_buffer", "boolean",
|
||||
@@ -3849,6 +3857,7 @@ void
|
||||
irc_config_free ()
|
||||
{
|
||||
weechat_config_free (irc_config_file);
|
||||
irc_config_file = NULL;
|
||||
|
||||
if (irc_config_hook_config_nick_color_options)
|
||||
{
|
||||
|
||||
@@ -139,6 +139,7 @@ extern struct t_config_option *irc_config_look_notice_welcome_redirect;
|
||||
extern struct t_config_option *irc_config_look_notice_welcome_tags;
|
||||
extern struct t_config_option *irc_config_look_notify_tags_ison;
|
||||
extern struct t_config_option *irc_config_look_notify_tags_whois;
|
||||
extern struct t_config_option *irc_config_look_open_pv_buffer_echo_msg;
|
||||
extern struct t_config_option *irc_config_look_part_closes_buffer;
|
||||
extern struct t_config_option *irc_config_look_pv_buffer;
|
||||
extern struct t_config_option *irc_config_look_pv_tags;
|
||||
|
||||
@@ -343,6 +343,9 @@ irc_info_info_irc_server_isupport_cb (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) info_name;
|
||||
|
||||
if (!arguments || !arguments[0])
|
||||
return NULL;
|
||||
|
||||
isupport_value = NULL;
|
||||
pos_comma = strchr (arguments, ',');
|
||||
if (pos_comma)
|
||||
@@ -381,6 +384,9 @@ irc_info_info_irc_server_isupport_value_cb (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) info_name;
|
||||
|
||||
if (!arguments || !arguments[0])
|
||||
return NULL;
|
||||
|
||||
isupport_value = NULL;
|
||||
pos_comma = strchr (arguments, ',');
|
||||
if (pos_comma)
|
||||
@@ -419,6 +425,9 @@ irc_info_info_irc_server_cap_cb (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) info_name;
|
||||
|
||||
if (!arguments || !arguments[0])
|
||||
return NULL;
|
||||
|
||||
has_cap = 0;
|
||||
pos_comma = strchr (arguments, ',');
|
||||
if (pos_comma)
|
||||
@@ -457,6 +466,9 @@ irc_info_info_irc_server_cap_value_cb (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) info_name;
|
||||
|
||||
if (!arguments || !arguments[0])
|
||||
return NULL;
|
||||
|
||||
cap_value = NULL;
|
||||
pos_comma = strchr (arguments, ',');
|
||||
if (pos_comma)
|
||||
@@ -1261,7 +1273,7 @@ irc_info_init ()
|
||||
"irc_is_message_ignored",
|
||||
N_("1 if the nick is ignored (message is not displayed)"),
|
||||
N_("server,message (message is the raw IRC message)"),
|
||||
&irc_info_info_irc_is_channel_cb, NULL, NULL);
|
||||
&irc_info_info_irc_is_message_ignored_cb, NULL, NULL);
|
||||
|
||||
/* info_hashtable hooks */
|
||||
weechat_hook_info_hashtable (
|
||||
|
||||
@@ -625,6 +625,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
|
||||
ptr_value = (const char *)weechat_hashtable_get (values, "max-bytes");
|
||||
if (ptr_value)
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (ptr_value, &error, 10);
|
||||
if (error && !error[0])
|
||||
server->multiline_max_bytes = number;
|
||||
@@ -633,6 +634,7 @@ irc_message_parse_cap_multiline_value (struct t_irc_server *server,
|
||||
ptr_value = (const char *)weechat_hashtable_get (values, "max-lines");
|
||||
if (ptr_value)
|
||||
{
|
||||
error = NULL;
|
||||
number = strtol (ptr_value, &error, 10);
|
||||
if (error && !error[0])
|
||||
server->multiline_max_lines = number;
|
||||
@@ -1053,9 +1055,6 @@ irc_message_split_string (struct t_irc_message_split_context *context,
|
||||
if (suffix)
|
||||
max_length -= strlen (suffix);
|
||||
|
||||
if (max_length < 2)
|
||||
return 0;
|
||||
|
||||
/* debug message */
|
||||
if (weechat_irc_plugin->debug >= 2)
|
||||
{
|
||||
@@ -1067,17 +1066,23 @@ irc_message_split_string (struct t_irc_message_split_context *context,
|
||||
max_length);
|
||||
}
|
||||
|
||||
if (!arguments || !arguments[0])
|
||||
if ((max_length < 2) || !arguments || !arguments[0])
|
||||
{
|
||||
snprintf (message, sizeof (message), "%s%s%s %s%s%s%s",
|
||||
/*
|
||||
* max length is not known (server probably sent values that are not
|
||||
* consistent), or no arguments => in this case, we just return message
|
||||
* as-is (no split)
|
||||
*/
|
||||
snprintf (message, sizeof (message), "%s%s%s %s%s%s%s%s",
|
||||
(host) ? host : "",
|
||||
(host) ? " " : "",
|
||||
command,
|
||||
(target) ? target : "",
|
||||
(target && target[0]) ? " " : "",
|
||||
(prefix) ? prefix : "",
|
||||
(arguments) ? arguments : "",
|
||||
(suffix) ? suffix : "");
|
||||
irc_message_split_add (context, tags, message, "");
|
||||
irc_message_split_add (context, tags, message, (arguments) ? arguments : "");
|
||||
(context->number)++;
|
||||
return 1;
|
||||
}
|
||||
@@ -1678,8 +1683,9 @@ irc_message_split (struct t_irc_server *server, const char *message)
|
||||
}
|
||||
|
||||
multiline = (
|
||||
((weechat_strcasecmp (command, "privmsg") == 0)
|
||||
|| (weechat_strcasecmp (command, "notice") == 0))
|
||||
server
|
||||
&& ((weechat_strcasecmp (command, "privmsg") == 0)
|
||||
|| (weechat_strcasecmp (command, "notice") == 0))
|
||||
&& message
|
||||
&& strchr (message, '\n')
|
||||
&& (index_args + 1 <= argc - 1)
|
||||
|
||||
@@ -1288,9 +1288,18 @@ void
|
||||
irc_notify_end ()
|
||||
{
|
||||
if (irc_notify_timer_ison)
|
||||
{
|
||||
weechat_unhook (irc_notify_timer_ison);
|
||||
irc_notify_timer_ison = NULL;
|
||||
}
|
||||
if (irc_notify_timer_whois)
|
||||
{
|
||||
weechat_unhook (irc_notify_timer_whois);
|
||||
irc_notify_timer_whois = NULL;
|
||||
}
|
||||
if (irc_notify_hsignal)
|
||||
{
|
||||
weechat_unhook (irc_notify_hsignal);
|
||||
irc_notify_hsignal = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,6 +341,7 @@ irc_protocol_parse_time (const char *time)
|
||||
pos = strchr (time2, ',');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
error = NULL;
|
||||
value = strtol (time2, &error, 10);
|
||||
if (error && !error[0] && (value >= 0))
|
||||
time_value = (int)value;
|
||||
@@ -3077,6 +3078,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
pos_target++;
|
||||
}
|
||||
|
||||
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
|
||||
"echo-message");
|
||||
|
||||
/* receiver is a channel ? */
|
||||
if (is_channel)
|
||||
{
|
||||
@@ -3200,8 +3204,6 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
/* CTCP to user */
|
||||
if (msg_args[0] == '\01')
|
||||
{
|
||||
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
|
||||
"echo-message");
|
||||
msg_already_received = weechat_hashtable_has_key (
|
||||
server->echo_msg_recv, irc_message);
|
||||
if (!msg_already_received && cap_echo_message)
|
||||
@@ -3231,7 +3233,8 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
if (strcmp (ptr_channel->name, remote_nick) != 0)
|
||||
irc_channel_pv_rename (server, ptr_channel, remote_nick);
|
||||
}
|
||||
else
|
||||
else if (!nick_is_me || !cap_echo_message
|
||||
|| weechat_config_boolean (irc_config_look_open_pv_buffer_echo_msg))
|
||||
{
|
||||
ptr_channel = irc_channel_new (server,
|
||||
IRC_CHANNEL_TYPE_PRIVATE,
|
||||
@@ -3247,13 +3250,21 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
}
|
||||
}
|
||||
|
||||
if (weechat_config_boolean (irc_config_look_typing_status_nicks))
|
||||
if (ptr_channel
|
||||
&& weechat_config_boolean (irc_config_look_typing_status_nicks))
|
||||
{
|
||||
irc_typing_channel_set_nick (ptr_channel, nick,
|
||||
IRC_CHANNEL_TYPING_STATE_OFF);
|
||||
}
|
||||
|
||||
irc_channel_set_topic (ptr_channel, address);
|
||||
if (ptr_channel
|
||||
&& (!nick_is_me
|
||||
|| !cap_echo_message
|
||||
|| (irc_server_strcasecmp (server,
|
||||
server->nick, remote_nick) == 0)))
|
||||
{
|
||||
irc_channel_set_topic (ptr_channel, address);
|
||||
}
|
||||
|
||||
if (nick_is_me)
|
||||
{
|
||||
@@ -3296,20 +3307,35 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
||||
free (str_color);
|
||||
msg_args2 = (nick_is_me) ?
|
||||
irc_message_hide_password (server, remote_nick, msg_args) : NULL;
|
||||
weechat_printf_date_tags (
|
||||
ptr_channel->buffer,
|
||||
date,
|
||||
irc_protocol_tags (server, command, tags, str_tags, nick, address),
|
||||
"%s%s",
|
||||
irc_nick_as_prefix (
|
||||
server, NULL, nick,
|
||||
(nick_is_me) ?
|
||||
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick)),
|
||||
(msg_args2) ? msg_args2 : msg_args);
|
||||
if (nick_is_me && !ptr_channel)
|
||||
{
|
||||
irc_input_user_message_display (
|
||||
server,
|
||||
date,
|
||||
remote_nick,
|
||||
address,
|
||||
"privmsg",
|
||||
NULL, /* ctcp_type */
|
||||
(msg_args2) ? msg_args2 : msg_args,
|
||||
1); /* decode_colors */
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_printf_date_tags (
|
||||
ptr_channel->buffer,
|
||||
date,
|
||||
irc_protocol_tags (server, command, tags, str_tags, nick, address),
|
||||
"%s%s",
|
||||
irc_nick_as_prefix (
|
||||
server, NULL, nick,
|
||||
(nick_is_me) ?
|
||||
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick)),
|
||||
(msg_args2) ? msg_args2 : msg_args);
|
||||
}
|
||||
if (msg_args2)
|
||||
free (msg_args2);
|
||||
|
||||
if (ptr_channel->has_quit_server)
|
||||
if (ptr_channel && ptr_channel->has_quit_server)
|
||||
ptr_channel->has_quit_server = 0;
|
||||
|
||||
(void) weechat_hook_signal_send ("irc_pv",
|
||||
@@ -6249,7 +6275,7 @@ IRC_PROTOCOL_CALLBACK(353)
|
||||
free (prefixes);
|
||||
}
|
||||
|
||||
if (!ptr_channel)
|
||||
if (!ptr_channel && str_nicks)
|
||||
{
|
||||
weechat_printf_date_tags (
|
||||
irc_msgbuffer_get_target_buffer (
|
||||
@@ -7818,7 +7844,8 @@ irc_protocol_recv_command (struct t_irc_server *server,
|
||||
IRCB(331, 1, 0, 331), /* no topic for channel */
|
||||
IRCB(332, 0, 1, 332), /* topic of channel */
|
||||
IRCB(333, 1, 0, 333), /* topic info (nick/date) */
|
||||
IRCB(335, 1, 0, whois_nick_msg), /* is a bot on */
|
||||
IRCB(335, 1, 0, whois_nick_msg), /* whois (is a bot on) */
|
||||
IRCB(337, 1, 0, whois_nick_msg), /* whois (is hiding idle time) */
|
||||
IRCB(338, 1, 0, 338), /* whois (host) */
|
||||
IRCB(341, 1, 0, 341), /* inviting */
|
||||
IRCB(343, 1, 0, 330_343), /* is opered as */
|
||||
|
||||
@@ -673,6 +673,11 @@ irc_raw_end ()
|
||||
{
|
||||
irc_raw_message_free_all ();
|
||||
|
||||
if (irc_raw_buffer)
|
||||
{
|
||||
weechat_buffer_close (irc_raw_buffer);
|
||||
irc_raw_buffer = NULL;
|
||||
}
|
||||
if (irc_raw_filter)
|
||||
{
|
||||
free (irc_raw_filter);
|
||||
|
||||
@@ -462,6 +462,7 @@ irc_redirect_new_with_commands (struct t_irc_server *server,
|
||||
if (pos)
|
||||
{
|
||||
pos[0] = '\0';
|
||||
error = NULL;
|
||||
value = strtol (pos + 1, &error, 10);
|
||||
if (!error || error[0])
|
||||
value = -1;
|
||||
@@ -1309,6 +1310,7 @@ irc_redirect_pattern_hsignal_cb (const void *pointer, void *data,
|
||||
timeout = 0;
|
||||
if (str_timeout && str_timeout[0])
|
||||
{
|
||||
error = NULL;
|
||||
number = (int)strtol (str_timeout, &error, 10);
|
||||
if (error && !error[0])
|
||||
timeout = number;
|
||||
@@ -1379,6 +1381,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
|
||||
count = 1;
|
||||
if (str_count && str_count[0])
|
||||
{
|
||||
error = NULL;
|
||||
number = (int)strtol (str_count, &error, 10);
|
||||
if (error && !error[0])
|
||||
count = number;
|
||||
@@ -1387,6 +1390,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
|
||||
timeout = 0;
|
||||
if (str_timeout && str_timeout[0])
|
||||
{
|
||||
error = NULL;
|
||||
number = (int)strtol (str_timeout, &error, 10);
|
||||
if (error && !error[0])
|
||||
timeout = number;
|
||||
|
||||
@@ -131,6 +131,8 @@ char *irc_server_options[IRC_SERVER_NUM_OPTIONS][2] =
|
||||
|
||||
char *irc_server_casemapping_string[IRC_SERVER_NUM_CASEMAPPING] =
|
||||
{ "rfc1459", "strict-rfc1459", "ascii" };
|
||||
int irc_server_casemapping_range[IRC_SERVER_NUM_CASEMAPPING] =
|
||||
{ 30, 29, 26 };
|
||||
|
||||
char *irc_server_utf8mapping_string[IRC_SERVER_NUM_UTF8MAPPING] =
|
||||
{ "none", "rfc8265" };
|
||||
@@ -294,25 +296,15 @@ int
|
||||
irc_server_strcasecmp (struct t_irc_server *server,
|
||||
const char *string1, const char *string2)
|
||||
{
|
||||
int casemapping, rc;
|
||||
int casemapping, range;
|
||||
|
||||
casemapping = (server) ? server->casemapping : IRC_SERVER_CASEMAPPING_RFC1459;
|
||||
switch (casemapping)
|
||||
{
|
||||
case IRC_SERVER_CASEMAPPING_RFC1459:
|
||||
rc = weechat_strcasecmp_range (string1, string2, 30);
|
||||
break;
|
||||
case IRC_SERVER_CASEMAPPING_STRICT_RFC1459:
|
||||
rc = weechat_strcasecmp_range (string1, string2, 29);
|
||||
break;
|
||||
case IRC_SERVER_CASEMAPPING_ASCII:
|
||||
rc = weechat_strcasecmp (string1, string2);
|
||||
break;
|
||||
default:
|
||||
rc = weechat_strcasecmp_range (string1, string2, 30);
|
||||
break;
|
||||
}
|
||||
return rc;
|
||||
casemapping = (server) ? server->casemapping : -1;
|
||||
if ((casemapping < 0) || (casemapping >= IRC_SERVER_NUM_CASEMAPPING))
|
||||
casemapping = IRC_SERVER_CASEMAPPING_RFC1459;
|
||||
|
||||
range = irc_server_casemapping_range[casemapping];
|
||||
|
||||
return weechat_strcasecmp_range (string1, string2, range);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -329,25 +321,15 @@ int
|
||||
irc_server_strncasecmp (struct t_irc_server *server,
|
||||
const char *string1, const char *string2, int max)
|
||||
{
|
||||
int casemapping, rc;
|
||||
int casemapping, range;
|
||||
|
||||
casemapping = (server) ? server->casemapping : IRC_SERVER_CASEMAPPING_RFC1459;
|
||||
switch (casemapping)
|
||||
{
|
||||
case IRC_SERVER_CASEMAPPING_RFC1459:
|
||||
rc = weechat_strncasecmp_range (string1, string2, max, 30);
|
||||
break;
|
||||
case IRC_SERVER_CASEMAPPING_STRICT_RFC1459:
|
||||
rc = weechat_strncasecmp_range (string1, string2, max, 29);
|
||||
break;
|
||||
case IRC_SERVER_CASEMAPPING_ASCII:
|
||||
rc = weechat_strncasecmp (string1, string2, max);
|
||||
break;
|
||||
default:
|
||||
rc = weechat_strncasecmp_range (string1, string2, max, 30);
|
||||
break;
|
||||
}
|
||||
return rc;
|
||||
casemapping = (server) ? server->casemapping : -1;
|
||||
if ((casemapping < 0) || (casemapping >= IRC_SERVER_NUM_CASEMAPPING))
|
||||
casemapping = IRC_SERVER_CASEMAPPING_RFC1459;
|
||||
|
||||
range = irc_server_casemapping_range[casemapping];
|
||||
|
||||
return weechat_strncasecmp_range (string1, string2, max, range);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -418,6 +400,9 @@ irc_server_eval_fingerprint (struct t_irc_server *server)
|
||||
char *fingerprint_eval, **fingerprints, *str_sizes;
|
||||
int i, j, rc, algo, length;
|
||||
|
||||
if (!server)
|
||||
return NULL;
|
||||
|
||||
ptr_fingerprint = IRC_SERVER_OPTION_STRING(server,
|
||||
IRC_SERVER_OPTION_TLS_FINGERPRINT);
|
||||
|
||||
@@ -1611,6 +1596,25 @@ irc_server_buffer_set_input_multiline (struct t_irc_server *server,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a server has channels opened.
|
||||
*/
|
||||
|
||||
int
|
||||
irc_server_has_channels (struct t_irc_server *server)
|
||||
{
|
||||
struct t_irc_channel *ptr_channel;
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocates a new server and adds it to the servers queue.
|
||||
*
|
||||
@@ -2814,11 +2818,10 @@ irc_server_outqueue_send (struct t_irc_server *server)
|
||||
'\r');
|
||||
if (pos)
|
||||
pos[0] = '\0';
|
||||
|
||||
irc_raw_print (server, IRC_RAW_FLAG_SEND |
|
||||
((server->outqueue[priority]->modified) ? IRC_RAW_FLAG_MODIFIED : 0),
|
||||
server->outqueue[priority]->message_after_mod);
|
||||
if (pos)
|
||||
pos[0] = '\r';
|
||||
|
||||
/* send signal with command that will be sent to server */
|
||||
(void) irc_server_send_signal (
|
||||
@@ -2836,6 +2839,9 @@ irc_server_outqueue_send (struct t_irc_server *server)
|
||||
if (tags_to_send)
|
||||
free (tags_to_send);
|
||||
|
||||
if (pos)
|
||||
pos[0] = '\r';
|
||||
|
||||
/* send command */
|
||||
irc_server_send (
|
||||
server, server->outqueue[priority]->message_after_mod,
|
||||
@@ -5861,7 +5867,7 @@ irc_server_autojoin_create_buffers (struct t_irc_server *server)
|
||||
* buffers are opened only if auto-join was not already done
|
||||
* and if no channels are currently opened
|
||||
*/
|
||||
if (server->autojoin_done || server->channels)
|
||||
if (server->autojoin_done || irc_server_has_channels (server))
|
||||
return;
|
||||
|
||||
/* evaluate server option "autojoin" */
|
||||
@@ -6022,7 +6028,7 @@ irc_server_autojoin_channels (struct t_irc_server *server)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!server->autojoin_done && !server->channels)
|
||||
if (!server->autojoin_done && !irc_server_has_channels (server))
|
||||
{
|
||||
/* auto-join when connecting to server for first time */
|
||||
autojoin = irc_server_eval_expression (
|
||||
@@ -6036,7 +6042,7 @@ irc_server_autojoin_channels (struct t_irc_server *server)
|
||||
if (autojoin)
|
||||
free (autojoin);
|
||||
}
|
||||
else if (server->channels)
|
||||
else if (irc_server_has_channels (server))
|
||||
{
|
||||
/* auto-join after disconnection (only rejoins opened channels) */
|
||||
autojoin = irc_server_build_autojoin (server);
|
||||
|
||||
@@ -387,6 +387,7 @@ extern char *irc_server_get_default_msg (const char *default_msg,
|
||||
const char *target_nick);
|
||||
extern void irc_server_buffer_set_input_multiline (struct t_irc_server *server,
|
||||
int multiline);
|
||||
extern int irc_server_has_channels (struct t_irc_server *server);
|
||||
extern struct t_irc_server *irc_server_alloc (const char *name);
|
||||
extern struct t_irc_server *irc_server_alloc_with_url (const char *irc_url);
|
||||
extern void irc_server_apply_command_line_options (struct t_irc_server *server,
|
||||
|
||||
@@ -192,6 +192,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_plugin = plugin;
|
||||
|
||||
irc_signal_quit_received = 0;
|
||||
irc_signal_upgrade_received = 0;
|
||||
|
||||
if (!irc_config_init ())
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
@@ -307,7 +310,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
(void) plugin;
|
||||
|
||||
if (irc_hook_timer)
|
||||
{
|
||||
weechat_unhook (irc_hook_timer);
|
||||
irc_hook_timer = NULL;
|
||||
}
|
||||
|
||||
if (irc_signal_upgrade_received)
|
||||
{
|
||||
|
||||
@@ -657,7 +657,7 @@ weechat_js_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load javascript script */
|
||||
path_script = plugin_script_search_path (weechat_js_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_js_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -930,6 +930,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_js_plugin = plugin;
|
||||
|
||||
js_quiet = 0;
|
||||
js_eval_mode = 0;
|
||||
js_eval_send_input = 0;
|
||||
js_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
snprintf (str_interpreter, sizeof (str_interpreter),
|
||||
"%s (v8)", plugin->name);
|
||||
@@ -980,11 +985,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (js_action_install_list)
|
||||
{
|
||||
free (js_action_install_list);
|
||||
js_action_install_list = NULL;
|
||||
}
|
||||
if (js_action_remove_list)
|
||||
{
|
||||
free (js_action_remove_list);
|
||||
js_action_remove_list = NULL;
|
||||
}
|
||||
if (js_action_autoload_list)
|
||||
{
|
||||
free (js_action_autoload_list);
|
||||
js_action_autoload_list = NULL;
|
||||
}
|
||||
/* weechat_string_dyn_free (js_buffer_output, 1); */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
@@ -261,7 +261,6 @@ logger_backlog_file (struct t_gui_buffer *buffer, const char *filename,
|
||||
struct t_arraylist *last_lines, *messages;
|
||||
int i, num_msgs, old_input_multiline;
|
||||
|
||||
num_msgs = 0;
|
||||
last_lines = logger_tail_file (filename, lines);
|
||||
if (!last_lines)
|
||||
return;
|
||||
|
||||
@@ -752,4 +752,5 @@ void
|
||||
logger_config_free ()
|
||||
{
|
||||
weechat_config_free (logger_config_file);
|
||||
logger_config_file = NULL;
|
||||
}
|
||||
|
||||
@@ -975,7 +975,7 @@ weechat_lua_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load lua script */
|
||||
path_script = plugin_script_search_path (weechat_lua_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_lua_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1243,6 +1243,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_lua_plugin = plugin;
|
||||
|
||||
lua_quiet = 0;
|
||||
lua_eval_mode = 0;
|
||||
lua_eval_send_input = 0;
|
||||
lua_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1304,12 +1309,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (lua_action_install_list)
|
||||
{
|
||||
free (lua_action_install_list);
|
||||
lua_action_install_list = NULL;
|
||||
}
|
||||
if (lua_action_remove_list)
|
||||
{
|
||||
free (lua_action_remove_list);
|
||||
lua_action_remove_list = NULL;
|
||||
}
|
||||
if (lua_action_autoload_list)
|
||||
{
|
||||
free (lua_action_autoload_list);
|
||||
lua_action_autoload_list = NULL;
|
||||
}
|
||||
weechat_string_dyn_free (lua_buffer_output, 1);
|
||||
lua_buffer_output = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -963,7 +963,7 @@ weechat_perl_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load perl script */
|
||||
path_script = plugin_script_search_path (weechat_perl_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_perl_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1264,6 +1264,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_perl_plugin = plugin;
|
||||
|
||||
perl_quiet = 0;
|
||||
perl_eval_mode = 0;
|
||||
perl_eval_send_input = 0;
|
||||
perl_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1368,12 +1373,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (perl_action_install_list)
|
||||
{
|
||||
free (perl_action_install_list);
|
||||
perl_action_install_list = NULL;
|
||||
}
|
||||
if (perl_action_remove_list)
|
||||
{
|
||||
free (perl_action_remove_list);
|
||||
perl_action_remove_list = NULL;
|
||||
}
|
||||
if (perl_action_autoload_list)
|
||||
{
|
||||
free (perl_action_autoload_list);
|
||||
perl_action_autoload_list = NULL;
|
||||
}
|
||||
weechat_string_dyn_free (perl_buffer_output, 1);
|
||||
perl_buffer_output = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load PHP script */
|
||||
path_script = plugin_script_search_path (weechat_php_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_php_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1308,6 +1308,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_php_plugin = plugin;
|
||||
|
||||
php_quiet = 0;
|
||||
php_eval_mode = 0;
|
||||
php_eval_send_input = 0;
|
||||
php_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1382,11 +1387,20 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
php_embed_shutdown ();
|
||||
|
||||
if (php_action_install_list)
|
||||
{
|
||||
free (php_action_install_list);
|
||||
php_action_install_list = NULL;
|
||||
}
|
||||
if (php_action_remove_list)
|
||||
{
|
||||
free (php_action_remove_list);
|
||||
php_action_remove_list = NULL;
|
||||
}
|
||||
if (php_action_autoload_list)
|
||||
{
|
||||
free (php_action_autoload_list);
|
||||
php_action_autoload_list = NULL;
|
||||
}
|
||||
/* weechat_string_dyn_free (php_buffer_output, 1); */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
+101
-100
@@ -536,7 +536,8 @@ plugin_script_search_by_full_name (struct t_plugin_script *scripts,
|
||||
|
||||
char *
|
||||
plugin_script_search_path (struct t_weechat_plugin *weechat_plugin,
|
||||
const char *filename)
|
||||
const char *filename,
|
||||
int search_system_dir)
|
||||
{
|
||||
char *final_name, *weechat_data_dir, *dir_system;
|
||||
int length;
|
||||
@@ -601,28 +602,31 @@ plugin_script_search_path (struct t_weechat_plugin *weechat_plugin,
|
||||
free (weechat_data_dir);
|
||||
}
|
||||
|
||||
/* try WeeChat system dir */
|
||||
dir_system = weechat_info_get ("weechat_sharedir", "");
|
||||
if (dir_system)
|
||||
if (search_system_dir)
|
||||
{
|
||||
length = strlen (dir_system) + strlen (weechat_plugin->name) +
|
||||
strlen (filename) + 16;
|
||||
final_name = malloc (length);
|
||||
if (final_name)
|
||||
/* try WeeChat system dir */
|
||||
dir_system = weechat_info_get ("weechat_sharedir", "");
|
||||
if (dir_system)
|
||||
{
|
||||
snprintf (final_name,length,
|
||||
"%s/%s/%s", dir_system, weechat_plugin->name, filename);
|
||||
if ((stat (final_name, &st) == 0) && (st.st_size > 0))
|
||||
length = strlen (dir_system) + strlen (weechat_plugin->name) +
|
||||
strlen (filename) + 16;
|
||||
final_name = malloc (length);
|
||||
if (final_name)
|
||||
{
|
||||
free (dir_system);
|
||||
return final_name;
|
||||
snprintf (final_name,length,
|
||||
"%s/%s/%s", dir_system, weechat_plugin->name, filename);
|
||||
if ((stat (final_name, &st) == 0) && (st.st_size > 0))
|
||||
{
|
||||
free (dir_system);
|
||||
return final_name;
|
||||
}
|
||||
free (final_name);
|
||||
}
|
||||
free (final_name);
|
||||
free (dir_system);
|
||||
}
|
||||
free (dir_system);
|
||||
}
|
||||
|
||||
return strdup (filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1146,17 +1150,9 @@ plugin_script_remove_file (struct t_weechat_plugin *weechat_plugin,
|
||||
i = 0;
|
||||
while (i < 2)
|
||||
{
|
||||
path_script = plugin_script_search_path (weechat_plugin, name);
|
||||
/*
|
||||
* script not found? (if path_script == name, that means the function
|
||||
* above did not find the script)
|
||||
*/
|
||||
if (!path_script || (strcmp (path_script, name) == 0))
|
||||
{
|
||||
if (path_script)
|
||||
free (path_script);
|
||||
path_script = plugin_script_search_path (weechat_plugin, name, 0);
|
||||
if (!path_script)
|
||||
break;
|
||||
}
|
||||
num_found++;
|
||||
if (unlink (path_script) == 0)
|
||||
{
|
||||
@@ -1216,7 +1212,7 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
||||
char **list)
|
||||
{
|
||||
char **argv, *name, *ptr_base_name, *base_name, *new_path, *autoload_path;
|
||||
char *symlink_path, str_signal[128], *ptr_list, *weechat_data_dir, *dir_separator;
|
||||
char *symlink_path, str_signal[128], *ptr_name, *weechat_data_dir, *dir_separator;
|
||||
int argc, i, length, rc, autoload, existing_script, script_loaded;
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -1226,30 +1222,7 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
||||
/* create again directories, just in case they have been removed */
|
||||
plugin_script_create_dirs (weechat_plugin);
|
||||
|
||||
ptr_list = *list;
|
||||
autoload = 0;
|
||||
*quiet = 0;
|
||||
|
||||
while ((ptr_list[0] == ' ') || (ptr_list[0] == '-'))
|
||||
{
|
||||
if (ptr_list[0] == ' ')
|
||||
ptr_list++;
|
||||
else
|
||||
{
|
||||
switch (ptr_list[1])
|
||||
{
|
||||
case 'a': /* autoload */
|
||||
autoload = 1;
|
||||
break;
|
||||
case 'q': /* quiet mode */
|
||||
*quiet = 1;
|
||||
break;
|
||||
}
|
||||
ptr_list += 2;
|
||||
}
|
||||
}
|
||||
|
||||
argv = weechat_string_split (ptr_list, ",", NULL,
|
||||
argv = weechat_string_split (*list, ",", NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
@@ -1258,7 +1231,30 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
name = strdup (argv[i]);
|
||||
autoload = 0;
|
||||
*quiet = 0;
|
||||
ptr_name = argv[i];
|
||||
while ((ptr_name[0] == ' ') || (ptr_name[0] == '-'))
|
||||
{
|
||||
if (ptr_name[0] == ' ')
|
||||
{
|
||||
ptr_name++;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ptr_name[1])
|
||||
{
|
||||
case 'a': /* autoload */
|
||||
autoload = 1;
|
||||
break;
|
||||
case 'q': /* quiet mode */
|
||||
*quiet = 1;
|
||||
break;
|
||||
}
|
||||
ptr_name += 2;
|
||||
}
|
||||
}
|
||||
name = strdup (ptr_name);
|
||||
if (name)
|
||||
{
|
||||
ptr_base_name = basename (name);
|
||||
@@ -1350,6 +1346,13 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
||||
free (base_name);
|
||||
if (weechat_data_dir)
|
||||
free (weechat_data_dir);
|
||||
|
||||
/* send signal */
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_installed", weechat_plugin->name);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
name);
|
||||
}
|
||||
free (name);
|
||||
}
|
||||
@@ -1359,11 +1362,6 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
||||
|
||||
*quiet = 0;
|
||||
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_installed", weechat_plugin->name);
|
||||
(void) weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
|
||||
free (*list);
|
||||
*list = NULL;
|
||||
}
|
||||
@@ -1383,7 +1381,7 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
int *quiet,
|
||||
char **list)
|
||||
{
|
||||
char **argv, str_signal[128], *ptr_list;
|
||||
char **argv, str_signal[128], *ptr_name;
|
||||
int argc, i;
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -1393,15 +1391,7 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
/* create again directories, just in case they have been removed */
|
||||
plugin_script_create_dirs (weechat_plugin);
|
||||
|
||||
ptr_list = *list;
|
||||
*quiet = 0;
|
||||
if (strncmp (ptr_list, "-q ", 3) == 0)
|
||||
{
|
||||
*quiet = 1;
|
||||
ptr_list += 3;
|
||||
}
|
||||
|
||||
argv = weechat_string_split (ptr_list, ",", NULL,
|
||||
argv = weechat_string_split (*list, ",", NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
@@ -1410,25 +1400,35 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
ptr_name = argv[i];
|
||||
*quiet = 0;
|
||||
if (strncmp (ptr_name, "-q ", 3) == 0)
|
||||
{
|
||||
*quiet = 1;
|
||||
ptr_name += 3;
|
||||
}
|
||||
|
||||
/* unload script, if script is loaded */
|
||||
ptr_script = plugin_script_search_by_full_name (scripts, argv[i]);
|
||||
ptr_script = plugin_script_search_by_full_name (scripts, ptr_name);
|
||||
if (ptr_script)
|
||||
(*script_unload) (ptr_script);
|
||||
|
||||
/* remove script file(s) */
|
||||
(void) plugin_script_remove_file (weechat_plugin, argv[i],
|
||||
(void) plugin_script_remove_file (weechat_plugin, ptr_name,
|
||||
*quiet, 1);
|
||||
|
||||
/* send signal */
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_removed", weechat_plugin->name);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_name);
|
||||
}
|
||||
weechat_string_free_split (argv);
|
||||
}
|
||||
|
||||
*quiet = 0;
|
||||
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_removed", weechat_plugin->name);
|
||||
(void) weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
|
||||
free (*list);
|
||||
*list = NULL;
|
||||
}
|
||||
@@ -1443,7 +1443,7 @@ plugin_script_action_autoload (struct t_weechat_plugin *weechat_plugin,
|
||||
char **list)
|
||||
{
|
||||
char **argv, *name, *ptr_base_name, *base_name, *autoload_path;
|
||||
char *symlink_path, *ptr_list, *weechat_data_dir, *dir_separator;
|
||||
char *symlink_path, *ptr_name, *weechat_data_dir, *dir_separator;
|
||||
int argc, i, length, rc, autoload;
|
||||
|
||||
if (!*list)
|
||||
@@ -1452,30 +1452,7 @@ plugin_script_action_autoload (struct t_weechat_plugin *weechat_plugin,
|
||||
/* create again directories, just in case they have been removed */
|
||||
plugin_script_create_dirs (weechat_plugin);
|
||||
|
||||
ptr_list = *list;
|
||||
autoload = 0;
|
||||
*quiet = 0;
|
||||
|
||||
while ((ptr_list[0] == ' ') || (ptr_list[0] == '-'))
|
||||
{
|
||||
if (ptr_list[0] == ' ')
|
||||
ptr_list++;
|
||||
else
|
||||
{
|
||||
switch (ptr_list[1])
|
||||
{
|
||||
case 'a': /* no autoload */
|
||||
autoload = 1;
|
||||
break;
|
||||
case 'q': /* quiet mode */
|
||||
*quiet = 1;
|
||||
break;
|
||||
}
|
||||
ptr_list += 2;
|
||||
}
|
||||
}
|
||||
|
||||
argv = weechat_string_split (ptr_list, ",", NULL,
|
||||
argv = weechat_string_split (*list, ",", NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
@@ -1484,7 +1461,30 @@ plugin_script_action_autoload (struct t_weechat_plugin *weechat_plugin,
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
name = strdup (argv[i]);
|
||||
ptr_name = argv[i];
|
||||
autoload = 0;
|
||||
*quiet = 0;
|
||||
while ((ptr_name[0] == ' ') || (ptr_name[0] == '-'))
|
||||
{
|
||||
if (ptr_name[0] == ' ')
|
||||
{
|
||||
ptr_name++;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ptr_name[1])
|
||||
{
|
||||
case 'a': /* no autoload */
|
||||
autoload = 1;
|
||||
break;
|
||||
case 'q': /* quiet mode */
|
||||
*quiet = 1;
|
||||
break;
|
||||
}
|
||||
ptr_name += 2;
|
||||
}
|
||||
}
|
||||
name = strdup (ptr_name);
|
||||
if (name)
|
||||
{
|
||||
ptr_base_name = basename (name);
|
||||
@@ -1795,6 +1795,7 @@ plugin_script_end (struct t_weechat_plugin *weechat_plugin,
|
||||
/* write config file (file: "<language>.conf") */
|
||||
weechat_config_write (*(plugin_data->config_file));
|
||||
weechat_config_free (*(plugin_data->config_file));
|
||||
*(plugin_data->config_file) = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -135,7 +135,8 @@ extern void plugin_script_auto_load (struct t_weechat_plugin *weechat_plugin,
|
||||
extern struct t_plugin_script *plugin_script_search (struct t_plugin_script *scripts,
|
||||
const char *name);
|
||||
extern char *plugin_script_search_path (struct t_weechat_plugin *weechat_plugin,
|
||||
const char *filename);
|
||||
const char *filename,
|
||||
int search_system_dir);
|
||||
extern struct t_plugin_script *plugin_script_alloc (const char *filename,
|
||||
const char *name,
|
||||
const char *author,
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
return PyLong_FromLong((long)__int)
|
||||
#define API_RETURN_LONG(__long) \
|
||||
return PyLong_FromLong(__long)
|
||||
#define API_RETURN_LONGLONG(__longlong) \
|
||||
return PyLong_FromLongLong(__longlong)
|
||||
#define API_RETURN_ULONGLONG(__ulonglong) \
|
||||
return PyLong_FromUnsignedLongLong(__ulonglong)
|
||||
|
||||
|
||||
/*
|
||||
@@ -376,14 +376,14 @@ API_FUNC(string_parse_size)
|
||||
char *size;
|
||||
unsigned long long value;
|
||||
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_LONGLONG(0));
|
||||
API_INIT_FUNC(1, "string_parse_size", API_RETURN_ULONGLONG(0));
|
||||
size = NULL;
|
||||
if (!PyArg_ParseTuple (args, "s", &size))
|
||||
API_WRONG_ARGS(API_RETURN_LONGLONG(0));
|
||||
API_WRONG_ARGS(API_RETURN_ULONGLONG(0));
|
||||
|
||||
value = weechat_string_parse_size (size);
|
||||
|
||||
API_RETURN_LONGLONG(value);
|
||||
API_RETURN_ULONGLONG(value);
|
||||
}
|
||||
|
||||
API_FUNC(string_color_code_size)
|
||||
|
||||
@@ -1201,7 +1201,7 @@ weechat_python_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load python script */
|
||||
path_script = plugin_script_search_path (weechat_python_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_python_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1471,6 +1471,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_python_plugin = plugin;
|
||||
|
||||
python_quiet = 0;
|
||||
python_eval_mode = 0;
|
||||
python_eval_send_input = 0;
|
||||
python_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1582,12 +1587,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (python_action_install_list)
|
||||
{
|
||||
free (python_action_install_list);
|
||||
python_action_install_list = NULL;
|
||||
}
|
||||
if (python_action_remove_list)
|
||||
{
|
||||
free (python_action_remove_list);
|
||||
python_action_remove_list = NULL;
|
||||
}
|
||||
if (python_action_autoload_list)
|
||||
{
|
||||
free (python_action_autoload_list);
|
||||
python_action_autoload_list = NULL;
|
||||
}
|
||||
weechat_string_dyn_free (python_buffer_output, 1);
|
||||
python_buffer_output = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# DO NOT EDIT BY HAND!
|
||||
#
|
||||
|
||||
from typing import Dict
|
||||
from typing import Dict, Union
|
||||
|
||||
WEECHAT_RC_OK: int = 0
|
||||
WEECHAT_RC_OK_EAT: int = 1
|
||||
@@ -539,7 +539,7 @@ def config_new_section(config_file: str, name: str,
|
||||
::
|
||||
|
||||
# example
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_read_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -558,7 +558,7 @@ def config_new_section(config_file: str, name: str,
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_ERROR
|
||||
# return weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR
|
||||
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: str | None) -> int:
|
||||
def my_section_create_option_cb(data: str, config_file: str, section: str, option_name: str, value: Union[str, None]) -> int:
|
||||
# ...
|
||||
return weechat.WEECHAT_CONFIG_OPTION_SET_OK_CHANGED
|
||||
# return weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE
|
||||
@@ -594,7 +594,7 @@ def config_search_section(config_file: str, section_name: str) -> str:
|
||||
|
||||
def config_new_option(config_file: str, section: str, name: str, type: str, description: str,
|
||||
string_values: str, min: int, max: int,
|
||||
default_value: str | None, value: str | None, null_value_allowed: int,
|
||||
default_value: Union[str, None], value: Union[str, None], null_value_allowed: int,
|
||||
callback_check_value: str, callback_check_value_data: str,
|
||||
callback_change: str, callback_change_data: str,
|
||||
callback_delete: str, callback_delete_data: str) -> str:
|
||||
|
||||
@@ -50,7 +50,7 @@ list(APPEND LINK_LIBS ${GCRYPT_LDFLAGS})
|
||||
|
||||
list(APPEND LINK_LIBS ${ZLIB_LIBRARY})
|
||||
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
list(APPEND LINK_LIBS ${LIBZSTD_LDFLAGS})
|
||||
|
||||
target_link_libraries(relay ${LINK_LIBS} coverage_config)
|
||||
|
||||
@@ -616,6 +616,13 @@ relay_irc_signal_irc_disc_cb (const void *pointer, void *data,
|
||||
|
||||
if (strcmp ((char *)signal_data, client->protocol_args) == 0)
|
||||
{
|
||||
relay_irc_sendf (client,
|
||||
":%s ERROR :WeeChat: disconnected from server \"%s\"",
|
||||
RELAY_IRC_DATA(client, address),
|
||||
client->protocol_args);
|
||||
relay_irc_sendf (client,
|
||||
":%s ERROR :Closing Link",
|
||||
RELAY_IRC_DATA(client, address));
|
||||
relay_client_set_status (client, RELAY_STATUS_DISCONNECTED);
|
||||
}
|
||||
|
||||
|
||||
@@ -247,6 +247,7 @@ relay_auth_parse_pbkdf2 (const char *parameters,
|
||||
}
|
||||
|
||||
/* parameter 2: iterations */
|
||||
error = NULL;
|
||||
*iterations = (int)strtol (argv[1], &error, 10);
|
||||
if (!error || error[0])
|
||||
*iterations = 0;
|
||||
|
||||
@@ -1460,6 +1460,7 @@ void
|
||||
relay_config_free ()
|
||||
{
|
||||
weechat_config_free (relay_config_file);
|
||||
relay_config_file = NULL;
|
||||
|
||||
if (relay_config_regex_allowed_ips)
|
||||
{
|
||||
|
||||
@@ -162,6 +162,9 @@ relay_network_set_priority ()
|
||||
void
|
||||
relay_network_init ()
|
||||
{
|
||||
relay_network_init_ok = 0;
|
||||
relay_network_init_tls_cert_key_ok = 0;
|
||||
|
||||
/* credentials */
|
||||
gnutls_certificate_allocate_credentials (&relay_gnutls_x509_cred);
|
||||
relay_network_set_tls_cert_key (0);
|
||||
|
||||
@@ -203,6 +203,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_plugin = plugin;
|
||||
|
||||
relay_signal_upgrade_received = 0;
|
||||
|
||||
if (!relay_config_init ())
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
@@ -240,7 +242,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
(void) plugin;
|
||||
|
||||
if (relay_hook_timer)
|
||||
{
|
||||
weechat_unhook (relay_hook_timer);
|
||||
relay_hook_timer = NULL;
|
||||
}
|
||||
|
||||
relay_config_write ();
|
||||
|
||||
@@ -254,7 +259,11 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
relay_server_free_all ();
|
||||
|
||||
if (relay_buffer)
|
||||
{
|
||||
weechat_buffer_close (relay_buffer);
|
||||
relay_buffer = NULL;
|
||||
}
|
||||
relay_buffer_selected_line = 0;
|
||||
|
||||
relay_client_free_all ();
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ weechat_ruby_print_exception (VALUE err)
|
||||
err_class = StringValuePtr (class_name);
|
||||
}
|
||||
|
||||
if (strcmp (err_class, "SyntaxError") == 0)
|
||||
if (err_class && (strcmp (err_class, "SyntaxError") == 0))
|
||||
{
|
||||
tmp3 = rb_inspect (err);
|
||||
weechat_printf (NULL,
|
||||
@@ -1003,7 +1003,7 @@ weechat_ruby_command_cb (const void *pointer, void *data,
|
||||
{
|
||||
/* load ruby script */
|
||||
path_script = plugin_script_search_path (weechat_ruby_plugin,
|
||||
ptr_name);
|
||||
ptr_name, 1);
|
||||
weechat_ruby_load ((path_script) ? path_script : ptr_name,
|
||||
NULL);
|
||||
if (path_script)
|
||||
@@ -1336,6 +1336,11 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_ruby_plugin = plugin;
|
||||
|
||||
ruby_quiet = 0;
|
||||
ruby_eval_mode = 0;
|
||||
ruby_eval_send_input = 0;
|
||||
ruby_eval_exec_commands = 0;
|
||||
|
||||
/* set interpreter name and version */
|
||||
weechat_hashtable_set (plugin->variables, "interpreter_name",
|
||||
plugin->name);
|
||||
@@ -1439,12 +1444,22 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
|
||||
/* free some data */
|
||||
if (ruby_action_install_list)
|
||||
{
|
||||
free (ruby_action_install_list);
|
||||
ruby_action_install_list = NULL;
|
||||
}
|
||||
if (ruby_action_remove_list)
|
||||
{
|
||||
free (ruby_action_remove_list);
|
||||
ruby_action_remove_list = NULL;
|
||||
}
|
||||
if (ruby_action_autoload_list)
|
||||
{
|
||||
free (ruby_action_autoload_list);
|
||||
ruby_action_autoload_list = NULL;
|
||||
}
|
||||
weechat_string_dyn_free (ruby_buffer_output, 1);
|
||||
ruby_buffer_output = NULL;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -1254,6 +1254,9 @@ script_action_run_all ()
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
0, &num_actions);
|
||||
|
||||
script_action_clear ();
|
||||
|
||||
if (actions)
|
||||
{
|
||||
for (i = 0; i < num_actions; i++)
|
||||
@@ -1311,6 +1314,11 @@ script_action_run_all ()
|
||||
script_buffer_open ();
|
||||
script_buffer_refresh (1);
|
||||
}
|
||||
if (script_buffer_detail_script)
|
||||
{
|
||||
/* back to list of scripts */
|
||||
script_buffer_show_detail_script (NULL);
|
||||
}
|
||||
weechat_buffer_set (script_buffer, "display", "1");
|
||||
}
|
||||
else if (weechat_strcmp (argv[0], "list") == 0)
|
||||
@@ -1511,8 +1519,6 @@ script_action_run_all ()
|
||||
weechat_string_free_split (actions);
|
||||
}
|
||||
|
||||
script_action_clear ();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -840,4 +840,5 @@ void
|
||||
script_config_free ()
|
||||
{
|
||||
weechat_config_free (script_config_file);
|
||||
script_config_file = NULL;
|
||||
}
|
||||
|
||||
@@ -412,6 +412,27 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
/* make C compiler happy */
|
||||
(void) plugin;
|
||||
|
||||
if (script_loaded)
|
||||
{
|
||||
weechat_hashtable_free (script_loaded);
|
||||
script_loaded = NULL;
|
||||
}
|
||||
if (script_timer_refresh)
|
||||
{
|
||||
weechat_unhook (script_timer_refresh);
|
||||
script_timer_refresh = NULL;
|
||||
}
|
||||
|
||||
if (script_buffer)
|
||||
{
|
||||
weechat_buffer_close (script_buffer);
|
||||
script_buffer = NULL;
|
||||
}
|
||||
script_buffer_selected_line = 0;
|
||||
script_buffer_detail_script = NULL;
|
||||
script_buffer_detail_script_last_line = 0;
|
||||
script_buffer_detail_script_line_diff = -1;
|
||||
|
||||
script_mouse_end ();
|
||||
|
||||
script_config_write ();
|
||||
@@ -419,10 +440,16 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
script_repo_remove_all ();
|
||||
|
||||
if (script_repo_filter)
|
||||
{
|
||||
free (script_repo_filter);
|
||||
script_repo_filter = NULL;
|
||||
}
|
||||
|
||||
if (script_loaded)
|
||||
{
|
||||
weechat_hashtable_free (script_loaded);
|
||||
script_loaded = NULL;
|
||||
}
|
||||
|
||||
script_config_free ();
|
||||
|
||||
|
||||
@@ -654,9 +654,16 @@ void
|
||||
spell_config_free ()
|
||||
{
|
||||
weechat_config_free (spell_config_file);
|
||||
spell_config_file = NULL;
|
||||
|
||||
if (spell_commands_to_check)
|
||||
{
|
||||
weechat_string_free_split (spell_commands_to_check);
|
||||
spell_commands_to_check = NULL;
|
||||
}
|
||||
if (spell_length_commands_to_check)
|
||||
{
|
||||
free (spell_length_commands_to_check);
|
||||
spell_length_commands_to_check = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,5 +501,8 @@ void
|
||||
spell_speller_end ()
|
||||
{
|
||||
weechat_hashtable_free (spell_spellers);
|
||||
spell_spellers = NULL;
|
||||
|
||||
weechat_hashtable_free (spell_speller_buffer);
|
||||
spell_speller_buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -1188,6 +1188,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
weechat_plugin = plugin;
|
||||
|
||||
spell_enabled = 0;
|
||||
|
||||
spell_warning_aspell_config ();
|
||||
|
||||
#ifdef USE_ENCHANT
|
||||
@@ -1260,10 +1262,15 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
#ifdef USE_ENCHANT
|
||||
/* release enchant broker */
|
||||
enchant_broker_free (broker);
|
||||
broker = NULL;
|
||||
#endif /* USE_ENCHANT */
|
||||
|
||||
if (spell_nick_completer)
|
||||
{
|
||||
free (spell_nick_completer);
|
||||
spell_nick_completer = NULL;
|
||||
}
|
||||
spell_len_nick_completer = 0;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user