Age | Commit message (Collapse) | Author |
|
(issue #1999)
|
|
The type "enum" replaces type "integer" when used with string values.
For compatibility, any option created with type "integer" and string values is
automatically created to "enum" on creation, with no error.
|
|
|
|
plugins, add info "auto_load_scripts"
This fixes an issue with IRC URL given on command line when it starts with
`ircs://` or `irc6://`: the server is not created at all (only `irc://` works
fine).
|
|
|
|
|
|
|
|
(issue #1872)
|
|
|
|
#1872)
|
|
sensitive (issue #1872)
|
|
|
|
This function is deprecated since Python 3.11.
|
|
CMake is now the only way to build WeeChat.
|
|
Use a step of 10 between each scripting plugin priority.
|
|
|
|
This updates the Python examples to include all the possible return
values for the callbacks in config_new_section, like it is done in the C
example. It also aligns the order of the values with the C example.
|
|
The callback_read and callback_create_option functions in the scripting
APIs always get the value as a string, never as null. This means that if
the value is null, there is no way for the script to distinguish this
from an empty string for string options. This makes it impossible to
properly make options with fallback values, like the irc server and
server_default options, as far as I can see.
All the scripting languages except Tcl use that language's equivalent
for null. For JavaScript which has both null and undefined, null is
used. For Tcl, the magic null string defined in commit 197a7a01e is used
and the documentation is updated to describe that.
I tested this with these scripts:
https://gist.github.com/trygveaa/2d49c609addf9773d2ed16e15d1e3447
You can load all of those scripts and see the result with this command
(assuming you have the scripts in the current directory):
weechat -t -r "/filter add script * * script; /script load $(echo script_config.*)"
|
|
|
|
|
|
config_new_option (scripting API)
|
|
I erroneously typed the return types for these to int in commit
e0c117e14, but they should be None.
|
|
This makes it possible to see how functions are used without having to
go to the web page. It's especially useful to see the types of the
callback functions.
|
|
This is useful for two reasons:
1. When running unit tests for a script weechat needs to be mocked. By
having the constant values available in the stub file, they can be
loaded from that, instead of having to define the constants manually
for the mock.
2. If you log a constant value you have to look up what it means. This
makes it easier, in the same vein as PR #1824.
|
|
to integer (in scripts)
|
|
string to integer (in scripts)
|
|
|
|
Affected plugins: python, ruby, lua, tcl, guile, javascript, php.
|
|
print_y_date_tags
Affected plugins: python, lua, tcl, guile, javascript.
|
|
Affected plugins: python, lua, tcl, guile, javascript.
|
|
string_rebuild_split_string
|
|
string_rebuild_split_string
|
|
|
|
In Python raw strings, newlines can't be escaped with a backslash. If
you do that, both the backslash and the newline become part of the
string. This meant that the regex for constants both started and ended
with a newline which caused every other constant to be skipped.
|
|
|
|
|
|
The plugin API function config_new_option accepts null as the
default_value and/or value however the scripting APIs (except for lua)
didn't allow sending null as a parameter value, so it was impossible to
use it this way. This allows sending a null value for these parameters.
Lua already supported sending in nil for these parameters and it works
as expected, so nothing is changed for this plugin.
For Guile you can now send in #nil, for JavaScript null or undefined,
for Perl undef, for PHP NULL, for Python None, for Ruby nil and for Tcl
$::weechat::WEECHAT_NULL.
In all of these languages except Tcl this is the special value
indicating a missing value. However Tcl only has one type, string, so it
doesn't have a null value. Therefore I created a constant with the value
`\uFFFF\uFFFF\uFFFFWEECHAT_NULL\uFFFF\uFFFF\uFFFF` which is used
instead. This is very unlikely to appear unintentionally. Using the
unicode code point \uFFFF was suggested on
https://wiki.tcl-lang.org/page/null.
I tested this with these scripts:
https://gist.github.com/trygveaa/f91977dde5d2876d502bf55fbf9b50cc
|
|
|
|
|
|
function ngettext
|
|
free content, add function printf_y_date_tags (closes #1746)
|
|
prnt_date_tags
|
|
|
|
|
|
|
|
|
|
|
|
(issue #1285)
The 4 directories (which can be the same):
- config: configuration files, certificates
- data: log/upgrade files, local plugins, scripts, xfer files
- cache: script repository, scripts downloaded (temporary location)
- runtime: FIFO pipe, relay UNIX sockets
|
|
reference)
|
|
|