mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 22:24:47 +02:00
Compare commits
138 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24f4f8fffa | |||
| 6f352deefe | |||
| 6620f40efa | |||
| 438313d331 | |||
| eb77c78dad | |||
| 1a3bd49a46 | |||
| e3e4c89b5e | |||
| 5bc37eeee3 | |||
| 4939e9659f | |||
| e9be61b133 | |||
| 585257196d | |||
| e7cb025e68 | |||
| 9bc9b4c86b | |||
| f17cee75dc | |||
| c5ccac9e22 | |||
| 37da24ca22 | |||
| 21b4294f4e | |||
| 63e2a3dab9 | |||
| d07701dae6 | |||
| 8d1dcb666a | |||
| b348479e4c | |||
| 85544ca6dd | |||
| a3e0c3f0e4 | |||
| 96938d47f1 | |||
| 72d5274d54 | |||
| 8da3458f4c | |||
| 82697714e1 | |||
| a774ffd4e8 | |||
| 7f69fff41e | |||
| 102fc6662b | |||
| e6e46bcae6 | |||
| 40a87970e1 | |||
| 5173e19ff3 | |||
| e688fa4daa | |||
| 5c766317df | |||
| 30121ff9df | |||
| ecdbaef288 | |||
| 4b58ea37c0 | |||
| fc63620f1e | |||
| fb3ca3caae | |||
| d6d8b9094f | |||
| 56daba869e | |||
| 50567b0f64 | |||
| 8abd05fe3d | |||
| b7f3ba69e1 | |||
| e28cb00106 | |||
| 0f782166e2 | |||
| 9c96ce825b | |||
| eec2e37d20 | |||
| 6bb0130e7b | |||
| ff66a8a161 | |||
| 7b3ec510ca | |||
| 4f0a64cc8b | |||
| 4cf86af506 | |||
| ce9bcadaa8 | |||
| a7a04783d4 | |||
| 126b7d4433 | |||
| 93b5e60441 | |||
| 65f1c82a87 | |||
| 54cd82e4a4 | |||
| 7b8faf6d97 | |||
| 1ff9d1f52a | |||
| 952640e88c | |||
| fcf7469d76 | |||
| 8945e70f81 | |||
| f0d0612a33 | |||
| 796859b873 | |||
| 533dbf972d | |||
| 1d85ff0f8d | |||
| a9e84bfc52 | |||
| b53045281e | |||
| f4dbc060b8 | |||
| 1495ecf6d0 | |||
| 6bf0dfddd6 | |||
| 97ad48e317 | |||
| 41d5cdd14b | |||
| 5c9608f05c | |||
| b4842dd707 | |||
| cd5d48fc87 | |||
| f4ea802322 | |||
| 79f204eeb9 | |||
| 466dbbe75b | |||
| 822270ccca | |||
| fad6768318 | |||
| 85681772f0 | |||
| 669aa2741a | |||
| 968d7ede29 | |||
| e7096810c4 | |||
| 9105c3ba1f | |||
| 1a0087a7d7 | |||
| ca90f28beb | |||
| 6ca2408c99 | |||
| ec5a5fd73f | |||
| f10578b18b | |||
| cfc491f7d1 | |||
| eb64c8d65c | |||
| 053d432eec | |||
| 50bedd10b6 | |||
| cb8b60028b | |||
| ba820a0172 | |||
| 8c47ca6926 | |||
| 7b0cced319 | |||
| 8e939b089d | |||
| 2f2263afa6 | |||
| b8ec088fd9 | |||
| 057f2c3396 | |||
| cdc7faf93f | |||
| 6d061a9ac0 | |||
| aff752c50b | |||
| bb8ac59c32 | |||
| 51bda896c8 | |||
| 66d11b7e46 | |||
| d8c7b3fd5e | |||
| 3bdab1c538 | |||
| 49c3e62106 | |||
| 42be1a74a0 | |||
| 12a6f74ec0 | |||
| d699ae89aa | |||
| e85bf426c1 | |||
| 48cbf3ad37 | |||
| 737a16b7de | |||
| 6140aac57f | |||
| b3fc7c1b1a | |||
| 2047d4f1f7 | |||
| ac5f26367a | |||
| 9b3ec88559 | |||
| ea4aad0b1d | |||
| 9fb8ca649e | |||
| a14973816b | |||
| 7d7ca34a41 | |||
| b7d6be5936 | |||
| b934e874d0 | |||
| df27a3b76a | |||
| 738585d9e2 | |||
| 62ad65ef45 | |||
| 20a23484ed | |||
| a3179c8c0d | |||
| dd0b04d057 |
+3
-1
@@ -38,6 +38,7 @@ Alphabetically:
|
||||
* Elizabeth Myers (Elizacat)
|
||||
* Elián Hanisch (m4v)
|
||||
* Emanuele Giaquinta
|
||||
* emk
|
||||
* Esteban I. Ruiz Moreno (Exio)
|
||||
* Evgeny Shmarnev
|
||||
* Felix Eckhofer
|
||||
@@ -124,8 +125,9 @@ Alphabetically:
|
||||
* Wojciech Kwolek
|
||||
* W. Trevor King
|
||||
* Yannick Palanque
|
||||
* Ørjan Malde
|
||||
|
||||
== Contact
|
||||
|
||||
See https://weechat.org/files/doc/devel/weechat_user.en.html#support[user's guide]
|
||||
or https://weechat.org/dev/support
|
||||
or https://weechat.org/about/support
|
||||
|
||||
@@ -15,6 +15,50 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
(file _ReleaseNotes.adoc_ in sources).
|
||||
|
||||
|
||||
[[v2.3.1]]
|
||||
== Version 2.3.1 (under dev)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* relay: fix crash when decoding a malformed websocket frame (CVE-2021-40516)
|
||||
|
||||
[[v2.3]]
|
||||
== Version 2.3 (2018-10-21)
|
||||
|
||||
New features::
|
||||
|
||||
* core: add repeat of string in evaluation of expressions with "repeat:count,string" (issue #958)
|
||||
* core: allow specifying buffer number/name for /buffer localvar (issue #1259)
|
||||
* core: allow multiple arguments in command /buffer close
|
||||
* core: allow multiple options "-r" ("--run-command") in command line arguments (issue #1248)
|
||||
* core: add option "-P" (or "--plugins") to customize the plugins to load at startup
|
||||
* core: allow partial buffer name in command /buffer close (issue #1226)
|
||||
* api: add function hook_line
|
||||
* irc: display a warning when the value of option irc.server.xxx.autojoin is set to an invalid value
|
||||
* relay: add real IP in client description (issue #1256)
|
||||
* trigger: allow creation of temporary variables with the regex
|
||||
* trigger: add hook "line"
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix evaluation of nested ternary operators (issue #1263)
|
||||
* core: fix evaluation of condition when the left operand is an empty string
|
||||
* core: fix string evaluation with regex replacement when the string is empty
|
||||
* core: fix check of tags in lines (command /filter and hook_print)
|
||||
* core: fix clear of completion item in case of partial completion (issue #1162)
|
||||
* core: send signal "key_pressed" for mouse code only if the string is UTF-8 valid (issue #1220)
|
||||
* api: fix memory leak in function string_split
|
||||
* lua: fix return code of mkdir functions in case of error (issue #1267)
|
||||
* scripts: fix duplicated lines in output of script eval (python, perl, ruby, lua and guile)
|
||||
|
||||
Tests::
|
||||
|
||||
* unit: add tests on line and hook functions
|
||||
|
||||
Build::
|
||||
|
||||
* php: add detection of PHP 7.3
|
||||
|
||||
[[v2.2]]
|
||||
== Version 2.2 (2018-07-14)
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ image:https://img.shields.io/badge/diaspora*-follow-blue.svg["Diaspora*", link="
|
||||
image:https://img.shields.io/badge/google%2B-follow-blue.svg["Google+", link="https://plus.google.com/+WeeChat"]
|
||||
image:https://img.shields.io/badge/devel%20blog-follow-blue.svg["Devel blog", link="https://weechat.org/blog/"]
|
||||
image:https://img.shields.io/badge/slant-recommend-28acad.svg["Slant", link="http://www.slant.co/topics/1323/~irc-clients-for-linux"]
|
||||
image:https://img.shields.io/badge/help-donate%20%E2%9D%A4-ff69b4.svg["Donate", link="https://weechat.org/about/donate/"]
|
||||
image:https://img.shields.io/badge/help-donate%20%E2%9D%A4-ff69b4.svg["Donate", link="https://weechat.org/donate/"]
|
||||
|
||||
image:https://travis-ci.org/weechat/weechat.svg?branch=master["Build Status", link="https://travis-ci.org/weechat/weechat"]
|
||||
|
||||
|
||||
+9
-4
@@ -17,6 +17,11 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
|
||||
(file _ChangeLog.adoc_ in sources).
|
||||
|
||||
|
||||
[[v2.3]]
|
||||
== Version 2.3 (2018-10-21)
|
||||
|
||||
No release note.
|
||||
|
||||
[[v2.2]]
|
||||
== Version 2.2 (2018-07-14)
|
||||
|
||||
@@ -34,8 +39,8 @@ is added to the hotlist:
|
||||
* `${away}`: true if you are away on the server matching the buffer,
|
||||
* `${buffer.num_displayed} == 0`: true if the buffer is not displayed in any
|
||||
window
|
||||
* `${info:relay_client_count,weechat,connected} > 0` (new): true if at least
|
||||
one client is connected on a weechat relay.
|
||||
* `${info:relay_client_count,weechat,connected} > 0`: true if at least
|
||||
one client is connected on a weechat relay (new condition).
|
||||
|
||||
To use the new default value, you can reset the option with this command:
|
||||
|
||||
@@ -101,7 +106,7 @@ In older releases, this message was received:
|
||||
A new Debian package has been added: _weechat-headless_ which contains the
|
||||
binary _weechat-headless_ and its man page.
|
||||
|
||||
In version 2.0, this binary was in the package _weechat-curses_.
|
||||
In version 2.1, this binary was in the package _weechat-curses_.
|
||||
|
||||
[[v2.1]]
|
||||
== Version 2.1 (2018-03-18)
|
||||
@@ -261,7 +266,7 @@ No release note.
|
||||
The option _script.scripts.url_force_https_ has been removed because now the
|
||||
site weechat.org can only be used with HTTPS. +
|
||||
Both HTTP and HTTPS protocols are allowed in the option _script.scripts.url_.
|
||||
For http://weechat.org an automatic redirection to https://weechat.org will
|
||||
For http://weechat.org/ an automatic redirection to https://weechat.org/ will
|
||||
occur, so you should check that the CA certificates are properly installed
|
||||
on your machine.
|
||||
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ run "rm -f ABOUT-NLS"
|
||||
run "rm -rf intl"
|
||||
|
||||
# execute autoreconf cmds
|
||||
run "autoreconf -fvi"
|
||||
run "autoreconf -vi"
|
||||
|
||||
# ending
|
||||
rm -f $AUTOGEN_LOG
|
||||
|
||||
+2
-1
@@ -28,6 +28,7 @@ endif()
|
||||
|
||||
if(NOT PHP_FOUND)
|
||||
find_program(PHP_CONFIG_EXECUTABLE NAMES
|
||||
php-config7.3 php-config73
|
||||
php-config7.2 php-config72
|
||||
php-config7.1 php-config71
|
||||
php-config7.0 php-config70
|
||||
@@ -39,7 +40,7 @@ if(NOT PHP_FOUND)
|
||||
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PHP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(${PHP_VERSION} MATCHES "^7")
|
||||
find_library(PHP_LIB
|
||||
NAMES php7.2 php7.1 php7.0 php7
|
||||
NAMES php7.3 php7.2 php7.1 php7.0 php7
|
||||
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64)
|
||||
if(PHP_LIB)
|
||||
get_filename_component(PHP_LIB_DIR ${PHP_LIB} DIRECTORY)
|
||||
|
||||
+3
-3
@@ -968,7 +968,7 @@ if test "x$enable_php" = "xyes" ; then
|
||||
if test "x$PHP_CFLAGS" = "x" -o "x$PHP_LFLAGS" = "x" ; then
|
||||
AC_MSG_CHECKING(for PHP headers and libraries with pkg-config)
|
||||
echo
|
||||
for l in "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
for l in "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
pkgconfig_php_found=`$PKGCONFIG --exists php$l 2>/dev/null`
|
||||
if test "x$?" = "x0" ; then
|
||||
pkgconfig_php_found=`$PKGCONFIG --atleast-version=7 php$l 2>/dev/null`
|
||||
@@ -985,7 +985,7 @@ if test "x$enable_php" = "xyes" ; then
|
||||
if test "x$PHP_CFLAGS" = "x" -o "x$PHP_LFLAGS" = "x" ; then
|
||||
PHPCONFIG=""
|
||||
AC_MSG_CHECKING(for PHP headers and libraries with php-config)
|
||||
for l in "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
for l in "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
AC_CHECK_PROG(PHPCONFIG, "php-config$l", "php-config$l")
|
||||
if test "x$PHPCONFIG" != "x" ; then
|
||||
php_config_version=`$PHPCONFIG --version`
|
||||
@@ -1006,7 +1006,7 @@ if test "x$enable_php" = "xyes" ; then
|
||||
if test "x$ac_found_php_header" = "xyes" ; then
|
||||
PHP_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
for l in "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
for l in "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
|
||||
AC_CHECK_LIB(php$l,php_execute_script,ac_found_php_lib="yes",ac_found_php_lib="no")
|
||||
if test "x$ac_found_php_lib" = "xyes" ; then
|
||||
PHP_VERSION=">=7.0.0"
|
||||
|
||||
@@ -21,7 +21,7 @@ Build-Depends:
|
||||
libgcrypt20-dev,
|
||||
libgnutls28-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.1.3
|
||||
Standards-Version: 4.1.5
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ weechat (1.1.1-1) unstable; urgency=medium
|
||||
Since version 1.1, there is a new format for regexp replacement in
|
||||
triggers. This format is incompatible with version 1.0. The existing
|
||||
triggers will not be automatically updated.
|
||||
See http://www.weechat.org/files/releasenotes/ReleaseNotes-1.1.html
|
||||
See https://weechat.org/files/releasenotes/ReleaseNotes-1.1.html
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Sun, 25 Jan 2015 20:41:50 +0100
|
||||
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
weechat (2.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release
|
||||
* Remove upstream patch about localized manpages for weechat-headless
|
||||
* Bump Standards-Version to 4.1.5
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Wed, 19 Sep 2018 09:41:45 +0000
|
||||
|
||||
weechat (2.1-2) unstable; urgency=medium
|
||||
|
||||
* Disable build of javascript plugin to fix weechat autoremoval from
|
||||
testing (RC bugs in libv8) (Closes: #894680)
|
||||
* Add missing localized manpages for weechat-headless
|
||||
* Fix debian/copyright Format URI
|
||||
|
||||
-- Emmanuel Bouthenot <kolter@debian.org> Tue, 03 Apr 2018 10:48:35 +0200
|
||||
|
||||
weechat (2.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release (Closes: #887114)
|
||||
|
||||
@@ -21,7 +21,7 @@ Build-Depends:
|
||||
libgcrypt20-dev,
|
||||
libgnutls28-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.1.3
|
||||
Standards-Version: 4.1.5
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
Vcs-Browser: https://salsa.debian.org/kolter/weechat
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: weechat
|
||||
Upstream-Contact: Sébastien Helleu <flashcode@flashtux.org>
|
||||
Source: https://weechat.org/
|
||||
@@ -19,11 +19,11 @@ Files: src/core/wee-config-file.c
|
||||
Copyright: 2005-2006, Emmanuel Bouthenot <kolter@openics.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-hook.c
|
||||
Files: src/core/hook/wee-hook-connect.c
|
||||
Copyright: 2012, Simon Arlott
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-hook.h
|
||||
Files: src/core/hook/wee-hook-connect.h
|
||||
Copyright: 2012, Simon Arlott
|
||||
License: GPL-3+
|
||||
|
||||
|
||||
@@ -26,8 +26,15 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Vypne automatické nahrání pluginů.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
Load only these plugins at startup (see /help weechat.plugin.autoload).
|
||||
If this option is given, the option weechat.plugin.autoload is not used.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-r*, *--run-command* _<command>_::
|
||||
Spustí příkaz(y) po startu (více přůkazů může být odděleno středníky).
|
||||
Run command(s) after startup; many commands can be separated by semicolons,
|
||||
this option can be given multiple times.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Vypni automatické nahrání scriptů.
|
||||
|
||||
@@ -14,8 +14,9 @@ weechat-headless - the extensible chat client (headless version)
|
||||
|
||||
== PŘEHLED
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -60,4 +61,4 @@ include::man_copyright.cs.adoc[]
|
||||
|
||||
== PODPORA / HLÁŠENÍ CHYB
|
||||
|
||||
Pro pomoc nebo hlášení chyb https://weechat.org/dev/support
|
||||
Pro pomoc nebo hlášení chyb https://weechat.org/about/support
|
||||
|
||||
@@ -13,8 +13,9 @@ weechat - the extensible chat client
|
||||
|
||||
== PŘEHLED
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -54,4 +55,4 @@ include::man_copyright.cs.adoc[]
|
||||
|
||||
== PODPORA / HLÁŠENÍ CHYB
|
||||
|
||||
Pro pomoc nebo hlášení chyb https://weechat.org/dev/support
|
||||
Pro pomoc nebo hlášení chyb https://weechat.org/about/support
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
| weechat | inactivity | Inaktivität der Tastatur (Sekunden) | -
|
||||
|
||||
| weechat | locale | Lokalisation welche für die übersetzten Nachrichten verwendet werden soll | -
|
||||
| weechat | locale | Spracheinstellung die für die übersetzten Nachrichten verwendet werden soll | -
|
||||
|
||||
| weechat | nick_color | zeigt Farbecode des Nick | Nickname
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** Standardwert: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** Beschreibung: pass:none[ersetzt mirc Farben in Nachrichten mittels einer Hashtabelle: Schlüssel sind "fg,bg" als Ganzzahl zwischen -1 (nicht näher bezeichnet) und 15. Als Wert ist der Farbname oder die Farbnummer von WeeChat möglich (Format: "1,-1:Farbe1;2,7:Farbe2"), Beispiel: "1,-1:darkgray;1,2:white,blue" ersetzt schwarz durch "darkgray" und schwarz auf blau durch "white,blue"; Tabelle der Standard-IRC-Farben von WeeChat (in Klammern der Farbname, wie er von WeeChat genutzt wird): 0=weiß (white), 1=schwarz (black), 2=blau (blue), 3=grün (green), 4=hellrot (lightred), 5=rot (red), 6=violett (magenta), 7=braun (brown), 8=gelb (yellow), 9= hell-grün (lightgreen), 10=türkis (cyan), 11=hell-türkis (lightcyan), 12=hellblau (lightblue), 13=hell-violett (lightmagenta), 14=grau (gray), 15=weiß (white)]
|
||||
** Beschreibung: pass:none[ersetzt mirc Farben in Nachrichten mittels einer Hashtabelle: Schlüssel sind "fg,bg" als Ganzzahl zwischen -1 (nicht näher bezeichnet) und 15. Als Wert ist der Farbname oder die Farbnummer von WeeChat möglich (Format: "1,-1:Farbe1;2,7:Farbe2"), Beispiel: "1,-1:darkgray;1,2:white,blue" ersetzt schwarz durch "darkgray" und schwarz auf blau durch "white,blue"; Tabelle der Standard-IRC-Farben von WeeChat (in Klammern der Farbname, wie er von WeeChat genutzt wird): 0=weiß (white), 1=schwarz (black), 2=blau (blue), 3=grün (green), 4=hellrot (lightred), 5=rot (red), 6=violett (magenta), 7=braun (brown), 8=gelb (yellow), 9= hell-grün (lightgreen), 10=türkis (cyan), 11=hell-türkis (lightcyan), 12=hellblau (lightblue), 13=hell-violett (lightmagenta), 14=dunkel-grau (darkgray), 15=grau (gray)]
|
||||
** Typ: Zeichenkette
|
||||
** Werte: beliebige Zeichenkette
|
||||
** Standardwert: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
flush
|
||||
disable
|
||||
|
||||
list: zeigt den Status der Protokollierung aller geöffneten Buffer an
|
||||
list: zeigt von allen geöffneten Buffern den Status der Protokollierung an
|
||||
set: legt den Level fest, nach dem der aktuelle Buffer protokolliert werden soll
|
||||
level: legt fest, welche Nachrichten protokolliert werden sollen (0 = nichts protokollieren, 1 = nur die wichtigsten Nachrichten protokollieren .. 9 = alle Nachrichten werden protokolliert)
|
||||
flush: sichert alle Protokolle umgehend
|
||||
disable: die Protokollierung wird für den aktuellen Buffer ausgeschaltet (der Level wird auf 0 gestellt)
|
||||
disable: die Protokollierung wird für den aktuellen Buffer deaktiviert (der Level wird auf 0 gestellt)
|
||||
|
||||
Die Einstellungen "logger.level.*" und "logger.mask.*" können genutzt werden um den Level der Protokollierung festzulegen und um eine Maske für einen oder mehrere Buffer zu definieren.
|
||||
|
||||
Level der Protokollierung, die die IRC Erweiterung unterstützt:
|
||||
1: Nachrichten von Usern, private Nachrichten und Bemerkungen
|
||||
1: Nachrichten von Usern (private und öffentliche Nachrichten) , notice (Server und Channel)
|
||||
2: Wechsel von Nicks (/nick)
|
||||
3: Nachrichten vom Server
|
||||
4: join/part/quit Nachrichten
|
||||
|
||||
@@ -34,7 +34,7 @@ protocol.name: Protokoll und Name relay:
|
||||
- Protokoll "weechat" (es wird kein Name verwendet)
|
||||
|
||||
Das "irc" Protokoll dient dazu eine Verbindung zu einem anderen IRC Client (oder zu einem zweiten WeeChat) herzustellen.
|
||||
Das "weechat" Protokoll wird von einem Remote-Interface genutzt um eine Verbindung herzustellen. Siehe https://weechat.org/download/
|
||||
Das "weechat" Protokoll wird von einem Remote-Interface genutzt um eine Verbindung herzustellen. Siehe https://weechat.org/about/interfaces
|
||||
|
||||
Ohne Angabe von Argumenten werden alle Relay-Clients in einem neuen Buffer dargestellt.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
list: zeigt eine Liste aller Trigger (ohne Angabe von Argumente wird diese Liste standardmäßig ausgegeben)
|
||||
listfull: zeigt eine detaillierte Liste, mit zusätzlichen Informationen, aller Trigger an
|
||||
listdefault: zeigt die standardmäßig genutzen Trigger an
|
||||
listdefault: zeigt die standardmäßig genutzten Trigger an
|
||||
add: fügt einen Trigger hinzu
|
||||
addoff: fügt einen Trigger hinzu (deaktiviert)
|
||||
addreplace: fügt oder ersetzt einen schon existierenden Trigger
|
||||
@@ -32,6 +32,7 @@ listdefault: zeigt die standardmäßig genutzen Trigger an
|
||||
signal: Name(en) des signals (erforderlich)
|
||||
hsignal: Name(en) des hsignal (erforderlich)
|
||||
modifier: Name(en) des modifier (erforderlich)
|
||||
line: Buffertyp ("formatted", "free" oder "*"), Liste von Buffermasken, Tags
|
||||
print: buffer, tags, message, strip colors
|
||||
command: Befehl (erforderlich), Beschreibung, Argumente, Beschreibung der Argumente, Vervollständigung
|
||||
command_run: Befehl(e) (erforderlich)
|
||||
@@ -67,9 +68,9 @@ post_action: Aktion welche nach der Abarbeitung des Triggers ausgeführt werden
|
||||
|
||||
Wenn ein Trigger-Callback aufgerufen wird, dann wird folgende Befehlskette ausgeführt:
|
||||
1. Überprüfung von Bedingungen; falls unwahr, beenden
|
||||
2. ersetze Text mittels erweitertem regulärer POSIX Ausdruck (sofern im Trigger definiert)
|
||||
2. ersetze Text mittels einem oder mehreren erweiterten regulären POSIX Ausdrücken (sofern im Trigger definiert)
|
||||
3. ein oder mehrere Befehle werden ausgeführt (sofern im Trigger definiert)
|
||||
4. Beendigung mit einem Rückgabewert (ausgenommen sind modifiers und focus)
|
||||
4. Beendigung mit einem Rückgabewert (ausgenommen sind modifiers, line und focus)
|
||||
5. Aktion welche nach der Abarbeitung des Triggers ausgeführt werden soll
|
||||
|
||||
Beispiele (die standardmäßig, eingebauten Trigger kann man sich mit "/trigger listdefault" anzeigen lassen):
|
||||
|
||||
@@ -79,9 +79,9 @@ Beispiele:
|
||||
hide [<number>|<name>|-all [<number>|<name>...]]
|
||||
unhide [<number>|<name>|-all [<number>|<name>...]]
|
||||
renumber [<number1> [<number2> [<start>]]]
|
||||
close [<n1>[-<n2>]|<name>]
|
||||
close [<n1>[-<n2>]|<name>...]
|
||||
notify <level>
|
||||
localvar
|
||||
localvar [<number>|<name>]
|
||||
set <property> [<value>]
|
||||
get <property>
|
||||
<number>|-|+|<name>
|
||||
@@ -92,14 +92,14 @@ Beispiele:
|
||||
move: Buffer in der Liste verschieben (kann auch relativ sein, z.B. -1); "-" = auf erste Position verschieben, "+" = auf letzte Position + 1 verschieben
|
||||
swap: tauscht zwei Buffer miteinander aus (bei Angabe von nur einem Buffer (Buffernummer/-name), wird der aktuelle Buffer mit dem angegebenen Buffer getauscht)
|
||||
cycle: springt in einer Schleife von einem Buffer zum nächsten, die in einer Liste angegeben werden
|
||||
merge: fügt den aktuellen Buffer mit einem anderen Buffer zusammen (bei einem Chat-Buffer entsteht eine Zusammenfügung von zwei Buffer
|
||||
(Bei der Standardtastenbelegung kann mittels "CTRL-x" zwischen zusammengefügten Buffern umgeschaltet werden)
|
||||
merge: fügt den aktuellen Buffer mit einem anderen Buffer zusammen (bei einem Chat-Buffer werden zwei Buffer zusammengefügt
|
||||
(Bei der Standardtastenbelegung wird mittels "CTRL-x" zwischen zusammengefügten Buffern umgeschaltet)
|
||||
unmerge: trennt Buffer wieder voneinander, falls zwei Buffer die selbe Nummer teilen
|
||||
hide: versteckt einen Buffer
|
||||
unhide: macht Buffer wieder sichtbar
|
||||
renumber: Buffer werden um nummeriert (Einstellung weechat.look.buffer_auto_renumber muss deaktiviert sein)
|
||||
close: Buffer schließen (Nummer oder Bereich ist optional)
|
||||
notify: setzt den Status der Benachrichtigung für den aktuellen Buffer. Folgende Möglichkeiten bestimmen den Grad der Benachrichtigung:
|
||||
notify: setzt den Status der Benachrichtigung für den aktuellen Buffer. Folgende Möglichkeiten bestimmen den Grad der Benachrichtigung und ob der Buffer in der Hotlist angezeigt wird:
|
||||
none: keine Benachrichtigung
|
||||
highlight: Benachrichtigung bei hervorgehobenen Nachrichten (Highlights)
|
||||
message: Benachrichtigung bei Nachrichten von Usern + Highlights
|
||||
@@ -137,9 +137,9 @@ Beispiele:
|
||||
/buffer close
|
||||
schließt Buffer 5 bis 7:
|
||||
/buffer close 5-7
|
||||
wechselt zum Buffer: #weechat:
|
||||
springt zum Buffer: #weechat:
|
||||
/buffer #weechat
|
||||
wechselt zum nächsten Buffer:
|
||||
springt zum nächsten Buffer:
|
||||
/buffer +1
|
||||
springt zum letzten Buffer:
|
||||
/buffer +
|
||||
@@ -282,7 +282,7 @@ expression: Ausdruck welcher verarbeitet werden soll. Variablen im Format ${vari
|
||||
!* stimmt mit Maske NICHT überein (Platzhalter "*" ist erlaubt)
|
||||
|
||||
Ein Ausdruck gilt als "wahr" sofern das Ergebnis weder NULL, nicht leer und von "0" abweichend ist.
|
||||
Für einen Vergleich werden Fließkommazahlen genutzt sofern es sich bei beiden Ausdrücken um gültige Nummer handelt, die folgendes Format haben müssen:
|
||||
Für einen Vergleich werden Fließkommazahlen genutzt sofern es sich bei beiden Ausdrücken um gültige Nummer handelt, folgende Formate werden unterstützt:
|
||||
- Integer (Beispiele: 5, -7)
|
||||
- Fließkommazahl (Beispiele: 5.2, -7.5, 2.83e-2)
|
||||
- hexadezimale Zahl (Beispiele: 0xA3, -0xA3)
|
||||
@@ -290,21 +290,22 @@ Um einen Vergleich zwischen zwei Zeichenketten zu erzwingen, müssen die Ausdrü
|
||||
50 > 100 ==> 0
|
||||
"50" > "100" ==> 1
|
||||
|
||||
Einige Variablen werden im Ausdruck, mittels der Formatierung ${Variable}, ersetzt. Mögliche Variablen sind, nach Reihenfolge ihrer Priorität:
|
||||
Einige Variablen werden im Ausdruck, mittels der Formatierung ${variable}, ersetzt. Mögliche Variablen sind, nach Reihenfolge ihrer Priorität:
|
||||
1. eine evaluierte Teilzeichenkette (Format: "eval:xxx")
|
||||
2. eine Zeichenkette mit Escapesequenzen (Format: "esc:xxx" oder "\xxx")
|
||||
3. Zeichen welche in einer Zeichenkette nicht dargestellt werden sollen (Format: "hide:Zeichen,Zeichenkette")
|
||||
4. eine Zeichenkette mit einer maximalen Anzahl an Zeichen (Format: "cut:+Max,Suffix,Zeichenkette")
|
||||
oder maximale Anzahl an Zeichen die auf dem Bildschirm angezeigt werden sollen (Format: "cutscr:Max,Suffix,Zeichenkette oder "cutscr:+Max,Suffix,Zeichenkette")
|
||||
5. Ende einer Zeichenkette nutzen (Format: "rev:xxx")
|
||||
6. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color")
|
||||
7. eine Info (Format: "info:Name,Argumente", Argumente sind optional)
|
||||
8. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format")
|
||||
9. eine Umgebungsvariable (Format: "env:XXX")
|
||||
10. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr")
|
||||
11. eine Option (Format: "file.section.option")
|
||||
12. der Name einer lokalen Variablen eines Buffer
|
||||
13. ein hdata Name/Variable (der Wert wird automatisch in eine Zeichenkette konvertiert), standardmäßig wird für "window" und "buffer" das aktuelle Fenster/Buffer verwendet.
|
||||
6. Wiederholung einer Zeichenkette (Format: "repeat:Anzahl,Zeichenkette")
|
||||
7. eine Farbe (Format: "color:xxx", siehe "Anleitung für API Erweiterung", Funktion "color")
|
||||
8. eine Info (Format: "info:Name,Argumente", Argumente sind optional)
|
||||
9. aktuelles Datum/Uhrzeit (Format: "date" oder "date:format")
|
||||
10. eine Umgebungsvariable (Format: "env:XXX")
|
||||
11. ein Dreifachoperand (Format: "if:Bedingung?Wert_falls_wahr:Wert_falls_unwahr")
|
||||
12. eine Option (Format: "file.section.option")
|
||||
13. der Name einer lokalen Variablen eines Buffer
|
||||
14. ein hdata Name/Variable (der Wert wird automatisch in eine Zeichenkette konvertiert), standardmäßig wird für "window" und "buffer" das aktuelle Fenster/Buffer verwendet.
|
||||
Das Format für hdata kann wie folgt aufgebaut sein:
|
||||
hdata.var1.var2...: startet mit hdata (der Pointer muss bekannt sein) und fragt eine Variable nach der anderen ab (weitere hdata können folgen)
|
||||
hdata[list].var1.var2...: startet hdata mittels einer Liste, zum Beispiel:
|
||||
@@ -329,6 +330,8 @@ Beispiele (einfache Zeichenketten):
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH
|
||||
/eval -n ${repeat:5,-} ==> -----
|
||||
|
||||
Beispiele (Bedingungen):
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -24,9 +24,13 @@
|
||||
*-p*, *--no-plugin*::
|
||||
unterbindet das Laden der Erweiterungen beim Programmstart.
|
||||
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
lädt nur die angegebenen Erweiterungen, beim Start (siehe /help weechat.plugin.autoload).
|
||||
Wenn diese Option genutzt wird, dann wird die Option weechat.plugin.autoload ignoriert.
|
||||
|
||||
*-r*, *--run-command* _<command>_::
|
||||
führt einen oder mehrere Befehle aus, nachdem WeeChat gestartet wurde
|
||||
(mehrere Befehle müssen durch Kommata voneinander getrennt werden).
|
||||
führt einen oder mehrere Befehle nach dem Start aus; mehrere Befehle können durch ein
|
||||
Semikolon getrennt werden, diese Option kann mehrfach genutzt werden.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Skripten werden beim Programmstart nicht geladen.
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat-headless - der erweiterbare Chat Client (headless version)
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -57,4 +57,4 @@ include::man_copyright.de.adoc[]
|
||||
|
||||
== SUPPORT / FEHLER MELDEN
|
||||
|
||||
für Hilfe oder um einen Fehler zu melden: https://weechat.org/dev/support
|
||||
für Hilfe oder um einen Fehler zu melden: https://weechat.org/about/support
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat - der erweiterbare Chat Client
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -53,4 +53,4 @@ include::man_copyright.de.adoc[]
|
||||
|
||||
== SUPPORT / FEHLER MELDEN
|
||||
|
||||
für Hilfe oder um einen Fehler zu melden: https://weechat.org/dev/support
|
||||
für Hilfe oder um einen Fehler zu melden: https://weechat.org/about/support
|
||||
|
||||
@@ -47,8 +47,8 @@ https://weechat.org/about/features
|
||||
[[gui]]
|
||||
=== Ich habe gehört es gibt verschiedene GUIs für WeeChat. Wie kann ich diese kompilieren bzw. nutzen?
|
||||
|
||||
Die verschiedenen grafischen Oberflächen findet man auf folgender Seite:
|
||||
https://weechat.org/about/features
|
||||
Es sind einige Remote-Oberflächen verfügbar. Diese findet man auf der Homepage:
|
||||
https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== Ich kann WeeChat nach Cloning des git Repository nicht kompilieren - weshalb?
|
||||
@@ -928,6 +928,15 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
[[aspell_dictionaries]]
|
||||
=== Ich habe aspell Wörterbücher auf mein System installiert. Wie kann ich diese nutzen, ohne WeeChat neu starten zu müssen?
|
||||
|
||||
Du braucht lediglich die aspell Erweiterung neu zu laden:
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== Einstellungen
|
||||
|
||||
@@ -1047,7 +1056,7 @@ für weitere Informationen über Konfigurationsdateien.
|
||||
[[bug_task_patch]]
|
||||
=== Was kann ich machen falls ich einen Fehler gefunden habe, mich nach neuen Funktionen erkundigen, oder Patches einsenden möchte?
|
||||
|
||||
siehe: https://weechat.org/dev/support
|
||||
siehe: https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== Wenn man WeeChat in gdb startet, kann ein Thread-Fehler auftreten. Was beudeutet das?
|
||||
@@ -1084,10 +1093,10 @@ ist Hilfe gerne gesehen.
|
||||
Es gibt einiges zu tun z.B. testen, programmieren, Dokumentation, ...
|
||||
|
||||
Bitte kontaktiere uns via IRC oder email, wirf einen Blick auf die Support-Seite:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== Kann ich Geld oder anderes an die WeeChat Entwickler spenden?
|
||||
|
||||
Du kannst uns Geld zur Unterstützung der weiteren Entwicklung spenden.
|
||||
Details hierzu gibt es auf: https://weechat.org/about/donate
|
||||
Details hierzu gibt es auf: https://weechat.org/donate
|
||||
|
||||
@@ -530,6 +530,7 @@ Liste der Skript API Funktionen:
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+84
-24
@@ -430,10 +430,11 @@ ulimit -c 200000
|
||||
[[gdb_backtrace]]
|
||||
==== Rückverfolgung mit gdb
|
||||
|
||||
Falls WeeChat abstürzen sollte, dann wird auf Ihrem System eine _core_ bzw. _core.12345_ Datei
|
||||
(_12345_ ist die Prozess-Id) erzeugt.
|
||||
Diese Datei wird in dem Verzeichnis erzeugt aus welchem Sie WeeChat gestartet haben (dies
|
||||
ist *nicht* das Verzeichnis in welchem sich WeeChat befindet!).
|
||||
Sollte WeeChat abstürzen wird durch das System eine _core_ oder _core.12345_
|
||||
Datei erstellt (_12345_ ist dabei die Prozess-ID). Dazu muss aber die
|
||||
entprechende <<core_files,Option aktiviert sein>>.
|
||||
Diese Core-Datei wird in dem Verzeichnis erzeugt aus welchem WeeChat gestartet wurde
|
||||
(dies ist *nicht* das Verzeichnis in welchem sich WeeChat befindet!).
|
||||
|
||||
Beispiel: _weechat_ ist in _/usr/bin/_ installiert und die _core_ Datei befindet sich
|
||||
in _/home/xxx/_. Nun wird gdb mit folgendem Befehl aufgerufen:
|
||||
@@ -3588,7 +3589,7 @@ Liste der standardmäßigen Trigger:
|
||||
|
||||
| cmd_pass | modifier |
|
||||
unterdrückt Passwörter in den Befehlen:
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
@@ -3618,8 +3619,8 @@ Ein Trigger hat folgende Optionen (Benennung ist
|
||||
| enabled | `on`, `off` |
|
||||
Wenn die Option auf `off` gesetzt ist, dann ist der Trigger deaktiviert und die Ausführung ist gestoppt.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `print`, `command`, `command_run`,
|
||||
`timer`, `config`, `focus` |
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
Der hook welcher durch Trigger genutzt werden soll. Für weitere Informationen siehe
|
||||
link:weechat_plugin_api.en.html#hooks[Anleitung für API Erweiterung / Hooks] (Englisch).
|
||||
|
||||
@@ -3656,7 +3657,7 @@ folgende Optionen besitzt:
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3709,6 +3710,17 @@ ein Semikolon getrennt.
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.en.html#_hook_modifier[hook_modifier] (Englisch)
|
||||
|
||||
| line |
|
||||
1. Buffertyp +
|
||||
2. Buffername +
|
||||
3. Tags |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. Buffername +
|
||||
2. Tags +
|
||||
@@ -3775,7 +3787,7 @@ um ausschließlich bei einer privaten Nachricht oder einem Highlight ausgeführt
|
||||
zu werden:
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3784,24 +3796,34 @@ ${tg_highlight} || ${tg_msg_pv}
|
||||
Reguläre Ausdrücke werden verwendet um Variablen in einem Callback Hashtable zu ändern.
|
||||
|
||||
Das Format ist: "/regex/replace" oder "/regex/replace/var" (wobei _var_ eine
|
||||
Variable eines Hashtable darstellt). +
|
||||
Variable eines Hashtable darstellt).
|
||||
|
||||
Falls _var_ in der Hashtabelle nicht existieren sollte, wird diese automatisch mit einem
|
||||
leeren Wert angelegt. Damit kann man temporär benutzerspezifische Variablen erstellen.
|
||||
|
||||
Sollte _var_ nicht näher spezifiziert sein, wird die Standard-Variable genutzt,
|
||||
welche abhängig von dem genutzten Hook ist:
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| Hook | Standard-Variable
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| Hook | Standard-Variable | Update allowed ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Alle Variablen können im Trigger upgedated werden, aber nur diese Variablen
|
||||
haben einen Einfluss auf den Wert der vom Trigger zurückgegeben wird und dann von
|
||||
WeeChat genutzt wird.
|
||||
|
||||
Mehrere reguläre Ausdrücke können durch ein Leerzeichen voneinander
|
||||
getrennt werden, zum Beispiel:
|
||||
"/regex1/replace1/var1 /regex2/replace2/var2".
|
||||
@@ -3961,6 +3983,45 @@ vorhanden sind (siehe <<trigger_data_print,hook print>> weiter unten), und nachf
|
||||
Sollte das Signal eine IRC Nachricht beinhalten, wird die Nachricht analysiert
|
||||
und die Daten in einer Hashtable gesichert (siehe <<trigger_data_signal,hook signal>>).
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
Der Callback von "line" legt folgende Variablen in der Hashtable an:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Typ | Beschreibung
|
||||
| buffer | pointer | Buffer.
|
||||
| buffer_name | string | Buffername.
|
||||
| buffer_type | string | Buffertyp ("formatted" oder "free").
|
||||
| y | string | Zeilennummer bei einem Buffer mit freier Einteilung (≥ 0), -1 für einen Buffer mit formatiertem Inhalt.
|
||||
| date | string | Datum der Zeile (Zeitstempel).
|
||||
| date_printed | string | Datum wann die Zeile dargestellt wurde (Zeitstempel).
|
||||
| str_time | string | Datum für Darstellung. Kann Farbkodierungen erhalten.
|
||||
| tags | string | Tags einer Nachricht (Komma wird automatisch zu Beginn und Ende den Tags hinzugefügt).
|
||||
| displayed | string | "1" wenn Zeile dargestellt wird, "0" wenn Zeile gefiltert wird.
|
||||
| notify_level | string | "0" = low level, "1" = Nachricht, "2" = private Nachricht, "3" = Highlight
|
||||
| highlight | string | "1" wenn Highlight, andernfalls "0".
|
||||
| prefix | string | Prefix.
|
||||
| tg_prefix_nocolor | string | Prefix, ohne Farbkodierung.
|
||||
| message | string | Nachricht.
|
||||
| tg_message_nocolor | string | Nachricht, ohne Farbkodierung.
|
||||
|===
|
||||
|
||||
Variablen die mittels Tags in der Nachricht gesetzt werden:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Typ | Beschreibung
|
||||
| tg_tags_count | string | Anzahl an Tags der Nachricht.
|
||||
| tg_tag_nick | string | Nick (extrahiert aus Tag "nick_xxx").
|
||||
| tg_tag_prefix_nick | string | Nickfarbe für Präfix (extrahier aus Tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | Username und Host, Format: username@host (extrahiert aus Tag "host_xxx").
|
||||
| tg_tag_notify | string | Benachrichtigungsstufe (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | string | Benachrichtigungsstufe, falls von _none_ abweichend.
|
||||
| tg_msg_pv | string | "1" für eine private Nachricht, andernfalls "0".
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -3979,8 +4040,7 @@ Der Callback von "print" legt folgende Variablen in der Hashtable an:
|
||||
| tg_message_nocolor | string | Nachricht ohne Farbcodes.
|
||||
|===
|
||||
|
||||
Variablen welche gesetzt werden, aufgrund der Nutzung von Tags in einer Nachricht
|
||||
(_weechat_print_ nutzt ebenso diese Tag-Variablen):
|
||||
Variablen die mittels Tags in der Nachricht gesetzt werden:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4195,4 +4255,4 @@ Unterstützung im IRC findet man auf dem Server _chat.freenode.net_:
|
||||
** _#weechat-de_ (deutsch)
|
||||
** _#weechat-fi_ (finnisch)
|
||||
|
||||
Weitere Möglichkeiten, um mit den Entwicklern in Kontakt zu treten, siehe: https://weechat.org/dev/support
|
||||
Weitere Möglichkeiten, um mit den Entwicklern in Kontakt zu treten, siehe: https://weechat.org/about/support
|
||||
|
||||
+18
-12
@@ -51,6 +51,7 @@ try:
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from operator import itemgetter
|
||||
except ImportError as message:
|
||||
@@ -158,22 +159,27 @@ class AutogenDoc(object):
|
||||
"""Write a line in auto-generated doc file."""
|
||||
self._file.write(string)
|
||||
|
||||
@staticmethod
|
||||
def sha256_file(filename, default):
|
||||
"""
|
||||
Return SHA256 checksum of a file, "default" if file is not found.
|
||||
"""
|
||||
try:
|
||||
with open(filename, 'r') as _file:
|
||||
content = _file.read()
|
||||
if sys.version_info >= (3, ):
|
||||
content = content.encode('utf-8')
|
||||
checksum = hashlib.sha256(content).hexdigest()
|
||||
except IOError:
|
||||
checksum = default
|
||||
return checksum
|
||||
|
||||
def update(self, obj_name, num_files, num_files_updated):
|
||||
"""Update doc file if needed (if content has changed)."""
|
||||
# close temp file
|
||||
self._file.close()
|
||||
# compute checksum on old file
|
||||
try:
|
||||
with open(self.filename, 'r') as _file:
|
||||
shaold = hashlib.sha256(_file.read()).hexdigest()
|
||||
except IOError:
|
||||
shaold = ''
|
||||
# compute checksum on new (temp) file
|
||||
try:
|
||||
with open(self.filename_tmp, 'r') as _file:
|
||||
shanew = hashlib.sha256(_file.read()).hexdigest()
|
||||
except IOError:
|
||||
shanew = ''
|
||||
shaold = AutogenDoc.sha256_file(self.filename, 'old')
|
||||
shanew = AutogenDoc.sha256_file(self.filename_tmp, 'new')
|
||||
# compare checksums
|
||||
if shaold != shanew:
|
||||
# update doc file
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** default value: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** description: pass:none[remap mirc colors in messages using a hashtable: keys are "fg,bg" as integers between -1 (not specified) and 15, values are WeeChat color names or numbers (format is: "1,-1:color1;2,7:color2"), example: "1,-1:darkgray;1,2:white,blue" to remap black to "darkgray" and black on blue to "white,blue"; default WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=gray, 15=white]
|
||||
** description: pass:none[remap mirc colors in messages using a hashtable: keys are "fg,bg" as integers between -1 (not specified) and 15, values are WeeChat color names or numbers (format is: "1,-1:color1;2,7:color2"), example: "1,-1:darkgray;1,2:white,blue" to remap black to "darkgray" and black on blue to "white,blue"; default WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=darkgray, 15=gray]
|
||||
** type: string
|
||||
** values: any string
|
||||
** default value: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -20,7 +20,7 @@ disable: disable logging on current buffer (set level to 0)
|
||||
Options "logger.level.*" and "logger.mask.*" can be used to set level or mask for a buffer, or buffers beginning with name.
|
||||
|
||||
Log levels used by IRC plugin:
|
||||
1: user message, notice, private
|
||||
1: user message (channel and private), notice (server and channel)
|
||||
2: nick change
|
||||
3: server message
|
||||
4: join/part/quit
|
||||
|
||||
@@ -34,7 +34,7 @@ protocol.name: protocol and name to relay:
|
||||
- protocol "weechat" (name is not used)
|
||||
|
||||
The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port.
|
||||
The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/download/
|
||||
The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/about/interfaces
|
||||
|
||||
Without argument, this command opens buffer with list of relay clients.
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ listdefault: list default triggers
|
||||
addoff: add a trigger (disabled)
|
||||
addreplace: add or replace an existing trigger
|
||||
name: name of trigger
|
||||
hook: signal, hsignal, modifier, print, command, command_run, timer, config, focus
|
||||
hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus
|
||||
arguments: arguments for the hook, depending on hook (separated by semicolons):
|
||||
signal: name(s) of signal (required)
|
||||
hsignal: name(s) of hsignal (required)
|
||||
modifier: name(s) of modifier (required)
|
||||
line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
|
||||
print: buffer, tags, message, strip colors
|
||||
command: command (required), description, arguments, description of arguments, completion
|
||||
command_run: command(s) (required)
|
||||
@@ -69,7 +70,7 @@ When a trigger callback is called, following actions are performed, in this orde
|
||||
1. check conditions; if false, exit
|
||||
2. replace text using POSIX extended regular expression(s) (if defined in trigger)
|
||||
3. execute command(s) (if defined in trigger)
|
||||
4. exit with a return code (except for modifiers and focus)
|
||||
4. exit with a return code (except for modifier, line and focus)
|
||||
5. perform post action
|
||||
|
||||
Examples (you can also look at default triggers with /trigger listdefault):
|
||||
|
||||
@@ -79,9 +79,9 @@ Examples:
|
||||
hide [<number>|<name>|-all [<number>|<name>...]]
|
||||
unhide [<number>|<name>|-all [<number>|<name>...]]
|
||||
renumber [<number1> [<number2> [<start>]]]
|
||||
close [<n1>[-<n2>]|<name>]
|
||||
close [<n1>[-<n2>]|<name>...]
|
||||
notify <level>
|
||||
localvar
|
||||
localvar [<number>|<name>]
|
||||
set <property> [<value>]
|
||||
get <property>
|
||||
<number>|-|+|<name>
|
||||
@@ -105,7 +105,7 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
|
||||
message: for messages from users + highlights
|
||||
all: all messages
|
||||
reset: reset to default value (all)
|
||||
localvar: display local variables for current buffer
|
||||
localvar: display local variables for the buffer
|
||||
set: set a property for current buffer
|
||||
get: display a property of current buffer
|
||||
number: jump to buffer by number, possible prefix:
|
||||
@@ -297,14 +297,15 @@ Some variables are replaced in expression, using the format ${variable}, variabl
|
||||
4. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
|
||||
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
|
||||
5. a reversed string (format: "rev:xxx")
|
||||
6. a color (format: "color:xxx", see "Plugin API reference", function "color")
|
||||
7. an info (format: "info:name,arguments", arguments are optional)
|
||||
8. current date/time (format: "date" or "date:format")
|
||||
9. an environment variable (format: "env:XXX")
|
||||
10. a ternary operator (format: "if:condition?value_if_true:value_if_false")
|
||||
11. an option (format: "file.section.option")
|
||||
12. a local variable in buffer
|
||||
13. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
6. a repeated string (format: "repeat:count,string")
|
||||
7. a color (format: "color:xxx", see "Plugin API reference", function "color")
|
||||
8. an info (format: "info:name,arguments", arguments are optional)
|
||||
9. current date/time (format: "date" or "date:format")
|
||||
10. an environment variable (format: "env:XXX")
|
||||
11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
|
||||
12. an option (format: "file.section.option")
|
||||
13. a local variable in buffer
|
||||
14. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
Format for hdata can be one of following:
|
||||
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
|
||||
hdata[list].var1.var2...: start with a hdata using a list, for example:
|
||||
@@ -329,6 +330,8 @@ Examples (simple strings):
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH
|
||||
/eval -n ${repeat:5,-} ==> -----
|
||||
|
||||
Examples (conditions):
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -24,8 +24,13 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Disable plugins auto-load.
|
||||
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
Load only these plugins at startup (see /help weechat.plugin.autoload).
|
||||
If this option is given, the option weechat.plugin.autoload is not used.
|
||||
|
||||
*-r*, *--run-command* _<command>_::
|
||||
Run command(s) after startup (many commands can be separated by semicolons).
|
||||
Run command(s) after startup; many commands can be separated by semicolons,
|
||||
this option can be given multiple times.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Disable scripts auto-load.
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat-headless - the extensible chat client (headless version)
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -54,4 +54,4 @@ include::man_copyright.en.adoc[]
|
||||
|
||||
== SUPPORT / REPORTING BUGS
|
||||
|
||||
For help or a bug report: https://weechat.org/dev/support
|
||||
For help or a bug report: https://weechat.org/about/support
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat - the extensible chat client
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -51,4 +51,4 @@ include::man_copyright.en.adoc[]
|
||||
|
||||
== SUPPORT / REPORTING BUGS
|
||||
|
||||
For help or a bug report: https://weechat.org/dev/support
|
||||
For help or a bug report: https://weechat.org/about/support
|
||||
|
||||
+84
-63
@@ -63,6 +63,7 @@ The main WeeChat directories are:
|
||||
| Directory | Description
|
||||
| src/ | Root of sources.
|
||||
| core/ | Core functions: entry point, internal structures.
|
||||
| hook/ | Hook functions.
|
||||
| gui/ | Functions for buffers, windows, ... (used by all interfaces).
|
||||
| curses/ | Curses interface.
|
||||
| headless/ | Headless mode (no interface).
|
||||
@@ -112,69 +113,88 @@ WeeChat "core" is located in following directories:
|
||||
|
||||
[width="100%",cols="1m,3",options="header"]
|
||||
|===
|
||||
| Path/file | Description
|
||||
| core/ | Core functions: entry point, internal structures.
|
||||
| wee-arraylist.c | Array lists.
|
||||
| wee-backtrace.c | Display a backtrace after a crash.
|
||||
| wee-command.c | WeeChat core commands.
|
||||
| wee-completion.c | Default completions.
|
||||
| wee-config-file.c | Configuration file management.
|
||||
| wee-config.c | Configuration options for WeeChat core (file weechat.conf).
|
||||
| wee-debug.c | Some debug functions.
|
||||
| wee-eval.c | Evaluation of expressions with references to internal vars.
|
||||
| wee-hashtable.c | Hashtables.
|
||||
| wee-hdata.c | Hdata (direct access to data using hashtables).
|
||||
| wee-hook.c | Hooks.
|
||||
| wee-infolist.c | Infolists (lists with objects data).
|
||||
| wee-input.c | Input of commands/text.
|
||||
| wee-list.c | Sorted lists.
|
||||
| wee-log.c | Write to WeeChat log file (weechat.log).
|
||||
| wee-network.c | Network functions (connection to servers/proxies).
|
||||
| wee-proxy.c | Proxy management.
|
||||
| wee-secure.c | Secured data options (file sec.conf).
|
||||
| wee-string.c | Functions on strings.
|
||||
| wee-upgrade-file.c | Internal upgrade system.
|
||||
| wee-upgrade.c | Upgrade for WeeChat core (buffers, lines, history, ...).
|
||||
| wee-url.c | URL transfer (using libcurl).
|
||||
| wee-utf8.c | UTF-8 functions.
|
||||
| wee-util.c | Some other functions.
|
||||
| wee-version.c | Functions for WeeChat version.
|
||||
| weechat.c | Main functions: command line options, startup.
|
||||
| gui/ | Functions for buffers, windows, ... (used by all interfaces).
|
||||
| gui-bar-item.c | Bar items.
|
||||
| gui-bar-window.c | Bar windows.
|
||||
| gui-bar.c | Bars.
|
||||
| gui-buffer.c | Buffers.
|
||||
| gui-chat.c | Chat functions (display message, ...).
|
||||
| gui-color.c | Color functions.
|
||||
| gui-completion.c | Completion on command line.
|
||||
| gui-cursor.c | Cursor mode (free movement of cursor).
|
||||
| gui-filter.c | Filters.
|
||||
| gui-focus.c | Functions about focus (for cursor mode and mouse).
|
||||
| gui-history.c | Commands/text saved in buffers.
|
||||
| gui-hotlist.c | Hotlist management (list of buffers with activity).
|
||||
| gui-input.c | Input functions (input bar).
|
||||
| gui-key.c | Keyboard functions.
|
||||
| gui-layout.c | Layout.
|
||||
| gui-line.c | Lines in buffers.
|
||||
| gui-mouse.c | Mouse.
|
||||
| gui-nick.c | Nick functions.
|
||||
| gui-nicklist.c | Nicklist in buffers.
|
||||
| gui-window.c | Windows.
|
||||
| curses/ | Curses interface.
|
||||
| gui-curses-bar-window.c | Display in bar windows.
|
||||
| gui-curses-chat.c | Display in chat area (messages).
|
||||
| gui-curses-color.c | Color functions.
|
||||
| gui-curses-key.c | Keyboard functions (default keys, read of input).
|
||||
| gui-curses-main.c | WeeChat main loop (waiting for keyboard/network events).
|
||||
| gui-curses-mouse.c | Mouse.
|
||||
| gui-curses-term.c | Functions about terminal.
|
||||
| gui-curses-window.c | Windows.
|
||||
| headless/ | Headless mode (no interface).
|
||||
| main.c | Entry point for headless mode.
|
||||
| ncurses-fake.c | Fake ncurses library.
|
||||
| normal/ | Curses interface.
|
||||
| main.c | Entry point for Curses interface.
|
||||
| Path/file | Description
|
||||
| core/ | Core functions: entry point, internal structures.
|
||||
| wee-arraylist.c | Array lists.
|
||||
| wee-backtrace.c | Display a backtrace after a crash.
|
||||
| wee-command.c | WeeChat core commands.
|
||||
| wee-completion.c | Default completions.
|
||||
| wee-config-file.c | Configuration file management.
|
||||
| wee-config.c | Configuration options for WeeChat core (file weechat.conf).
|
||||
| wee-debug.c | Some debug functions.
|
||||
| wee-eval.c | Evaluation of expressions with references to internal vars.
|
||||
| wee-hashtable.c | Hashtables.
|
||||
| wee-hdata.c | Hdata (direct access to data using hashtables).
|
||||
| wee-hook.c | Hooks.
|
||||
| wee-infolist.c | Infolists (lists with objects data).
|
||||
| wee-input.c | Input of commands/text.
|
||||
| wee-list.c | Sorted lists.
|
||||
| wee-log.c | Write to WeeChat log file (weechat.log).
|
||||
| wee-network.c | Network functions (connection to servers/proxies).
|
||||
| wee-proxy.c | Proxy management.
|
||||
| wee-secure.c | Secured data options (file sec.conf).
|
||||
| wee-string.c | Functions on strings.
|
||||
| wee-upgrade-file.c | Internal upgrade system.
|
||||
| wee-upgrade.c | Upgrade for WeeChat core (buffers, lines, history, ...).
|
||||
| wee-url.c | URL transfer (using libcurl).
|
||||
| wee-utf8.c | UTF-8 functions.
|
||||
| wee-util.c | Some other functions.
|
||||
| wee-version.c | Functions for WeeChat version.
|
||||
| weechat.c | Main functions: command line options, startup.
|
||||
| hook/ | Hook functions.
|
||||
| wee-hook-command-run.c | Hook "command_run".
|
||||
| wee-hook-command.c | Hook "command".
|
||||
| wee-hook-completion.c | Hook "completion".
|
||||
| wee-hook-config.c | Hook "config".
|
||||
| wee-hook-connect.c | Hook "connect".
|
||||
| wee-hook-fd.c | Hook "fd".
|
||||
| wee-hook-focus.c | Hook "focus".
|
||||
| wee-hook-hdata.c | Hook "hdata".
|
||||
| wee-hook-hsignal.c | Hook "hsignal".
|
||||
| wee-hook-info-hashtable.c | Hook "info_hashtable".
|
||||
| wee-hook-info.c | Hook "info".
|
||||
| wee-hook-infolist.c | Hook "infolist".
|
||||
| wee-hook-line.c | Hook "line".
|
||||
| wee-hook-modifier.c | Hook "modifier".
|
||||
| wee-hook-print.c | Hook "print".
|
||||
| wee-hook-process.c | Hook "process".
|
||||
| wee-hook-signal.c | Hook "signal".
|
||||
| wee-hook-timer.c | Hook "timer".
|
||||
| gui/ | Functions for buffers, windows, ... (used by all interfaces).
|
||||
| gui-bar-item.c | Bar items.
|
||||
| gui-bar-window.c | Bar windows.
|
||||
| gui-bar.c | Bars.
|
||||
| gui-buffer.c | Buffers.
|
||||
| gui-chat.c | Chat functions (display message, ...).
|
||||
| gui-color.c | Color functions.
|
||||
| gui-completion.c | Completion on command line.
|
||||
| gui-cursor.c | Cursor mode (free movement of cursor).
|
||||
| gui-filter.c | Filters.
|
||||
| gui-focus.c | Functions about focus (for cursor mode and mouse).
|
||||
| gui-history.c | Commands/text saved in buffers.
|
||||
| gui-hotlist.c | Hotlist management (list of buffers with activity).
|
||||
| gui-input.c | Input functions (input bar).
|
||||
| gui-key.c | Keyboard functions.
|
||||
| gui-layout.c | Layout.
|
||||
| gui-line.c | Lines in buffers.
|
||||
| gui-mouse.c | Mouse.
|
||||
| gui-nick.c | Nick functions.
|
||||
| gui-nicklist.c | Nicklist in buffers.
|
||||
| gui-window.c | Windows.
|
||||
| curses/ | Curses interface.
|
||||
| gui-curses-bar-window.c | Display in bar windows.
|
||||
| gui-curses-chat.c | Display in chat area (messages).
|
||||
| gui-curses-color.c | Color functions.
|
||||
| gui-curses-key.c | Keyboard functions (default keys, read of input).
|
||||
| gui-curses-main.c | WeeChat main loop (waiting for keyboard/network events).
|
||||
| gui-curses-mouse.c | Mouse.
|
||||
| gui-curses-term.c | Functions about terminal.
|
||||
| gui-curses-window.c | Windows.
|
||||
| headless/ | Headless mode (no interface).
|
||||
| main.c | Entry point for headless mode.
|
||||
| ncurses-fake.c | Fake ncurses library.
|
||||
| normal/ | Curses interface.
|
||||
| main.c | Entry point for Curses interface.
|
||||
|===
|
||||
|
||||
[[sources_plugins]]
|
||||
@@ -270,6 +290,7 @@ WeeChat "core" is located in following directories:
|
||||
| logger/ | Logger plugin.
|
||||
| logger.c | Main logger functions.
|
||||
| logger-buffer.c | Logger buffer list management.
|
||||
| logger-command.c | Logger commands.
|
||||
| logger-config.c | Logger config options (file logger.conf).
|
||||
| logger-info.c | Logger info/infolists/hdata.
|
||||
| logger-tail.c | Functions to get last lines of a file.
|
||||
|
||||
@@ -40,8 +40,8 @@ More info on this page: https://weechat.org/about/features
|
||||
[[gui]]
|
||||
=== I heard about many GUIs for WeeChat. How can I compile/use them?
|
||||
|
||||
Some remote GUIs are available, see the links on features page:
|
||||
https://weechat.org/about/features
|
||||
Some remote GUIs are available, see the remote interfaces page:
|
||||
https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== I can't compile WeeChat after cloning git repository, why?
|
||||
@@ -880,6 +880,15 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
[[aspell_dictionaries]]
|
||||
=== I installed aspell dictionaries on my system, how can I use them without restarting WeeChat?
|
||||
|
||||
You have to reload the aspell plugin:
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== Settings
|
||||
|
||||
@@ -994,7 +1003,7 @@ for more information about configuration files.
|
||||
[[bug_task_patch]]
|
||||
=== How should I report bugs, ask for new features or send patches?
|
||||
|
||||
See: https://weechat.org/dev/support
|
||||
See: https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== When I run WeeChat under gdb, there is error about threads, what can I do?
|
||||
@@ -1030,10 +1039,10 @@ some OS' we don't have, to test WeeChat.
|
||||
There's many tasks to do (testing, code, documentation, ...)
|
||||
|
||||
Please contact us via IRC or mail, look at support page:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== Can I give money or other things to WeeChat developers?
|
||||
|
||||
You can give us money to help development.
|
||||
Details on https://weechat.org/about/donate
|
||||
Details on https://weechat.org/donate
|
||||
|
||||
@@ -2294,6 +2294,12 @@ expanded to last):
|
||||
`+${rev:Hello, world!}+` |
|
||||
`+!dlrow ,olleH+`
|
||||
|
||||
| `+${repeat:count,string}+` +
|
||||
(_WeeChat ≥ 2.3_) |
|
||||
Repeated string. |
|
||||
`+${repeat:5,-}+` |
|
||||
`+-----+`
|
||||
|
||||
| `+${re:N}+` +
|
||||
(_WeeChat ≥ 1.1_) |
|
||||
Regex captured group: `0` = whole string matching, `1` to `99` = group
|
||||
@@ -5661,7 +5667,7 @@ option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", ""
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
@@ -9110,11 +9116,287 @@ hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "",
|
||||
"my_connect_cb", "")
|
||||
----
|
||||
|
||||
==== hook_line
|
||||
|
||||
_WeeChat ≥ 2.3._
|
||||
|
||||
Hook a line to be printed in a buffer.
|
||||
|
||||
When a line is printed in a buffer, hooks are called in this order:
|
||||
|
||||
* <<_hook_line,hook line>> (this hook): it can change the buffer, prefix,
|
||||
message, tags, notify level, … (see below)
|
||||
* <<_hook_modifier,hook modifier>> "<<hook_modifier_weechat_print,weechat_print>>":
|
||||
it can change the prefix and message on a buffer with formatted content
|
||||
* <<_hook_print,hook print>>: called when the line has been added in a buffer
|
||||
with formatted content (nothing can be changed directly with this hook).
|
||||
|
||||
[NOTE]
|
||||
The "line" hook is the only one among these three hooks that can work on
|
||||
buffers with free content.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_hook *weechat_hook_line (const char *buffer_type,
|
||||
const char *buffer_name,
|
||||
const char *tags,
|
||||
struct t_hashtable *(*callback)(const void *pointer,
|
||||
void *data,
|
||||
struct t_hashtable *line),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _buffer_type_: catch lines on the given buffer type (if NULL or empty string,
|
||||
_formatted_ is the default):
|
||||
** _formatted_: catch lines on formatted buffers only (default)
|
||||
** _free_: catch lines on buffers with free content only
|
||||
** _*_: catch lines on all buffer types
|
||||
* _buffer_name_: comma-separated list of buffer masks
|
||||
(see <<_buffer_match_list,buffer_match_list>>); NULL, empty string or "*"
|
||||
matches any buffer
|
||||
* _tags_: catch only messages with these tags (optional): comma-separated list
|
||||
of tags that must be in message (logical "or"); it is possible to combine
|
||||
many tags as a logical "and" with separator `+++`; wildcard `+*+` is allowed
|
||||
in tags
|
||||
* _callback_: function called when a line is added in a buffer, arguments and
|
||||
return value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _struct t_hashtable *line_: hashtable with the line info, keys and values are
|
||||
strings (see table below)
|
||||
** return value: hashtable with new values (see table below)
|
||||
* _callback_pointer_: pointer given to callback when it is called by WeeChat
|
||||
* _callback_data_: pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Return value:
|
||||
|
||||
* pointer to new hook, NULL if error occurred
|
||||
|
||||
Line data sent to the callback is a hashtable, with following values
|
||||
(keys and values are strings):
|
||||
|
||||
[width="100%",cols="^1,3,3,2",options="header"]
|
||||
|===
|
||||
| Key | Value (formatted buffer) | Value (free buffer) | Examples
|
||||
|
||||
| buffer |
|
||||
Buffer pointer. |
|
||||
Buffer pointer. |
|
||||
`+0x12345678+`
|
||||
|
||||
| buffer_name |
|
||||
Buffer name. |
|
||||
Buffer name. |
|
||||
`+core.weechat+` +
|
||||
`+irc.server.freenode+` +
|
||||
`+irc.freenode.#weechat+`
|
||||
|
||||
| buffer_type |
|
||||
"formatted" |
|
||||
"free" |
|
||||
`+formatted+` +
|
||||
`+free+`
|
||||
|
||||
| y |
|
||||
N/A ("-1"). |
|
||||
Line number (≥ "0"). |
|
||||
`+-1+` +
|
||||
`+8+`
|
||||
|
||||
| date |
|
||||
Line date (timestamp). |
|
||||
N/A ("0"). |
|
||||
`+1533792000+`
|
||||
|
||||
| date_printed |
|
||||
Date when line was displayed (timestamp). |
|
||||
N/A ("0"). |
|
||||
`+1533792012+`
|
||||
|
||||
| str_time |
|
||||
Date for display (possible color codes inside). |
|
||||
N/A (empty string). |
|
||||
`+09:07:20+`
|
||||
|
||||
| tags_count |
|
||||
Number of tags in the line (≥ "0"). |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| tags |
|
||||
Comma-separated list of tags. |
|
||||
N/A (empty string). |
|
||||
`+irc_join,nick_test+`
|
||||
|
||||
| displayed |
|
||||
"0" = line is filtered (hidden) +
|
||||
"1" = line is not filtered (displayed). |
|
||||
"0" = line is filtered (hidden) +
|
||||
"1" = line is not filtered (displayed). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| notify_level |
|
||||
"0" = low level +
|
||||
"1" = message +
|
||||
"2" = private message +
|
||||
"3" = highlight |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| highlight |
|
||||
"0" = no highlight +
|
||||
"1" = line has highlight. |
|
||||
N/A ("0"). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| prefix |
|
||||
Prefix of the line. |
|
||||
N/A (empty string). |
|
||||
`+-->+`
|
||||
|
||||
| message |
|
||||
Message of the line. |
|
||||
Message of the line. |
|
||||
`+test (~test@example.com) has joined #channel+`
|
||||
|===
|
||||
|
||||
The callback can return a hashtable with some fields to update the line.
|
||||
Any invalid value in a field is silently ignored by WeeChat.
|
||||
|
||||
The following keys can be set in the hashtable (keys and values are strings
|
||||
in this hashtable):
|
||||
|
||||
[width="100%",cols="^1,2,2,5",options="header"]
|
||||
|===
|
||||
| Key | Allowed value (formatted buffer) | Allowed value (free buffer) | Result
|
||||
|
||||
| buffer |
|
||||
Pointer of a buffer with formatted content. |
|
||||
Pointer of a buffer with free content. |
|
||||
The line is displayed on this buffer. +
|
||||
If the value is empty, the line is deleted (anything else in the hashtable
|
||||
is then ignored); the next hooks of type "line" are not called.
|
||||
|
||||
| buffer_name |
|
||||
Name of a buffer with formatted content. |
|
||||
Name of a buffer with free content. |
|
||||
The line is displayed on this buffer. +
|
||||
If `buffer` is also set, the value of `buffer_name` has higher priority and is used. +
|
||||
If the value is empty, the line is deleted (anything else in the hashtable
|
||||
is then ignored); the next hooks of type "line" are not called.
|
||||
|
||||
| y |
|
||||
N/A. |
|
||||
Integer (≥ "0"). |
|
||||
The line number is set to this value.
|
||||
|
||||
| date |
|
||||
Timestamp. |
|
||||
N/A. |
|
||||
The date is set to this value. +
|
||||
The value of `str_time` is updated accordingly.
|
||||
|
||||
| date_printed |
|
||||
Timestamp. |
|
||||
N/A. |
|
||||
The printed date is set to this timestamp (not displayed).
|
||||
|
||||
| str_time |
|
||||
String. |
|
||||
N/A. |
|
||||
This string is used to display the date line. +
|
||||
If `date` is also set, the value of `str_time` has higher priority and is used.
|
||||
|
||||
| tags |
|
||||
String. |
|
||||
N/A. |
|
||||
The line tags are replaced with this comma-separated list of tags. +
|
||||
The values of `notify_level` and `highlight` are updated accordingly.
|
||||
|
||||
| notify_level |
|
||||
Integer ("0" to "3"). |
|
||||
N/A. |
|
||||
The notify level is set to this value. The hotlist will be updated
|
||||
accordingly once the line is added in the buffer. +
|
||||
The value of `highlight` is updated accordingly. +
|
||||
If `tags` is also set, the value of `notify_level` has higher priority and is used.
|
||||
|
||||
| highlight |
|
||||
Integer ("0" or "1"). |
|
||||
N/A. |
|
||||
"0" disables highlight on the line, "1" forces a highlight on the line. +
|
||||
If `tags` or `notify_level` are set, the value of `highlight` has higher
|
||||
priority and is used.
|
||||
|
||||
| prefix |
|
||||
String. |
|
||||
N/A. |
|
||||
The line prefix is set to this value.
|
||||
|
||||
| message |
|
||||
String. |
|
||||
String. |
|
||||
The line message is set to this value.
|
||||
|===
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_line_cb (const void *pointer, void *data, struct t_hasbtable *line)
|
||||
{
|
||||
struct t_hashtable *hashtable;
|
||||
|
||||
hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
/* force a highlight on the line */
|
||||
weechat_hashtable_set (hashtable, "highlight", "1");
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
/* catch lines with tag "irc_join" */
|
||||
struct t_hook *my_line_hook =
|
||||
weechat_hook_line ("", "", "irc_join", &my_line_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
|
||||
|
||||
# example
|
||||
def my_line_cb(data, line):
|
||||
# force a highlight on the line
|
||||
return {"highlight": "1"}
|
||||
|
||||
# catch lines with tag "irc_join"
|
||||
hook = weechat.hook_line("", "", "irc_join", "my_line_cb", "")
|
||||
----
|
||||
|
||||
==== hook_print
|
||||
|
||||
_Updated in 0.4.3, 1.0, 1.5._
|
||||
|
||||
Hook a message printed.
|
||||
Hook a message printed. It is called when a line has been added in a buffer
|
||||
with formatted content.
|
||||
|
||||
For more information on the hooks called when a line is printed, see
|
||||
<<_hook_line,hook_line>>.
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -10668,110 +10950,68 @@ List of modifiers used by WeeChat and plugins:
|
||||
|===
|
||||
| Modifier | Modifier data | String | Output
|
||||
|
||||
| charset_decode |
|
||||
plugin.buffer_name |
|
||||
Any string. |
|
||||
String decoded from charset found for plugin/buffer to UTF-8.
|
||||
|
||||
| charset_encode |
|
||||
plugin.buffer_name |
|
||||
Any string. |
|
||||
String encoded from UTF-8 to charset found for plugin/buffer.
|
||||
|
||||
| irc_color_decode |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with IRC colors converted to WeeChat colors (or IRC colors removed).
|
||||
|
||||
| irc_color_encode |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with IRC colors (or IRC colors removed).
|
||||
|
||||
| irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with ANSI colors converted to IRC colors (or ANSI colors removed).
|
||||
|
||||
| irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Server name |
|
||||
Authentication command (for example: `+/msg nickserv identify password+`). |
|
||||
command with hidden password (for example: `+/msg nickserv identify ********+`).
|
||||
|
||||
| irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Server name |
|
||||
Message displayed after `/msg` sent to nickserv. |
|
||||
Message with hidden password.
|
||||
|
||||
| irc_in_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_in_xxx]] irc_in_xxx ^(1)^ |
|
||||
Server name |
|
||||
Content of message received from IRC server (before charset decoding). |
|
||||
New content of message.
|
||||
|
||||
| irc_in2_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_in2_xxx]] irc_in2_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.5)_ |
|
||||
Server name |
|
||||
Content of message received from IRC server (after charset decoding). |
|
||||
New content of message.
|
||||
|
||||
| irc_out1_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_out1_xxx]] irc_out1_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
Server name |
|
||||
Content of message about to be sent to IRC server before automatic split
|
||||
(to fit in 512 bytes by default). |
|
||||
New content of message.
|
||||
|
||||
| irc_out_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_out_xxx]] irc_out_xxx ^(1)^ |
|
||||
Server name |
|
||||
Content of message about to be sent to IRC server after automatic split
|
||||
(to fit in 512 bytes by default). |
|
||||
New content of message.
|
||||
|
||||
| color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with ANSI colors converted to WeeChat colors (or ANSI colors removed).
|
||||
|
||||
| bar_condition_yyy ^(2)^ |
|
||||
| [[hook_modifier_bar_condition_yyy]] bar_condition_yyy ^(2)^ |
|
||||
String with window pointer ("0x123..") |
|
||||
Empty string. |
|
||||
"1" to display bar, "0" to hide it.
|
||||
|
||||
| history_add +
|
||||
| [[hook_modifier_history_add]] history_add +
|
||||
_(WeeChat ≥ 0.3.2)_ |
|
||||
String with buffer pointer ("0x123..") |
|
||||
Content of command line to add in command history (buffer and global). |
|
||||
String added to command history.
|
||||
|
||||
| input_text_content |
|
||||
| [[hook_modifier_input_text_content]] input_text_content |
|
||||
String with buffer pointer ("0x123..") |
|
||||
Content of command line. |
|
||||
New content of command line.
|
||||
|
||||
| input_text_display |
|
||||
| [[hook_modifier_input_text_display]] input_text_display |
|
||||
String with buffer pointer ("0x123..") |
|
||||
Content of command line, without cursor tag. |
|
||||
New string, for display only (command line is not changed).
|
||||
|
||||
| input_text_display_with_cursor |
|
||||
| [[hook_modifier_input_text_display_with_cursor]] input_text_display_with_cursor |
|
||||
String with buffer pointer ("0x123..") |
|
||||
Content of command line, with cursor tag. |
|
||||
New string, for display only (command line is not changed).
|
||||
|
||||
| input_text_for_buffer +
|
||||
| [[hook_modifier_input_text_for_buffer]] input_text_for_buffer +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
String with buffer pointer ("0x123..") |
|
||||
Content of command line sent to buffer (text or command). |
|
||||
New content of command line sent to buffer.
|
||||
|
||||
| weechat_print |
|
||||
| [[hook_modifier_weechat_print]] weechat_print |
|
||||
plugin + ";" + buffer_name + ";" + tags |
|
||||
Message printed. |
|
||||
New message printed.
|
||||
New message printed. +
|
||||
For more information on the hooks called when a line is printed, see
|
||||
<<_hook_line,hook_line>>.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -10845,6 +11085,57 @@ Return value:
|
||||
|
||||
* string modified, NULL if error occurred
|
||||
|
||||
List of modifiers defined by WeeChat and plugins that can be used:
|
||||
|
||||
[width="100%",cols="^2,3,4,4",options="header"]
|
||||
|===
|
||||
| Modifier | Modifier data | String | Output
|
||||
|
||||
| [[hook_modifier_charset_decode]] charset_decode |
|
||||
plugin.buffer_name |
|
||||
Any string. |
|
||||
String decoded from charset found for plugin/buffer to UTF-8.
|
||||
|
||||
| [[hook_modifier_charset_encode]] charset_encode |
|
||||
plugin.buffer_name |
|
||||
Any string. |
|
||||
String encoded from UTF-8 to charset found for plugin/buffer.
|
||||
|
||||
| [[hook_modifier_irc_color_decode]] irc_color_decode |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with IRC colors converted to WeeChat colors (or IRC colors removed).
|
||||
|
||||
| [[hook_modifier_irc_color_encode]] irc_color_encode |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with IRC colors (or IRC colors removed).
|
||||
|
||||
| [[hook_modifier_irc_color_decode_ansi]] irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with ANSI colors converted to IRC colors (or ANSI colors removed).
|
||||
|
||||
| [[hook_modifier_irc_command_auth]] irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Server name |
|
||||
Authentication command (for example: `+/msg nickserv identify password+`). |
|
||||
command with hidden password (for example: `+/msg nickserv identify ********+`).
|
||||
|
||||
| [[hook_modifier_irc_message_auth]] irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Server name |
|
||||
Message displayed after `/msg` sent to nickserv. |
|
||||
Message with hidden password.
|
||||
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" to keep colors, "0" to remove colors |
|
||||
Any string. |
|
||||
String with ANSI colors converted to WeeChat colors (or ANSI colors removed).
|
||||
|===
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -489,23 +489,23 @@ quit
|
||||
Messages are sent as binary data, using following format (with size in bytes):
|
||||
|
||||
....
|
||||
┌────────╥─────────────╥────╥────────┬──────────╥───────╥────────┬──────────┐
|
||||
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
|
||||
└────────╨─────────────╨────╨────────┴──────────╨───────╨────────┴──────────┘
|
||||
└──────┘ └───────────┘ └──┘ └──────┘ └────────┘ └──────┘ └────────┘
|
||||
4 1 ?? 3 ?? 3 ??
|
||||
└────────────────────┘ └──────────────────────────────────────────────────┘
|
||||
header (5) compressed data (??)
|
||||
└─────────────────────────────────────────────────────────────────────────┘
|
||||
_length_ bytes
|
||||
┌────────╥─────────────╥─────────╥────────┬──────────╥───────╥────────┬──────────┐
|
||||
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
|
||||
└────────╨─────────────╨─────────╨────────┴──────────╨───────╨────────┴──────────┘
|
||||
└──────┘ └───────────┘ └───────┘ └──────┘ └────────┘ └──────┘ └────────┘
|
||||
4 1 4 + str 3 ?? 3 ??
|
||||
└────────────────────┘ └───────────────────────────────────────────────────────┘
|
||||
header (5) compressed data (??)
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
'length' bytes
|
||||
....
|
||||
|
||||
* _length_ (unsigned integer): number of bytes of whole message (including
|
||||
this field)
|
||||
* _length_ (unsigned integer, 4 bytes): number of bytes of whole message
|
||||
(including this field)
|
||||
* _compression_ (byte): flag:
|
||||
** _0x00_: following data is not compressed
|
||||
** _0x01_: following data is compressed with _zlib_
|
||||
* _id_ (string): identifier sent by client (before command name); it can be
|
||||
* _id_ (string, 4 bytes + content): identifier sent by client (before command name); it can be
|
||||
empty (string with zero length and no content) if no identifier was given in
|
||||
command
|
||||
* _type_ (3 chars): a type: 3 letters (see table below)
|
||||
@@ -1569,13 +1569,13 @@ hdata buffer:gui_buffers(*)/lines/first_line(*)/data
|
||||
└───────────────────────────┘ └───┘ └──┘
|
||||
h-path (hdata names) keys count
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────┘ └─────┘
|
||||
p-path (pointers) objects
|
||||
└─────────────────────────────────────────┘
|
||||
line 1
|
||||
──╥───────────┬───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ 0x23d8a10 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────────────────┘ └─────┘
|
||||
p-path (pointers) objects
|
||||
└─────────────────────────────────────────────────────┘
|
||||
line 1
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──────────────┐
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d6110 │ ..... ║ ............ │
|
||||
|
||||
@@ -517,6 +517,7 @@ List of functions in script API:
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+79
-21
@@ -423,7 +423,7 @@ ulimit -c 200000
|
||||
==== Get backtrace with gdb
|
||||
|
||||
When WeeChat crashes, your system will create a file _core_ or _core.12345_
|
||||
(_12345_ is process id).
|
||||
(_12345_ is process id) if the <<core_files,option is enabled>>.
|
||||
This file is created in directory where you have run WeeChat (this is *not*
|
||||
directory where WeeChat is installed!).
|
||||
|
||||
@@ -3508,7 +3508,7 @@ List of default triggers:
|
||||
|
||||
| cmd_pass | modifier |
|
||||
Hide password in commands:
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
@@ -3539,8 +3539,8 @@ A trigger has the following options (names are
|
||||
When option is `off`, the trigger is disabled and actions are not executed
|
||||
any more.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `print`, `command`, `command_run`,
|
||||
`timer`, `config`, `focus` |
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
The hook used in trigger. For more information, see
|
||||
link:weechat_plugin_api.en.html#hooks[WeeChat plugin API reference / Hooks].
|
||||
|
||||
@@ -3575,7 +3575,7 @@ For example, the default _beep_ trigger has following options:
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3627,6 +3627,17 @@ The arguments depend on the hook used. They are separated by semicolons.
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.en.html#_hook_modifier[hook_modifier]
|
||||
|
||||
| line |
|
||||
1. buffer type +
|
||||
2. buffer name +
|
||||
3. tags |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. buffer name +
|
||||
2. tags +
|
||||
@@ -3691,7 +3702,7 @@ Example: the default _beep_ trigger uses this condition to make a beep only on
|
||||
highlight or private message:
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3700,24 +3711,33 @@ ${tg_highlight} || ${tg_msg_pv}
|
||||
The regular expression is used to change variables in callback hashtable.
|
||||
|
||||
The format is: "/regex/replace" or "/regex/replace/var" (where _var_ is a
|
||||
variable of the hashtable). +
|
||||
variable of the hashtable).
|
||||
|
||||
If _var_ does not exist in the hashtable, it is created automatically with an
|
||||
empty value. This allows to create custom temporary variables.
|
||||
|
||||
If _var_ is not specified, the default variable is used, it depends on hook
|
||||
type:
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| Hook | Default variable
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| Hook | Default variable | Update allowed ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ All variables can be updated in the trigger, but only these variables
|
||||
have an effect on the value returned by the trigger and used by WeeChat.
|
||||
|
||||
Many regular expressions can be separated by a space, for example:
|
||||
"/regex1/replace1/var1 /regex2/replace2/var2".
|
||||
|
||||
@@ -3872,6 +3892,45 @@ For the _weechat_print_ modifier, variables using message tags are added (see
|
||||
If the modifier contains an IRC message, the message is parsed and extra data is
|
||||
added in hashtable (see <<trigger_data_signal,hook signal>>).
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
The "line" callback sets following variables in hashtable:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| buffer | pointer | Buffer.
|
||||
| buffer_name | string | Buffer name.
|
||||
| buffer_type | string | Buffer type ("formatted" or "free").
|
||||
| y | string | Line number for a buffer with free content (≥ 0), -1 for a buffer with formatted content.
|
||||
| date | string | Line date (timestamp).
|
||||
| date_printed | string | Date when line was displayed (timestamp).
|
||||
| str_time | string | Date for display. It may contain color codes.
|
||||
| tags | string | Tags of message (with comma added at beginning/end of string).
|
||||
| displayed | string | "1" if displayed, "0" if line filtered.
|
||||
| notify_level | string | "0" = low level, "1" = message, "2" = private message, "3" = highlight
|
||||
| highlight | string | "1" if highlight, otherwise "0".
|
||||
| prefix | string | Prefix.
|
||||
| tg_prefix_nocolor | string | Prefix without color codes.
|
||||
| message | string | Message.
|
||||
| tg_message_nocolor | string | Message without color codes.
|
||||
|===
|
||||
|
||||
Variables set using tags in message:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_tags_count | string | Number of tags in message.
|
||||
| tg_tag_nick | string | Nick (from tag "nick_xxx").
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -3890,8 +3949,7 @@ The "print" callback sets following variables in hashtable:
|
||||
| tg_message_nocolor | string | Message without color codes.
|
||||
|===
|
||||
|
||||
Variables set using tags in message (they are set in modifier _weechat_print_
|
||||
too):
|
||||
Variables set using tags in message:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4106,4 +4164,4 @@ For support with IRC, on server _chat.freenode.net_:
|
||||
** _#weechat-de_ (German)
|
||||
** _#weechat-fi_ (Finnish)
|
||||
|
||||
For other ways of support, see: https://weechat.org/dev/support
|
||||
For other ways of support, see: https://weechat.org/about/support
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** valeur par défaut: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** description: pass:none[réassigner les couleurs mirc dans les messages en utilisant une table de hachage : les clés sont "fg,bg" sous forme d'entiers entre -1 (non spécifié) et 15, les valeurs sont des noms de couleur WeeChat ou nombres (le format est : "1,-1:couleur1;2,7:couleur2"), exemple : "1,-1:darkgray;1,2:white,blue" pour réassigner le noir en "darkgray" et le noir sur bleu en "white,blue" ; les couleurs WeeChat par défaut pour les codes IRC sont : 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=gray, 15=white]
|
||||
** description: pass:none[réassigner les couleurs mirc dans les messages en utilisant une table de hachage : les clés sont "fg,bg" sous forme d'entiers entre -1 (non spécifié) et 15, les valeurs sont des noms de couleur WeeChat ou nombres (le format est : "1,-1:couleur1;2,7:couleur2"), exemple : "1,-1:darkgray;1,2:white,blue" pour réassigner le noir en "darkgray" et le noir sur bleu en "white,blue" ; les couleurs WeeChat par défaut pour les codes IRC sont : 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=darkgray, 15=gray]
|
||||
** type: chaîne
|
||||
** valeurs: toute chaîne
|
||||
** valeur par défaut: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -20,7 +20,7 @@ disable : désactiver l'enregistrement pour le tampon courant (définir le nive
|
||||
Les options "logger.level.*" et "logger.mask.*" peuvent être utilisées pour définir le niveau ou le masque de nom de fichier pour un tampon, ou plusieurs tampons commençant par un nom.
|
||||
|
||||
Niveaux de log utilisés par l'extension IRC :
|
||||
1 : message d'utilisateur, notice, privé
|
||||
1 : message d'utilisateur (canal et privé), notice (serveur et canal)
|
||||
2 : changement de pseudo
|
||||
3 : message du serveur
|
||||
4 : join/part/quit
|
||||
|
||||
@@ -34,7 +34,7 @@ protocole.nom : protocole et nom à relayer :
|
||||
- protocole "weechat" (le nom n'est pas utilisé)
|
||||
|
||||
Le protocole "irc" permet à n'importe quel client IRC (incluant WeeChat lui-même) de se connecter sur le port.
|
||||
Le protocole "weechat" permet à une interface distante de se connecter sur le port, voir la liste ici : https://weechat.org/download/
|
||||
Le protocole "weechat" permet à une interface distante de se connecter sur le port, voir la liste ici : https://weechat.org/about/interfaces
|
||||
|
||||
Sans paramètre, cette commande ouvre le tampon avec la liste des clients pour le relai.
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ listdefault : lister les triggers par défaut
|
||||
addoff : ajouter un trigger (désactivé)
|
||||
addreplace : ajouter ou remplacer un trigger existant
|
||||
nom : nom du trigger
|
||||
hook : signal, hsignal, modifier, print, command, command_run, timer, config, focus
|
||||
hook : signal, hsignal, modifier, line, print, command, command_run, timer, config, focus
|
||||
paramètres : paramètres pour le hook, dépendant du hook (séparés par des points-virgules) :
|
||||
signal : nom(s) de signal (obligatoire)
|
||||
hsignal : nom(s) de signal (obligatoire)
|
||||
modifier : nom(s) de modificateur (obligatoire)
|
||||
line : type de tampon ("formatted", "free" ou "*"), liste de masques de tampons, étiquettes
|
||||
print : tampon, étiquettes, message, suppression des couleurs (0/1)
|
||||
command : commande (obligatoire), description, paramètres, description des paramètres, complétion
|
||||
command_run : commande(s) (obligatoire)
|
||||
@@ -69,7 +70,7 @@ Lorsqu'une fonction de rappel de trigger est appelée, les actions suivantes son
|
||||
1. vérifier les conditions ; si faux, sortir
|
||||
2. remplacer le texte en utilisant une/des expression(s)s régulière(s)s POSIX étendue(s)s (si définie(s) dans le trigger)
|
||||
3. exécuter le(s) commande(s) (si définie(s) dans le trigger)
|
||||
4. sortir avec le code retour (sauf pour les modificateurs et focus)
|
||||
4. sortir avec le code retour (sauf pour les modificateurs, line et focus)
|
||||
5. effectuer l'action "post"
|
||||
|
||||
Exemples (vous pouvez aussi regarder les triggers par défaut avec /trigger listdefault) :
|
||||
|
||||
@@ -79,9 +79,9 @@ Exemples :
|
||||
hide [<nombre>|<nom>|-all [<nombre>|<nom>...]]
|
||||
unhide [<nombre>|<nom>|-all [<nombre>|<nom>...]]
|
||||
renumber <nombre1> [<nombre2> [<départ>]]
|
||||
close [<n1>[-<n2>]|<nom>]
|
||||
close [<n1>[-<n2>]|<nom>...]
|
||||
notify <niveau>
|
||||
localvar
|
||||
localvar [<nombre>|<nom>]
|
||||
set <propriété> [<valeur>]
|
||||
get <propriété>
|
||||
<nombre>|<nom>
|
||||
@@ -105,7 +105,7 @@ renumber : renuméroter des tampons (fonctionne seulement si l'option weechat.l
|
||||
message : pour les messages d'utilisateurs + highlights
|
||||
all : pour tous les messages
|
||||
reset : réinitialise à valeur par défaut (all)
|
||||
localvar : afficher la liste des variables locales pour le tampon courant
|
||||
localvar : afficher la liste des variables locales pour le tampon
|
||||
set : modifier une propriété du tampon courant
|
||||
get : afficher une propriété du tampon courant
|
||||
nombre : sauter au tampon qui a ce numéro, préfixe possible :
|
||||
@@ -297,14 +297,15 @@ Des variables sont remplacées dans l'expression, en utilisant le format ${varia
|
||||
4. une chaîne avec un maximum de caractères (format : "cut:max,suffixe,chaîne" ou "cut:+max,suffixe,chaîne")
|
||||
ou un maximum de caractères affichés à l'écran (format : "cutscr:max,suffixe,chaîne" ou "cutscr:+max,suffixe,chaîne")
|
||||
5. une chaîne inversée (format : "rev:xxx")
|
||||
6. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
|
||||
7. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
|
||||
8. la date/heure courante (format : "date" ou "date:format")
|
||||
9. une variable d'environnement (format : "env:XXX")
|
||||
10. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
|
||||
11. une option (format : "fichier.section.option")
|
||||
12. une variable locale du tampon
|
||||
13. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
|
||||
6. une chaîne répétée (format : "repeat:nombre,chaîne")
|
||||
7. une couleur (format : "color:xxx", voir la "Référence API extension", fonction "color")
|
||||
8. une info (format : "info:nom,paramètres", les paramètres sont optionnels)
|
||||
9. la date/heure courante (format : "date" ou "date:format")
|
||||
10. une variable d'environnement (format : "env:XXX")
|
||||
11. un opérateur ternaire (format : "if:condition?valeur_si_vrai:valeur_si_faux")
|
||||
12. une option (format : "fichier.section.option")
|
||||
13. une variable locale du tampon
|
||||
14. un hdata/variable (la valeur est automatiquement convertie en chaîne), par défaut "window" et "buffer" pointent vers la fenêtre et le tampon courants.
|
||||
Le format du hdata peut être le suivant :
|
||||
hdata.var1.var2... : démarrer avec un hdata (le pointeur doit être connu), et demander les variables l'une après l'autre (d'autres hdata peuvent être suivis)
|
||||
hdata[liste].var1.var2... : démarrer avec un hdata en utilisant une liste, par exemple :
|
||||
@@ -329,6 +330,8 @@ Exemples (chaînes simples) :
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH
|
||||
/eval -n ${repeat:5,-} ==> -----
|
||||
|
||||
Exemples (conditions) :
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -25,9 +25,14 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Supprimer le chargement automatique des extensions au démarrage.
|
||||
|
||||
*-P*, *--plugins* _<extensions>_::
|
||||
Charger uniquement ces extensions au démarrage (voir /help weechat.plugin.autoload).
|
||||
Si cette option est donnée, l'option weechat.plugin.autoload n'est pas utilisée.
|
||||
|
||||
*-r*, *--run-command* _<commande>_::
|
||||
Lancer la/les commande(s) après le démarrage (plusieurs commandes peuvent
|
||||
être séparées par des points-virgules).
|
||||
Lancer la/les commande(s) après le démarrage ; plusieurs commandes peuvent
|
||||
être séparées par des points-virgules, cette option peut être donnée
|
||||
plusieurs fois.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Supprimer le chargement automatique des scripts au démarrage.
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat-headless - le client de discussion extensible (version sans interface)
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <extensions>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -55,4 +55,4 @@ include::man_copyright.fr.adoc[]
|
||||
|
||||
== SUPPORT / SIGNALER DES BUGS
|
||||
|
||||
Pour de l'aide ou signaler un bug : https://weechat.org/dev/support
|
||||
Pour de l'aide ou signaler un bug : https://weechat.org/about/support
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat - le client de discussion extensible
|
||||
== SYNOPSIS
|
||||
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <répertoire>] [-p|--no-plugin] [-r|--run-command <commande>] [-s|--no-script] [--upgrade] [extension:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <répertoire>] [-p|--no-plugin] [-P|--plugins <extensions>] [-r|--run-command <commande>] [-s|--no-script] [--upgrade] [extension:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -51,4 +51,4 @@ include::man_copyright.fr.adoc[]
|
||||
|
||||
== SUPPORT / SIGNALER DES BUGS
|
||||
|
||||
Pour de l'aide ou signaler un bug : https://weechat.org/dev/support
|
||||
Pour de l'aide ou signaler un bug : https://weechat.org/about/support
|
||||
|
||||
+84
-63
@@ -65,6 +65,7 @@ Les répertoires principaux de WeeChat sont :
|
||||
| Répertoire | Description
|
||||
| src/ | Racine des sources.
|
||||
| core/ | Fonctions du cœur : point d'entrée, structures internes.
|
||||
| hook/ | Fonctions sur les "hooks".
|
||||
| gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|
||||
| curses/ | Interface Curses.
|
||||
| headless/ | Mode sans interface (« headless »).
|
||||
@@ -114,69 +115,88 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
|
||||
[width="100%",cols="1m,3",options="header"]
|
||||
|===
|
||||
| Chemin/fichier | Description
|
||||
| core/ | Fonctions du cœur : point d'entrée, structures internes.
|
||||
| wee-arraylist.c | Listes avec tableau (« arraylists »).
|
||||
| wee-backtrace.c | Afficher une trace après un plantage.
|
||||
| wee-command.c | Commandes du cœur de WeeChat.
|
||||
| wee-completion.c | Complétions par défaut.
|
||||
| wee-config-file.c | Gestion des fichiers de configuration.
|
||||
| wee-config.c | Options de configuration du cœur de WeeChat (fichier weechat.conf).
|
||||
| wee-debug.c | Quelques fonctions de debug.
|
||||
| wee-eval.c | Évaluation d'expressions avec des références à des variables internes.
|
||||
| wee-hashtable.c | Tables de hachage.
|
||||
| wee-hdata.c | Hdata (accès direct aux données en utilisant des tables de hachage).
|
||||
| wee-hook.c | Crochets ("hooks").
|
||||
| wee-infolist.c | Infolists (listes avec les données des objets).
|
||||
| wee-input.c | Entrée de commandes/texte.
|
||||
| wee-list.c | Listes triées.
|
||||
| wee-log.c | Écriture dans le fichier de log WeeChat (weechat.log).
|
||||
| wee-network.c | Fonctions réseau (connexion aux serveurs/proxies).
|
||||
| wee-proxy.c | Gestion des proxies.
|
||||
| wee-secure.c | Options des données sécurisées (fichier sec.conf).
|
||||
| wee-string.c | Fonctions sur les chaînes de caractères.
|
||||
| wee-upgrade-file.c | Système de mise à jour interne.
|
||||
| wee-upgrade.c | Mise à jour du cœur de WeeChat (tampons, lignes, historique, ...).
|
||||
| wee-url.c | Transfert d'URL (en utilisant libcurl).
|
||||
| wee-utf8.c | Fonctions UTF-8.
|
||||
| wee-util.c | Quelques autres fonctions utilitaires.
|
||||
| wee-version.c | Fonctions pour la version de WeeChat.
|
||||
| weechat.c | Fonctions principales : options de ligne de commande, démarrage.
|
||||
| gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|
||||
| gui-bar-item.c | Objets de barre.
|
||||
| gui-bar-window.c | Fenêtres de barre.
|
||||
| gui-bar.c | Barres.
|
||||
| gui-buffer.c | Tampons.
|
||||
| gui-chat.c | Fonctions pour la discussion (afficher un message, ...).
|
||||
| gui-color.c | Fonctions de couleur.
|
||||
| gui-completion.c | Complétion sur la ligne de commande.
|
||||
| gui-cursor.c | Mode curseur (mouvement libre du curseur).
|
||||
| gui-filter.c | Filtres.
|
||||
| gui-focus.c | Fonctions concernant le focus (pour les modes curseur et souris).
|
||||
| gui-history.c | Commandes/texte sauvés dans les tampons.
|
||||
| gui-hotlist.c | Gestion de la "hotlist" (liste des tampons avec activité).
|
||||
| gui-input.c | Fonctions d'entrée (barre "input").
|
||||
| gui-key.c | Fonctions pour le clavier.
|
||||
| gui-layout.c | Dispositions ("layouts").
|
||||
| gui-line.c | Lignes dans les tampons.
|
||||
| gui-mouse.c | Souris.
|
||||
| gui-nick.c | Fonctions pour les pseudos.
|
||||
| gui-nicklist.c | Liste de pseudos dans les tampons.
|
||||
| gui-window.c | Fenêtres.
|
||||
| curses/ | Interface Curses.
|
||||
| gui-curses-bar-window.c | Affichage dans les fenêtres de barre.
|
||||
| gui-curses-chat.c | Affichage dans la zone de discussion (messages).
|
||||
| gui-curses-color.c | Fonctions pour les couleurs.
|
||||
| gui-curses-key.c | Fonctions pour le clavier (touches par défaut, lecture du clavier).
|
||||
| gui-curses-main.c | Boucle principale de WeeChat (attente des évènements clavier/réseau).
|
||||
| gui-curses-mouse.c | Souris.
|
||||
| gui-curses-term.c | Fonctions pour le terminal.
|
||||
| gui-curses-window.c | Fenêtres.
|
||||
| headless/ | Mode sans interface (« headless »).
|
||||
| main.c | Point d'entrée pour le mode sans interface.
|
||||
| ncurses-fake.c | Fausse bibliothèque ncurses.
|
||||
| normal/ | Interface Curses.
|
||||
| main.c | Point d'entrée pour l'interface Curses.
|
||||
| Chemin/fichier | Description
|
||||
| core/ | Fonctions du cœur : point d'entrée, structures internes.
|
||||
| wee-arraylist.c | Listes avec tableau (« arraylists »).
|
||||
| wee-backtrace.c | Afficher une trace après un plantage.
|
||||
| wee-command.c | Commandes du cœur de WeeChat.
|
||||
| wee-completion.c | Complétions par défaut.
|
||||
| wee-config-file.c | Gestion des fichiers de configuration.
|
||||
| wee-config.c | Options de configuration du cœur de WeeChat (fichier weechat.conf).
|
||||
| wee-debug.c | Quelques fonctions de debug.
|
||||
| wee-eval.c | Évaluation d'expressions avec des références à des variables internes.
|
||||
| wee-hashtable.c | Tables de hachage.
|
||||
| wee-hdata.c | Hdata (accès direct aux données en utilisant des tables de hachage).
|
||||
| wee-hook.c | Crochets ("hooks").
|
||||
| wee-infolist.c | Infolists (listes avec les données des objets).
|
||||
| wee-input.c | Entrée de commandes/texte.
|
||||
| wee-list.c | Listes triées.
|
||||
| wee-log.c | Écriture dans le fichier de log WeeChat (weechat.log).
|
||||
| wee-network.c | Fonctions réseau (connexion aux serveurs/proxies).
|
||||
| wee-proxy.c | Gestion des proxies.
|
||||
| wee-secure.c | Options des données sécurisées (fichier sec.conf).
|
||||
| wee-string.c | Fonctions sur les chaînes de caractères.
|
||||
| wee-upgrade-file.c | Système de mise à jour interne.
|
||||
| wee-upgrade.c | Mise à jour du cœur de WeeChat (tampons, lignes, historique, ...).
|
||||
| wee-url.c | Transfert d'URL (en utilisant libcurl).
|
||||
| wee-utf8.c | Fonctions UTF-8.
|
||||
| wee-util.c | Quelques autres fonctions utilitaires.
|
||||
| wee-version.c | Fonctions pour la version de WeeChat.
|
||||
| weechat.c | Fonctions principales : options de ligne de commande, démarrage.
|
||||
| hook/ | Hook functions.
|
||||
| wee-hook-command-run.c | Hook "command_run".
|
||||
| wee-hook-command.c | Hook "command".
|
||||
| wee-hook-completion.c | Hook "completion".
|
||||
| wee-hook-config.c | Hook "config".
|
||||
| wee-hook-connect.c | Hook "connect".
|
||||
| wee-hook-fd.c | Hook "fd".
|
||||
| wee-hook-focus.c | Hook "focus".
|
||||
| wee-hook-hdata.c | Hook "hdata".
|
||||
| wee-hook-hsignal.c | Hook "hsignal".
|
||||
| wee-hook-info-hashtable.c | Hook "info".
|
||||
| wee-hook-info.c | Hook "info".
|
||||
| wee-hook-infolist.c | Hook "infolist".
|
||||
| wee-hook-line.c | Hook "line".
|
||||
| wee-hook-modifier.c | Hook "modifier".
|
||||
| wee-hook-print.c | Hook "print".
|
||||
| wee-hook-process.c | Hook "process".
|
||||
| wee-hook-signal.c | Hook "signal".
|
||||
| wee-hook-timer.c | Hook "timer".
|
||||
| gui/ | Fonctions pour les tampons, fenêtres, ... (utilisées par toutes les interfaces).
|
||||
| gui-bar-item.c | Objets de barre.
|
||||
| gui-bar-window.c | Fenêtres de barre.
|
||||
| gui-bar.c | Barres.
|
||||
| gui-buffer.c | Tampons.
|
||||
| gui-chat.c | Fonctions pour la discussion (afficher un message, ...).
|
||||
| gui-color.c | Fonctions de couleur.
|
||||
| gui-completion.c | Complétion sur la ligne de commande.
|
||||
| gui-cursor.c | Mode curseur (mouvement libre du curseur).
|
||||
| gui-filter.c | Filtres.
|
||||
| gui-focus.c | Fonctions concernant le focus (pour les modes curseur et souris).
|
||||
| gui-history.c | Commandes/texte sauvés dans les tampons.
|
||||
| gui-hotlist.c | Gestion de la "hotlist" (liste des tampons avec activité).
|
||||
| gui-input.c | Fonctions d'entrée (barre "input").
|
||||
| gui-key.c | Fonctions pour le clavier.
|
||||
| gui-layout.c | Dispositions ("layouts").
|
||||
| gui-line.c | Lignes dans les tampons.
|
||||
| gui-mouse.c | Souris.
|
||||
| gui-nick.c | Fonctions pour les pseudos.
|
||||
| gui-nicklist.c | Liste de pseudos dans les tampons.
|
||||
| gui-window.c | Fenêtres.
|
||||
| curses/ | Interface Curses.
|
||||
| gui-curses-bar-window.c | Affichage dans les fenêtres de barre.
|
||||
| gui-curses-chat.c | Affichage dans la zone de discussion (messages).
|
||||
| gui-curses-color.c | Fonctions pour les couleurs.
|
||||
| gui-curses-key.c | Fonctions pour le clavier (touches par défaut, lecture du clavier).
|
||||
| gui-curses-main.c | Boucle principale de WeeChat (attente des évènements clavier/réseau).
|
||||
| gui-curses-mouse.c | Souris.
|
||||
| gui-curses-term.c | Fonctions pour le terminal.
|
||||
| gui-curses-window.c | Fenêtres.
|
||||
| headless/ | Mode sans interface (« headless »).
|
||||
| main.c | Point d'entrée pour le mode sans interface.
|
||||
| ncurses-fake.c | Fausse bibliothèque ncurses.
|
||||
| normal/ | Interface Curses.
|
||||
| main.c | Point d'entrée pour l'interface Curses.
|
||||
|===
|
||||
|
||||
[[sources_plugins]]
|
||||
@@ -272,6 +292,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
| logger/ | Extension Logger.
|
||||
| logger.c | Fonctions principales pour Logger.
|
||||
| logger-buffer.c | Gestion des listes de tampons pour Logger.
|
||||
| logger-command.c | Commandes de Logger.
|
||||
| logger-config.c | Options de configuration pour Logger (fichier logger.conf).
|
||||
| logger-info.c | Info/infolists/hdata pour Logger.
|
||||
| logger-tail.c | Fonctions pour obtenir les dernières lignes d'un fichier.
|
||||
|
||||
@@ -40,8 +40,8 @@ Plus d'infos sur cette page : https://weechat.org/about/features
|
||||
[[gui]]
|
||||
=== J'ai entendu parler de plusieurs interfaces pour WeeChat. Comment puis-je les compiler/utiliser ?
|
||||
|
||||
Des interfaces distantes sont disponibles, voir les liens sur la page des
|
||||
fonctionnalités : https://weechat.org/about/features
|
||||
Des interfaces distantes sont disponibles, voir la page avec les interfaces
|
||||
distantes : https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== Je ne peux pas compiler WeeChat après avoir cloné la base git, pourquoi ?
|
||||
@@ -917,6 +917,15 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
[[aspell_dictionaries]]
|
||||
=== J'ai installé des dictionnaires aspell sur mon système, comment les utiliser sans redémarrer WeeChat ?
|
||||
|
||||
Vous devez recharger l'extension aspell :
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== Réglages
|
||||
|
||||
@@ -1038,7 +1047,7 @@ pour plus d'informations sur les fichiers de configuration.
|
||||
[[bug_task_patch]]
|
||||
=== Comment puis-je reporter un bug, demander une nouvelle fonctionnalité ou envoyer un patch ?
|
||||
|
||||
Voir : https://weechat.org/dev/support
|
||||
Voir : https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== Quand je lance WeeChat sous gdb, il y a une erreur à propos des threads, que puis-je faire ?
|
||||
@@ -1075,10 +1084,10 @@ tester WeeChat.
|
||||
Il y a plusieurs choses à faire (test, code, documentation, etc...)
|
||||
|
||||
Merci de prendre contact avec nous par IRC ou mail, consultez la page
|
||||
support : https://weechat.org/dev/support
|
||||
support : https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ?
|
||||
|
||||
Vous pouvez donner de l'argent pour aider le développement.
|
||||
Plus de détails sur https://weechat.org/about/donate
|
||||
Plus de détails sur https://weechat.org/donate
|
||||
|
||||
@@ -1419,7 +1419,7 @@ Paramètres :
|
||||
* _reference_char_ : le caractère utilisé pour les références aux
|
||||
correspondances (en général `+$+`)
|
||||
* _callback_ : une fonction de rappel optionnelle appelé pour chaque référence
|
||||
dans _replace_ (sauf pour les correspondances remplacées par un caractère);
|
||||
dans _replace_ (sauf pour les correspondances remplacées par un caractère) ;
|
||||
la fonction de rappel doit retourner :
|
||||
** une chaîne nouvellement allouée : elle est utilisée en texte de remplacement
|
||||
(elle est libérée après utilisation)
|
||||
@@ -2035,7 +2035,7 @@ Paramètres :
|
||||
* _expr_ : l'expression à évaluer (voir les <<eval_conditions,conditions>> et
|
||||
<<eval_variables,variables>>)
|
||||
* _pointers_ : table de hachage avec les pointeurs (les clés doivent être des
|
||||
chaînes, les valeurs doivent être des pointeurs); les pointeurs "window" et
|
||||
chaînes, les valeurs doivent être des pointeurs) ; les pointeurs "window" et
|
||||
"buffer" sont automatiquement ajoutés s'ils ne sont pas dans la table de
|
||||
hachage (avec le pointer vers fenêtre/tampon courants) (peut être NULL) :
|
||||
** _regex_ : pointeur vers une expression régulière (structure _regex_t_)
|
||||
@@ -2337,6 +2337,12 @@ première étendue à la dernière) :
|
||||
`+${rev:Bonjour !}+` |
|
||||
`+! ruojnoB+`
|
||||
|
||||
| `+${repeat:nombre,chaîne}+` +
|
||||
(_WeeChat ≥ 2.3_) |
|
||||
Chaîne répétée. |
|
||||
`+${repeat:5,-}+` |
|
||||
`+-----+`
|
||||
|
||||
| `+${re:N}+` +
|
||||
(_WeeChat ≥ 1.1_) |
|
||||
Groupe regex capturé : `0` = toute la chaîne correspondante,
|
||||
@@ -5755,7 +5761,7 @@ option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"Mon option, type chaîne",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", ""
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
@@ -9286,11 +9292,299 @@ hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "",
|
||||
"my_connect_cb", "")
|
||||
----
|
||||
|
||||
==== hook_line
|
||||
|
||||
_WeeChat ≥ 2.3._
|
||||
|
||||
Intercepter une ligne sur le point d'être affichée dans un tampon.
|
||||
|
||||
Lorsqu'une ligne est affichée dans un tampon, les "hooks" suivants sont
|
||||
appelés dans cet ordre :
|
||||
|
||||
* <<_hook_line,hook line>> (ce "hook") : il peut changer le tampon, préfixe,
|
||||
message, étiquettes, niveau de notification, … (voir ci-dessous)
|
||||
* <<_hook_modifier,hook modifier>> "<<hook_modifier_weechat_print,weechat_print>>" :
|
||||
il peut changer le préfixe et le message sur un tampon avec contenu formaté
|
||||
* <<_hook_print,hook print>> : appelé quand une ligne a été ajoutée dans un
|
||||
tampon avec contenu formaté (rien ne peut être changé directement avec ce
|
||||
"hook").
|
||||
|
||||
[NOTE]
|
||||
The "line" hook is the only one among these three hooks that can work on
|
||||
buffers with free content.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_hook *weechat_hook_line (const char *buffer_type,
|
||||
const char *buffer_name,
|
||||
const char *tags,
|
||||
struct t_hashtable *(*callback)(const void *pointer,
|
||||
void *data,
|
||||
struct t_hashtable *line),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _buffer_type_ : intercepter les lignes affichées sur ce type de tampon
|
||||
(si NULL ou chaîne vide, _formatted_ est utilisé par défaut) :
|
||||
** _formatted_ : intercepter les lignes sur un tampon avec contenu formaté
|
||||
seulement (par défaut)
|
||||
** _free_ : intercepter les lignes sur un tampon avec contenu libre seulement
|
||||
** _*_ : intercepter les lignes sur tous les types de tampons
|
||||
* _buffer_name_ : liste de masques de tampons séparés par des virgules
|
||||
(voir <<_buffer_match_list,buffer_match_list>>); NULL, chaîne vide ou "*"
|
||||
correspondent à n'importe quel tampon
|
||||
* _tags_ : intercepter seulement les messages avec ces étiquettes (optionnel) :
|
||||
liste d'étiquettes (séparées par des virgules) qui doivent être dans le message
|
||||
("ou" logique); il est possible de combiner plusieurs étiquettes sous forme
|
||||
d'un "et" logique avec le séparateur `+++`; le caractère joker `+*+` est
|
||||
autorisé dans les étiquettes
|
||||
* _callback_ : fonction appelée lorsqu'une ligne est ajoutée dans un tampon,
|
||||
paramètres et valeur de retour :
|
||||
** _const void *pointer_ : pointeur
|
||||
** _void *data_ : pointeur
|
||||
** _struct t_hashtable *line_ : table de hachage avec les informations sur la ligne,
|
||||
les clés et valeurs sont des chaînes (voir le tableau ci-dessous)
|
||||
** valeur de retour : table de hachage avec les nouvelles valeurs
|
||||
(voir le tableau ci-dessous)
|
||||
* _callback_pointer_ : pointeur donné à la fonction de rappel lorsqu'elle est
|
||||
appelée par WeeChat
|
||||
* _callback_data_ : pointeur donné à la fonction de rappel lorsqu'elle est
|
||||
appelée par WeeChat; si non NULL, doit avoir été alloué par malloc (ou une
|
||||
fonction similaire) et est automatiquement libéré (par free) lorsque le
|
||||
"hook" est supprimé
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* pointeur vers le nouveau "hook", NULL en cas d'erreur
|
||||
|
||||
Les données de la ligne envoyées à la fonction de rappel sont dans une table
|
||||
de hachage, avec les valeurs suivantes (les clés et valeurs sont des chaînes) :
|
||||
|
||||
[width="100%",cols="^1,3,3,2",options="header"]
|
||||
|===
|
||||
| Clé | Valeur (tampon formaté) | Valeur (tampon libre) | Exemples
|
||||
|
||||
| buffer |
|
||||
Pointeur vers le tampon. |
|
||||
Pointeur vers le tampon. |
|
||||
`+0x12345678+`
|
||||
|
||||
| buffer_name |
|
||||
Nom du tampon. |
|
||||
Nom du tampon. |
|
||||
`+core.weechat+` +
|
||||
`+irc.server.freenode+` +
|
||||
`+irc.freenode.#weechat+`
|
||||
|
||||
| buffer_type |
|
||||
"formatted" |
|
||||
"free" |
|
||||
`+formatted+` +
|
||||
`+free+`
|
||||
|
||||
| y |
|
||||
N/A ("-1"). |
|
||||
Numéro de ligne (≥ "0"). |
|
||||
`+-1+` +
|
||||
`+8+`
|
||||
|
||||
| date |
|
||||
Date de la ligne (horodatage). |
|
||||
N/A ("0"). |
|
||||
`+1533792000+`
|
||||
|
||||
| date_printed |
|
||||
Date d'affichage de la ligne (horodatage). |
|
||||
N/A ("0"). |
|
||||
`+1533792012+`
|
||||
|
||||
| str_time |
|
||||
Date pour l'affichage (elle peut contenir des codes couleur). |
|
||||
N/A (chaîne vide). |
|
||||
`+09:07:20+`
|
||||
|
||||
| tags_count |
|
||||
Nombre d'étiquettes dans la ligne (≥ "0"). |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| tags |
|
||||
Liste des étiquettes séparées par des virgules. |
|
||||
N/A (chaîne vide). |
|
||||
`+irc_join,nick_test+`
|
||||
|
||||
| displayed |
|
||||
"0" = la ligne est filtrée (cachée) +
|
||||
"1" = la ligne n'est pas filtrée (affichée). |
|
||||
"0" = la ligne est filtrée (cachée) +
|
||||
"1" = la ligne n'est pas filtrée (affichée). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| notify_level |
|
||||
"0" = niveau bas +
|
||||
"1" = message +
|
||||
"2" = message privé +
|
||||
"3" = highlight |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| highlight |
|
||||
"0" = pas de highlight +
|
||||
"1" = la ligne a un highlight. |
|
||||
N/A ("0"). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| prefix |
|
||||
Préfixe de la ligne. |
|
||||
N/A (chaîne vide). |
|
||||
`+-->+`
|
||||
|
||||
| message |
|
||||
Message de la ligne. |
|
||||
Message de la ligne. |
|
||||
`+test (~test@example.com) a rejoint #canal+`
|
||||
|===
|
||||
|
||||
La fonction de retour peut retourner une table de hachage avec quelques champs
|
||||
pour mettre à jour la ligne.
|
||||
Toute valeur invalide dans un champ est silencieusement ignorée par WeeChat.
|
||||
|
||||
Les clés suivantes peuvent être définies dans la table de hachage (les clés et
|
||||
valeurs sont des chaînes dans cette table de hachage) :
|
||||
|
||||
[width="100%",cols="^1,2,2,5",options="header"]
|
||||
|===
|
||||
| Clé | Valeur autorisée (tampon formaté) | Valeur autorisée (tampon libre) | Résultat
|
||||
|
||||
| buffer |
|
||||
Pointeur vers un tampon avec contenu formaté. |
|
||||
Pointeur vers un tampon avec contenu libre. |
|
||||
La ligne est affichée sur ce tampon. +
|
||||
Si la valeur est vide, la ligne est supprimée (le reste de la table de hachage
|
||||
est alors ignoré) ; les "hooks" suivants de type "line" ne sont pas appelés.
|
||||
|
||||
| buffer_name |
|
||||
Nom d'un tampon avec contenu formaté. |
|
||||
Nom d'un tampon avec contenu libre. |
|
||||
La ligne est affichée sur ce tampon. +
|
||||
Si `buffer` est également défini, la valeur de `buffer_name` a une priorité
|
||||
plus haute est est utilisée. +
|
||||
Si la valeur est vide, la ligne est supprimée (le reste de la table de hachage
|
||||
est alors ignoré) ; les "hooks" suivants de type "line" ne sont pas appelés.
|
||||
|
||||
| y |
|
||||
N/A. |
|
||||
Entier (≥ "0"). |
|
||||
Le numéro de ligne est positionné à cette valeur.
|
||||
|
||||
| date |
|
||||
Horodatage. |
|
||||
N/A. |
|
||||
La date est positionnée à cet horodatage. +
|
||||
La valeur de `str_time` est mise à jour en conséquence.
|
||||
|
||||
| date_printed |
|
||||
Horodatage. |
|
||||
N/A. |
|
||||
La date d'affichage est positionnée à cet horodatage (non affichée).
|
||||
|
||||
| str_time |
|
||||
Chaîne. |
|
||||
N/A. |
|
||||
Cette chaîne est utilisée pour afficher la date de la ligne. +
|
||||
Si `date` est également défini, la valeur de `str_time` a une priorité plus
|
||||
haute et est utilisée.
|
||||
|
||||
| tags |
|
||||
Chaîne. |
|
||||
N/A. |
|
||||
Les étiquettes de la ligne sont remplacées avec cette liste d'étiquettes
|
||||
(séparées par des virgules). +
|
||||
Les valeurs de `notify_level` et `highlight` sont mises à jour en conséquence.
|
||||
|
||||
| notify_level |
|
||||
Entier ("0" à "3"). |
|
||||
N/A. |
|
||||
Le niveau de notification est positionné à cette valeur. La hotlist sera mise
|
||||
à jour en conséquence une fois que la ligne sera ajoutée dans la tampon. +
|
||||
La valeur de `highlight` est mise à jours en conséquence. +
|
||||
Si `tags` est également défini, la valeur de `notify_level` a une priorité
|
||||
plus haute et est utilisée.
|
||||
|
||||
| highlight |
|
||||
Entier ("0" ou "1"). |
|
||||
N/A. |
|
||||
"0" désactive le highlight sur la ligne, "1" force un highlight sur la ligne. +
|
||||
Si `tags` ou `notify_level` sont définis, la valeur de `highlight` a une
|
||||
priorité plus haute et est utilisée.
|
||||
|
||||
| prefix |
|
||||
Chaîne. |
|
||||
N/A. |
|
||||
Le préfixe de la ligne est positionné à cette valeur.
|
||||
|
||||
| message |
|
||||
Chaîne. |
|
||||
Chaîne. |
|
||||
Le message de la ligne est positionné à cette valeur.
|
||||
|===
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_line_cb (const void *pointer, void *data, struct t_hasbtable *line)
|
||||
{
|
||||
struct t_hashtable *hashtable;
|
||||
|
||||
hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
/* forcer un highlight sur la ligne */
|
||||
weechat_hashtable_set (hashtable, "highlight", "1");
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
/* intercepter les lignes avec l'étiquette "irc_join" */
|
||||
struct t_hook *my_line_hook =
|
||||
weechat_hook_line ("", "", "irc_join", &my_line_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
|
||||
|
||||
# exemple
|
||||
def my_line_cb(data, line):
|
||||
# forcer un highlight sur la ligne
|
||||
return {"highlight": "1"}
|
||||
|
||||
# intercepter les lignes avec l'étiquette "irc_join"
|
||||
hook = weechat.hook_line("", "", "irc_join", "my_line_cb", "")
|
||||
----
|
||||
|
||||
==== hook_print
|
||||
|
||||
_Mis à jour dans la 0.4.3, 1.0, 1.5._
|
||||
|
||||
Intercepter un message affiché.
|
||||
Intercepter un message affiché. Il est appelée quand une ligne a été ajoutée
|
||||
dans un tampon avec contenu formaté.
|
||||
|
||||
Pour plus d'informations sur les "hooks" appelés lorsqu'une ligne est affichée,
|
||||
voir <<_hook_line,hook_line>>.
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -10885,118 +11179,71 @@ Liste des modificateurs utilisés par WeeChat et les extensions :
|
||||
|===
|
||||
| Modificateur | Données du modificateur | Chaîne | Sortie
|
||||
|
||||
| charset_decode |
|
||||
extension.nom_tampon |
|
||||
Toute chaîne. |
|
||||
Chaîne décodée depuis le jeu de caractères trouvé pour l'extension/tampon
|
||||
vers UTF-8.
|
||||
|
||||
| charset_encode |
|
||||
extension.nom_tampon |
|
||||
Toute chaîne. |
|
||||
Chaîne encodée depuis UTF-8 vers le jeu de caractères trouvé pour
|
||||
l'extension/tampon.
|
||||
|
||||
| irc_color_decode |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs IRC converties en couleurs WeeChat (ou avec les
|
||||
couleurs IRC supprimées).
|
||||
|
||||
| irc_color_encode |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs IRC (ou avec les couleurs IRC supprimées).
|
||||
|
||||
| irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs ANSI converties en couleurs IRC (ou avec les couleurs
|
||||
ANSI supprimées).
|
||||
|
||||
| irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nom du serveur |
|
||||
Commande d'authentification (par exemple : `+/msg nickserv identify password+`). |
|
||||
Commande avec le mot de passe caché (par exemple : `+/msg nickserv identify ********+`).
|
||||
|
||||
| irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nom du serveur |
|
||||
Message affiché après `msg` envoyé à nickserv. |
|
||||
Message avec le mot de passe caché.
|
||||
|
||||
| irc_in_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_in_xxx]] irc_in_xxx ^(1)^ |
|
||||
Nom de serveur |
|
||||
Contenu du message reçu du serveur IRC (avant décodage du jeu de caractères). |
|
||||
Nouveau contenu du message.
|
||||
|
||||
| irc_in2_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_in2_xxx]] irc_in2_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.5)_ |
|
||||
Nom de serveur |
|
||||
Contenu du message reçu du serveur IRC (après décodage du jeu de caractères). |
|
||||
Nouveau contenu du message.
|
||||
|
||||
| irc_out1_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_out1_xxx]] irc_out1_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
Nom de serveur |
|
||||
Contenu du message qui va être envoyé au serveur IRC avant découpage automatique
|
||||
(pour tenir dans les 512 octets par défaut). |
|
||||
Nouveau contenu du message.
|
||||
|
||||
| irc_out_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_out_xxx]] irc_out_xxx ^(1)^ |
|
||||
Nom de serveur |
|
||||
Contenu du message qui va être envoyé au serveur IRC après découpage automatique
|
||||
(pour tenir dans les 512 octets par défaut). |
|
||||
Nouveau contenu du message.
|
||||
|
||||
| color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs ANSI converties en couleurs WeeChat (ou avec les
|
||||
couleurs ANSI supprimées).
|
||||
|
||||
| bar_condition_yyy ^(2)^ |
|
||||
| [[hook_modifier_bar_condition_yyy]] bar_condition_yyy ^(2)^ |
|
||||
Chaîne avec un pointeur vers la fenêtre ("0x123..") |
|
||||
Chaîne vide. |
|
||||
"1" pour afficher la barre, "0" pour la cacher.
|
||||
|
||||
| history_add +
|
||||
| [[hook_modifier_history_add]] history_add +
|
||||
_(WeeChat ≥ 0.3.2)_ |
|
||||
Chaîne avec un pointeur vers le tampon ("0x123..") |
|
||||
Contenu de la ligne de commande à ajouter à l'historique des commandes
|
||||
(tampon et global). |
|
||||
Chaîne ajoutée à l'historique des commandes.
|
||||
|
||||
| input_text_content |
|
||||
| [[hook_modifier_input_text_content]] input_text_content |
|
||||
Chaîne avec un pointeur vers le tampon ("0x123..") |
|
||||
Contenu de la ligne de commande. |
|
||||
Nouvelle chaîne pour la ligne de commande.
|
||||
|
||||
| input_text_display |
|
||||
| [[hook_modifier_input_text_display]] input_text_display |
|
||||
Chaîne avec un pointeur vers le tampon ("0x123..") |
|
||||
Contenu de la ligne de commande, sans le code du curseur dedans. |
|
||||
Nouvelle chaîne, pour affichage seulement (la ligne de commande n'est pas
|
||||
modifiée).
|
||||
|
||||
| input_text_display_with_cursor |
|
||||
| [[hook_modifier_input_text_display_with_cursor]] input_text_display_with_cursor |
|
||||
Chaîne avec un pointeur vers le tampon ("0x123..") |
|
||||
Contenu de la ligne de commande, avec le code du curseur dedans. |
|
||||
Nouvelle chaîne, pour affichage seulement (la ligne de commande n'est pas
|
||||
modifiée).
|
||||
|
||||
| input_text_for_buffer +
|
||||
| [[hook_modifier_input_text_for_buffer]] input_text_for_buffer +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
Chaîne avec un pointeur vers le tampon ("0x123..") |
|
||||
Contenu de la ligne de commande envoyée au tampon (texte ou commande). |
|
||||
Nouveau contenu de la ligne de commande envoyée au tampon.
|
||||
|
||||
| weechat_print |
|
||||
| [[hook_modifier_weechat_print]] weechat_print |
|
||||
extension + ";" + nom_tampon + ";" + étiquettes |
|
||||
Message affiché. |
|
||||
Nouveau message affiché.
|
||||
Nouveau message affiché. +
|
||||
Pour plus d'informations sur les "hooks" appelés lorsqu'une ligne est affichée,
|
||||
voir <<_hook_line,hook_line>>.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -11070,6 +11317,63 @@ Valeur de retour :
|
||||
|
||||
* chaîne modifiée, NULL en cas d'erreur
|
||||
|
||||
Liste des modificateurs définis par WeeChat et les extensions qui peuvent être
|
||||
utilisés :
|
||||
|
||||
[width="100%",cols="^2,3,4,4",options="header"]
|
||||
|===
|
||||
| Modificateur | Données du modificateur | Chaîne | Sortie
|
||||
|
||||
| [[hook_modifier_charset_decode]] charset_decode |
|
||||
extension.nom_tampon |
|
||||
Toute chaîne. |
|
||||
Chaîne décodée depuis le jeu de caractères trouvé pour l'extension/tampon
|
||||
vers UTF-8.
|
||||
|
||||
| [[hook_modifier_charset_encode]] charset_encode |
|
||||
extension.nom_tampon |
|
||||
Toute chaîne. |
|
||||
Chaîne encodée depuis UTF-8 vers le jeu de caractères trouvé pour
|
||||
l'extension/tampon.
|
||||
|
||||
| [[hook_modifier_irc_color_decode]] irc_color_decode |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs IRC converties en couleurs WeeChat (ou avec les
|
||||
couleurs IRC supprimées).
|
||||
|
||||
| [[hook_modifier_irc_color_encode]] irc_color_encode |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs IRC (ou avec les couleurs IRC supprimées).
|
||||
|
||||
| [[hook_modifier_irc_color_decode_ansi]] irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs ANSI converties en couleurs IRC (ou avec les couleurs
|
||||
ANSI supprimées).
|
||||
|
||||
| [[hook_modifier_irc_command_auth]] irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nom du serveur |
|
||||
Commande d'authentification (par exemple : `+/msg nickserv identify password+`). |
|
||||
Commande avec le mot de passe caché (par exemple : `+/msg nickserv identify ********+`).
|
||||
|
||||
| [[hook_modifier_irc_message_auth]] irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nom du serveur |
|
||||
Message affiché après `msg` envoyé à nickserv. |
|
||||
Message avec le mot de passe caché.
|
||||
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" pour garder les couleurs, "0" pour les supprimer |
|
||||
Toute chaîne. |
|
||||
Chaîne avec les couleurs ANSI converties en couleurs WeeChat (ou avec les
|
||||
couleurs ANSI supprimées).
|
||||
|===
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -506,25 +506,25 @@ Les messages sont envoyés sous forme de données binaires, en utilisant le form
|
||||
suivant (avec la taille en octets) :
|
||||
|
||||
....
|
||||
┌────────╥─────────────╥────╥────────┬─────────╥───────╥────────┬─────────┐
|
||||
│ taille ║ compression ║ id ║ type 1 │ objet 1 ║ ... ║ type N │ objet N │
|
||||
└────────╨─────────────╨────╨────────┴─────────╨───────╨────────┴─────────┘
|
||||
└──────┘ └───────────┘ └──┘ └──────┘ └───────┘ └──────┘ └───────┘
|
||||
4 1 ?? 3 ?? 3 ??
|
||||
└────────────────────┘ └────────────────────────────────────────────────┘
|
||||
en-tête (5) données compressées (??)
|
||||
└───────────────────────────────────────────────────────────────────────┘
|
||||
┌────────╥─────────────╥─────────╥────────┬─────────╥───────╥────────┬─────────┐
|
||||
│ taille ║ compression ║ id ║ type 1 │ objet 1 ║ ... ║ type N │ objet N │
|
||||
└────────╨─────────────╨─────────╨────────┴─────────╨───────╨────────┴─────────┘
|
||||
└──────┘ └───────────┘ └───────┘ └──────┘ └───────┘ └──────┘ └───────┘
|
||||
4 1 4 + str 3 ?? 3 ??
|
||||
└────────────────────┘ └─────────────────────────────────────────────────────┘
|
||||
en-tête (5) données compressées (??)
|
||||
└────────────────────────────────────────────────────────────────────────────┘
|
||||
'taille' octets
|
||||
....
|
||||
|
||||
* _taille_ (entier non signé) : nombre d'octets du message entier (en incluant
|
||||
ce champ)
|
||||
* _taille_ (entier non signé, 4 octets) : nombre d'octets du message entier
|
||||
(en incluant ce champ)
|
||||
* _compression_ (octet) : drapeau :
|
||||
** _0x00_ : les données qui suivent ne sont pas compressées
|
||||
** _0x01_ : les données qui suivent sont compressées avec _zlib_
|
||||
* _id_ (chaîne) : l'identifiant envoyé par le client (avant le nom de la
|
||||
commande); il peut être vide (chaîne avec une longueur de zéro sans contenu)
|
||||
si l'identifiant n'était pas donné dans la commande
|
||||
* _id_ (chaîne, 4 octets + contenu) : l'identifiant envoyé par le client
|
||||
(avant le nom de la commande); il peut être vide (chaîne avec une longueur
|
||||
de zéro sans contenu) si l'identifiant n'était pas donné dans la commande
|
||||
* _type_ (3 caractères) : un type : 3 lettres (voir le tableau ci-dessous)
|
||||
* _objet_ : un objet (voir tableau ci-dessous)
|
||||
|
||||
@@ -1603,13 +1603,13 @@ hdata buffer:gui_buffers(*)/lines/first_line(*)/data
|
||||
└───────────────────────────┘ └───┘ └──┘
|
||||
h-path (noms de hdata) clés nombre
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────┘ └─────┘
|
||||
p-path (pointeurs) objets
|
||||
└─────────────────────────────────────────┘
|
||||
ligne 1
|
||||
──╥───────────┬───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ 0x23d8a10 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────────────────┘ └─────┘
|
||||
p-path (pointeurs) objets
|
||||
└─────────────────────────────────────────────────────┘
|
||||
ligne 1
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──────────────┐
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d6110 │ ..... ║ ............ │
|
||||
|
||||
@@ -529,6 +529,7 @@ Liste des fonctions de l'API script :
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+82
-21
@@ -433,7 +433,8 @@ ulimit -c 200000
|
||||
==== Obtenir la trace avec gdb
|
||||
|
||||
Lorsque WeeChat se plante, votre système génère un fichier _core_ ou
|
||||
_core.12345_ (_12345_ est l'identifiant du processus).
|
||||
_core.12345_ (_12345_ est l'identifiant du processus)
|
||||
si <<core_files,l'option est activée>>.
|
||||
Ce fichier est créé dans le répertoire où vous avez lancé WeeChat (ce n'est
|
||||
*pas* le répertoire où WeeChat est installé !).
|
||||
|
||||
@@ -3618,7 +3619,7 @@ Liste des triggers par défaut :
|
||||
|
||||
| cmd_pass | modifier |
|
||||
Cacher le mot de passe dans les commandes :
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
@@ -3649,8 +3650,8 @@ Un trigger a les options suivantes (les noms sont
|
||||
Lorsque l'option est `off`, le trigger est désactivé et les actions ne sont
|
||||
plus exécutées.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `print`, `command`, `command_run`,
|
||||
`timer`, `config`, `focus` |
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
Le "hook" utilisé dans le trigger. Pour plus d'information, voir la
|
||||
link:weechat_plugin_api.fr.html#hooks[Référence API extension WeeChat / Hooks].
|
||||
|
||||
@@ -3688,7 +3689,7 @@ Par exemple, le trigger _beep_ par défaut a les options suivantes :
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3742,6 +3743,17 @@ points-virgules.
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.fr.html#_hook_modifier[hook_modifier]
|
||||
|
||||
| line |
|
||||
1. type de tampon +
|
||||
2. nom de tampon +
|
||||
3. étiquettes |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. nom de tampon +
|
||||
2. étiquettes +
|
||||
@@ -3808,7 +3820,7 @@ Exemple : le trigger _beep_ par défaut utilise cette condition pour faire un
|
||||
beep seulement sur un highlight ou un message privé :
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3818,24 +3830,34 @@ L'expression régulière est utilisée pour modifier des variables dans la table
|
||||
de hachage de la fonction de rappel.
|
||||
|
||||
Le format est : "/regex/remplacement" ou "/regex/remplacement/var" (où _var_ est
|
||||
une variable de la table de hachage). +
|
||||
une variable de la table de hachage).
|
||||
|
||||
Si _var_ n'existe pas dans la table de hachage, elle est automatiquement créée
|
||||
avec une valeur vide. Cela permet de créer des variables temporaires.
|
||||
|
||||
Si _var_ n'est pas spécifiée, la variable par défaut est utilisée, elle dépend
|
||||
du type de hook :
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| Hook | Variable par défaut
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| Hook | Variable par défaut | Mise à jour autorisée ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Toutes les variables peuvent être mises à jour dans le trigger, mais
|
||||
seulement ces variables ont un effet sur la valeur retournée par le trigger
|
||||
et utilisée par WeeChat.
|
||||
|
||||
Plusieurs expressions régulières peuvent être séparées par un espace, par
|
||||
exemple : "/regex1/remplacement1/var1 /regex2/remplacement2/var2".
|
||||
|
||||
@@ -4000,6 +4022,46 @@ Si le modificateur contient un message IRC, le message est analysé et des
|
||||
données supplémentaires sont ajoutées dans la table de hachage (voir le
|
||||
<<trigger_data_signal,"hook" signal>>).
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
La fonction de rappel "line" définit les variables suivantes dans la table
|
||||
de hachage :
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| buffer | pointeur | Tampon.
|
||||
| buffer_name | chaîne | Nom du tampon.
|
||||
| buffer_type | chaîne | Type de tampon ("formatted" ou "free").
|
||||
| y | chaîne | Numéro de ligne pour un tampon avec contenu libre (≥ 0), -1 pour un tampon avec contenu formaté.
|
||||
| date | chaîne | Date de la ligne (horodatage).
|
||||
| date_printed | chaîne | Date d'affichage de la ligne (horodatage).
|
||||
| str_time | chaîne | Date pour l'affichage. Elle peut contenir des codes couleur.
|
||||
| tags | chaîne | Étiquettes du message (avec une virgule en début/fin de chaîne).
|
||||
| displayed | chaîne | "1" si affichée, "0" si la ligne est filtrée.
|
||||
| notify_level | chaîne | "0" = niveau bas, "1" = message, "2" = message privé, "3" = highlight
|
||||
| highlight | chaîne | "1" si highlight, sinon "0".
|
||||
| prefix | chaîne | Préfixe.
|
||||
| tg_prefix_nocolor | chaîne | Préfixe sans les codes couleur.
|
||||
| message | chaîne | Message.
|
||||
| tg_message_nocolor | chaîne | Message sans les codes couleur.
|
||||
|===
|
||||
|
||||
Variables définies avec les étiquettes du message :
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_tags_count | chaîne | Nombre d'étiquettes dans le message.
|
||||
| tg_tag_nick | chaîne | Pseudo (depuis l'étiquette "nick_xxx").
|
||||
| tg_tag_prefix_nick | chaîne | Couleur du pseudo dans le préfixe (depuis l'étiquette "prefix_nick_ccc").
|
||||
| tg_tag_host | chaîne | Nom d'utilisateur et hôte, format : utilisateur@hôte (depuis l'étiquette "host_xxx").
|
||||
| tg_tag_notify | chaîne | Niveau de notification (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | chaîne | Niveau de notification, si différent de _none_.
|
||||
| tg_msg_pv | chaîne | "1" pour un message privé, sinon "0".
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -4019,8 +4081,7 @@ hachage :
|
||||
| tg_message_nocolor | chaîne | Message sans les codes couleur.
|
||||
|===
|
||||
|
||||
Variables définies avec les étiquettes du message (elles sont définies aussi
|
||||
pour le modificateur _weechat_print_) :
|
||||
Variables définies avec les étiquettes du message :
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4243,4 +4304,4 @@ Pour le support via IRC, sur le serveur _chat.freenode.net_ :
|
||||
** _#weechat-de_ (Allemand)
|
||||
** _#weechat-fi_ (Finnois)
|
||||
|
||||
Pour les autres formes de support, voir : https://weechat.org/dev/support
|
||||
Pour les autres formes de support, voir : https://weechat.org/about/support
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** valore predefinito: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** descrizione: pass:none[remap mirc colors in messages using a hashtable: keys are "fg,bg" as integers between -1 (not specified) and 15, values are WeeChat color names or numbers (format is: "1,-1:color1;2,7:color2"), example: "1,-1:darkgray;1,2:white,blue" to remap black to "darkgray" and black on blue to "white,blue"; default WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=gray, 15=white]
|
||||
** descrizione: pass:none[remap mirc colors in messages using a hashtable: keys are "fg,bg" as integers between -1 (not specified) and 15, values are WeeChat color names or numbers (format is: "1,-1:color1;2,7:color2"), example: "1,-1:darkgray;1,2:white,blue" to remap black to "darkgray" and black on blue to "white,blue"; default WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=darkgray, 15=gray]
|
||||
** tipo: stringa
|
||||
** valori: qualsiasi stringa
|
||||
** valore predefinito: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -11,30 +11,30 @@
|
||||
flush
|
||||
disable
|
||||
|
||||
list: mostra lo stato del logging per i buffer aperti
|
||||
set: imposta il livello di logging per il buffer corrente
|
||||
livello: livello per i messaggi da loggare (0 = disabilitato, 1 = alcuni messaggi (più importanti) .. 9 = tutti i messaggi)
|
||||
flush: scrive immediatamente tutti i file di log
|
||||
disable: disabilita il logging sul buffer corrente (imposta livello a 0)
|
||||
list: show logging status for opened buffers
|
||||
set: set logging level on current buffer
|
||||
level: level for messages to be logged (0 = logging disabled, 1 = a few messages (most important) .. 9 = all messages)
|
||||
flush: write all log files now
|
||||
disable: disable logging on current buffer (set level to 0)
|
||||
|
||||
Le opzioni "logger.level.*" e "logger.mask.*" possono essere usate per impostare un livello o una mask per un buffer, o per i buffer che cominciano per nome.
|
||||
Options "logger.level.*" and "logger.mask.*" can be used to set level or mask for a buffer, or buffers beginning with name.
|
||||
|
||||
Livelli di log usati dal plugin IRC:
|
||||
1: messaggio utente, notifica, privato
|
||||
2: cambio di nick
|
||||
3: messaggio del server
|
||||
4: entrata/uscita/abbandono
|
||||
9: tutti gli altri messaggi
|
||||
Log levels used by IRC plugin:
|
||||
1: user message (channel and private), notice (server and channel)
|
||||
2: nick change
|
||||
3: server message
|
||||
4: join/part/quit
|
||||
9: all other messages
|
||||
|
||||
Esempi:
|
||||
imposta il livello 5 per buffer corrente:
|
||||
Examples:
|
||||
set level to 5 for current buffer:
|
||||
/logger set 5
|
||||
disabilita logging per il buffer corrente:
|
||||
disable logging for current buffer:
|
||||
/logger disable
|
||||
imposta il livello 3 per tutti i buffer IRC:
|
||||
set level to 3 for all IRC buffers:
|
||||
/set logger.level.irc 3
|
||||
disabilita logging per il buffer principale di WeeChat:
|
||||
disable logging for main WeeChat buffer:
|
||||
/set logger.level.core.weechat 0
|
||||
usa una directory per il server IRC e un file per ogni canale al suo interno:
|
||||
use a directory per IRC server and a file per channel inside:
|
||||
/set logger.mask.irc "$server/$channel.weechatlog"
|
||||
----
|
||||
|
||||
@@ -34,7 +34,7 @@ protocol.name: protocol and name to relay:
|
||||
- protocol "weechat" (name is not used)
|
||||
|
||||
The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port.
|
||||
The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/download/
|
||||
The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/about/interfaces
|
||||
|
||||
Without argument, this command opens buffer with list of relay clients.
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ listdefault: list default triggers
|
||||
addoff: add a trigger (disabled)
|
||||
addreplace: add or replace an existing trigger
|
||||
name: name of trigger
|
||||
hook: signal, hsignal, modifier, print, command, command_run, timer, config, focus
|
||||
hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus
|
||||
arguments: arguments for the hook, depending on hook (separated by semicolons):
|
||||
signal: name(s) of signal (required)
|
||||
hsignal: name(s) of hsignal (required)
|
||||
modifier: name(s) of modifier (required)
|
||||
line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
|
||||
print: buffer, tags, message, strip colors
|
||||
command: command (required), description, arguments, description of arguments, completion
|
||||
command_run: command(s) (required)
|
||||
@@ -69,7 +70,7 @@ When a trigger callback is called, following actions are performed, in this orde
|
||||
1. check conditions; if false, exit
|
||||
2. replace text using POSIX extended regular expression(s) (if defined in trigger)
|
||||
3. execute command(s) (if defined in trigger)
|
||||
4. exit with a return code (except for modifiers and focus)
|
||||
4. exit with a return code (except for modifier, line and focus)
|
||||
5. perform post action
|
||||
|
||||
Examples (you can also look at default triggers with /trigger listdefault):
|
||||
|
||||
@@ -79,9 +79,9 @@ Examples:
|
||||
hide [<number>|<name>|-all [<number>|<name>...]]
|
||||
unhide [<number>|<name>|-all [<number>|<name>...]]
|
||||
renumber [<number1> [<number2> [<start>]]]
|
||||
close [<n1>[-<n2>]|<name>]
|
||||
close [<n1>[-<n2>]|<name>...]
|
||||
notify <level>
|
||||
localvar
|
||||
localvar [<number>|<name>]
|
||||
set <property> [<value>]
|
||||
get <property>
|
||||
<number>|-|+|<name>
|
||||
@@ -105,7 +105,7 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
|
||||
message: for messages from users + highlights
|
||||
all: all messages
|
||||
reset: reset to default value (all)
|
||||
localvar: display local variables for current buffer
|
||||
localvar: display local variables for the buffer
|
||||
set: set a property for current buffer
|
||||
get: display a property of current buffer
|
||||
number: jump to buffer by number, possible prefix:
|
||||
@@ -297,14 +297,15 @@ Some variables are replaced in expression, using the format ${variable}, variabl
|
||||
4. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
|
||||
or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
|
||||
5. a reversed string (format: "rev:xxx")
|
||||
6. a color (format: "color:xxx", see "Plugin API reference", function "color")
|
||||
7. an info (format: "info:name,arguments", arguments are optional)
|
||||
8. current date/time (format: "date" or "date:format")
|
||||
9. an environment variable (format: "env:XXX")
|
||||
10. a ternary operator (format: "if:condition?value_if_true:value_if_false")
|
||||
11. an option (format: "file.section.option")
|
||||
12. a local variable in buffer
|
||||
13. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
6. a repeated string (format: "repeat:count,string")
|
||||
7. a color (format: "color:xxx", see "Plugin API reference", function "color")
|
||||
8. an info (format: "info:name,arguments", arguments are optional)
|
||||
9. current date/time (format: "date" or "date:format")
|
||||
10. an environment variable (format: "env:XXX")
|
||||
11. a ternary operator (format: "if:condition?value_if_true:value_if_false")
|
||||
12. an option (format: "file.section.option")
|
||||
13. a local variable in buffer
|
||||
14. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
|
||||
Format for hdata can be one of following:
|
||||
hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
|
||||
hdata[list].var1.var2...: start with a hdata using a list, for example:
|
||||
@@ -329,6 +330,8 @@ Examples (simple strings):
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH
|
||||
/eval -n ${repeat:5,-} ==> -----
|
||||
|
||||
Examples (conditions):
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -26,10 +26,15 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Disabilita il caricamento automatico dei plugin.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
Load only these plugins at startup (see /help weechat.plugin.autoload).
|
||||
If this option is given, the option weechat.plugin.autoload is not used.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-r*, *--run-command* _<command>_::
|
||||
Esegue un comando(i) dopo l'avvio (più comandi possono essere separati da
|
||||
punto e virgola).
|
||||
Run command(s) after startup; many commands can be separated by semicolons,
|
||||
this option can be given multiple times.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Disabilita il caricamento automatico dei script.
|
||||
|
||||
@@ -14,8 +14,9 @@ weechat-headless - the extensible chat client (headless version)
|
||||
|
||||
== SYNOPSIS
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -65,4 +66,4 @@ include::man_copyright.it.adoc[]
|
||||
== SUPPORT / REPORTING BUGS
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For help or a bug report: https://weechat.org/dev/support
|
||||
For help or a bug report: https://weechat.org/about/support
|
||||
|
||||
@@ -14,8 +14,9 @@ weechat - the extensible chat client
|
||||
|
||||
== SYNOPSIS
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -61,4 +62,4 @@ include::man_copyright.it.adoc[]
|
||||
== SUPPORT / REPORTING BUGS
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For help or a bug report: https://weechat.org/dev/support
|
||||
For help or a bug report: https://weechat.org/about/support
|
||||
|
||||
@@ -48,8 +48,8 @@ Maggiori informazioni su https://weechat.org/about/features
|
||||
=== Ho sentito parlare di molte interfacce per WeeChat. Come si possono compilare/utilizzare?
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Some remote GUIs are available, see the links on features page:
|
||||
https://weechat.org/about/features
|
||||
Some remote GUIs are available, see the remote interfaces page:
|
||||
https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== Non è possibile compilare WeeChat dopo aver clonato il repository git, perché?
|
||||
@@ -946,6 +946,17 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[aspell_dictionaries]]
|
||||
=== I installed aspell dictionaries on my system, how can I use them without restarting WeeChat?
|
||||
|
||||
// TRANSLATION MISSING
|
||||
You have to reload the aspell plugin:
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== Impostazioni
|
||||
|
||||
@@ -1071,7 +1082,7 @@ for more information about configuration files.
|
||||
=== Come posso segnalare bug, richiedere nuove funzionalità o inviare patch?
|
||||
|
||||
// TRANSLATION MISSING
|
||||
See: https://weechat.org/dev/support
|
||||
See: https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== Quando eseguo WeeChat in gdb, c'è un errore riguardo ai thread, cosa posso fare?
|
||||
@@ -1108,10 +1119,10 @@ per gli OS che non abbiamo, e su cui testare WeeChat, è ben accetto.
|
||||
Ci sono molti compiti da fare (testing, scrittura del codice, documentazione, ...)
|
||||
|
||||
Per favore contattateci su IRC o via mail e consultate la pagina di supporto:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== Posso donare denaro o altre cose agli sviluppatori di WeeChat?
|
||||
|
||||
È possibile donare denaro per aiutare lo sviluppo.
|
||||
Maggiori dettagli su https://weechat.org/about/donate
|
||||
Maggiori dettagli su https://weechat.org/donate
|
||||
|
||||
@@ -2387,6 +2387,12 @@ expanded to last):
|
||||
`+${rev:Hello, world!}+` |
|
||||
`+!dlrow ,olleH+`
|
||||
|
||||
| `+${repeat:count,string}+` +
|
||||
(_WeeChat ≥ 2.3_) |
|
||||
Repeated string. |
|
||||
`+${repeat:5,-}+` |
|
||||
`+-----+`
|
||||
|
||||
| `+${re:N}+` +
|
||||
(_WeeChat ≥ 1.1_) |
|
||||
Regex captured group: `0` = whole string matching, `1` to `99` = group
|
||||
@@ -5863,7 +5869,7 @@ option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", ""
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
@@ -9402,12 +9408,290 @@ hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "",
|
||||
"my_connect_cb", "")
|
||||
----
|
||||
|
||||
==== hook_line
|
||||
|
||||
_WeeChat ≥ 2.3._
|
||||
|
||||
Hook a line to be printed in a buffer.
|
||||
|
||||
When a line is printed in a buffer, hooks are called in this order:
|
||||
|
||||
* <<_hook_line,hook line>> (this hook): it can change the buffer, prefix,
|
||||
message, tags, notify level, … (see below)
|
||||
* <<_hook_modifier,hook modifier>> "<<hook_modifier_weechat_print,weechat_print>>":
|
||||
it can change the prefix and message on a buffer with formatted content
|
||||
* <<_hook_print,hook print>>: called when the line has been added in a buffer
|
||||
with formatted content (nothing can be changed directly with this hook).
|
||||
|
||||
[NOTE]
|
||||
The "line" hook is the only one among these three hooks that can work on
|
||||
buffers with free content.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_hook *weechat_hook_line (const char *buffer_type,
|
||||
const char *buffer_name,
|
||||
const char *tags,
|
||||
struct t_hashtable *(*callback)(const void *pointer,
|
||||
void *data,
|
||||
struct t_hashtable *line),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
||||
* _buffer_type_: catch lines on the given buffer type (if NULL or empty string,
|
||||
_formatted_ is the default):
|
||||
** _formatted_: catch lines on formatted buffers only (default)
|
||||
** _free_: catch lines on buffers with free content only
|
||||
** _*_: catch lines on all buffer types
|
||||
* _buffer_name_: comma-separated list of buffer masks
|
||||
(see <<_buffer_match_list,buffer_match_list>>); NULL, empty string or "*"
|
||||
matches any buffer
|
||||
* _tags_: catch only messages with these tags (optional): comma-separated list
|
||||
of tags that must be in message (logical "or"); it is possible to combine
|
||||
many tags as a logical "and" with separator `+++`; wildcard `+*+` is allowed
|
||||
in tags
|
||||
* _callback_: function called when a line is added in a buffer, arguments and
|
||||
return value:
|
||||
** _const void *pointer_: pointer
|
||||
** _void *data_: pointer
|
||||
** _struct t_hashtable *line_: hashtable with the line info, keys and values are
|
||||
strings (see table below)
|
||||
** return value: hashtable with new values (see table below)
|
||||
* _callback_pointer_: pointer given to callback when it is called by WeeChat
|
||||
* _callback_data_: pointer given to callback when it is called by WeeChat;
|
||||
if not NULL, it must have been allocated with malloc (or similar function)
|
||||
and it is automatically freed when the hook is deleted
|
||||
|
||||
Valore restituito:
|
||||
|
||||
* puntatore al nuovo hook, NULL in caso di errore
|
||||
|
||||
Line data sent to the callback is a hashtable, with following values
|
||||
(keys and values are strings):
|
||||
|
||||
[width="100%",cols="^1,3,3,2",options="header"]
|
||||
|===
|
||||
| Key | Value (formatted buffer) | Value (free buffer) | Examples
|
||||
|
||||
| buffer |
|
||||
Buffer pointer. |
|
||||
Buffer pointer. |
|
||||
`+0x12345678+`
|
||||
|
||||
| buffer_name |
|
||||
Buffer name. |
|
||||
Buffer name. |
|
||||
`+core.weechat+` +
|
||||
`+irc.server.freenode+` +
|
||||
`+irc.freenode.#weechat+`
|
||||
|
||||
| buffer_type |
|
||||
"formatted" |
|
||||
"free" |
|
||||
`+formatted+` +
|
||||
`+free+`
|
||||
|
||||
| y |
|
||||
N/A ("-1"). |
|
||||
Line number (≥ "0"). |
|
||||
`+-1+` +
|
||||
`+8+`
|
||||
|
||||
| date |
|
||||
Line date (timestamp). |
|
||||
N/A ("0"). |
|
||||
`+1533792000+`
|
||||
|
||||
| date_printed |
|
||||
Date when line was displayed (timestamp). |
|
||||
N/A ("0"). |
|
||||
`+1533792012+`
|
||||
|
||||
| str_time |
|
||||
Date for display (possible color codes inside). |
|
||||
N/A (empty string). |
|
||||
`+09:07:20+`
|
||||
|
||||
| tags_count |
|
||||
Number of tags in the line (≥ "0"). |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| tags |
|
||||
Comma-separated list of tags. |
|
||||
N/A (empty string). |
|
||||
`+irc_join,nick_test+`
|
||||
|
||||
| displayed |
|
||||
"0" = line is filtered (hidden) +
|
||||
"1" = line is not filtered (displayed). |
|
||||
"0" = line is filtered (hidden) +
|
||||
"1" = line is not filtered (displayed). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| notify_level |
|
||||
"0" = low level +
|
||||
"1" = message +
|
||||
"2" = private message +
|
||||
"3" = highlight |
|
||||
N/A ("0"). |
|
||||
`+2+`
|
||||
|
||||
| highlight |
|
||||
"0" = no highlight +
|
||||
"1" = line has highlight. |
|
||||
N/A ("0"). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| prefix |
|
||||
Prefix of the line. |
|
||||
N/A (empty string). |
|
||||
`+-->+`
|
||||
|
||||
| message |
|
||||
Message of the line. |
|
||||
Message of the line. |
|
||||
`+test (~test@example.com) has joined #channel+`
|
||||
|===
|
||||
|
||||
The callback can return a hashtable with some fields to update the line.
|
||||
Any invalid value in a field is silently ignored by WeeChat.
|
||||
|
||||
The following keys can be set in the hashtable (keys and values are strings
|
||||
in this hashtable):
|
||||
|
||||
[width="100%",cols="^1,2,2,5",options="header"]
|
||||
|===
|
||||
| Key | Allowed value (formatted buffer) | Allowed value (free buffer) | Result
|
||||
|
||||
| buffer |
|
||||
Pointer of a buffer with formatted content. |
|
||||
Pointer of a buffer with free content. |
|
||||
The line is displayed on this buffer. +
|
||||
If the value is empty, the line is deleted (anything else in the hashtable
|
||||
is then ignored); the next hooks of type "line" are not called.
|
||||
|
||||
| buffer_name |
|
||||
Name of a buffer with formatted content. |
|
||||
Name of a buffer with free content. |
|
||||
The line is displayed on this buffer. +
|
||||
If `buffer` is also set, the value of `buffer_name` has higher priority and is used. +
|
||||
If the value is empty, the line is deleted (anything else in the hashtable
|
||||
is then ignored); the next hooks of type "line" are not called.
|
||||
|
||||
| y |
|
||||
N/A. |
|
||||
Integer (≥ "0"). |
|
||||
The line number is set to this value.
|
||||
|
||||
| date |
|
||||
Timestamp. |
|
||||
N/A. |
|
||||
The date is set to this value. +
|
||||
The value of `str_time` is updated accordingly.
|
||||
|
||||
| date_printed |
|
||||
Timestamp. |
|
||||
N/A. |
|
||||
The printed date is set to this timestamp (not displayed).
|
||||
|
||||
| str_time |
|
||||
String. |
|
||||
N/A. |
|
||||
This string is used to display the date line. +
|
||||
If `date` is also set, the value of `str_time` has higher priority and is used.
|
||||
|
||||
| tags |
|
||||
String. |
|
||||
N/A. |
|
||||
The line tags are replaced with this comma-separated list of tags. +
|
||||
The values of `notify_level` and `highlight` are updated accordingly.
|
||||
|
||||
| notify_level |
|
||||
Integer ("0" to "3"). |
|
||||
N/A. |
|
||||
The notify level is set to this value. The hotlist will be updated
|
||||
accordingly once the line is added in the buffer. +
|
||||
The value of `highlight` is updated accordingly. +
|
||||
If `tags` is also set, the value of `notify_level` has higher priority and is used.
|
||||
|
||||
| highlight |
|
||||
Integer ("0" or "1"). |
|
||||
N/A. |
|
||||
"0" disables highlight on the line, "1" forces a highlight on the line. +
|
||||
If `tags` or `notify_level` are set, the value of `highlight` has higher
|
||||
priority and is used.
|
||||
|
||||
| prefix |
|
||||
String. |
|
||||
N/A. |
|
||||
The line prefix is set to this value.
|
||||
|
||||
| message |
|
||||
String. |
|
||||
String. |
|
||||
The line message is set to this value.
|
||||
|===
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_line_cb (const void *pointer, void *data, struct t_hasbtable *line)
|
||||
{
|
||||
struct t_hashtable *hashtable;
|
||||
|
||||
hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
/* force a highlight on the line */
|
||||
weechat_hashtable_set (hashtable, "highlight", "1");
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
/* catch lines with tag "irc_join" */
|
||||
struct t_hook *my_line_hook =
|
||||
weechat_hook_line ("", "", "irc_join", &my_line_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
|
||||
|
||||
# esempio
|
||||
def my_line_cb(data, line):
|
||||
# force a highlight on the line
|
||||
return {"highlight": "1"}
|
||||
|
||||
# catch lines with tag "irc_join"
|
||||
hook = weechat.hook_line("", "", "irc_join", "my_line_cb", "")
|
||||
----
|
||||
|
||||
==== hook_print
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 0.4.3, 1.0, 1.5._
|
||||
|
||||
Hook su un messaggio stampato.
|
||||
// TRANSLATION MISSING
|
||||
Hook su un messaggio stampato. It is called when a line has been added in
|
||||
a buffer with formatted content.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For more information on the hooks called when a line is printed, see
|
||||
<<_hook_line,hook_line>>.
|
||||
|
||||
Prototipo:
|
||||
|
||||
@@ -11099,62 +11383,19 @@ List of modifiers used by WeeChat and plugins:
|
||||
|===
|
||||
| Modificatore | Dati modificatore | Stringa | Output
|
||||
|
||||
| charset_decode |
|
||||
plugin.buffer_name |
|
||||
Qualsiasi stringa. |
|
||||
Stringa codificata dal set caratteri trovato per plugin/buffer in UTF-8.
|
||||
|
||||
| charset_encode |
|
||||
plugin.buffer_name |
|
||||
Qualsiasi stringa. |
|
||||
Stringa codificata da UTF-8 al set caratteri trovato per il plugin/buffer.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_color_decode |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with IRC colors converted to WeeChat colors (or IRC colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_color_encode |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with IRC colors (or IRC colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with ANSI colors converted to IRC colors (or ANSI colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nome server |
|
||||
Authentication command (for example: `+/msg nickserv identify password+`). |
|
||||
Command with hidden password (for example: `+/msg nickserv identify ********+`).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nome server |
|
||||
Message displayed after `/msg` sent to nickserv. |
|
||||
Message with hidden password.
|
||||
|
||||
| irc_in_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_in_xxx]] irc_in_xxx ^(1)^ |
|
||||
Nome server |
|
||||
Contenuto del messaggio ricevuto dal server IRC (prima della codifica del set caratteri). |
|
||||
Nuovo contenuto del messaggio.
|
||||
|
||||
| irc_in2_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_in2_xxx]] irc_in2_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.5)_ |
|
||||
Nome server |
|
||||
Contenuto del messaggio ricevuto dal server IRC (dopo la codifica del set caratteri). |
|
||||
Nuovo contenuto del messaggio.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_out1_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_out1_xxx]] irc_out1_xxx ^(1)^ +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
Nome server |
|
||||
Content of message about to be sent to IRC server before automatic split
|
||||
@@ -11162,55 +11403,51 @@ List of modifiers used by WeeChat and plugins:
|
||||
Nuovo contenuto del messaggio.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| irc_out_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_out_xxx]] irc_out_xxx ^(1)^ |
|
||||
Nome server |
|
||||
Content of message about to be sent to IRC server after automatic split
|
||||
(to fit in 512 bytes by default). |
|
||||
Nuovo contenuto del messaggio.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with ANSI colors converted to WeeChat colors (or ANSI colors removed).
|
||||
|
||||
| bar_condition_yyy ^(2)^ |
|
||||
| [[hook_modifier_bar_condition_yyy]] bar_condition_yyy ^(2)^ |
|
||||
Stringa con puntatore alla finestra ("0x123..") |
|
||||
Stringa vuota. |
|
||||
"1" per visualizzare la barra, "0" per nasconderla.
|
||||
|
||||
| history_add +
|
||||
| [[hook_modifier_history_add]] history_add +
|
||||
_(WeeChat ≥ 0.3.2)_ |
|
||||
Stringa con puntatore al buffer ("0x123..") |
|
||||
Contenuto della riga di comando da aggiungere nella cronologia comandi (buffer e globale). |
|
||||
Stringa aggiunta alla cronologia comandi.
|
||||
|
||||
| input_text_content |
|
||||
| [[hook_modifier_input_text_content]] input_text_content |
|
||||
Stringa con puntatore al buffer ("0x123..") |
|
||||
Contenuto della riga di comando. |
|
||||
Nuovo contenuto della riga di comando.
|
||||
|
||||
| input_text_display |
|
||||
| [[hook_modifier_input_text_display]] input_text_display |
|
||||
Stringa con puntatore al buffer ("0x123..") |
|
||||
Contenuto della riga di comando, senza tag al cursore. |
|
||||
Nuova stringa, solo da mostrare (la riga di comando non viene modificata).
|
||||
|
||||
| input_text_display_with_cursor |
|
||||
| [[hook_modifier_input_text_display_with_cursor]] input_text_display_with_cursor |
|
||||
Stringa con puntatore al buffer ("0x123..") |
|
||||
Contenuto della riga di comando, con tag al cursore. |
|
||||
Nuova stringa, solo da mostrare (la riga di comando non viene modificata).
|
||||
|
||||
| input_text_for_buffer +
|
||||
| [[hook_modifier_input_text_for_buffer]] input_text_for_buffer +
|
||||
_(WeeChat ≥ 0.3.7)_ |
|
||||
Stringa con puntatore al buffer ("0x123..") |
|
||||
Contenuto della riga di comando inviata al buffer (testo o comando). |
|
||||
Nuovo contenuto della riga di comando inviata al buffer.
|
||||
|
||||
| weechat_print |
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_weechat_print]] weechat_print |
|
||||
plugin + ";" + buffer_name + ";" + tags |
|
||||
Messaggio stampato. |
|
||||
Nuovo messaggio stampato.
|
||||
Nuovo messaggio stampato. +
|
||||
For more information on the hooks called when a line is printed, see
|
||||
<<_hook_line,hook_line>>.
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -11284,6 +11521,64 @@ Valore restituito:
|
||||
|
||||
* stringa modificata, NULL in caso di errore
|
||||
|
||||
// TRANSLATION MISSING
|
||||
List of modifiers defined by WeeChat and plugins that can be used:
|
||||
|
||||
[width="100%",cols="^2,3,4,4",options="header"]
|
||||
|===
|
||||
| Modificatore | Dati modificatore | Stringa | Output
|
||||
|
||||
| [[hook_modifier_charset_decode]] charset_decode |
|
||||
plugin.buffer_name |
|
||||
Qualsiasi stringa. |
|
||||
Stringa codificata dal set caratteri trovato per plugin/buffer in UTF-8.
|
||||
|
||||
| [[hook_modifier_charset_encode]] charset_encode |
|
||||
plugin.buffer_name |
|
||||
Qualsiasi stringa. |
|
||||
Stringa codificata da UTF-8 al set caratteri trovato per il plugin/buffer.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_irc_color_decode]] irc_color_decode |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with IRC colors converted to WeeChat colors (or IRC colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_irc_color_encode]] irc_color_encode |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with IRC colors (or IRC colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_irc_color_decode_ansi]] irc_color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with ANSI colors converted to IRC colors (or ANSI colors removed).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_irc_command_auth]] irc_command_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nome server |
|
||||
Authentication command (for example: `+/msg nickserv identify password+`). |
|
||||
Command with hidden password (for example: `+/msg nickserv identify ********+`).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_irc_message_auth]] irc_message_auth +
|
||||
_(WeeChat ≥ 0.4.1)_ |
|
||||
Nome server |
|
||||
Message displayed after `/msg` sent to nickserv. |
|
||||
Message with hidden password.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi +
|
||||
_(WeeChat ≥ 1.0)_ |
|
||||
"1" per mantenere i colori, "0" per rimuovere i colori |
|
||||
Qualsiasi stringa. |
|
||||
String with ANSI colors converted to WeeChat colors (or ANSI colors removed).
|
||||
|===
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -537,6 +537,7 @@ Elenco di funzioni nelle API per gli script:
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+82
-25
@@ -465,8 +465,9 @@ ulimit -c 200000
|
||||
[[gdb_backtrace]]
|
||||
==== Ottenere un backtrace con gdb
|
||||
|
||||
In caso di errore di WeeChat, il sistema creerà un file _core_ oppure _core.12345_
|
||||
(_12345_ è l'id del processo).
|
||||
// TRANSLATION MISSING
|
||||
When WeeChat crashes, your system will create a file _core_ or _core.12345_
|
||||
(_12345_ is process id) if the <<core_files,option is enabled>>.
|
||||
Questo file viene creato nella directory in cui è in esecuzione WeeChat (e
|
||||
*non* la directory dove WeeChat è installato!).
|
||||
|
||||
@@ -3747,7 +3748,6 @@ Using triggers require you to know how the signals, modifiers, ... are working.
|
||||
So you might consider reading the
|
||||
link:weechat_plugin_api.it.html#hooks[WeeChat plugin API reference / Hooks].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[trigger_default]]
|
||||
==== Default triggers
|
||||
|
||||
@@ -3768,7 +3768,7 @@ List of default triggers:
|
||||
|
||||
| cmd_pass | modifier |
|
||||
Hide password in commands:
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
@@ -3799,8 +3799,8 @@ A trigger has the following options (names are
|
||||
When option is `off`, the trigger is disabled and actions are not executed
|
||||
any more.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `print`, `command`, `command_run`,
|
||||
`timer`, `config`, `focus` |
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
The hook used in trigger. For more information, see
|
||||
link:weechat_plugin_api.it.html#hooks[WeeChat plugin API reference / Hooks].
|
||||
|
||||
@@ -3835,7 +3835,7 @@ For example, the default _beep_ trigger has following options:
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3887,6 +3887,17 @@ The arguments depend on the hook used. They are separated by semicolons.
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.it.html#_hook_modifier[hook_modifier]
|
||||
|
||||
| line |
|
||||
1. buffer type +
|
||||
2. buffer name +
|
||||
3. tags |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. buffer name +
|
||||
2. tags +
|
||||
@@ -3951,7 +3962,7 @@ Example: the default _beep_ trigger uses this condition to make a beep only on
|
||||
highlight or private message:
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3960,24 +3971,34 @@ ${tg_highlight} || ${tg_msg_pv}
|
||||
The regular expression is used to change variables in callback hashtable.
|
||||
|
||||
The format is: "/regex/replace" or "/regex/replace/var" (where _var_ is a
|
||||
variable of the hashtable). +
|
||||
variable of the hashtable).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
If _var_ does not exist in the hashtable, it is created automatically with an
|
||||
empty value. This allows to create custom temporary variables.
|
||||
|
||||
If _var_ is not specified, the default variable is used, it depends on hook
|
||||
type:
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| Hook | Default variable
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| Hook | Default variable | Update allowed ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ All variables can be updated in the trigger, but only these variables
|
||||
have an effect on the value returned by the trigger and used by WeeChat.
|
||||
|
||||
Many regular expressions can be separated by a space, for example:
|
||||
"/regex1/replace1/var1 /regex2/replace2/var2".
|
||||
|
||||
@@ -4132,6 +4153,45 @@ For the _weechat_print_ modifier, variables using message tags are added (see
|
||||
If the modifier contains an IRC message, the message is parsed and extra data is
|
||||
added in hashtable (see <<trigger_data_signal,hook signal>>).
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
The "line" callback sets following variables in hashtable:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| buffer | pointer | Buffer.
|
||||
| buffer_name | string | Buffer name.
|
||||
| buffer_type | string | Buffer type ("formatted" or "free").
|
||||
| y | string | Line number for a buffer with free content (≥ 0), -1 for a buffer with formatted content.
|
||||
| date | string | Line date (timestamp).
|
||||
| date_printed | string | Date when line was displayed (timestamp).
|
||||
| str_time | string | Date for display. It may contain color codes.
|
||||
| tags | string | Tags of message (with comma added at beginning/end of string).
|
||||
| displayed | string | "1" if displayed, "0" if line filtered.
|
||||
| notify_level | string | "0" = low level, "1" = message, "2" = private message, "3" = highlight
|
||||
| highlight | string | "1" if highlight, otherwise "0".
|
||||
| prefix | string | Prefix.
|
||||
| tg_prefix_nocolor | string | Prefix without color codes.
|
||||
| message | string | Message.
|
||||
| tg_message_nocolor | string | Message without color codes.
|
||||
|===
|
||||
|
||||
Variables set using tags in message:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Variable | Type | Description
|
||||
| tg_tags_count | string | Number of tags in message.
|
||||
| tg_tag_nick | string | Nick (from tag "nick_xxx").
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -4150,8 +4210,7 @@ The "print" callback sets following variables in hashtable:
|
||||
| tg_message_nocolor | string | Message without color codes.
|
||||
|===
|
||||
|
||||
Variables set using tags in message (they are set in modifier _weechat_print_
|
||||
too):
|
||||
Variables set using tags in message:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4160,7 +4219,6 @@ too):
|
||||
| tg_tags_count | string | Number of tags in message.
|
||||
| tg_tag_nick | string | Nick (from tag "nick_xxx").
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
@@ -4304,7 +4362,6 @@ include::autogen/user/trigger_commands.adoc[]
|
||||
[[trigger_options]]
|
||||
==== Opzioni
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Sections in file _trigger.conf_:
|
||||
|
||||
[width="100%",cols="3m,6m,16",options="header"]
|
||||
@@ -4374,4 +4431,4 @@ For support with IRC, on server _chat.freenode.net_:
|
||||
** _#weechat-fi_ (Finlandese)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For other ways of support, see: https://weechat.org/dev/support
|
||||
For other ways of support, see: https://weechat.org/about/support
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** デフォルト値: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** 説明: pass:none[メッセージに含まれる mirc の定義する色に対するマッピングをハッシュテーブルで変更: キーは "fg,bg" で -1 (指定無し) から 15 までの整数、値は WeeChat 色名か色番号 (書式: "1,-1:color1;2,7:color2")、例: "1,-1:darkgray;1,2:white,blue" はテキスト色が黒のものを "darkgray" に、背景色が青でテキスト色が黒のものを "white,blue" に変更; IRC コードに対するデフォルトの WeeChat 色は、0=白、1=黒、2=青、3=緑、4=ライトレッド、5=赤、6=赤紫、7=茶色、8=黄色、9=ライトグリーン、10=シアン、11=ライトシアン、12=ライトブルー、13=ライトマゼンタ、14=灰色、15=白]
|
||||
** 説明: pass:none[remap mirc colors in messages using a hashtable: keys are "fg,bg" as integers between -1 (not specified) and 15, values are WeeChat color names or numbers (format is: "1,-1:color1;2,7:color2"), example: "1,-1:darkgray;1,2:white,blue" to remap black to "darkgray" and black on blue to "white,blue"; default WeeChat colors for IRC codes: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=darkgray, 15=gray]
|
||||
** タイプ: 文字列
|
||||
** 値: 未制約文字列
|
||||
** デフォルト値: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -20,7 +20,7 @@ disable: 現在のバッファのログ保存を無効化 (レベルを 0 に設
|
||||
オプション "logger.level.*" と "logger.mask.*" は任意のバッファに対するログレベルとログ保存先の設定を意味します。
|
||||
|
||||
IRC プラグインで使われるログレベル:
|
||||
1: ユーザメッセージ、通知、プライベート
|
||||
1: ユーザメッセージ (チャンネルとプライベート)、通知 (サーバとチャンネル)
|
||||
2: ニックネームの変更
|
||||
3: サーバメッセージ
|
||||
4: 参加/退出/終了
|
||||
|
||||
@@ -34,7 +34,7 @@ protocol.name: リレーするプロトコルと名前:
|
||||
- "weechat" プロトコル (name は使われません)
|
||||
|
||||
"irc" プロトコルを指定した場合、どんな IRC クライアント (WeeChat 自身を含めて) でもポートに接続することができます。
|
||||
"weechat" プロトコルを指定した場合、リモートインターフェースを使ってポートに接続することができます、参照: https://weechat.org/download/
|
||||
"weechat" プロトコルを指定した場合、リモートインターフェースを使ってポートに接続することができます、参照: https://weechat.org/about/interfaces
|
||||
|
||||
引数無しの場合、リレークライアントのリストを含むバッファを開く
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ listdefault: デフォルトトリガをリストアップ
|
||||
addoff: トリガを追加 (無効状態で)
|
||||
addreplace: 追加または存在するトリガを置換
|
||||
name: トリガの名前
|
||||
hook: signal、hsignal、modifier、print、command、command_run、timer、config、focus
|
||||
hook: signal、hsignal、modifier、line、print、command、command_run、timer、config、focus
|
||||
arguments: フックの引数、フックの種類に依存 (セミコロンで区切る):
|
||||
signal: シグナルの名前 (必須)
|
||||
hsignal: hsignal の名前 (必須)
|
||||
modifier: modifier の名前 (必須)
|
||||
line: バッファ型 ("formatted"、"free"、"*")、バッファマスクおよびタグのリスト
|
||||
print: バッファ、タグ、メッセージ、色の削除
|
||||
command: コマンド (必須)、説明、引数、引数の説明、補完
|
||||
command_run: コマンド (必須)
|
||||
@@ -69,7 +70,7 @@ post_action: トリガ実行後の処遇 (none (デフォルト、何もしな
|
||||
1. 条件を確認; 偽の場合、終了
|
||||
2. POSIX 拡張正規表現を使ってテキストを置換 (トリガに定義されている場合)
|
||||
3. コマンドを実行 (トリガに定義されている場合)
|
||||
4. リターンコードを返して終了 (modifier と focus を除く)
|
||||
4. リターンコードを返して終了 (modifier、line、focus を除く)
|
||||
5. トリガ実行後の処遇を適用
|
||||
|
||||
例 (/trigger listdefault でデフォルトトリガを見ることができます):
|
||||
|
||||
@@ -79,9 +79,9 @@ message: 離席メッセージ (メッセージが無い場合は、離席状態
|
||||
hide [<number>|<name>|-all [<number>|<name>...]]
|
||||
unhide [<number>|<name>|-all [<number>|<name>...]]
|
||||
renumber [<number1> [<number2> [<start>]]]
|
||||
close [<n1>[-<n2>]|<name>]
|
||||
close [<n1>[-<n2>]|<name>...]
|
||||
notify <level>
|
||||
localvar
|
||||
localvar [<number>|<name>]
|
||||
set <property> [<value>]
|
||||
get <property>
|
||||
<number>|-|+|<name>
|
||||
@@ -297,14 +297,15 @@ expression: 評価する式、${variable} 型の書式の変数は置換され
|
||||
4. 最大文字数を指定した文字列 (書式: "cut:max,suffix,string" または "cut:+max,suffix,string")
|
||||
または最大文字表示幅を指定した文字列 (書式: "cutscr:max,suffix,string" または "cutscr:+max,suffix,string")
|
||||
5. 文字順を反転させた文字列 (書式: "rev:xxx")
|
||||
6. 色 (書式: "color:xxx"、"プラグイン API リファレンス" の "color" 関数を参照してください)
|
||||
7. 情報 (書式: "info:name,arguments"、arguments は任意)
|
||||
8. 現在の日付/時刻 (書式: "date" または "date:format")
|
||||
9. 環境変数 (書式: "env:XXX")
|
||||
10. 三項演算子 (書式: "if:condition?value_if_true:value_if_false")
|
||||
11. オプション (書式: "file.section.option")
|
||||
12. バッファのローカル変数
|
||||
13. hdata の名前/変数 (値は自動的に文字列に変換されます)、デフォルトでは "window" と "buffer" は現在のウィンドウ/バッファを指します。
|
||||
6. 繰り返し文字列 (書式: "repeat:count,string")
|
||||
7. 色 (書式: "color:xxx"、"プラグイン API リファレンス" の "color" 関数を参照してください)
|
||||
8. 情報 (書式: "info:name,arguments"、arguments は任意)
|
||||
9. 現在の日付/時刻 (書式: "date" または "date:format")
|
||||
10. 環境変数 (書式: "env:XXX")
|
||||
11. 三項演算子 (書式: "if:condition?value_if_true:value_if_false")
|
||||
12. オプション (書式: "file.section.option")
|
||||
13. バッファのローカル変数
|
||||
14. hdata の名前/変数 (値は自動的に文字列に変換されます)、デフォルトでは "window" と "buffer" は現在のウィンドウ/バッファを指します。
|
||||
hdata の書式は以下の 1 つです:
|
||||
hdata.var1.var2...: hdata (ポインタは既知) で開始し、1 個ずつ変数を続ける (他の hdata を続けることも可能)
|
||||
hdata[list].var1.var2...: リストを使う hdata で開始する、例:
|
||||
@@ -329,6 +330,8 @@ hdata と変数の名前については、"プラグイン API リファレン
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH\n"
|
||||
/eval -n ${repeat:5,-} ==> -----\n"
|
||||
|
||||
例 (条件):
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -24,8 +24,13 @@
|
||||
*-p*, *--no-plugin*::
|
||||
プラグインの自動ロードを止める
|
||||
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
起動時にロードするプラグインを指定 (/help weechat.plugin.autoload を参照してください)。
|
||||
このオプションを使う場合、weechat.plugin.autoload オプションは無視されます。
|
||||
|
||||
*-r*, *--run-command* _<command>_::
|
||||
起動後にコマンドを実行 (複数のコマンドを指定するにはセミコロンで各コマンドを区切る)
|
||||
起動後にコマンドを実行; 複数のコマンドを実行するには各コマンドをセミコロンで区切って下さい。
|
||||
このオプションは複数回使用できます。
|
||||
|
||||
*-s*, *--no-script*::
|
||||
スクリプトの自動ロードを止める
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat-headless - 拡張可能なチャットクライアント (ヘッドレ
|
||||
== 書式
|
||||
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -25,7 +25,7 @@ WeeChat (Wee Enhanced Environment for Chat) はフリーのチャットクライ
|
||||
高速で軽量、多くのオペレーティングシステムで動くように設計されています。
|
||||
スクリプトを使って高度にカスタマイズと拡張可能です。
|
||||
|
||||
*weechat-headless* コマンドを使うことで、WeeChat をヘッドレスモード (インターフェイスなし) で実行できます。
|
||||
*weechat-headless* コマンドを使うことで、WeeChat をヘッドレスモード (インターフェースなし) で実行できます。
|
||||
ヘッドレスモードはテストや WeeChat をデーモン化する (オプション "--daemon" を使います) ために使われます。
|
||||
|
||||
== オプション
|
||||
@@ -56,4 +56,4 @@ include::man_copyright.ja.adoc[]
|
||||
|
||||
== サポート / バグ報告
|
||||
|
||||
手助けを受けたりバグを報告するには: https://weechat.org/dev/support
|
||||
手助けを受けたりバグを報告するには: https://weechat.org/about/support
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat - 拡張可能なチャットクライアント
|
||||
== 書式
|
||||
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <plugins>] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -53,4 +53,4 @@ include::man_copyright.ja.adoc[]
|
||||
|
||||
== サポート / バグ報告
|
||||
|
||||
手助けを受けたりバグを報告するには: https://weechat.org/dev/support
|
||||
手助けを受けたりバグを報告するには: https://weechat.org/about/support
|
||||
|
||||
+94
-73
@@ -69,10 +69,11 @@ qweechat::
|
||||
| ディレクトリ | 説明
|
||||
| src/ | ソースコードのルートディレクトリ
|
||||
| core/ | コア関数: エントリポイント、内部構造体
|
||||
| gui/ | バッファ、ウィンドウ、... を操作する関数 (全てのインターフェイスで使う)
|
||||
| curses/ | curses インターフェイス
|
||||
| headless/ | ヘッドレスモード (インターフェイスなし)
|
||||
| normal/ | curses インターフェイス
|
||||
| hook/ | フック関数
|
||||
| gui/ | バッファ、ウィンドウ、... を操作する関数 (全てのインターフェースで使う)
|
||||
| curses/ | curses インターフェース
|
||||
| headless/ | ヘッドレスモード (インターフェースなし)
|
||||
| normal/ | curses インターフェース
|
||||
| plugins/ | プラグインとスクリプト向け API
|
||||
| alias/ | alias プラグイン
|
||||
| aspell/ | aspell プラグイン
|
||||
@@ -89,7 +90,7 @@ qweechat::
|
||||
| perl/ | perl スクリプト用 API
|
||||
| php/ | php スクリプト用 API
|
||||
| python/ | python スクリプト用 API
|
||||
| relay/ | relay プラグイン (irc プロキシ + リモートインターフェイス用の中継)
|
||||
| relay/ | relay プラグイン (irc プロキシ + リモートインターフェース用の中継)
|
||||
| ruby/ | ruby スクリプト用 API
|
||||
| script/ | スクリプトマネージャ
|
||||
| tcl/ | tcl スクリプト用 API
|
||||
@@ -114,73 +115,92 @@ qweechat::
|
||||
WeeChat "core" は以下のディレクトリに配置されています:
|
||||
|
||||
* _src/core/_: コア関数 (データ操作用)
|
||||
* _src/gui/_: インターフェイスの関数 (バッファ、ウィンドウ、...)
|
||||
* _src/gui/_: インターフェースの関数 (バッファ、ウィンドウ、...)
|
||||
|
||||
[width="100%",cols="1m,3",options="header"]
|
||||
|===
|
||||
| パス/ファイル名 | 説明
|
||||
| core/ | コア関数: エントリポイント、内部構造体
|
||||
| wee-arraylist.c | 配列リスト
|
||||
| wee-backtrace.c | クラッシュした際にバックトレースを表示
|
||||
| wee-command.c | WeeChat コアコマンド
|
||||
| wee-completion.c | デフォルト補完
|
||||
| wee-config-file.c | 設定ファイル管理
|
||||
| wee-config.c | WeeChat コアの設定オプション (weechat.conf ファイル)
|
||||
| wee-debug.c | デバッグ用関数
|
||||
| wee-eval.c | 内部変数へのリファレンスを含む式を評価
|
||||
| wee-hashtable.c | ハッシュテーブル
|
||||
| wee-hdata.c | hdata (ハッシュテーブルを用いて直接データを読む)
|
||||
| wee-hook.c | フック
|
||||
| wee-infolist.c | インフォリスト (オブジェクトに関するデータを含むリスト)
|
||||
| wee-input.c | コマンドおよびテキストの入力
|
||||
| wee-list.c | ソート済みリスト
|
||||
| wee-log.c | WeeChat ログファイル (weechat.log) に書き込む
|
||||
| wee-network.c | ネットワーク関数 (サーバやプロキシへの接続)
|
||||
| wee-proxy.c | プロキシ管理
|
||||
| wee-secure.c | 安全なデータオプション (sec.conf ファイル)
|
||||
| wee-string.c | 文字列関数
|
||||
| wee-upgrade-file.c | 内部アップグレードシステム
|
||||
| wee-upgrade.c | WeeChat コアのアップグレード (バッファ、行、履歴、...)
|
||||
| wee-url.c | URL 転送 (libcurl を使う)
|
||||
| wee-utf8.c | UTF-8 関数
|
||||
| wee-util.c | その他の関数
|
||||
| wee-version.c | WeeChat バージョンについての関数
|
||||
| weechat.c | 主要関数: コマンドラインオプション、起動
|
||||
| gui/ | バッファ、ウィンドウなどの関数 (全てのインターフェイスで利用)
|
||||
| gui-bar-item.c | バー要素
|
||||
| gui-bar-window.c | バーウィンドウ
|
||||
| gui-bar.c | バー
|
||||
| gui-buffer.c | バッファ
|
||||
| gui-chat.c | チャット関数 (メッセージの表示、...)
|
||||
| gui-color.c | 色関数
|
||||
| gui-completion.c | コマンドラインの補完
|
||||
| gui-cursor.c | カーソルモード (カーソルを自由に移動)
|
||||
| gui-filter.c | フィルタ
|
||||
| gui-focus.c | フォーカスについての関数 (カーソルモードとマウス用)
|
||||
| gui-history.c | コマンドおよびバッファに保存されたテキスト
|
||||
| gui-hotlist.c | ホットリスト管理 (活発なバッファのリスト)
|
||||
| gui-input.c | 入力関数 (入力バー)
|
||||
| gui-key.c | キーボード関数
|
||||
| gui-layout.c | レイアウト
|
||||
| gui-line.c | バッファ中の行
|
||||
| gui-mouse.c | マウス
|
||||
| gui-nick.c | ニックネーム関数
|
||||
| gui-nicklist.c | バッファのニックネームリスト
|
||||
| gui-window.c | ウィンドウ
|
||||
| curses/ | curses インターフェイス
|
||||
| gui-curses-bar-window.c | バーウィンドウへの表示
|
||||
| gui-curses-chat.c | チャットエリアへの表示 (メッセージ)
|
||||
| gui-curses-color.c | 色関数
|
||||
| gui-curses-key.c | キーボード関数 (デフォルトキー、入力の読み取り)
|
||||
| gui-curses-main.c | WeeChat メインループ (キーボードやネットワークイベントの待ち受け)
|
||||
| gui-curses-mouse.c | マウス
|
||||
| gui-curses-term.c | 端末についての関数
|
||||
| gui-curses-window.c | ウィンドウ
|
||||
| headless/ | ヘッドレスモード (インターフェイスなし)
|
||||
| main.c | ヘッドレスモード用のエントリポイント
|
||||
| ncurses-fake.c | ダミーの ncurses ライブラリ
|
||||
| normal/ | curses インターフェイス
|
||||
| main.c | curses インターフェイス用のエントリポイント
|
||||
| パス/ファイル名 | 説明
|
||||
| core/ | コア関数: エントリポイント、内部構造体
|
||||
| wee-arraylist.c | 配列リスト
|
||||
| wee-backtrace.c | クラッシュした際にバックトレースを表示
|
||||
| wee-command.c | WeeChat コアコマンド
|
||||
| wee-completion.c | デフォルト補完
|
||||
| wee-config-file.c | 設定ファイル管理
|
||||
| wee-config.c | WeeChat コアの設定オプション (weechat.conf ファイル)
|
||||
| wee-debug.c | デバッグ用関数
|
||||
| wee-eval.c | 内部変数へのリファレンスを含む式を評価
|
||||
| wee-hashtable.c | ハッシュテーブル
|
||||
| wee-hdata.c | hdata (ハッシュテーブルを用いて直接データを読む)
|
||||
| wee-hook.c | フック
|
||||
| wee-infolist.c | インフォリスト (オブジェクトに関するデータを含むリスト)
|
||||
| wee-input.c | コマンドおよびテキストの入力
|
||||
| wee-list.c | ソート済みリスト
|
||||
| wee-log.c | WeeChat ログファイル (weechat.log) に書き込む
|
||||
| wee-network.c | ネットワーク関数 (サーバやプロキシへの接続)
|
||||
| wee-proxy.c | プロキシ管理
|
||||
| wee-secure.c | 安全なデータオプション (sec.conf ファイル)
|
||||
| wee-string.c | 文字列関数
|
||||
| wee-upgrade-file.c | 内部アップグレードシステム
|
||||
| wee-upgrade.c | WeeChat コアのアップグレード (バッファ、行、履歴、...)
|
||||
| wee-url.c | URL 転送 (libcurl を使う)
|
||||
| wee-utf8.c | UTF-8 関数
|
||||
| wee-util.c | その他の関数
|
||||
| wee-version.c | WeeChat バージョンについての関数
|
||||
| weechat.c | 主要関数: コマンドラインオプション、起動
|
||||
| hook/ | フック関数
|
||||
| wee-hook-command-run.c | "command_run" フック
|
||||
| wee-hook-command.c | "command" フック
|
||||
| wee-hook-completion.c | "completion" フック
|
||||
| wee-hook-config.c | "config" フック
|
||||
| wee-hook-connect.c | "connect" フック
|
||||
| wee-hook-fd.c | "fd" フック
|
||||
| wee-hook-focus.c | "focus" フック
|
||||
| wee-hook-hdata.c | "hdata" フック
|
||||
| wee-hook-hsignal.c | "hsignal" フック
|
||||
| wee-hook-info-hashtable.c | "info_hashtable" フック
|
||||
| wee-hook-info.c | "info" フック
|
||||
| wee-hook-infolist.c | "infolist" フック
|
||||
| wee-hook-line.c | "line" フック
|
||||
| wee-hook-modifier.c | "modifier" フック
|
||||
| wee-hook-print.c | "print" フック
|
||||
| wee-hook-process.c | "process" フック
|
||||
| wee-hook-signal.c | "signal" フック
|
||||
| wee-hook-timer.c | "timer" フック
|
||||
| gui/ | バッファ、ウィンドウなどの関数 (全てのインターフェースで利用)
|
||||
| gui-bar-item.c | バー要素
|
||||
| gui-bar-window.c | バーウィンドウ
|
||||
| gui-bar.c | バー
|
||||
| gui-buffer.c | バッファ
|
||||
| gui-chat.c | チャット関数 (メッセージの表示、...)
|
||||
| gui-color.c | 色関数
|
||||
| gui-completion.c | コマンドラインの補完
|
||||
| gui-cursor.c | カーソルモード (カーソルを自由に移動)
|
||||
| gui-filter.c | フィルタ
|
||||
| gui-focus.c | フォーカスについての関数 (カーソルモードとマウス用)
|
||||
| gui-history.c | コマンドおよびバッファに保存されたテキスト
|
||||
| gui-hotlist.c | ホットリスト管理 (活発なバッファのリスト)
|
||||
| gui-input.c | 入力関数 (入力バー)
|
||||
| gui-key.c | キーボード関数
|
||||
| gui-layout.c | レイアウト
|
||||
| gui-line.c | バッファ中の行
|
||||
| gui-mouse.c | マウス
|
||||
| gui-nick.c | ニックネーム関数
|
||||
| gui-nicklist.c | バッファのニックネームリスト
|
||||
| gui-window.c | ウィンドウ
|
||||
| curses/ | curses インターフェース
|
||||
| gui-curses-bar-window.c | バーウィンドウへの表示
|
||||
| gui-curses-chat.c | チャットエリアへの表示 (メッセージ)
|
||||
| gui-curses-color.c | 色関数
|
||||
| gui-curses-key.c | キーボード関数 (デフォルトキー、入力の読み取り)
|
||||
| gui-curses-main.c | WeeChat メインループ (キーボードやネットワークイベントの待ち受け)
|
||||
| gui-curses-mouse.c | マウス
|
||||
| gui-curses-term.c | 端末についての関数
|
||||
| gui-curses-window.c | ウィンドウ
|
||||
| headless/ | ヘッドレスモード (インターフェースなし)
|
||||
| main.c | ヘッドレスモード用のエントリポイント
|
||||
| ncurses-fake.c | ダミーの ncurses ライブラリ
|
||||
| normal/ | curses インターフェース
|
||||
| main.c | curses インターフェース用のエントリポイント
|
||||
|===
|
||||
|
||||
[[sources_plugins]]
|
||||
@@ -276,6 +296,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| logger/ | logger プラグイン
|
||||
| logger.c | logger の主要関数
|
||||
| logger-buffer.c | logger バッファリスト管理
|
||||
| logger-command.c | logger コマンド
|
||||
| logger-config.c | logger 設定オプション (logger.conf ファイル)
|
||||
| logger-info.c | logger の情報/インフォリスト/hdata
|
||||
| logger-tail.c | ファイル末尾の行を返す
|
||||
@@ -291,7 +312,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| python/ | python プラグイン
|
||||
| weechat-python.c | python の主要関数 (スクリプトのロード/アンロード、python コードの実行)
|
||||
| weechat-python-api.c | python スクリプト作成 API 関数
|
||||
| relay/ | relay プラグイン (IRC プロキシとリモートインターフェイスへの中継)
|
||||
| relay/ | relay プラグイン (IRC プロキシとリモートインターフェースへの中継)
|
||||
| relay.c | relay の主要関数
|
||||
| relay-buffer.c | relay バッファ
|
||||
| relay-client.c | relay クライアント
|
||||
@@ -306,8 +327,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| relay-websocket.c | リレー用の websocket サーバ関数 (RFC 6455)
|
||||
| irc/ | IRC プロキシ
|
||||
| relay-irc.c | IRC プロキシの主要関数
|
||||
| weechat/ | リモートインターフェイスへの中継
|
||||
| relay-weechat.c | リモートインターフェイスへの中継 (主要関数)
|
||||
| weechat/ | リモートインターフェースへの中継
|
||||
| relay-weechat.c | リモートインターフェースへの中継 (主要関数)
|
||||
| relay-weechat-msg.c | クライアントにバイナリメッセージを送信
|
||||
| relay-weechat-nicklist.c | ニックネームリスト関数
|
||||
| relay-weechat-protocol.c | クライアントからのコマンドを読み取る
|
||||
@@ -394,7 +415,7 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
| weechat_faq.XX.adoc | link:weechat_faq.ja.html[FAQ]
|
||||
| weechat_plugin_api.XX.adoc | link:weechat_plugin_api.ja.html[プラグイン API リファレンス]
|
||||
| weechat_quickstart.XX.adoc | link:weechat_quickstart.ja.html[クイックスタートガイド]
|
||||
| weechat_relay_protocol.XX.adoc | link:weechat_relay_protocol.ja.html[リレープロトコル] (リモートインターフェイス用)
|
||||
| weechat_relay_protocol.XX.adoc | link:weechat_relay_protocol.ja.html[リレープロトコル] (リモートインターフェース用)
|
||||
| weechat_scripting.XX.adoc | link:weechat_scripting.ja.html[スクリプト作成ガイド]
|
||||
| weechat_tester.XX.adoc | link:weechat_tester.ja.html[テスターガイド]
|
||||
| weechat_user.XX.adoc | link:weechat_user.ja.html[ユーザーズガイド]
|
||||
|
||||
@@ -45,8 +45,8 @@ WeeChat は非常に軽く、革新的な機能を備えているからです。
|
||||
[[gui]]
|
||||
=== WeeChat には多くの GUI があると聞きました。コンパイル/利用方法を教えてください。
|
||||
|
||||
いくつかのリモート GUI が利用可能です、機能のページに載っているリンクを参照してください:
|
||||
https://weechat.org/about/features
|
||||
いくつかのリモート GUI が利用可能です、以下のリモートインターフェースに関するページを参照してください:
|
||||
https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== git リポジトリをクローンした後に WeeChat をコンパイルできません。
|
||||
@@ -509,9 +509,8 @@ Mac OS X のターミナル.app を使っている場合、設定メニューの
|
||||
|
||||
デフォルトキー割り当てのリストはlink:weechat_user.ja.html#key_bindings[ユーザーズガイド / デフォルトのキー割り当て]を参照してください
|
||||
|
||||
// TRANSLATION MISSING
|
||||
To jump to buffers with number ≥ 100, you could define a trigger and then use
|
||||
commands like `/123` to jump to buffer #123:
|
||||
番号 100 以上のバッファにジャンプするには、以下のトリガを定義してください。こうすることでコマンド
|
||||
`/123` でバッファ #123 にジャンプできるようになります:
|
||||
|
||||
----
|
||||
/trigger add numberjump modifier "2000|input_text_for_buffer" "${tg_string} =~ ^/[0-9]+$" "=\/([0-9]+)=/buffer *${re:1}=" "" "" "none"
|
||||
@@ -875,6 +874,15 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
[[aspell_dictionaries]]
|
||||
=== システムに aspell 辞書をインストールした後、WeeChat を再起動せずにそれを使う方法を教えてください。
|
||||
|
||||
aspell プラグインをリロードしてください:
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== 設定
|
||||
|
||||
@@ -987,7 +995,7 @@ _sec.conf_ に保存していない場合、これらの情報は _irc.conf_
|
||||
[[bug_task_patch]]
|
||||
=== どのようにバグ報告、新機能のリクエスト、パッチ送信すればよいですか。
|
||||
|
||||
以下のページを参照してください: https://weechat.org/dev/support
|
||||
以下のページを参照してください: https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== gdb で WeeChat を実行する場合、スレッドに関するエラーが発生します。
|
||||
@@ -1023,10 +1031,10 @@ OS で WeeChat をテストすることを歓迎します。
|
||||
多くの課題があります (テスト、コード、ドキュメント作成、...)。
|
||||
|
||||
IRC かメールで連絡を取り、サポートページを確認してください:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== WeeChat 開発者にお金か何かを贈りたいのですが。
|
||||
|
||||
開発補助のためお金を贈ることができます。詳しいことは
|
||||
https://weechat.org/about/donate に載っています。
|
||||
https://weechat.org/donate に載っています。
|
||||
|
||||
@@ -2298,6 +2298,12 @@ str5 = weechat.string_eval_expression("password=abc password=def", {}, {}, optio
|
||||
`+${rev:Hello, world!}+` |
|
||||
`+!dlrow ,olleH+`
|
||||
|
||||
| `+${repeat:count,string}+` +
|
||||
(_WeeChat バージョン 2.3 以上で利用可_) |
|
||||
繰り返し文字列。|
|
||||
`+${repeat:5,-}+` |
|
||||
`+-----+`
|
||||
|
||||
| `+${re:N}+` +
|
||||
(_WeeChat バージョン 1.1 以上で利用可_) |
|
||||
正規表現のキャプチャグループ: `0` = マッチするすべての文字列、`1` から `99` =
|
||||
@@ -5618,7 +5624,7 @@ option3 = weechat.config_new_option(config_file, section, "option3", "integer",
|
||||
option4 = weechat.config_new_option(config_file, section, "option4", "string",
|
||||
"My option, type string",
|
||||
"", 0, 0, "test", "test", 1,
|
||||
"option4_check_value_cb", ""
|
||||
"option4_check_value_cb", "",
|
||||
"option4_change_cb", "",
|
||||
"option4_delete_cb", "")
|
||||
|
||||
@@ -9070,11 +9076,286 @@ hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "",
|
||||
"my_connect_cb", "")
|
||||
----
|
||||
|
||||
==== hook_line
|
||||
|
||||
_WeeChat バージョン 2.3 以上で利用可_
|
||||
|
||||
バッファに対する行表示をフックする。
|
||||
|
||||
バッファに行が表示される際に、以下の順番でフックが呼び出されます:
|
||||
|
||||
* <<_hook_line,hook line>> (このフック):
|
||||
バッファ、プレフィックス、メッセージ、タグ、通知レベル、… を変更可能 (以下を参照)
|
||||
* <<_hook_modifier,hook modifier>> "<<hook_modifier_weechat_print,weechat_print>>":
|
||||
フォーマット済み内容バッファ上のプレフィックスとメッセージを変更可能
|
||||
* <<_hook_print,hook print>>: 行がフォーマット済み内容バッファに追加された時点で呼び出されます
|
||||
(このフックでは何かを変更することはできません)。
|
||||
|
||||
[NOTE]
|
||||
上記 3 つのフックの中で、フォーマット済み内容バッファの内容を操作できるのは
|
||||
"line" フックだけです。
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
struct t_hook *weechat_hook_line (const char *buffer_type,
|
||||
const char *buffer_name,
|
||||
const char *tags,
|
||||
struct t_hashtable *(*callback)(const void *pointer,
|
||||
void *data,
|
||||
struct t_hashtable *line),
|
||||
const void *callback_pointer,
|
||||
void *callback_data);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
||||
* _buffer_type_: ここで指定したバッファ型の行をフックします (NULL または空文字列の場合、
|
||||
_formatted_ を指定したことになります):
|
||||
** _formatted_: フォーマット済み内容バッファの行のみをフックします (デフォルト)
|
||||
** _free_: 自由内容バッファの行のみをフックします
|
||||
** _*_: すべてのバッファの行をフックします
|
||||
* _buffer_name_: バッファマスクのコンマ区切りリスト
|
||||
(<<_buffer_match_list,buffer_match_list>> を参照してください);
|
||||
NULL、空文字列、"*" は任意のバッファにマッチします。
|
||||
* _tags_: 指定したタグを付けられたメッセージのみをフックします (任意):
|
||||
メッセージに含まれるタグのコンマ区切りリスト (論理 "or");
|
||||
複数のタグを論理 "and" で組み合わせるには `+++` を使ってください;
|
||||
タグ中の `+*+` はワイルドカードを意味します
|
||||
* _callback_:
|
||||
バッファに行が追加されると呼び出される関数、引数と戻り値は以下:
|
||||
** _const void *pointer_: ポインタ
|
||||
** _void *data_: ポインタ
|
||||
** _struct t_hashtable *line_: 行のインフォを含むハッシュテーブル、キーと値は文字列
|
||||
(以下のテーブルを参照してください)
|
||||
** 戻り値: 新しい値のハッシュテーブル (以下のテーブルを参照してください)
|
||||
* _callback_pointer_: WeeChat がコールバックを呼び出した際にコールバックに渡したポインタ
|
||||
* _callback_data_: WeeChat がコールバックを呼び出した際にコールバックに渡したポインタ;
|
||||
NULL 以外の場合、このポインタの指す領域は malloc (もしくは類似の関数)
|
||||
で割り当てられたものでなければいけません。加えて、このポインタの指す領域はフックが削除された時点で自動的に解放されます。
|
||||
|
||||
戻り値:
|
||||
|
||||
* 新しいフックへのポインタ、エラーが起きた場合は NULL
|
||||
|
||||
コールバックへ送られる行のデータは以下の値を持つハッシュテーブルです
|
||||
(キーと値は文字列):
|
||||
|
||||
[width="100%",cols="^1,3,3,2",options="header"]
|
||||
|===
|
||||
| キー | 値 (フォーマット済みバッファ) | 値 (自由内容バッファ) | 例
|
||||
|
||||
| buffer |
|
||||
バッファポインタ |
|
||||
バッファポインタ |
|
||||
`+0x12345678+`
|
||||
|
||||
| buffer_name |
|
||||
バッファ名 |
|
||||
バッファ名 |
|
||||
`+core.weechat+` +
|
||||
`+irc.server.freenode+` +
|
||||
`+irc.freenode.#weechat+`
|
||||
|
||||
| buffer_type |
|
||||
"formatted" |
|
||||
"free" |
|
||||
`+formatted+` +
|
||||
`+free+`
|
||||
|
||||
| y |
|
||||
利用不可 ("-1") |
|
||||
行番号 (≥ "0") |
|
||||
`+-1+` +
|
||||
`+8+`
|
||||
|
||||
| date |
|
||||
行日付 (タイムスタンプ) |
|
||||
利用不可 ("0") |
|
||||
`+1533792000+`
|
||||
|
||||
| date_printed |
|
||||
行が表示された日付 (タイムスタンプ) |
|
||||
利用不可 ("0") |
|
||||
`+1533792012+`
|
||||
|
||||
| str_time |
|
||||
行に追加される日付 (色コードを入れてもよい) |
|
||||
利用不可 (空文字列) |
|
||||
`+09:07:20+`
|
||||
|
||||
| tags_count |
|
||||
タグの個数 (≥ "0") |
|
||||
利用不可 ("0") |
|
||||
`+2+`
|
||||
|
||||
| tags |
|
||||
タグのコンマ区切りリスト |
|
||||
利用不可 (空文字列) |
|
||||
`+irc_join,nick_test+`
|
||||
|
||||
| displayed |
|
||||
"0" = 行はフィルタされました (非表示) +
|
||||
"1" = 行はフィルタされませんでした (表示) |
|
||||
"0" = 行はフィルタされました (非表示) +
|
||||
"1" = 行はフィルタされませんでした (表示) |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| notify_level |
|
||||
"0" = 低レベル +
|
||||
"1" = メッセージ +
|
||||
"2" = プライベートメッセージ +
|
||||
"3" = ハイライト |
|
||||
利用不可 ("0") |
|
||||
`+2+`
|
||||
|
||||
| highlight |
|
||||
"0" = ハイライトなし +
|
||||
"1" = ハイライトあり |
|
||||
利用不可 ("0"). |
|
||||
`+0+` +
|
||||
`+1+`
|
||||
|
||||
| prefix |
|
||||
行のプレフィックス |
|
||||
利用不可 (空文字列) |
|
||||
`+-->+`
|
||||
|
||||
| message |
|
||||
行のメッセージ |
|
||||
行のメッセージ |
|
||||
`+test (~test@example.com) has joined #channel+`
|
||||
|===
|
||||
|
||||
戻り値としては、値すべてのフィールドを含む完全なハッシュテーブルを返す必要もありませんし、無効なフィールドがあっても
|
||||
WeeChat はそれらを無視します。
|
||||
|
||||
ハッシュテーブルに設定できるキーを以下に挙げます
|
||||
(ハッシュテーブル中のキーと値は文字列です)。
|
||||
|
||||
[width="100%",cols="^1,2,2,5",options="header"]
|
||||
|===
|
||||
| キー | 設定可能な値 (フォーマット済みバッファ) | 設定可能な値 (自由内容バッファ) | 結果
|
||||
|
||||
| buffer |
|
||||
フォーマット済みバッファへのポインタ |
|
||||
自由内容バッファへのポインタ |
|
||||
行を表示するバッファ。 +
|
||||
この値が空の場合、行は削除されます (ハッシュテーブルに含まれるその他の情報も無視されます);
|
||||
"line" 型の次のフックも呼び出されません。
|
||||
|
||||
| buffer_name |
|
||||
フォーマット済み内容バッファの名前. |
|
||||
自由内容バッファの名前 |
|
||||
行を表示するバッファ。 +
|
||||
`buffer` と `buffer_name` の両方が設定された場合、`buffer_name` の値が優先されます +
|
||||
この値が空の場合、行は削除されます (ハッシュテーブルに含まれるその他の情報も無視されます);
|
||||
"line" 型の次のフックも呼び出されません。
|
||||
|
||||
| y |
|
||||
利用不可 |
|
||||
整数 (≥ "0") |
|
||||
行番号はこの値に設定されます
|
||||
|
||||
| date |
|
||||
タイムスタンプ |
|
||||
利用不可 |
|
||||
日付はこの値に設定されます +
|
||||
これに対応して `str_time` も更新されます
|
||||
|
||||
| date_printed |
|
||||
タイムスタンプ |
|
||||
利用不可 |
|
||||
表示される日付はこのタイムスタンプを使います。The printed date is set to this timestamp (not displayed).
|
||||
|
||||
| str_time |
|
||||
文字列 |
|
||||
利用不可 |
|
||||
この文字列は日付を表示する際に使われます。 +
|
||||
`date` と `str_time` の両方が設定された場合、`str_time` の値が優先されます。
|
||||
|
||||
| tags |
|
||||
文字列 |
|
||||
利用不可 |
|
||||
行タグはここで指定したコンマ区切りリストに置き換えられます。 +
|
||||
これに対応して `notify_level` と `highlight` も更新されます。
|
||||
|
||||
| notify_level |
|
||||
整数 ("0" から "3") |
|
||||
利用不可 |
|
||||
通知レベルがこの値に設定されます。バッファに行が追加されるとホットリストも更新されます。 +
|
||||
この値に対応して `highlight` の値も更新されます。 +
|
||||
`tags` と `notify_level` の両方が設定された場合、`notify_level`
|
||||
の値が優先されます。
|
||||
|
||||
| highlight |
|
||||
整数 ("0" または "1") |
|
||||
利用不可 |
|
||||
"0" は行のハイライトを無効化し、"1" は行のハイライトを強制します。 +
|
||||
この値と `tags` または `notify_level` の両方が設定された場合、`highlight`
|
||||
の値が優先されます。
|
||||
|
||||
| prefix |
|
||||
文字列 |
|
||||
利用不可 |
|
||||
行のプレフィックスがこの値に設定されます
|
||||
|
||||
| message |
|
||||
文字列 |
|
||||
文字列 |
|
||||
行メッセージがこの値に設定されます
|
||||
|===
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int
|
||||
my_line_cb (const void *pointer, void *data, struct t_hasbtable *line)
|
||||
{
|
||||
struct t_hashtable *hashtable;
|
||||
|
||||
hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
NULL,
|
||||
NULL);
|
||||
/* この行のハイライトを強制 */
|
||||
weechat_hashtable_set (hashtable, "highlight", "1");
|
||||
return hashtable;
|
||||
}
|
||||
|
||||
/* タグ "irc_join" をつけられた行をフック */
|
||||
struct t_hook *my_line_hook =
|
||||
weechat_hook_line ("", "", "irc_join", &my_line_cb, NULL, NULL);
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
hook = weechat.hook_line(buffer_type, buffer_name, tags, callback, callback_data)
|
||||
|
||||
# 例
|
||||
def my_line_cb(data, line):
|
||||
# この行のハイライトを強制
|
||||
return {"highlight": "1"}
|
||||
|
||||
# タグ "irc_join" をつけられた行をフック
|
||||
hook = weechat.hook_line("", "", "irc_join", "my_line_cb", "")
|
||||
----
|
||||
|
||||
==== hook_print
|
||||
|
||||
_WeeChat バージョン 0.4.3、1.0、1.5 で更新。_
|
||||
|
||||
メッセージの表示をフックする。
|
||||
メッセージの表示をフックする。これは行がフォーマット済みバッファに追加された時点で呼び出されます。
|
||||
|
||||
行が表示された際に呼び出されるフックの情報は
|
||||
<<_hook_line,hook_line>> を参照してください。
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
@@ -10628,110 +10909,68 @@ WeeChat とプラグインが使う修飾子のリスト:
|
||||
|===
|
||||
| 修飾子 | 修飾子データ | 文字列 | 出力
|
||||
|
||||
| charset_decode |
|
||||
plugin.buffer_name |
|
||||
任意の文字列 |
|
||||
プラグインおよびバッファの文字セットから UTF-8 にデコードされた文字列
|
||||
|
||||
| charset_encode |
|
||||
plugin.buffer_name |
|
||||
任意の文字列 |
|
||||
UTF-8 からプラグインおよびバッファの文字セットにエンコードされた文字列
|
||||
|
||||
| irc_color_decode |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
WeeChat 色コードに変換された IRC 色コードを含む (または IRC 色コードを削除された) 文字列
|
||||
|
||||
| irc_color_encode |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
IRC 色コードを含む (または IRC 色コードを削除された) 文字列
|
||||
|
||||
| irc_color_decode_ansi +
|
||||
_(WeeChat バージョン 1.0 以上で利用可)_ |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
IRC 色コードに変換された ANSI 色コードを含む (または ANSI 色コードを削除された) 文字列
|
||||
|
||||
| irc_command_auth +
|
||||
_(WeeChat バージョン 0.4.1 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
認証コマンド (例: `+/msg nickserv identify password+`) |
|
||||
パスワードを隠したコマンド (例: `+/msg nickserv identify ********+`)
|
||||
|
||||
| irc_message_auth +
|
||||
_(WeeChat バージョン 0.4.1 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
`/msg` をサーバに送信した後に表示されるメッセージ |
|
||||
パスワードを隠したメッセージ
|
||||
|
||||
| irc_in_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_in_xxx]] irc_in_xxx ^(1)^ |
|
||||
サーバ名 |
|
||||
IRC サーバから受信したメッセージの内容 (文字セットをデコードする前) |
|
||||
メッセージの新しい内容
|
||||
|
||||
| irc_in2_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_in2_xxx]] irc_in2_xxx ^(1)^ +
|
||||
_(WeeChat バージョン 0.3.5 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
IRC サーバから受信したメッセージの内容 (文字セットをデコードした後) |
|
||||
メッセージの新しい内容
|
||||
|
||||
| irc_out1_xxx ^(1)^ +
|
||||
| [[hook_modifier_irc_out1_xxx]] irc_out1_xxx ^(1)^ +
|
||||
_(WeeChat バージョン 0.3.7 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
IRC サーバに送信するメッセージの内容
|
||||
(自動分割前、自動分割はデフォルトでメッセージを 512 バイト内に収まるように分割します)。|
|
||||
メッセージの新しい内容
|
||||
|
||||
| irc_out_xxx ^(1)^ |
|
||||
| [[hook_modifier_irc_out_xxx]] irc_out_xxx ^(1)^ |
|
||||
サーバ名 |
|
||||
IRC サーバに送信するメッセージの内容
|
||||
(自動分割後、自動分割はデフォルトでメッセージを 512 バイト内に収まるように分割します)。|
|
||||
メッセージの新しい内容
|
||||
|
||||
| color_decode_ansi +
|
||||
_(WeeChat バージョン 1.0 以上で利用可)_ |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
WeeChat 色コードに変換された ANSI 色コードを含む (または ANSI 色コードを削除された) 文字列
|
||||
|
||||
| bar_condition_yyy ^(2)^ |
|
||||
| [[hook_modifier_bar_condition_yyy]] bar_condition_yyy ^(2)^ |
|
||||
ウィンドウへのポインタの文字列 ("0x123..") |
|
||||
空文字列 |
|
||||
バーを表示する場合は "1"、隠す場合は "0"
|
||||
|
||||
| history_add +
|
||||
| [[hook_modifier_history_add]] history_add +
|
||||
_(WeeChat バージョン 0.3.2 以上で利用可)_ |
|
||||
バッファへのポインタの文字列 ("0x123..") |
|
||||
コマンド履歴に追加するコマンドラインの内容 (バッファとグローバル履歴) |
|
||||
コマンド履歴に追加した文字列
|
||||
|
||||
| input_text_content |
|
||||
| [[hook_modifier_input_text_content]] input_text_content |
|
||||
バッファへのポインタの文字列 ("0x123..") |
|
||||
コマンドラインの内容 |
|
||||
コマンドラインの新しい内容
|
||||
|
||||
| input_text_display |
|
||||
| [[hook_modifier_input_text_display]] input_text_display |
|
||||
バッファへのポインタの文字列 ("0x123..") |
|
||||
カーソルタグを含まないコマンドラインの内容 |
|
||||
新しい文字列、表示のみ (コマンドラインは変化しない)
|
||||
|
||||
| input_text_display_with_cursor |
|
||||
| [[hook_modifier_input_text_display_with_cursor]] input_text_display_with_cursor |
|
||||
バッファへのポインタの文字列 ("0x123..") |
|
||||
カーソルタグを含むコマンドラインの内容 |
|
||||
新しい文字列、表示のみ (コマンドラインは変化しない)
|
||||
|
||||
| input_text_for_buffer +
|
||||
| [[hook_modifier_input_text_for_buffer]] input_text_for_buffer +
|
||||
_(WeeChat バージョン 0.3.7 以上で利用可)_ |
|
||||
バッファへのポインタの文字列 ("0x123..") |
|
||||
バッファに送信するコマンドラインの内容 (テキストまたはコマンド) |
|
||||
バッファに送信するコマンドラインの新しい内容
|
||||
|
||||
| weechat_print |
|
||||
| [[hook_modifier_weechat_print]] weechat_print |
|
||||
plugin + ";" + buffer_name + ";" + tags |
|
||||
表示されたメッセージ |
|
||||
表示される新しいメッセージ
|
||||
表示される新しいメッセージ +
|
||||
行が表示される際に呼び出されるフックについての詳細は
|
||||
<<_hook_line,hook_line>> を参照してください
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
@@ -10805,6 +11044,57 @@ char *weechat_hook_modifier_exec (const char *modifier,
|
||||
|
||||
* 修正された文字列、エラーが起きた場合は NULL
|
||||
|
||||
WeeChat とプラグインが定義する修飾子のリスト:
|
||||
|
||||
[width="100%",cols="^2,3,4,4",options="header"]
|
||||
|===
|
||||
| 修飾子 | 修飾子データ | 文字列 | 出力
|
||||
|
||||
| [[hook_modifier_charset_decode]] charset_decode |
|
||||
plugin.buffer_name |
|
||||
任意の文字列 |
|
||||
プラグインおよびバッファの文字セットから UTF-8 にデコードされた文字列
|
||||
|
||||
| [[hook_modifier_charset_encode]] charset_encode |
|
||||
plugin.buffer_name |
|
||||
任意の文字列 |
|
||||
UTF-8 からプラグインおよびバッファの文字セットにエンコードされた文字列
|
||||
|
||||
| [[hook_modifier_irc_color_decode]] irc_color_decode |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
WeeChat 色コードに変換された IRC 色コードを含む (または IRC 色コードを削除された) 文字列
|
||||
|
||||
| [[hook_modifier_irc_color_encode]] irc_color_encode |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
IRC 色コードを含む (または IRC 色コードを削除された) 文字列
|
||||
|
||||
| [[hook_modifier_irc_color_decode_ansi]] irc_color_decode_ansi +
|
||||
_(WeeChat バージョン 1.0 以上で利用可)_ |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
IRC 色コードに変換された ANSI 色コードを含む (または ANSI 色コードを削除された) 文字列
|
||||
|
||||
| [[hook_modifier_irc_command_auth]] irc_command_auth +
|
||||
_(WeeChat バージョン 0.4.1 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
認証コマンド (例: `+/msg nickserv identify password+`) |
|
||||
パスワードを隠したコマンド (例: `+/msg nickserv identify ********+`)
|
||||
|
||||
| [[hook_modifier_irc_message_auth]] irc_message_auth +
|
||||
_(WeeChat バージョン 0.4.1 以上で利用可)_ |
|
||||
サーバ名 |
|
||||
`/msg` をサーバに送信した後に表示されるメッセージ |
|
||||
パスワードを隠したメッセージ
|
||||
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi +
|
||||
_(WeeChat バージョン 1.0 以上で利用可)_ |
|
||||
色を保持する場合は "1"、削除する場合は "0" |
|
||||
任意の文字列 |
|
||||
WeeChat 色コードに変換された ANSI 色コードを含む (または ANSI 色コードを削除された) 文字列
|
||||
|===
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
この文書は WeeChat リレープロトコルについて述べたものです: リレープロトコルとは、WeeChat
|
||||
データをクライアントに中継するためのもので、多くの場合クライアントはリモートインターフェイスを指します。
|
||||
データをクライアントに中継するためのもので、多くの場合クライアントはリモートインターフェースを指します。
|
||||
|
||||
|
||||
[[introduction]]
|
||||
@@ -29,7 +29,7 @@
|
||||
* _リレー_: これは relay プラグインを備えた WeeChat を指し、"サーバ"
|
||||
のように振る舞い、_クライアント_ からの接続を受け付けます
|
||||
* _クライアント_: これは他のソフトウェアのことを指し、ネットワークを介して _リレー_
|
||||
に接続します; 多くの場合、_クライアント_ はリモートインターフェイスのことを指します。
|
||||
に接続します; 多くの場合、_クライアント_ はリモートインターフェースのことを指します。
|
||||
|
||||
[[network_diagram]]
|
||||
=== ネットワーク図
|
||||
@@ -50,8 +50,8 @@
|
||||
|
||||
|
||||
└────────────┘ └────────────────────┘╘══════╛└──────────────────────────────────────┘
|
||||
ネットワーク ncurses リレー リモートインターフェイス
|
||||
サーバ インターフェイス プロトコル
|
||||
ネットワーク ncurses リレー リモートインターフェース
|
||||
サーバ インターフェース プロトコル
|
||||
....
|
||||
|
||||
[NOTE]
|
||||
@@ -496,23 +496,23 @@ quit
|
||||
メッセージは以下の書式でバイナリデータとして送信されます (サイズはバイト単位):
|
||||
|
||||
....
|
||||
┌────────╥─────────────╥────╥────────┬──────────╥───────╥────────┬──────────┐
|
||||
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
|
||||
└────────╨─────────────╨────╨────────┴──────────╨───────╨────────┴──────────┘
|
||||
└──────┘ └───────────┘ └──┘ └──────┘ └────────┘ └──────┘ └────────┘
|
||||
4 1 ?? 3 ?? 3 ??
|
||||
└────────────────────┘ └──────────────────────────────────────────────────┘
|
||||
ヘッダ (5) 圧縮されたデータ (??)
|
||||
└─────────────────────────────────────────────────────────────────────────┘
|
||||
┌────────╥─────────────╥─────────╥────────┬──────────╥───────╥────────┬──────────┐
|
||||
│ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │
|
||||
└────────╨─────────────╨─────────╨────────┴──────────╨───────╨────────┴──────────┘
|
||||
└──────┘ └───────────┘ └───────┘ └──────┘ └────────┘ └──────┘ └────────┘
|
||||
4 1 4 + str 3 ?? 3 ??
|
||||
└────────────────────┘ └───────────────────────────────────────────────────────┘
|
||||
ヘッダ (5) 圧縮されたデータ (??)
|
||||
└──────────────────────────────────────────────────────────────────────────────┘
|
||||
'length' バイト
|
||||
....
|
||||
|
||||
* _length_ (符号なし整数型): メッセージ全体のバイト数
|
||||
* _length_ (符号なし整数型、4 バイト): メッセージ全体のバイト数
|
||||
(このフィールドを含む)
|
||||
* _compression_ (バイト型): フラグ:
|
||||
** _0x00_: これ以降のデータは圧縮されていません
|
||||
** _0x01_: これ以降のデータは _zlib_ で圧縮されています
|
||||
* _id_ (文字列型): クライアントが送信した識別子 (コマンド名の前につけられる);
|
||||
* _id_ (文字列型、4 バイト + 内容): クライアントが送信した識別子 (コマンド名の前につけられる);
|
||||
コマンドに識別子が含まれない場合は空文字列でも可
|
||||
(内容を含まない長さゼロの文字列)
|
||||
* _type_ (3 文字): 型の種類: 3 文字 (以下の表を参照)
|
||||
@@ -1575,13 +1575,13 @@ hdata buffer:gui_buffers(*)/lines/first_line(*)/data
|
||||
└───────────────────────────┘ └───┘ └──┘
|
||||
h-path (hdata names) keys count
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────┘ └─────┘
|
||||
p-path (pointers) objects
|
||||
└─────────────────────────────────────────┘
|
||||
line 1
|
||||
──╥───────────┬───────────┬───────────┬───────────┬───────╥──
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ 0x23d8a10 │ ..... ║ ...
|
||||
──╨───────────┴───────────┴───────────┴───────────┴───────╨──
|
||||
└─────────────────────────────────────────────┘ └─────┘
|
||||
p-path (pointers) objects
|
||||
└─────────────────────────────────────────────────────┘
|
||||
line 1
|
||||
|
||||
──╥───────────┬───────────┬───────────┬───────╥──────────────┐
|
||||
... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d6110 │ ..... ║ ............ │
|
||||
|
||||
@@ -525,6 +525,7 @@ link:weechat_plugin_api.ja.html[WeeChat プラグイン API リファレンス]
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+108
-49
@@ -42,7 +42,7 @@ WeeChat (Wee Enhanced Environment for Chat)
|
||||
http://tools.ietf.org/html/rfc2811[2811]、
|
||||
http://tools.ietf.org/html/rfc2812[2812]、
|
||||
http://tools.ietf.org/html/rfc2813[2813]。
|
||||
* リモートインターフェイス用の IRC プロキシとリレー
|
||||
* リモートインターフェース用の IRC プロキシとリレー
|
||||
* マルチプラットフォーム (GNU/Linux、*BSD、MacOS X、Windows 等)
|
||||
* 完全な GPL、フリーソフトウェア
|
||||
|
||||
@@ -105,7 +105,7 @@ OS X では http://brew.sh/[Homebrew] を使ってください:
|
||||
| C++ コンパイラ | | | ビルドとテストの実行、JavaScript プラグイン
|
||||
| cmake | | *必須* | ビルド (autotools でも可能ですが、cmake を推奨します)
|
||||
| pkg-config | | *必須* | インストール済みライブラリを検出
|
||||
| libncursesw5-dev ^(2)^ | | *必須* | ncurses インターフェイス
|
||||
| libncursesw5-dev ^(2)^ | | *必須* | ncurses インターフェース
|
||||
| libcurl4-gnutls-dev | | *必須* | URL 転送
|
||||
| zlib1g-dev | | *必須* | relay プラグインでパケットを圧縮 (weechat プロトコル)、スクリプトプラグイン
|
||||
| libgcrypt20-dev | | *必須* | 保護データ、IRC SASL 認証 (DH-BLOWFISH/DH-AES)、スクリプトプラグイン
|
||||
@@ -247,7 +247,7 @@ cmake に対するオプションを指定するには、以下の書式を使
|
||||
<<scripts_plugins,Lua プラグイン>>のコンパイル。
|
||||
|
||||
| ENABLE_NCURSES | `ON`, `OFF` | ON |
|
||||
Ncurses インターフェイスのコンパイル。
|
||||
Ncurses インターフェースのコンパイル。
|
||||
|
||||
| ENABLE_NLS | `ON`, `OFF` | ON |
|
||||
NLS の有効化 (多言語サポート)。
|
||||
@@ -297,7 +297,7 @@ cmake に対するオプションを指定するには、以下の書式を使
|
||||
$ cmake -LA
|
||||
----
|
||||
|
||||
Curses インターフェイスを使う場合は以下のコマンドを使ってください:
|
||||
Curses インターフェースを使う場合は以下のコマンドを使ってください:
|
||||
|
||||
----
|
||||
$ ccmake ..
|
||||
@@ -426,9 +426,9 @@ ulimit -c 200000
|
||||
[[gdb_backtrace]]
|
||||
==== gdb でバックトレースを得る
|
||||
|
||||
WeeChat がクラッシュすると、_core_ または _core.12345_ ファイルが作られます
|
||||
(_12345_ はプロセス番号です)。
|
||||
このファイルは WeeChat を起動したディレクトリに作られます (これは
|
||||
<<core_files,オプションが有効の場合>>、WeeChat がクラッシュするとシステムは
|
||||
_core_ または _core.12345_ ファイルを作ります (_12345_
|
||||
はプロセス番号です)。このファイルは WeeChat を起動したディレクトリに作られます (これは
|
||||
WeeChat がインストールされているディレクトリでは *ありません*!)。
|
||||
|
||||
例えば、_weechat_ が _/usr/bin/_ にインストールされ、_core_ ファイルが
|
||||
@@ -3136,8 +3136,8 @@ Relay プラグインはネットワークを介して異なるプロトコル
|
||||
|
||||
* _irc_: IRC プロキシ: IRC サーバに対する接続を、単一または複数の IRC
|
||||
クライアントで共有するために用います。
|
||||
* _weechat_: リモートインターフェイスを通じて WeeChat
|
||||
を表示および操作する際に利用されるプロトコル。リモートインターフェイスの一例:
|
||||
* _weechat_: リモートインターフェースを通じて WeeChat
|
||||
を表示および操作する際に利用されるプロトコル。リモートインターフェースの一例:
|
||||
** Glowing Bear (HTML5): https://www.glowing-bear.org/
|
||||
** QWeeChat (Qt): https://weechat.org/download
|
||||
** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android
|
||||
@@ -3212,9 +3212,9 @@ IRC プロキシを設定した場合には "freenode:mypass") で 8000 番ポ
|
||||
[[relay_weechat_protocol]]
|
||||
==== WeeChat プロトコル
|
||||
|
||||
Relay プラグインは WeeChat プロトコルを使ってリモートインターフェイスに対してデータを送信できます。
|
||||
Relay プラグインは WeeChat プロトコルを使ってリモートインターフェースに対してデータを送信できます。
|
||||
|
||||
リモートインターフェイスを使って接続できます、<<relay_plugin>> のリストを参照してください。
|
||||
リモートインターフェースを使って接続できます、<<relay_plugin>> のリストを参照してください。
|
||||
|
||||
[IMPORTANT]
|
||||
このプロトコルを使った場合 WeeChat から他の WeeChat に接続することはできません。
|
||||
@@ -3225,7 +3225,7 @@ Relay プラグインは WeeChat プロトコルを使ってリモートイン
|
||||
/relay add weechat 9000
|
||||
----
|
||||
|
||||
この後、リモートインターフェイスを使って 9000
|
||||
この後、リモートインターフェースを使って 9000
|
||||
番ポートに対して、パスワード "mypass" で接続することができます。
|
||||
|
||||
[[relay_websocket]]
|
||||
@@ -3482,42 +3482,42 @@ include::autogen/user/php_options.adoc[]
|
||||
がどのように動いているかを知らなければいけません。これを知るには
|
||||
link:weechat_plugin_api.ja.html#hooks[WeeChat プラグイン API リファレンス / フック]を読むことをお勧めします。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[trigger_default]]
|
||||
==== Default triggers
|
||||
==== デフォルトトリガ
|
||||
|
||||
WeeChat creates 5 triggers by default, which can be disabled, updated or
|
||||
deleted:
|
||||
WeeChat はデフォルトで 5
|
||||
つのトリガを作成しますが、これらを無効化、更新、削除することも可能です:
|
||||
|
||||
* a _beep_ trigger for notifications
|
||||
* four other triggers to hide passwords on screen
|
||||
* 通知用の _beep_ トリガ
|
||||
* それ以外の 4 つは画面上でパスワードを隠すためのトリガ
|
||||
|
||||
List of default triggers:
|
||||
デフォルトトリガのリスト:
|
||||
|
||||
[width="100%",cols="5m,3,22",options="header"]
|
||||
|===
|
||||
| Name | Hook | Description
|
||||
| 名前 | フック | 説明
|
||||
|
||||
| beep | print |
|
||||
Beep on highlight/private message.
|
||||
ハイライト/プライベートメッセージを受信した際にビープを鳴らす。
|
||||
|
||||
| cmd_pass | modifier |
|
||||
Hide password in commands:
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
`pass:[/secure passphrase\|decrypt\|set]`.
|
||||
コマンド内のパスワードを隠す:
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`、
|
||||
`pass:[/oper]`、
|
||||
`pass:[/quote pass]`、
|
||||
`pass:[/set *password*]`、
|
||||
`pass:[/secure passphrase\|decrypt\|set]`。
|
||||
|
||||
| cmd_pass_register | modifier |
|
||||
Hide password in command `pass:[/msg nickserv register]`.
|
||||
コマンド内のパスワードを隠す `pass:[/msg nickserv register]`。
|
||||
|
||||
| msg_auth | modifier |
|
||||
Hide password in IRC auth message displayed (message received from server
|
||||
after the user issued the command).
|
||||
IRC auth メッセージ
|
||||
(ユーザがコマンドを実行した後にサーバから受信するメッセージ)
|
||||
の表示時にパスワードを隠す。
|
||||
|
||||
| server_pass | modifier |
|
||||
Hide server password in commands `/server` and `/connect`.
|
||||
`/server` と `/connect` コマンド内のパスワードを隠す。
|
||||
|===
|
||||
|
||||
[[trigger_anatomy]]
|
||||
@@ -3534,7 +3534,8 @@ List of default triggers:
|
||||
オプションが `off`
|
||||
の場合、トリガは無効化され、アクションは実行されません。
|
||||
|
||||
| hook | `signal`、`hsignal`、`modifier`、`print`、`command`、`command_run`、`timer`、`config`、`focus` |
|
||||
| hook | `signal`、`hsignal`、`modifier`、`line`, `print`、`command`、
|
||||
`command_run`、`timer`、`config`、`focus` |
|
||||
トリガの中で使われるフック。より詳しい情報は
|
||||
link:weechat_plugin_api.ja.html#hooks[WeeChat プラグイン API リファレンス / フック]を参照してください。
|
||||
|
||||
@@ -3569,7 +3570,7 @@ List of default triggers:
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3620,6 +3621,17 @@ trigger.trigger.beep.post_action = none
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.ja.html#_hook_modifier[hook_modifier]
|
||||
|
||||
| line |
|
||||
1. バッファ型 +
|
||||
2. バッファ名 +
|
||||
3. タグ |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. バッファ名 +
|
||||
2. タグ +
|
||||
@@ -3684,7 +3696,7 @@ trigger.trigger.beep.post_action = none
|
||||
トリガは以下の条件を使い、ハイライトまたはプライベートメッセージの場合だけビープを鳴らすようにしています:
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3693,24 +3705,33 @@ ${tg_highlight} || ${tg_msg_pv}
|
||||
正規表現はコールバックハッシュテーブル内の変数を変更するために使われます。
|
||||
|
||||
書式: "/regex/replace" または "/regex/replace/var" (ここで
|
||||
_var_ はハッシュテーブルの変数)。 +
|
||||
_var_ はハッシュテーブルの変数)。
|
||||
|
||||
ハッシュテーブル内に _var_ が存在しない場合、空の値を持つ _var_
|
||||
が自動的に作られます。これを使うことで一時的な任意の変数を作れます。
|
||||
|
||||
_var_
|
||||
が指定されなかった場合、デフォルト変数を使います、これはフックの種類に依存します:
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| フック | デフォルト変数
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| フック | デフォルト変数 | 更新が許可Update allowed ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer、buffer_name、y、date、date_printed、str_time、tags、notify_level、highlight、prefix、message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ トリガはすべての値を更新できますが、ここで挙げた変数だけがトリガによって返されて
|
||||
WeeChat によって使われる値に影響を及ぼします
|
||||
|
||||
複数の正規表現を使う場合は空白で区切ってください、例:
|
||||
"/regex1/replace1/var1 /regex2/replace2/var2"。
|
||||
|
||||
@@ -3863,6 +3884,45 @@ _weechat_print_ 修飾子では、メッセージタグを使う変数 (下の
|
||||
修飾子が IRC メッセージを含む場合、メッセージは解析され追加のデータがハッシュテーブルに追加されます
|
||||
(<<trigger_data_signal,Signal>> を参照)。
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
"line" コールバックは以下の変数をハッシュテーブルに格納します:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| 変数 | 型 | 説明
|
||||
| buffer | pointer | バッファ
|
||||
| buffer_name | string | バッファ名
|
||||
| buffer_type | string | バッファ型 ("formatted" または "free")
|
||||
| y | string | 自由内容バッファの行番号 (≥ 0)、-1 はフォーマット済みバッファ用
|
||||
| date | string | 行の日付 (タイムスタンプ)
|
||||
| date_printed | string | 行が表示される日付 (タイムスタンプ).
|
||||
| str_time | string | 表示に使う日付、色コードを含めることも可能
|
||||
| tags | string | メッセージのタグ (文字列の最初と最後にコンマが追加されます)
|
||||
| displayed | string | "1" の場合は表示、"0" の場合は非表示
|
||||
| notify_level | string | "0" = 低レベル、"1" = メッセージ、"2" = プライベートメッセージ、"3" = ハイライト
|
||||
| highlight | string | "1" の場合はハイライトあり、"0" の場合はハイライトなし
|
||||
| prefix | string | プレフィックス
|
||||
| tg_prefix_nocolor | string | 色コードを含まないプレフィックス
|
||||
| message | string | メッセージ
|
||||
| tg_message_nocolor | string | 色コードを含まないメッセージ
|
||||
|===
|
||||
|
||||
メッセージにつけられたタグに関する変数:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| 変数 | 型 | 説明
|
||||
| tg_tags_count | string | メッセージのタグの個数
|
||||
| tg_tag_nick | string | ニックネーム ("nick_xxx" タグから)
|
||||
| tg_tag_prefix_nick | string | プレフィックスで使うニックネームの色 ("prefix_nick_ccc" タグから)
|
||||
| tg_tag_host | string | ユーザ名とホスト名、書式: username@host ("host_xxx" タグから)
|
||||
| tg_tag_notify | string | 通知レベル (_none_、_message_、_private_、_highlight_)
|
||||
| tg_notify | string | 通知レベルが _none_ 以外の場合、その通知レベル
|
||||
| tg_msg_pv | string | プライベートメッセージの場合 "1"、それ以外は "0"
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -3881,8 +3941,7 @@ _weechat_print_ 修飾子では、メッセージタグを使う変数 (下の
|
||||
| tg_message_nocolor | string | 色コードを削除したメッセージ
|
||||
|===
|
||||
|
||||
メッセージのタグをもとにして変数が格納されます
|
||||
(変数は _weechat_print_ 修飾子でも格納されます):
|
||||
メッセージにつけられたタグに関する変数:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4096,4 +4155,4 @@ IRC を使ったサポート窓口は _chat.freenode.net_ サーバにありま
|
||||
** _#weechat-de_ (ドイツ語)
|
||||
** _#weechat-fi_ (フィンランド語)
|
||||
|
||||
他の方法でサポートを受けるには、以下のページを参照してください: https://weechat.org/dev/support
|
||||
他の方法でサポートを受けるには、以下のページを参照してください: https://weechat.org/about/support
|
||||
|
||||
@@ -891,6 +891,7 @@ _str_time_ (string) +
|
||||
_tags_count_ (integer) +
|
||||
_tags_array_ (shared_string, array_size: "tags_count") +
|
||||
_displayed_ (char) +
|
||||
_notify_level_ (char) +
|
||||
_highlight_ (char) +
|
||||
_refresh_needed_ (char) +
|
||||
_prefix_ (shared_string) +
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
** domyślna wartość: `+red+`
|
||||
|
||||
* [[option_irc.color.mirc_remap]] *irc.color.mirc_remap*
|
||||
** opis: pass:none[zamień kolory mirca w wiadomościach używając tablicy hashy: klucze to "fg,bg" przyjmują one wartości pomiędzy -1 (nie określono) a 15, wartości to nazwy lub numery kolorów WeeChat (format: "1,-1:kolor1;2,7:kolor2"), przykład: "1,-1:darkgray;1,2:white,blue" w celu przemapowania czarnego na "darkgray" oraz czarnego na niebieskim tle na "white,blue"; domyślne kolory WeeChat dla kodów IRC: 0-=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=gray, 15=white]
|
||||
** opis: pass:none[zamień kolory mirca w wiadomościach używając tablicy hashy: klucze to "fg,bg" przyjmują one wartości pomiędzy -1 (nie określono) a 15, wartości to nazwy lub numery kolorów WeeChat (format: "1,-1:kolor1;2,7:kolor2"), przykład: "1,-1:darkgray;1,2:white,blue" w celu przemapowania czarnego na "darkgray" oraz czarnego na niebieskim tle na "white,blue"; domyślne kolory WeeChat dla kodów IRC: 0=white, 1=black, 2=blue, 3=green, 4=lightred, 5=red, 6=magenta, 7=brown, 8=yellow, 9=lightgreen, 10=cyan, 11=lightcyan, 12=lightblue, 13=lightmagenta, 14=darkgray, 15=gray]
|
||||
** typ: ciąg
|
||||
** wartości: dowolny ciąg
|
||||
** domyślna wartość: `+"1,-1:darkgray"+`
|
||||
|
||||
@@ -20,7 +20,7 @@ disable: wyłącza logowanie dla obecnego bufora (ustawia poziom na 0)
|
||||
Opcje "logger.level.*" oraz "logger.mask.*" mogą być użyte do ustawienia poziomu lub maski dla bufora lub buforów zaczynających się od nazwy.
|
||||
|
||||
Poziomy logowania używane przez wtyczkę IRC:
|
||||
1: wiadomości użytkowników, powiadomienia, wiadomości prywatne
|
||||
1: wiadomości użytkowników (z kanałów i prywatne), powiadomienia (od serwerów i kanałów)
|
||||
2: zmiany nicków
|
||||
3: wiadomości serwera
|
||||
4: wejścia/opuszczenia/wyjścia
|
||||
|
||||
@@ -34,7 +34,7 @@ protokół.nazwa: protokół i nazwa do przekazywania:
|
||||
- protokół "weechat" (nazwa nie jest używana)
|
||||
|
||||
Protokół "irc" pozwala dowolnemu klientowi IRC (włączajac w to WeeChat) połączyć się na ustawionym porcie.
|
||||
Protokół "weechat" pozwala na połączenie się zdalnym interfejsem, lista dostępna pod adresem: https://weechat.org/download/
|
||||
Protokół "weechat" pozwala na połączenie się zdalnym interfejsem, lista dostępna pod adresem: https://weechat.org/about/interfaces
|
||||
|
||||
Bez argumentu komenda otwiera bufor z listą klientów.
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ listdefault: lista domyślnych triggerów
|
||||
addoff: dodaje trigger (wyłączony)
|
||||
addreplace: dodaje lub zastępuje istniejący trigger
|
||||
nazwa: nazwa triggera
|
||||
hook: signal, hsignal, modifier, print, command, command_run, timer, config, focus
|
||||
hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus
|
||||
argumenty: argumenty dla uchwytu, w zależności od jego typu (oddzielone średnikami):
|
||||
signal: nazwa(-y) signal (wymagane)
|
||||
hsignal: nazwa(-y) hsignal (wymagane)
|
||||
modifier: nazwa(-y) modifier (wymagane)
|
||||
line: typ bufora("formatted", "free" lub "*"), lista mask buforów, tagów
|
||||
print: bufor, tagi, wiadomość, pomiń kolory
|
||||
command: komenda (wymagane), opis, argumenty, opis argumentów, dopełnienie
|
||||
command_run: komenda(-y) (wymagane)
|
||||
@@ -42,7 +43,7 @@ listdefault: lista domyślnych triggerów
|
||||
regex: jedno lub więcej wyrażeń regularnych do zastępowania ciągów w zmiennych
|
||||
komenda: komenda do wykonania (wiele komend można oddzielić ";")
|
||||
zwracany_kod: kod zwracany w callbacku (ok (domyślne), ok_eat, error)
|
||||
post_action: akcja do wykonania po zakończeniu (none (domylślne), disable, delete)
|
||||
post_action: akcja do wykonania po zakończeniu (none (domyślne), disable, delete)
|
||||
addinput: ustawia wejście z domyślnymi argumentami do stworzenia triggera
|
||||
input: ustawia wejście z komendą użytą do stworzenia triggera
|
||||
output: wysyła komendę do stworzenia triggera do buforu
|
||||
|
||||
@@ -79,7 +79,7 @@ Przykłady:
|
||||
hide [<numer>|<nazwa>|-all [<numer>|<nazwa>...]]
|
||||
unhide [<numer>|<nazwa>|-all [<numer>|<nazwa>...]]
|
||||
renumber [<numer1> [<numer2> [<start>]]]
|
||||
close [<n1>[-<n2>]|<nazwa>]
|
||||
close [<n1>[-<n2>]|<nazwa>...]
|
||||
notify <poziom>
|
||||
localvar
|
||||
set <opcja> [<value>]
|
||||
@@ -267,8 +267,8 @@ infolists: wyświetla informacje o infolistach
|
||||
wyrażenie: wyrażenie do przetworzenia, zmienne o formacie ${zmienna} są zastępowane (zobacz niżej); wiele komend można oddzielić średnikami
|
||||
operator: operator logiczny lub porównania:
|
||||
- operatory logiczne:
|
||||
&& boolowskie "i"
|
||||
|| boolowskie "lub"
|
||||
&& logiczne "i"
|
||||
|| logiczne "lub"
|
||||
- operatory porównania:
|
||||
== równy
|
||||
!= różny
|
||||
@@ -297,14 +297,15 @@ Niektóre zmienne w wyrażeniach są zamieniane, poprzez zastosowanie formatu ${
|
||||
4. ciąg o maksymalnej długości (format: "cut:max,suffix,string" lub "cut:+max,suffix,string")
|
||||
lub maksymalna ilość znaków wyświetlanych na ekranie (format: "cutscr:max,suffix,string" lub "cutscr:+max,suffix,string")
|
||||
5. odwrócony ciąg (format: "rev:xxx")
|
||||
6. kolor (format "color:xxx", zobacz „Opis API wtyczek”, funkcja "color")
|
||||
7. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne)
|
||||
8. obecna data/czas (format: "date" lub "date:format")
|
||||
9. zmienna środowiskowa (format: "env:XXX")
|
||||
10. wyrażenie warunkowe (format: "if:condition?value_if_true:value_if_false")
|
||||
11. opcja (format: plik.sekcja.opcja)
|
||||
12. zmienna lokalna w buforze
|
||||
13. nazwa hdatay/zmiennej (wartość jest automatycznie konwertowana na ciąg znaków), domyślnie "window" i "buffer" wskazują na aktualne okno/bufor.
|
||||
6. powtórzony ciąg (format: "repeat:ilość,ciąg")
|
||||
7. kolor (format "color:xxx", zobacz „Opis API wtyczek”, funkcja "color")
|
||||
8. informacja (format: "info:nazwa,argumenty", argumenty są opcjonalne)
|
||||
9. obecna data/czas (format: "date" lub "date:format")
|
||||
10. zmienna środowiskowa (format: "env:XXX")
|
||||
11. wyrażenie warunkowe (format: "if:condition?value_if_true:value_if_false")
|
||||
12. opcja (format: plik.sekcja.opcja)
|
||||
13. zmienna lokalna w buforze
|
||||
14. nazwa hdatay/zmiennej (wartość jest automatycznie konwertowana na ciąg znaków), domyślnie "window" i "buffer" wskazują na aktualne okno/bufor.
|
||||
Format dla hdata może być jednym z poniższych:
|
||||
hdata.zmienna1.zmienna2...: inicjuje hdata (wskaźnik musi być znany), następnie wypytuje zmienne jedna po drugiej (inne hdata mogą być następne)
|
||||
hdata[list].zmienna1.zmienna2...: inicjuje hdata z wykorzystaniem listy, na przykład:
|
||||
@@ -329,6 +330,8 @@ Przykłady (proste ciągi):
|
||||
/eval -n ${cut:+3,+,test} ==> te+
|
||||
/eval -n ${date:%H:%M:%S} ==> 07:46:40
|
||||
/eval -n ${if:${info:term_width}>80?big:small} ==> big
|
||||
/eval -n ${rev:Hello} ==> olleH
|
||||
/eval -n ${repeat:5,-} ==> -----
|
||||
|
||||
Przykłady (warunki):
|
||||
/eval -n -c ${window.buffer.number} > 2 ==> 0
|
||||
|
||||
@@ -23,8 +23,13 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Wyłącza automatyczne ładowanie wtyczek.
|
||||
|
||||
*-P*, *--plugins* _<wtyczki>_::
|
||||
Załaduje przy starcie tylko podane wtyczki (zobacz /help weechat.plugin.autoload).
|
||||
Jeśli ta opcja zotanie użyta, opcja weechat.plugin.autoload zostanie zignorowana.
|
||||
|
||||
*-r*, *--run-command* _<komenda>_::
|
||||
Wykonuje komendę(-y) po uruchomieniu (komendy należy oddzielać średnikiem).
|
||||
Uruchamia komende(-y) po uruchomieniu; kilka komend należy oddzielić średnikiem,
|
||||
ta opcja może zotać podana kilka razy.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Wyłącza automatyczne ładowanie skryptów.
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
== NAZWA
|
||||
|
||||
weechat-headless - rozszerzalny klient rozmów (headless version)
|
||||
weechat-headless - rozszerzalny klient rozmów (wersja headless)
|
||||
|
||||
== SKŁADNIA
|
||||
|
||||
[verse]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...]
|
||||
*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir <path>] [-p|--no-plugin] [-P|--plugins <wtyczki>] [-r|--run-command <komenda>] [-s|--no-script] [--upgrade] [wtyczka:opcja...]
|
||||
*weechat-headless* [-c|--colors]
|
||||
*weechat-headless* [-h|--help]
|
||||
*weechat-headless* [-l|--license]
|
||||
@@ -57,4 +57,4 @@ include::man_copyright.pl.adoc[]
|
||||
|
||||
== WSPARCIE / ZGŁASZANIE BŁĘDÓW
|
||||
|
||||
W celu uzyskania pomocy, lub zgłoszenia błędu zajrzyj na: https://weechat.org/dev/support
|
||||
W celu uzyskania pomocy, lub zgłoszenia błędu zajrzyj na: https://weechat.org/about/support
|
||||
|
||||
@@ -13,7 +13,7 @@ weechat - rozszerzalny klient rozmów
|
||||
== SKŁADNIA
|
||||
|
||||
[verse]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <ścieżka>] [-p|--no-plugin] [-r|--run-command <komenda>] [-s|--no-script] [--upgrade] [wtyczka:opcja...]
|
||||
*weechat* [-a|--no-connect] [-d|--dir <ścieżka>] [-p|--no-plugin] [-P|--plugins <wtyczki>] [-r|--run-command <komenda>] [-s|--no-script] [--upgrade] [wtyczka:opcja...]
|
||||
*weechat* [-c|--colors]
|
||||
*weechat* [-h|--help]
|
||||
*weechat* [-l|--license]
|
||||
@@ -53,4 +53,4 @@ include::man_copyright.pl.adoc[]
|
||||
|
||||
== WSPARCIE / ZGŁASZANIE BŁĘDÓW
|
||||
|
||||
W celu uzyskania pomocy, lub zgłoszenia błędu zajrzyj na: https://weechat.org/dev/support
|
||||
W celu uzyskania pomocy, lub zgłoszenia błędu zajrzyj na: https://weechat.org/about/support
|
||||
|
||||
@@ -45,8 +45,8 @@ Więcej informacji na stronie: https://weechat.org/about/features
|
||||
[[gui]]
|
||||
=== Słyszałem o wielu GUI dla WeeChat. Jak mogę je skompilować/użyć?
|
||||
|
||||
Dostępne są zdalne interfejsy, linki można znaleźć na stronie z cechami:
|
||||
https://weechat.org/about/features
|
||||
Dostępne są zdalne interfejsy, możesz o nich poczytać na tej stronie:
|
||||
https://weechat.org/about/interfaces
|
||||
|
||||
[[compile_git]]
|
||||
=== Nie mogę skompilować WeeChat po sklonowaniu repozytorium git, dlaczego?
|
||||
@@ -886,6 +886,15 @@ $ cd ~/.weechat/script
|
||||
$ curl -O https://weechat.org/files/plugins.xml.gz
|
||||
----
|
||||
|
||||
[[aspell_dictionaries]]
|
||||
=== Zainstalowałem słowniki aspell w systemie, jak mogę ich użyć bez restartowania WeeChat?
|
||||
|
||||
Musisz przeładować wtyczkę aspell:
|
||||
|
||||
----
|
||||
/plugin reload aspell
|
||||
----
|
||||
|
||||
[[settings]]
|
||||
== Ustawienia
|
||||
|
||||
@@ -998,7 +1007,7 @@ gdzie znajdziesz więcej informacji o plikach konfiguracyjnych.
|
||||
[[bug_task_patch]]
|
||||
=== Jak zgłaszać błędy, prosić o nowe możliwości lub wysyłać patche?
|
||||
|
||||
Zobacz: https://weechat.org/dev/support
|
||||
Zobacz: https://weechat.org/about/support
|
||||
|
||||
[[gdb_error_threads]]
|
||||
=== Kiedy uruchamiam WeeChat pod gdb dostaję komunikat o wątkach, co mogę z tym zrobić?
|
||||
@@ -1034,10 +1043,10 @@ możliwe. Mile widziana jest pomoc w testowaniu dla systemów, których nie mamy
|
||||
Jest wiele zadań do zrobienia (testowanie, kod, dokumentacja, ...)
|
||||
|
||||
Skontaktuj się z nami na IRC lub mailowo, szczegóły:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
[[donate]]
|
||||
=== Czy mogę dać pieniądze albo inne rzeczy deweloperom WeeChat?
|
||||
|
||||
Tak możesz dać nam pieniądze, aby wspomóc rozwój.
|
||||
Szczegóły na https://weechat.org/about/donate
|
||||
Szczegóły na https://weechat.org/donate
|
||||
|
||||
@@ -523,6 +523,7 @@ Lista funkcji w API skryptów:
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
|
||||
+80
-22
@@ -430,8 +430,8 @@ ulimit -c 200000
|
||||
[[gdb_backtrace]]
|
||||
==== Pozyskiwanie logów za pomocą gdb
|
||||
|
||||
Kiedy WeeChat ulegnie awarii, system stworzy plik _core_ lub _core.12345_
|
||||
(_12345_ to id procesu).
|
||||
Kiedy WeeChat ulegnie awarii, Twój system stworzy plik _core_ lub _core.12345_
|
||||
(_12345_ to id procesu) jeśli <<core_files,zostało to włączone>>.
|
||||
Plik ten zostanie utworzony w katalogu, z którego uruchomiono WeeChat (*nie*
|
||||
jest to katalog, gdzie zainstalowano WeeChat!).
|
||||
|
||||
@@ -3536,7 +3536,7 @@ Lista domyśłnych triggerów:
|
||||
|
||||
| cmd_pass | modifier |
|
||||
Ukrywa hasło w komendach:
|
||||
`pass:[/msg nickserv id\|identify\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/msg nickserv id\|identify\|set password\|ghost\|release\|regain\|recover]`,
|
||||
`pass:[/oper]`,
|
||||
`pass:[/quote pass]`,
|
||||
`pass:[/set *password*]`,
|
||||
@@ -3566,8 +3566,8 @@ Trigger posiada następujące opcje (nazwy to `trigger.trigger.<nazwa>.<opcja>`)
|
||||
Kiedy wartość ustawiona jest na `off`, trigger jest wyłączony i akcje nie będą
|
||||
więcej wykonywane.
|
||||
|
||||
| hook | `signal`, `hsignal`, `modifier`, `print`, `command`, `command_run`,
|
||||
`timer`, `config`, `focus` |
|
||||
| hook | `signal`, `hsignal`, `modifier`, `line`, `print`, `command`,
|
||||
`command_run`, `timer`, `config`, `focus` |
|
||||
Zdarzenia używane przez trigger. Więcej informacji można znaleźć w
|
||||
link:weechat_plugin_api.en.html#hooks[WeeChat Plugin API Reference / Hooks] (Angielski).
|
||||
|
||||
@@ -3602,7 +3602,7 @@ Na przykład, domyślny trigger _beep_ ma następujące opcje:
|
||||
trigger.trigger.beep.enabled = on
|
||||
trigger.trigger.beep.hook = print
|
||||
trigger.trigger.beep.arguments = ""
|
||||
trigger.trigger.beep.conditions = "${tg_highlight} || ${tg_msg_pv}"
|
||||
trigger.trigger.beep.conditions = "${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})"
|
||||
trigger.trigger.beep.regex = ""
|
||||
trigger.trigger.beep.command = "/print -beep"
|
||||
trigger.trigger.beep.return_code = ok
|
||||
@@ -3654,6 +3654,17 @@ Argumenty zależą od rodzaju uchwytu. Są oddzielane średnikami.
|
||||
`+5000\|input_text_display;5000\|history_add+` |
|
||||
link:weechat_plugin_api.en.html#_hook_modifier[hook_modifier] (Angielski)
|
||||
|
||||
| line |
|
||||
1. typ bufora +
|
||||
2. nazwa bufora +
|
||||
3. tagi |
|
||||
`+formatted+` +
|
||||
`+free+` +
|
||||
`+*;irc.freenode.*+` +
|
||||
`+*;irc.freenode.#weechat+` +
|
||||
`+formatted;irc.freenode.#weechat;irc_notice+` |
|
||||
link:weechat_plugin_api.en.html#_hook_line[hook_line]
|
||||
|
||||
| print |
|
||||
1. nazwa buforu +
|
||||
2. tagi +
|
||||
@@ -3719,7 +3730,7 @@ Przykład: domyślny trigger _beep_ używa tego warunku do wywołania dźwięku
|
||||
w przypadku podświetlenia lub otrzymania prywatnej wiadomości:
|
||||
|
||||
----
|
||||
${tg_highlight} || ${tg_msg_pv}
|
||||
${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
|
||||
----
|
||||
|
||||
[[trigger_regex]]
|
||||
@@ -3728,24 +3739,33 @@ ${tg_highlight} || ${tg_msg_pv}
|
||||
Wyrażenia regularne są używane do zmiany zmiennych w tablicy hashy callbacka.
|
||||
|
||||
Format: "/wyrażenie/zamień" lub "/wyrażenie/zamień/zmienna" (gdzie _zmienna_ to
|
||||
zmienna tablicy hashy). +
|
||||
zmienna tablicy hashy).
|
||||
|
||||
Jeśli _zmienna_ nie istnieje w tablicy haszy zostanie automarycznie utworzona bez
|
||||
wartości. Pozwala to tworzyć dowolne zmienne tymczasowe.
|
||||
|
||||
Jeśli _zmienna_ nie zostanie podana, użyta zostanie domyślna zmienna, zależy ona
|
||||
od typu uchwytu:
|
||||
|
||||
[width="50%",cols="4,5m",options="header"]
|
||||
[width="100%",cols="2,3,7",options="header"]
|
||||
|===
|
||||
| Uchwyt | Domyślna zmienna
|
||||
| signal | tg_signal_data
|
||||
| hsignal |
|
||||
| modifier | tg_string
|
||||
| print | tg_message
|
||||
| command | tg_argv_eol1
|
||||
| command_run | tg_command
|
||||
| timer | tg_remaining_calls
|
||||
| config | tg_value
|
||||
| focus |
|
||||
| Uchwyt | Domyślna zmienna | Dozwolona aktualizacja ^(1)^
|
||||
| signal | tg_signal_data |
|
||||
| hsignal | |
|
||||
| modifier | tg_string | tg_string
|
||||
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
|
||||
| print | tg_message |
|
||||
| command | tg_argv_eol1 |
|
||||
| command_run | tg_command |
|
||||
| timer | tg_remaining_calls |
|
||||
| config | tg_value |
|
||||
| focus | |
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Wszystkie zmienne mogą zostać zaktualizowane, jednak tylko te zmienne
|
||||
mają wpływ na zmienne zwrócone i użyte przez WeeChat.
|
||||
|
||||
Wiele wyrażeń może być oddzielonych spacją, na przykład:
|
||||
"/regex1/zamień1/zmienna1 /regex2/zamień2/zmienna2".
|
||||
|
||||
@@ -3898,6 +3918,45 @@ zobacz <<trigger_data_print,hook print>> poniżej), oraz następujące zmienne:
|
||||
Jeśli modyfikator zawiera wiadomość IRC, wiadomość jest parsowana i dodawane są
|
||||
dodatkowe dane do tablicy hashy (zobacz <<trigger_data_signal,hook signal>>).
|
||||
|
||||
[[trigger_data_line]]
|
||||
===== Line
|
||||
|
||||
Callback "line" ustawia następujące zmienne w tablicy hashy:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Zmienna | Typ | Opis
|
||||
| buffer | wskaźnik | Bufor.
|
||||
| buffer_name | ciąg | Nazwa bufora.
|
||||
| buffer_type | ciąg | Typ bufora ("formatted" lub "free").
|
||||
| y | ciąg | Numer linii bufora z wolną zawartością (≥ 0), -1 dla bufora ze sformatowaną zawartością.
|
||||
| date | ciąg | Linia z datą (timestamp).
|
||||
| date_printed | ciąg | Data, kiedy linia została wyświetlona (timestamp).
|
||||
| str_time | ciąg | Date do wyświetlenia. Może zawierać kody kolorów.
|
||||
| tags | ciąg | Tagi wiadomości (z przecinkiem dodanym na początku/końcu ciągu).
|
||||
| displayed | ciąg | "1" jeśli wyświetlono, "0" jeśli nie wyświetlono.
|
||||
| notify_level | ciąg | "0" = poziom niski, "1" = wiadomość, "2" = wiadomość prywatna, "3" = podświetlenie
|
||||
| highlight | ciąg | "1" jeśli podświetlenie, inaczej "0".
|
||||
| prefix | ciąg | Prefiks.
|
||||
| tg_prefix_nocolor | ciag | Prefiks bez kodów kolorów.
|
||||
| message | ciąg | Wiadomość.
|
||||
| tg_message_nocolor | ciag | Wiadomość bez kodów kolorów.
|
||||
|===
|
||||
|
||||
Zmienne ustawiane za pomocą tagów w wiadomościach:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
| Zmienna | Typ | Opis
|
||||
| tg_tags_count | ciąg | Liczba tagów w wiadomości.
|
||||
| tg_tag_nick | ciąg | Nick (z tagu "nick_xxx").
|
||||
| tg_tag_prefix_nick | ciąg | Kolor nicka w prefiksie (z tagu "prefix_nick_ccc").
|
||||
| tg_tag_host | ciąg | Nazwa użytkownika i host, format: username@host (z tagu "host_xxx").
|
||||
| tg_tag_notify | ciąg | Poziom powiadomień (_none_, _message_, _private_, _highlight_).
|
||||
| tg_notify | ciąg | Poziom powiadomień, jeśli różny od _none_.
|
||||
| tg_msg_pv | ciąg | "1" dla prywatnej wiadomości, inaczej "0".
|
||||
|===
|
||||
|
||||
[[trigger_data_print]]
|
||||
===== Print
|
||||
|
||||
@@ -3916,8 +3975,7 @@ Callback "print" ustawia następujące zmienne w tablicy hashy:
|
||||
| tg_message_nocolor | ciąg | Wiadomość bez kodów kolorów.
|
||||
|===
|
||||
|
||||
Zmienne ustawiane przez tagi w wiadomości (są ustawiane też przez modyfikator
|
||||
_weechat_print_):
|
||||
Zmienne ustawiane za pomocą tagów w wiadomościach:
|
||||
|
||||
[width="100%",cols="3m,2,14",options="header"]
|
||||
|===
|
||||
@@ -4133,4 +4191,4 @@ Wsparcie w sieci IRC na serwerze _chat.freenode.net_:
|
||||
** _#weechat-fi_ (Fiński)
|
||||
|
||||
Inne sposoby na uzyskanie pomocy można znaleźć pod adresem:
|
||||
https://weechat.org/dev/support
|
||||
https://weechat.org/about/support
|
||||
|
||||
@@ -26,9 +26,15 @@
|
||||
*-p*, *--no-plugin*::
|
||||
Отключить автозагрузку плагинов.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-P*, *--plugins* _<plugins>_::
|
||||
Load only these plugins at startup (see /help weechat.plugin.autoload).
|
||||
If this option is given, the option weechat.plugin.autoload is not used.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
*-r*, *--run-command* _<команда>_::
|
||||
Запустить команду (или команды) после загрузки WeeChat (несколько команд
|
||||
можно записать через точку с запятой).
|
||||
Run command(s) after startup; many commands can be separated by semicolons,
|
||||
this option can be given multiple times.
|
||||
|
||||
*-s*, *--no-script*::
|
||||
Отключить автозагрузку скриптов.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user