mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 22:24:47 +02:00
Compare commits
481 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 59e292a5be | |||
| 8617bd7d2a | |||
| e262cd47b4 | |||
| 5a7db09eb2 | |||
| 5fc7813643 | |||
| dc319af254 | |||
| e920903354 | |||
| 6457394042 | |||
| 7516774474 | |||
| a9d1b2990f | |||
| 13198697a9 | |||
| 2a0e578ae7 | |||
| 571da9f056 | |||
| 88b021f1b7 | |||
| 7eb04b77fe | |||
| b615e6cee7 | |||
| d1d7d4573c | |||
| 43d9c20e36 | |||
| 8ea0aa5f41 | |||
| f02ecf3e83 | |||
| 490a0b9db0 | |||
| 0ce38e7d58 | |||
| bc380447eb | |||
| 73c8b5f93c | |||
| a6519001c8 | |||
| 8b106be58e | |||
| 66e63bf8cf | |||
| 94ff5e5758 | |||
| 73720cf792 | |||
| b407de4c3b | |||
| 8444670ef1 | |||
| 657805ca25 | |||
| 12378b3a19 | |||
| 7684d5a3d1 | |||
| 2488466b0c | |||
| 647ca0c047 | |||
| 1452497b32 | |||
| 2c7057bf22 | |||
| e97dc832e5 | |||
| 7b4d374efd | |||
| 5294249515 | |||
| 2b81cce9e0 | |||
| 8814d1d5c4 | |||
| 4a4fbce5dd | |||
| f4a789c327 | |||
| 037afc5e92 | |||
| 17435d5532 | |||
| 6704b1b21c | |||
| cb08919baf | |||
| c67eb4e656 | |||
| 9605501c66 | |||
| e9c14d6548 | |||
| 54f2c7f2e0 | |||
| 44ca4b41f3 | |||
| cc544e3e3a | |||
| a749e3423f | |||
| 8949a65f52 | |||
| 2423fdbf2d | |||
| 839ffc4b0c | |||
| 5c79933faa | |||
| 47f40f961a | |||
| 1100b0e694 | |||
| 761d2dec12 | |||
| 6db01bee34 | |||
| 4c565413bb | |||
| b916ed6cf7 | |||
| 484abc68fc | |||
| f116061868 | |||
| 878c0a5d66 | |||
| 8009b21803 | |||
| 05e12c0232 | |||
| 8de2a36ac2 | |||
| 539a51f9e1 | |||
| 3aec35aeec | |||
| 3bfb7d7f04 | |||
| dcb8fcb6ed | |||
| fb4d2d30f4 | |||
| e7b2d98b6e | |||
| e57777acb1 | |||
| fa07d98f06 | |||
| c1083d022d | |||
| 464b019929 | |||
| 1a0b9427e0 | |||
| 32b01a606c | |||
| a456c3db86 | |||
| 77145d32ad | |||
| cdeac1b693 | |||
| 827a056790 | |||
| 7634774327 | |||
| e69cffd9bc | |||
| 5991278637 | |||
| 1a8c40826e | |||
| d14bc12282 | |||
| 0c9bbb5d4f | |||
| df52b57c33 | |||
| 7addd1bf00 | |||
| 28f75d17dc | |||
| 1050ba851f | |||
| 103684b15e | |||
| 7546ee08ca | |||
| 1aeea38355 | |||
| 9ce666fc31 | |||
| b2c7682242 | |||
| 2aa1b950cd | |||
| 0df1cde496 | |||
| 9f536d3dc7 | |||
| 4d0458afdd | |||
| 92dfd2425f | |||
| be621205e9 | |||
| 4ad497ce01 | |||
| da8353c54f | |||
| 44c96f6abf | |||
| 177b0a4299 | |||
| 75270d7841 | |||
| 6526cc230a | |||
| 211cd11c2a | |||
| 9ceea3697b | |||
| 0cf504dce7 | |||
| 6839974a07 | |||
| 25e3a631b9 | |||
| 998bb89c98 | |||
| ccf23ae51e | |||
| 6321669cd5 | |||
| 586e66d6fa | |||
| a21fa3359d | |||
| 4ac120e435 | |||
| b21b64bc44 | |||
| 68ff525d2e | |||
| 7e79dd92ba | |||
| cefc6820c1 | |||
| 9f7b4c497e | |||
| d85205ca8a | |||
| 06d10ad193 | |||
| 8f86f319ca | |||
| fef2ecec9b | |||
| cf42c7da38 | |||
| 9e6b9ca54d | |||
| d22c3344d4 | |||
| 93064b8401 | |||
| 573f1046ac | |||
| 3aeea2d6aa | |||
| afe037c579 | |||
| c5268bc5f9 | |||
| c47e4fa883 | |||
| 6c1f21f10c | |||
| ee3fb67a0c | |||
| b8f6468590 | |||
| de24921609 | |||
| 1d9cdba58e | |||
| 9cd7fd38a9 | |||
| ded599b272 | |||
| 6c706caa50 | |||
| f87347d44f | |||
| 96ff7248ef | |||
| eac442a855 | |||
| f1fa143b21 | |||
| dcd872bc45 | |||
| 4a058ae0f5 | |||
| 2b919b0a01 | |||
| 9c3eda660d | |||
| 17090ade74 | |||
| ba97a39565 | |||
| 42cba25453 | |||
| 7438d2c737 | |||
| ed48819b77 | |||
| 2c300424b4 | |||
| 3e520cb1ff | |||
| 114084a4fc | |||
| 1a31512503 | |||
| a7b21fa647 | |||
| 890caf4e8e | |||
| ad33036fea | |||
| a59fa70a94 | |||
| ac7cc25763 | |||
| ee51e6c05f | |||
| 61ff0b8587 | |||
| 561dd92d8e | |||
| 619b40b42f | |||
| 409a06982e | |||
| 7af01a56ca | |||
| 3057d846d9 | |||
| 9a5a1fb300 | |||
| f11c7c1bf4 | |||
| 0b2d9bcb9b | |||
| 1ad0b4b669 | |||
| 529a22e342 | |||
| 828ca37225 | |||
| 6cf163f00c | |||
| 2b6fbe26ac | |||
| 3eed74a75c | |||
| e73bff95fa | |||
| b56b34711d | |||
| 590d9453a0 | |||
| ea85d180e5 | |||
| 0e3b6a9c77 | |||
| 1f104d06a0 | |||
| 3973258628 | |||
| f79153ace7 | |||
| 7ee57af8e3 | |||
| b138510cff | |||
| c472b9a733 | |||
| 0ac2e54b46 | |||
| 3e994e3c5a | |||
| 128d2a4e12 | |||
| 846c785531 | |||
| 2bbf289635 | |||
| f3a9bfe55e | |||
| 852b8a5cdb | |||
| 1ae33517e9 | |||
| 5ad977a6ed | |||
| f92606a317 | |||
| c3750a02e3 | |||
| c242c8e3f9 | |||
| 4baf0e8526 | |||
| 1e08b1119a | |||
| fb9d677020 | |||
| d0f0a7834d | |||
| eadb7e95ef | |||
| 634f467c8d | |||
| c1b49f71a5 | |||
| 42b073629d | |||
| 731871dd78 | |||
| b7d07840d1 | |||
| 9defa13bbe | |||
| 984fdb2b58 | |||
| a4236be509 | |||
| 92d27d8676 | |||
| e1b1946ee4 | |||
| 252787c457 | |||
| 18d32cb613 | |||
| b909522307 | |||
| 5eb47ccf53 | |||
| 8c3f16dbe3 | |||
| 3bfe4e52ca | |||
| c112d0aafa | |||
| b0b733a8f0 | |||
| ae892d2893 | |||
| 90998bd296 | |||
| 976e5e8ae4 | |||
| f40f3cfa40 | |||
| 5046a9b596 | |||
| dbf9068909 | |||
| e8081fe4f7 | |||
| ed2becf8fe | |||
| f7c27b0801 | |||
| fadf9c47c9 | |||
| a3c9a5b897 | |||
| 2fe215276e | |||
| 419515845d | |||
| 5eaac71d25 | |||
| fd5f42dc06 | |||
| ec8c4cc042 | |||
| 86dea12b71 | |||
| ec3b3d47be | |||
| 8cb302e600 | |||
| eacd0002dd | |||
| 91a9af72b1 | |||
| cb6c2fd637 | |||
| ef12c93f1b | |||
| 14beee8a91 | |||
| 7c2f44e74e | |||
| 89fe540b53 | |||
| 40a68549b5 | |||
| a499b50b7b | |||
| b6647004a5 | |||
| 2cf66de423 | |||
| 08bc6404eb | |||
| 4adb64284b | |||
| 3cce916035 | |||
| 64db1b958d | |||
| cb785d5035 | |||
| 9d7e887d8e | |||
| 643adecff5 | |||
| 4460f92727 | |||
| f507be4128 | |||
| a3f3c9d09c | |||
| 90b855e1aa | |||
| fd32192464 | |||
| c2343ecb74 | |||
| c4c220f0a3 | |||
| 3f993f9422 | |||
| 786f889251 | |||
| a89bc85dc0 | |||
| 40bfded594 | |||
| 2c3c9a3ee7 | |||
| 74729ce677 | |||
| d81170b010 | |||
| f3f9dc388f | |||
| 7e997f87e8 | |||
| 965beb37de | |||
| a7c92e2d24 | |||
| 1fb6fda89b | |||
| a23b5b5a37 | |||
| acef7dd317 | |||
| 3d8607673e | |||
| 5a3dff1b97 | |||
| 372ffc1690 | |||
| fd06c67b58 | |||
| 0778d37924 | |||
| 6e5eb5eb25 | |||
| 2f5936bc9f | |||
| 3db4dd2790 | |||
| 26630ada2d | |||
| 8482e14630 | |||
| a7f8c32797 | |||
| 9bc4352089 | |||
| 907643bc9c | |||
| 947155f325 | |||
| 59d8857646 | |||
| d6386cd364 | |||
| 7d5503e84b | |||
| 762d71012a | |||
| 7aa5d718a8 | |||
| 77bc38d21d | |||
| 34a72ac02e | |||
| 0b0ab94aa3 | |||
| c516ff64f2 | |||
| 1f47e7c4f8 | |||
| f7b8e81941 | |||
| e29f496a96 | |||
| 55203680ba | |||
| c05b228078 | |||
| d462667ee6 | |||
| 8eafc0624c | |||
| 29b502a06a | |||
| 25a317280f | |||
| f856173e1f | |||
| 6f660f2430 | |||
| 41fb29bbd0 | |||
| ea86f75319 | |||
| c98d12b4af | |||
| 305b046370 | |||
| 080eecef2c | |||
| fe01faa9ab | |||
| 811390ebb1 | |||
| dd128dace8 | |||
| 4d83adc7d8 | |||
| fd541395f4 | |||
| 97f87932fe | |||
| b0581ac1f8 | |||
| 3b9e2f480d | |||
| f76d236015 | |||
| 1797fe18a3 | |||
| 63733d81d8 | |||
| 23e0533ea1 | |||
| 24c4029c96 | |||
| bb346f8c6c | |||
| 48ca390f79 | |||
| aa989767a1 | |||
| 7ad3c1979c | |||
| 99f0a2e002 | |||
| 6325add517 | |||
| e791535773 | |||
| 0ac377d306 | |||
| 59c977ddc9 | |||
| 4f9bcc73ca | |||
| 8c5db76271 | |||
| 80709292d4 | |||
| f2f6afb59c | |||
| 3045322822 | |||
| 29d4bc3102 | |||
| f9e8c7faab | |||
| 5af0415508 | |||
| c71e6a50eb | |||
| 4ffd62b206 | |||
| afc4dff71b | |||
| 9e0dd18152 | |||
| c85b57b8b3 | |||
| 34e99987bf | |||
| 1ab62e37cb | |||
| 3f49b1b44a | |||
| 431cf23a0c | |||
| a6c509611a | |||
| ec56a1103f | |||
| ccc5c75a03 | |||
| 732887cef7 | |||
| cb6ecb6818 | |||
| 70828a7dd1 | |||
| ab2e29fb0f | |||
| 8c1df496ae | |||
| 68598de958 | |||
| a1bee89ecc | |||
| 7385f767e3 | |||
| 5c88ee9c45 | |||
| a8a0053211 | |||
| 12521898f9 | |||
| 6c72d6f66d | |||
| 81599b88d4 | |||
| 84437ab672 | |||
| 014dc845e8 | |||
| 361d55d9d7 | |||
| 8f0b3ab9c7 | |||
| 1451e12c78 | |||
| 6817542f95 | |||
| c3eff15a56 | |||
| 0bf560f9b7 | |||
| ff2189f3d9 | |||
| 439a2d9c7a | |||
| 6d549d0da9 | |||
| 22686da40c | |||
| f649ccc3b8 | |||
| c5800178a0 | |||
| c5887354bd | |||
| 3f08785aee | |||
| 191701a5f3 | |||
| d52fea1d5e | |||
| 24f0e95de7 | |||
| 40deb493d5 | |||
| ef2ef9846d | |||
| e02ee703f0 | |||
| 27331dec5e | |||
| db6b96f629 | |||
| ef5ebc19e9 | |||
| 76998665f4 | |||
| b5a32c0fa9 | |||
| 4c5f98946a | |||
| a44ffa147f | |||
| a167322d8b | |||
| f19808cedd | |||
| 0f30a4e020 | |||
| 9b9b36bb02 | |||
| c4ac9046b2 | |||
| 61a8e4e27e | |||
| 780be1e1b7 | |||
| 4858d88567 | |||
| 6659bf1642 | |||
| b3a214252b | |||
| 4c6db9711a | |||
| 213483e678 | |||
| 9b9e0f042c | |||
| 831dcac808 | |||
| 4e0f7dfd25 | |||
| a35ac5e8d9 | |||
| 90c87e7553 | |||
| 162bcb2622 | |||
| 8b6452eb91 | |||
| e4e6fde80f | |||
| e0ec8da76a | |||
| 635dd818b5 | |||
| 0cfc61a17e | |||
| f153b6e6c3 | |||
| 9ce435fa5e | |||
| 5a00f1a138 | |||
| 9eb3403008 | |||
| e191d9225b | |||
| e08f6aab55 | |||
| 19bf6c9672 | |||
| e9dbf23a18 | |||
| caa51160da | |||
| 5c6e6f43d1 | |||
| 0414c139b0 | |||
| b7ecf93a22 | |||
| 162dc87796 | |||
| 7f2f60dab0 | |||
| 820a3e8767 | |||
| 052db75805 | |||
| 5c869722c1 | |||
| bc464679a7 | |||
| 86685f4af4 | |||
| 6acf1af828 | |||
| 3f902dba28 | |||
| de72fe1db5 | |||
| 89aeb03a13 | |||
| 83567fd871 | |||
| 70907fc169 | |||
| f126255d6a | |||
| 6cfb31c306 | |||
| 8971fc069a | |||
| 179d53a12e | |||
| 2469dc6df9 | |||
| e3af6a91d4 | |||
| 73a1c9753a | |||
| 1ac38a4cf9 | |||
| 09e01133d2 | |||
| b7735632b8 | |||
| da79574ca7 | |||
| 971d5b6b64 | |||
| 88d391bca3 | |||
| fe52f7c78c | |||
| 06b4e46977 | |||
| 750e677490 |
@@ -1,11 +1,47 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '22 9 * * 2'
|
||||
|
||||
env:
|
||||
WEECHAT_DEPENDENCIES: devscripts equivs python3-pip cmake ninja-build lcov pkg-config libncurses-dev gem2deb libperl-dev python3-dev libaspell-dev liblua5.3-dev tcl8.6-dev guile-3.0-dev libv8-dev libcurl4-gnutls-dev libgcrypt20-dev libgnutls28-dev libzstd-dev zlib1g-dev curl libcpputest-dev php-dev libphp-embed libargon2-dev libsodium-dev flake8 pylint python3-bandit asciidoctor ruby-pygments.rb shellcheck
|
||||
WEECHAT_DEPENDENCIES: >-
|
||||
asciidoctor
|
||||
cmake
|
||||
curl
|
||||
devscripts
|
||||
equivs
|
||||
flake8
|
||||
gem2deb
|
||||
guile-3.0-dev
|
||||
lcov
|
||||
libargon2-dev
|
||||
libaspell-dev
|
||||
libcjson-dev
|
||||
libcpputest-dev
|
||||
libcurl4-gnutls-dev
|
||||
libgcrypt20-dev
|
||||
libgnutls28-dev
|
||||
liblua5.3-dev
|
||||
libncurses-dev
|
||||
libperl-dev
|
||||
libphp-embed
|
||||
libsodium-dev
|
||||
libv8-dev
|
||||
libzstd-dev
|
||||
ninja-build
|
||||
php-dev
|
||||
pkg-config
|
||||
pylint
|
||||
python3-bandit
|
||||
python3-dev
|
||||
python3-pip
|
||||
ruby-pygments.rb
|
||||
shellcheck
|
||||
tcl8.6-dev
|
||||
zlib1g-dev
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -20,6 +56,7 @@ jobs:
|
||||
- { name: "gcc_ninja", cc: "gcc", cxx: "g++", buildargs: "-G Ninja" }
|
||||
- { name: "gcc_no_nls", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_NLS=OFF -DENABLE_DOC=OFF" }
|
||||
- { name: "gcc_no_zstd", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_ZSTD=OFF -DENABLE_DOC=OFF" }
|
||||
- { name: "gcc_no_cjson", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_CJSON=OFF -DENABLE_DOC=OFF" }
|
||||
- { name: "gcc_coverage", cc: "gcc", cxx: "g++", buildargs: "-DENABLE_CODE_COVERAGE=ON" }
|
||||
- { name: "clang", cc: "clang", cxx: "clang++", buildargs: "" }
|
||||
|
||||
@@ -45,7 +82,7 @@ jobs:
|
||||
run: ./tools/check_scripts.sh
|
||||
|
||||
- name: Check Python stub file
|
||||
run: ./doc/python_stub.py | diff src/plugins/python/weechat.pyi -
|
||||
run: ./tools/generate_python_stub.py | diff src/plugins/python/weechat.pyi -
|
||||
|
||||
- name: Check Curl symbols
|
||||
run: curl --silent --show-error --fail --retry 10 https://raw.githubusercontent.com/curl/curl/master/docs/libcurl/symbols-in-versions | ./tools/check_curl_symbols.py
|
||||
@@ -68,6 +105,22 @@ jobs:
|
||||
weechat --version
|
||||
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
|
||||
|
||||
- name: Test Relay OpenAPI
|
||||
if: ${{ matrix.config.name == 'gcc' }}
|
||||
env:
|
||||
RELAY_PASSWORD: test
|
||||
run: |
|
||||
sudo -H pip3 install --ignore-installed schemathesis
|
||||
weechat-headless \
|
||||
--dir /tmp/weechat-test-api \
|
||||
--run-command '/set relay.network.password "${{ env.RELAY_PASSWORD }}"' \
|
||||
--run-command '/relay add api 9000' \
|
||||
--daemon \
|
||||
;
|
||||
sleep 5
|
||||
./tools/test_relay_api.sh http://localhost:9000
|
||||
echo '*/quit' >/tmp/weechat-test-api/weechat_fifo_*
|
||||
|
||||
- name: Code coverage
|
||||
if: ${{ matrix.config.name == 'gcc_coverage' }}
|
||||
env:
|
||||
@@ -85,7 +138,6 @@ jobs:
|
||||
matrix:
|
||||
os:
|
||||
- macos-12
|
||||
- macos-11
|
||||
config:
|
||||
- { name: "gcc", cc: "gcc", cxx: "g++" }
|
||||
- { name: "clang", cc: "clang", cxx: "clang++" }
|
||||
@@ -115,7 +167,7 @@ jobs:
|
||||
/usr/local/bin/python3.11 \
|
||||
/usr/local/bin/python3.11-config \
|
||||
;
|
||||
brew install asciidoctor guile lua pkg-config ruby
|
||||
brew install asciidoctor cjson guile lua pkg-config ruby
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -176,3 +228,39 @@ jobs:
|
||||
weechat-curses --help
|
||||
weechat --version
|
||||
weechat --run-command "/debug dirs;/debug libs" --run-command "/quit"
|
||||
|
||||
codeql-analysis:
|
||||
|
||||
name: CodeQL
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get --yes --no-install-recommends install ${{ env.WEECHAT_DEPENDENCIES }}
|
||||
# uninstall php imagick as is causes a crash when loading php plugin (see #2009)
|
||||
sudo apt-get --yes purge php8.1-imagick
|
||||
sudo -H pip3 install --ignore-installed msgcheck
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: cpp
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:cpp"
|
||||
|
||||
@@ -67,6 +67,7 @@ Alphabetically:
|
||||
* Jiri Golembiovsky (GolemJ)
|
||||
* Joey Pabalinas (alyptik)
|
||||
* Johan Rylander
|
||||
* Johannes Kuhn
|
||||
* Joram Schrijver
|
||||
* Jos Ahrens
|
||||
* Joseph Kichline
|
||||
|
||||
+13
-2
@@ -100,6 +100,7 @@ option(ENABLE_HEADLESS "Compile the headless binary" ON)
|
||||
option(ENABLE_NLS "Enable Native Language Support" ON)
|
||||
option(ENABLE_LARGEFILE "Enable Large File Support" ON)
|
||||
option(ENABLE_ZSTD "Enable Zstandard compression" ON)
|
||||
option(ENABLE_CJSON "Enable cJSON support" ON)
|
||||
option(ENABLE_ALIAS "Enable Alias plugin" ON)
|
||||
option(ENABLE_BUFLIST "Enable Buflist plugin" ON)
|
||||
option(ENABLE_CHARSET "Enable Charset plugin" ON)
|
||||
@@ -191,6 +192,9 @@ include(CheckSymbolExists)
|
||||
check_include_files("langinfo.h" HAVE_LANGINFO_CODESET)
|
||||
check_include_files("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
||||
|
||||
check_include_files("malloc.h" HAVE_MALLOC_H)
|
||||
check_symbol_exists("malloc_trim" "malloc.h" HAVE_MALLOC_TRIM)
|
||||
|
||||
check_function_exists(mallinfo HAVE_MALLINFO)
|
||||
check_function_exists(mallinfo2 HAVE_MALLINFO2)
|
||||
|
||||
@@ -202,9 +206,10 @@ if(ENABLE_LARGEFILE)
|
||||
endif()
|
||||
|
||||
# Check for libgcrypt
|
||||
find_package(GCRYPT REQUIRED)
|
||||
pkg_check_modules(LIBGCRYPT REQUIRED libgcrypt)
|
||||
add_definitions(-DHAVE_GCRYPT)
|
||||
list(APPEND EXTRA_LIBS ${GCRYPT_LDFLAGS})
|
||||
include_directories(${LIBGCRYPT_INCLUDE_DIRS})
|
||||
list(APPEND EXTRA_LIBS ${LIBGCRYPT_LDFLAGS})
|
||||
|
||||
# Check for GnuTLS
|
||||
find_package(GnuTLS REQUIRED)
|
||||
@@ -222,6 +227,12 @@ if(ENABLE_ZSTD)
|
||||
add_definitions(-DHAVE_ZSTD)
|
||||
endif()
|
||||
|
||||
# Check for cJSON
|
||||
if(ENABLE_CJSON)
|
||||
pkg_check_modules(LIBCJSON REQUIRED libcjson)
|
||||
add_definitions(-DHAVE_CJSON)
|
||||
endif()
|
||||
|
||||
# Check for iconv
|
||||
find_package(Iconv)
|
||||
if(ICONV_FOUND)
|
||||
|
||||
+273
-7
@@ -5,14 +5,173 @@
|
||||
:toc: left
|
||||
:docinfo1:
|
||||
|
||||
:see-release-notes: If you are upgrading: please see release notes.
|
||||
:breaking: pass:quotes[*[breaking]*]
|
||||
|
||||
This document lists all the changes for each version. +
|
||||
For a list of important changes that require manual actions, please look at release notes.
|
||||
[[v4.3.2]]
|
||||
== Version 4.3.2 (2024-06-06)
|
||||
|
||||
[[v4.3.2_changed]]
|
||||
=== Changed
|
||||
|
||||
* relay: enable websocket extension "permessage-deflate" with "api" relay only (issue #1549)
|
||||
|
||||
[[v4.3.2_added]]
|
||||
=== Added
|
||||
|
||||
* relay: add option relay.look.raw_messages_max_length (issue #2122)
|
||||
|
||||
[[v4.3.2_fixed]]
|
||||
=== Fixed
|
||||
|
||||
* irc, xfer: fix display of input prompt in IRC private buffers and DCC chat buffers (issue #2128)
|
||||
* irc: don't return pointer to irc server if the channel or nick is not found in info "irc_buffer"
|
||||
* relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters (issue #1549)
|
||||
* relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure (issue #1549)
|
||||
|
||||
[[v4.3.1]]
|
||||
== Version 4.3.1 (2024-05-31)
|
||||
|
||||
[[v4.3.1_fixed]]
|
||||
=== Fixed
|
||||
|
||||
* irc: close /list buffer when the server buffer is closed (issue #2121)
|
||||
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
|
||||
* php: fix return value of function hdata_longlong
|
||||
* tcl: fix return value of function hdata_longlong (issue #2119)
|
||||
* core: fix detection of libgcrypt ≥ 1.11 (debian #1071960)
|
||||
* core, relay: fix include directory of libcjson and libzstd
|
||||
* tests: fix relay tests on s390x (issue #2118)
|
||||
* tests: fix check of php plugin (issue #2117)
|
||||
* tests: fix compilation of tests on Fedora 40 (issue #2116)
|
||||
* tests: fix compilation of tests on Rocky 9.4
|
||||
|
||||
[[v4.3.0]]
|
||||
== Version 4.3.0 (2024-05-26)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
[[v4.3.0_changed]]
|
||||
=== Changed
|
||||
|
||||
* {breaking} irc: add server option "autojoin_delay" (delay before autojoin), use option "command_delay" before execution of the command (issue #862)
|
||||
* {breaking} irc: rename option irc.color.item_channel_modes to weechat.color.status_modes
|
||||
* {breaking} irc: add option `-all` in command `/allchan`, do not execute command on parted channels by default (issue #2085)
|
||||
* {breaking} relay: rename option relay.weechat.commands to relay.network.commands and change default to `*,!quit` (issue #2066)
|
||||
* {breaking} relay: change option type relay.look.auto_open_buffer to string (issue #2066)
|
||||
* {breaking} core: add buffer properties "input_prompt" and "modes", used to display bar items (issue #2066)
|
||||
* {breaking} core: add bar item "lag" to display lag on relay remote buffers (issue #2066)
|
||||
* {breaking} core: send signal "buffer_line_added" on buffers with free content
|
||||
* {breaking} core: convert option weechat.look.hotlist_sort to a list of fields (issue #2097)
|
||||
* {breaking} core: rename variables with creation time in hdata "hotlist": "creation_time.tv_sec" to "time" and "creation_time.tv_usec" to "time_usec"
|
||||
* {breaking} api: return `-1` or `1` if one input string is NULL and not the other in string comparison functions
|
||||
* {breaking} api: use whole replacement string instead of first char in function string_remove_color
|
||||
* core: use nick offline color for nick in action message
|
||||
* core: display a specific message when the value of option is unchanged after `/set` command
|
||||
* core: add variable `${highlight}` in option weechat.look.buffer_time_format (issue #2079)
|
||||
* core: reintroduce help on the variables and operators in `/help eval` (issue #2005)
|
||||
* core: allow case insensitive search of partial buffer name with `(?i)name` in command `/buffer`
|
||||
* core: use function util_strftimeval in evaluation of expression `date:xxx`
|
||||
* fset: allow filename starting with "~" in command `/fset -export`
|
||||
* irc: store lag in channel and private buffers (local variable "lag"), in addition to the server buffer
|
||||
* irc: allow range in commands `/unban` and `/unquiet` (issue #2113)
|
||||
* tcl: add support of Tcl 9.0 (issue #2075)
|
||||
|
||||
[[v4.3.0_added]]
|
||||
=== Added
|
||||
|
||||
* relay: add "api" protocol (HTTP REST API), add options relay.look.display_clients, relay.api.remote_get_lines and relay.network.time_window (issue #2066)
|
||||
* relay: add command `/remote` to connect to remote WeeChat relay servers (issue #2066)
|
||||
* relay: add support of websocket extension "permessage-deflate" (issue #1549)
|
||||
* core, api: add unique identifier "id" in buffer and nicklist (group and nick), add function "hdata_longlong", allow search by buffer id in function buffer_search, allow search by group and nick id in functions nicklist_search_group and nicklist_search_nick (issue #2081)
|
||||
* core: add support of XDG "state" directory (issue #2106, issue #1747)
|
||||
* core: add support of SGR mouse events (issue #2082)
|
||||
* fset: add option `-import` in command `/fset`
|
||||
* core: add option `-s` in command `/command` to execute multiple commands separated by semicolons
|
||||
* core: add option `malloc_trim` in command `/sys`
|
||||
* core: add option weechat.look.config_permissions (issue #2057)
|
||||
* core: add option weechat.look.highlight_prefix (issue #2079)
|
||||
* core: add option weechat.completion.case_sensitive
|
||||
* api: add functions config_option_get_{string|pointer} and config_{boolean|integer|string|color|enum}_inherited in scripting API
|
||||
* api: add modifier "color_decode" to decode WeeChat colors with a replacement string
|
||||
* api: add support of base64url in encode/decode functions
|
||||
* api: add support of specifier `%!` for timestamp in function util_strftimeval
|
||||
* api: add info "plugin_loaded"
|
||||
* script: add option `enable` in command `/script`
|
||||
* script: add info "script_loaded"
|
||||
|
||||
[[v4.3.0_fixed]]
|
||||
=== Fixed
|
||||
|
||||
* core: fix conversion of WeeChat colors to ANSI colors: "default", "bar_fg", "bar_bg", "bar_delim"
|
||||
* core: fix recursive search of group in nicklist
|
||||
* core: use nick offline highlight color for prefix of action message when the nick is offline with a highlight
|
||||
* core: add missing hdata name "buffer" in hdata "hotlist"
|
||||
* core: fix reset to initial scroll position after search of text in buffer (issue #2093)
|
||||
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
|
||||
* core: remove trailing directory separators in home directories (issue #2070)
|
||||
* exec: remove trailing space on buffers with free content when line numbers are not displayed
|
||||
* exec: add missing exec tags in lines of buffers with free content (issue #2086)
|
||||
* irc: fix crash in split of IRC message containing a newline if the server is not given
|
||||
* irc: fix display of reply for CTCP request received on a channel when capability echo-message is enabled
|
||||
* irc: display CTCP reply to a nick in server buffer instead of channel
|
||||
* irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074)
|
||||
* irc: don't strip monospace color code 0x11 from incoming messages (issue #2073)
|
||||
* irc: fix random date displayed when a received message contains tags but no "time" (issue #2064)
|
||||
* lua: fix freeze on call to "debug.debug" (issue #1906, issue #1907)
|
||||
* python: fix truncation of unsigned long long integer returned by function string_parse_size
|
||||
* relay: set the last IRC client disconnection time only after a successful connection (issue #2103)
|
||||
* script: always display list of scripts when searching scripts with `/script search` (issue #2077)
|
||||
* script: fix default mouse keys (issue #2076)
|
||||
* scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067)
|
||||
* tcl: fix truncation of long integer returned by function hdata_long
|
||||
* trigger: fix memory leak when adding a new trigger with `/trigger` command
|
||||
|
||||
[[v4.2.3]]
|
||||
== Version 4.2.3 (2024-05-31)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* xfer: fix send of data on the DCC chat buffer after `/upgrade` if the buffer was opened before the upgrade (issue #2092)
|
||||
* irc: fix crash in split of IRC message containing a newline if the server is not given
|
||||
* core, relay: fix include directory of libzstd
|
||||
|
||||
[[v4.2.2]]
|
||||
== Version 4.2.2 (2024-04-07)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix reset to initial scroll position after search of text in buffer (issue #2093)
|
||||
* core: add missing mouse events "alt-ctrl-button2" and "alt-ctrl-button3"
|
||||
* exec: remove trailing space on buffers with free content when line numbers are not displayed
|
||||
* exec: add missing exec tags in lines of buffers with free content (issue #2086)
|
||||
* irc: add missing tags on self action messages when capability echo-message is enabled (issue #2074)
|
||||
* python: fix truncation of unsigned long long integer returned by function string_parse_size
|
||||
* relay: set the last IRC client disconnection time only after a successful connection (issue #2103)
|
||||
* script: always display list of scripts when searching scripts with `/script search` (issue #2077)
|
||||
* script: fix default mouse keys (issue #2076)
|
||||
* scripts: fix crash on script unload when a hook is created in a buffer close callback (issue #2067)
|
||||
* tcl: fix truncation of long integer returned by function hdata_long
|
||||
* trigger: fix memory leak when adding a new trigger with `/trigger` command
|
||||
|
||||
Tests::
|
||||
|
||||
* core: fix tests on function strftimeval on Alpine
|
||||
|
||||
[[v4.2.1]]
|
||||
== Version 4.2.1 (2024-01-22)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: fix random date displayed when a received message contains tags but no "time" (issue #2064)
|
||||
|
||||
[[v4.2.0]]
|
||||
== Version 4.2.0 (2024-01-21)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add variable "opening" in buffer, do not send buffer signals when the buffer is opening
|
||||
@@ -28,6 +187,8 @@ New features::
|
||||
* core: display only version with command `/version`, add options `-o` and `-ol` in command `/upgrade`
|
||||
* core: add number of processes in command `/sys waitpid`
|
||||
* core, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956)
|
||||
* api: add support of format/translation of command arguments description line by line (issue #2005)
|
||||
* api: add function string_concat (issue #2005)
|
||||
* api: add functions util_strftimeval, util_parse_time, printf_datetime_tags, printf_y_datetime_tags (issue #649)
|
||||
* api: add argument "date_usec" in hook_print callback (issue #649)
|
||||
* api: add property "type" in function buffer_get_string
|
||||
@@ -107,6 +268,8 @@ Bug fixes::
|
||||
[[v4.1.1]]
|
||||
== Version 4.1.1 (2023-10-26)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix crash when a custom bar item name is already used by a default bar item (issue #2034)
|
||||
@@ -120,6 +283,8 @@ Build::
|
||||
[[v4.1.0]]
|
||||
== Version 4.1.0 (2023-10-15)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add completion "eval_variables", used in completion of `/eval`
|
||||
@@ -132,8 +297,7 @@ New features::
|
||||
* core: add options weechat.buffer.* to save buffer properties set by user, add option `setauto` in command `/buffer` (issue #352)
|
||||
* core: add parameters and key bindings to move to edges of current area with commands `/cursor go` and `/cursor move` (issue #1282)
|
||||
* core: add variables "_chat_focused_line_bol" and "_chat_focused_line_eol" in focus data (issue #1955)
|
||||
* api: add support of format/translation of command arguments description line by line (issue #2005)
|
||||
* api: add function string_concat (issue #2005)
|
||||
* api: add function hook_url, add option `url` in command `/debug` (issue #1723)
|
||||
* api: add support of path to variable and hashtable comparison in function hdata_compare (issue #1066)
|
||||
* api: add infos "nick_color_ignore_case" and "nick_color_name_ignore_case" (issue #194)
|
||||
* api: add info "buffer" (issue #1962)
|
||||
@@ -218,6 +382,8 @@ Bug fixes::
|
||||
[[v4.0.6]]
|
||||
== Version 4.0.6 (2023-10-26)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: fix crash when a custom bar item name is already used by a default bar item (issue #2034)
|
||||
@@ -313,6 +479,10 @@ Build::
|
||||
[[v4.0.1]]
|
||||
== Version 4.0.1 (2023-06-30)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* core: force key "return" to command "/input return" when migrating legacy keys
|
||||
* core: display actual key name and command with key kbd:[Alt+k], remove key kbd:[Alt+K] (grab raw key) and associated commands `/input grab_raw_key` and `/input grab_raw_key_command`
|
||||
* core: check for newline characters in string_is_whitespace_char (issue #1968)
|
||||
@@ -324,6 +494,8 @@ Build::
|
||||
[[v4.0.0]]
|
||||
== Version 4.0.0 (2023-06-24)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: use human readable key bindings, separate keys with comma in combos, remove modifier "meta2-", add option `legacy` in command `/key` (issue #1238, task #10317)
|
||||
@@ -343,7 +515,7 @@ New features::
|
||||
* core: add relative move of read marker with `/buffer set unread [+/-]N` (issue #1895)
|
||||
* core: add access to hashtable properties in evaluation of expressions (issue #1888)
|
||||
* core: display similar command names when a command is unknown (issue #1877)
|
||||
* core: rename option weechat.color.status_name_ssl to weechat.color.status_name_tls
|
||||
* core: rename option weechat.color.status_name_ssl to weechat.color.status_name_tls (issue #1903)
|
||||
* core: add option weechat.color.status_name_insecure to display buffer name with a specific color when not connected with TLS to the server
|
||||
* core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213)
|
||||
* core: add item "mouse_status" in default status bar, change default color to lightgreen
|
||||
@@ -358,7 +530,7 @@ New features::
|
||||
* alias: add options `missing` and `rename` in command `/alias`
|
||||
* fifo: add support of escaped chars in text or commands sent (issue #1950)
|
||||
* fset: add options fset.color.color_name and fset.color.color_name_selected (issue #1920)
|
||||
* irc: rename "ssl" options to "tls", connect with TLS and port 6697 by default
|
||||
* irc: rename "ssl" options to "tls", connect with TLS and port 6697 by default (issue #1903)
|
||||
* irc: add support of capabilities "batch" and "draft/multiline" (issue #1292, issue #1923)
|
||||
* irc: add support of capability "echo-message" (issue #139)
|
||||
* irc: display CTCP ACTION to channel on the channel buffer (issue #207)
|
||||
@@ -379,7 +551,7 @@ New features::
|
||||
* irc: add tag "new_host_xxx" in message displayed for command CHGHOST (issue #1808)
|
||||
* logger: add option logger.file.log_conditions (issue #1942)
|
||||
* logger: add info "logger_log_file"
|
||||
* relay: rename "ssl" options and protocol to "tls"
|
||||
* relay: rename "ssl" options and protocol to "tls" (issue #1903)
|
||||
* relay: make TLS certificate/key loading error handling more verbose (issue #1558)
|
||||
* relay: add modifiers "relay_client_irc_in", "relay_client_irc_out1" and "relay_client_irc_out" in irc protocol
|
||||
* relay: add support of capability "echo-message" in irc protocol (issue #1949)
|
||||
@@ -457,6 +629,8 @@ Build::
|
||||
[[v3.8]]
|
||||
== Version 3.8 (2023-01-08)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.look.chat_space_right (issue #1862)
|
||||
@@ -522,6 +696,8 @@ Bug fixes::
|
||||
[[v3.7]]
|
||||
== Version 3.7 (2022-10-09)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option `-save` in command `/upgrade` (issue #1630)
|
||||
@@ -587,6 +763,8 @@ Tests::
|
||||
[[v3.6]]
|
||||
== Version 3.6 (2022-07-10)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add command `/item` to create custom bar items (issue #808)
|
||||
@@ -614,6 +792,8 @@ Bug fixes::
|
||||
[[v3.5]]
|
||||
== Version 3.5 (2022-03-27)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: search in message tags when tags are displayed with `/debug tags`
|
||||
@@ -666,6 +846,8 @@ Bug fixes::
|
||||
[[v3.4]]
|
||||
== Version 3.4 (2021-12-18)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add support of static arrays in hdata
|
||||
@@ -709,6 +891,8 @@ Build::
|
||||
[[v3.3]]
|
||||
== Version 3.3 (2021-09-19)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: change key kbd:[Alt+h] to kbd:[Alt+h], kbd:[Alt+c] (clear hotlist)
|
||||
@@ -771,6 +955,8 @@ Bug fixes::
|
||||
[[v3.2]]
|
||||
== Version 3.2 (2021-06-13)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: use XDG directories by default (config, data, cache, runtime) (issue #1285)
|
||||
@@ -826,6 +1012,8 @@ Build::
|
||||
[[v3.1]]
|
||||
== Version 3.1 (2021-03-07)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add options weechat.look.hotlist_update_on_buffer_switch and weechat.look.read_marker_update_on_buffer_switch (issue #992, issue #993)
|
||||
@@ -868,6 +1056,8 @@ Bug fixes::
|
||||
[[v3.0]]
|
||||
== Version 3.0 (2020-11-11)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* api: add optional list of colors in infos "nick_color" and "nick_color_name" (issue #1565)
|
||||
@@ -905,6 +1095,8 @@ Build::
|
||||
[[v2.9]]
|
||||
== Version 2.9 (2020-07-18)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add bar option "color_bg_inactive": color for window bars in inactive window (issue #732)
|
||||
@@ -991,6 +1183,8 @@ Build::
|
||||
[[v2.8]]
|
||||
== Version 2.8 (2020-03-29)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add variable "old_full_name" in buffer, set during buffer renaming (issue #1428)
|
||||
@@ -1047,6 +1241,8 @@ Bug fixes::
|
||||
[[v2.7]]
|
||||
== Version 2.7 (2019-12-08)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.look.nick_color_hash_salt to shuffle nick colors (issue #635)
|
||||
@@ -1104,6 +1300,8 @@ Build::
|
||||
[[v2.6]]
|
||||
== Version 2.6 (2019-09-08)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add support of 32767 color pairs (issue #1343, issue #1345)
|
||||
@@ -1152,6 +1350,8 @@ Build::
|
||||
[[v2.5]]
|
||||
== Version 2.5 (2019-06-06)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: use getopt to parse command line arguments
|
||||
@@ -1207,6 +1407,8 @@ Build::
|
||||
[[v2.4]]
|
||||
== Version 2.4 (2019-02-17)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: do not automatically add a space when completing "nick:" at the beginning of command line (the space can be added in option weechat.completion.nick_completer)
|
||||
@@ -1284,6 +1486,8 @@ Build::
|
||||
[[v2.2]]
|
||||
== Version 2.2 (2018-07-14)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: change default value of option weechat.look.hotlist_add_conditions to check connected relay clients via weechat protocol (issue #1206)
|
||||
@@ -1352,6 +1556,8 @@ Build::
|
||||
[[v2.1]]
|
||||
== Version 2.1 (2018-03-18)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add binary weechat-headless to run WeeChat without interface, with optional daemon mode (command line option `--daemon`) (issue #1120)
|
||||
@@ -1391,6 +1597,8 @@ Bug fixes::
|
||||
[[v2.0]]
|
||||
== Version 2.0 (2017-12-03)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add flag "input_get_empty" in buffer
|
||||
@@ -1478,6 +1686,8 @@ Bug fixes::
|
||||
[[v1.8]]
|
||||
== Version 1.8 (2017-05-13)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.completion.nick_case_sensitive (issue #981)
|
||||
@@ -1528,6 +1738,8 @@ Bug fixes::
|
||||
[[v1.7]]
|
||||
== Version 1.7 (2017-01-15)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.look.align_multiline_words (issue #411, issue #802)
|
||||
@@ -1572,6 +1784,8 @@ Build::
|
||||
[[v1.6]]
|
||||
== Version 1.6 (2016-10-02)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add optional argument `lowest`, `highest` or level mask in command `/input hotlist_clear`
|
||||
@@ -1608,6 +1822,8 @@ Build::
|
||||
[[v1.5]]
|
||||
== Version 1.5 (2016-05-01)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: evaluate content of option "weechat.look.item_time_format" (issue #791)
|
||||
@@ -1650,6 +1866,8 @@ Build::
|
||||
[[v1.4]]
|
||||
== Version 1.4 (2016-01-10)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add a parent name in options, display inherited values if null in `/set` output, add option weechat.color.chat_value_null (issue #629)
|
||||
@@ -1707,6 +1925,8 @@ Build::
|
||||
[[v1.3]]
|
||||
== Version 1.3 (2015-08-16)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add completion "colors" (issue #481)
|
||||
@@ -1762,6 +1982,8 @@ Build::
|
||||
[[v1.2]]
|
||||
== Version 1.2 (2015-05-10)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add signals "signal_sigterm" and "signal_sigquit" (issue #114)
|
||||
@@ -1836,6 +2058,8 @@ Build::
|
||||
[[v1.1]]
|
||||
== Version 1.1 (2015-01-11)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.completion.command_inline (task #12491)
|
||||
@@ -1933,6 +2157,8 @@ Build::
|
||||
[[v1.0]]
|
||||
== Version 1.0 (2014-08-15)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: display a warning on startup if $TERM does not start with "screen" under Screen/Tmux
|
||||
@@ -2094,6 +2320,8 @@ Tests::
|
||||
[[v0.4.3]]
|
||||
== Version 0.4.3 (2014-02-09)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add signals "signal_sighup" and "signal_sigwinch" (terminal resized)
|
||||
@@ -2197,6 +2425,8 @@ Build::
|
||||
[[v0.4.2]]
|
||||
== Version 0.4.2 (2013-10-06)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: display day change message dynamically (do not store it as a line in buffer), split option weechat.look.day_change_time_format into two options weechat.look.day_change_message_{1date|2dates}, new option weechat.color.chat_day_change (task #12775)
|
||||
@@ -2279,6 +2509,8 @@ Build::
|
||||
[[v0.4.1]]
|
||||
== Version 0.4.1 (2013-05-20)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: make nick prefix/suffix dynamic (not stored in the line): move options irc.look.nick_{prefix|suffix} to weechat.look.nick_{prefix|suffix} and options irc.color.nick_{prefix|suffix} to weechat.color.chat_nick_{prefix|suffix}, add new options weechat.look.prefix_align_more_after, weechat.look.prefix_buffer_align_more_after, logger.file.nick_{prefix|suffix} (bug #37531)
|
||||
@@ -2363,6 +2595,8 @@ Build::
|
||||
[[v0.4.0]]
|
||||
== Version 0.4.0 (2013-01-20)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add buffer pointer in arguments for signals "input_search", "input_text_changed" and "input_text_cursor_moved"
|
||||
@@ -2464,6 +2698,8 @@ Bug fixes::
|
||||
[[v0.3.9]]
|
||||
== Version 0.3.9 (2012-09-29)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add signals for plugins loaded/unloaded
|
||||
@@ -2552,6 +2788,8 @@ Build::
|
||||
[[v0.3.8]]
|
||||
== Version 0.3.8 (2012-06-03)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option weechat.look.prefix_same_nick (hide or change prefix on messages whose nick is the same as previous message) (task #11965)
|
||||
@@ -2619,6 +2857,8 @@ Build::
|
||||
[[v0.3.7]]
|
||||
== Version 0.3.7 (2012-02-26)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add support of flags in regular expressions and highlight options
|
||||
@@ -2703,6 +2943,8 @@ Build::
|
||||
[[v0.3.6]]
|
||||
== Version 0.3.6 (2011-10-22)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add color attribute "|" (keep attributes) and value "resetcolor" for function color in plugin API (used by irc plugin to keep bold/reverse/underlined in message when changing color) (bug #34550)
|
||||
@@ -2795,6 +3037,8 @@ Build::
|
||||
[[v0.3.5]]
|
||||
== Version 0.3.5 (2011-05-15)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add buffer to hotlist if away is set on buffer (even if buffer is displayed), new option weechat.look.hotlist_add_buffer_if_away (task #10948)
|
||||
@@ -2873,6 +3117,8 @@ Build::
|
||||
[[v0.3.4]]
|
||||
== Version 0.3.4 (2011-01-16)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add 256 colors support, new command `/color`, new section "palette" in weechat.conf (task #6834)
|
||||
@@ -2941,6 +3187,8 @@ Build::
|
||||
[[v0.3.3]]
|
||||
== Version 0.3.3 (2010-08-07)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: use "!" to reverse a regex in a filter (to keep lines matching regex and hide other lines) (task #10032)
|
||||
@@ -2984,6 +3232,8 @@ Bug fixes::
|
||||
[[v0.3.2]]
|
||||
== Version 0.3.2 (2010-04-18)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add new options for command `/key`: `listdefault`, `listdiff` and `reset`
|
||||
@@ -3064,6 +3314,8 @@ Build::
|
||||
[[v0.3.1]]
|
||||
== Version 0.3.1 (2010-01-23)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add option "grab_key_command" in command `/input` (bound by default to kbd:[Alt+k])
|
||||
@@ -3120,6 +3372,8 @@ Build::
|
||||
[[v0.3.0]]
|
||||
== Version 0.3.0 (2009-09-06)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* core: add group support in nicklist
|
||||
@@ -3346,6 +3600,8 @@ Build::
|
||||
[[v0.2.2]]
|
||||
== Version 0.2.2 (2007-01-06)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* add anti-flood option (irc_anti_flood) (task #5442)
|
||||
@@ -3422,6 +3678,8 @@ Bug fixes::
|
||||
[[v0.2.0]]
|
||||
== Version 0.2.0 (2006-08-19)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* add "C"lear option on IRC raw buffer
|
||||
@@ -3477,6 +3735,8 @@ Build::
|
||||
[[v0.1.9]]
|
||||
== Version 0.1.9 (2006-05-25)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* add backtrace when WeeChat crashes, log file automatically renamed
|
||||
@@ -3534,6 +3794,8 @@ Build::
|
||||
[[v0.1.8]]
|
||||
== Version 0.1.8 (2006-03-18)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* improve alias completion (now uses target command for completion)
|
||||
@@ -3581,6 +3843,8 @@ Bug fixes::
|
||||
[[v0.1.7]]
|
||||
== Version 0.1.7 (2006-01-14)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* remove "irc_default_msg_away" setting, for RFC 2812 conformity (`/away` command without argument only removes away status), new values for "irc_display_away" (off, local, channel)
|
||||
@@ -3613,6 +3877,8 @@ Build::
|
||||
[[v0.1.6]]
|
||||
== Version 0.1.6 (2005-11-11)
|
||||
|
||||
{see-release-notes}
|
||||
|
||||
New features::
|
||||
|
||||
* new color management system, IRC colors are now correctly displayed and can be removed by new options irc_colors_receive and irc_colors_send
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ pass:[<p align="center">] image:https://weechat.org/media/images/weechat_logo_la
|
||||
|
||||
image:https://img.shields.io/badge/mastodon-follow-blue.svg["Mastodon", link="https://hostux.social/@weechat"]
|
||||
image:https://img.shields.io/badge/diaspora*-follow-blue.svg["Diaspora*", link="https://diasp.eu/u/weechat"]
|
||||
image:https://img.shields.io/badge/twitter-follow-blue.svg["Twitter", link="https://twitter.com/WeeChatClient"]
|
||||
image:https://img.shields.io/badge/x-follow-blue.svg["Twitter", link="https://x.com/WeeChatClient"]
|
||||
image:https://img.shields.io/badge/devel%20blog-follow-blue.svg["Devel blog", link="https://blog.weechat.org/"]
|
||||
image:https://img.shields.io/badge/slant-recommend-28acad.svg["Slant", link="https://www.slant.co/topics/1323/~best-irc-clients-for-linux"]
|
||||
image:https://img.shields.io/badge/help-donate%20%E2%9D%A4-ff69b4.svg["Donate", link="https://weechat.org/donate/"]
|
||||
|
||||
+106
-9
@@ -11,6 +11,106 @@ It is recommended to read it when upgrading to a new stable version. +
|
||||
For a complete list of changes, please look at ChangeLog.
|
||||
|
||||
|
||||
[[v4.3.2]]
|
||||
== Version 4.3.2 (2024-06-06)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.3.1]]
|
||||
== Version 4.3.1 (2024-05-31)
|
||||
|
||||
[[v4.3.1_libgcrypt]]
|
||||
=== Detection of libgcrypt
|
||||
|
||||
The detection of libgcrypt has been fixed to properly detect libgcrypt >= 1.11. +
|
||||
As a consequence, the detection of an old version of libgcrypt is failing if the
|
||||
file `libgcrypt.pc` is not found. +
|
||||
This affects old distributions like Debian Buster and Ubuntu Bionic.
|
||||
|
||||
[[v4.3.0]]
|
||||
== Version 4.3.0 (2024-05-26)
|
||||
|
||||
[[v4.3.0_relay_options]]
|
||||
=== Relay options
|
||||
|
||||
The following relay options have been renamed:
|
||||
|
||||
* relay.color.status_waiting_auth -> relay.color.status_authenticating
|
||||
* relay.weechat.commands -> relay.network.commands (new default value: `*,!quit`)
|
||||
|
||||
[[v4.3.0_lag_in_buflist]]
|
||||
=== Lag in buflist
|
||||
|
||||
The lag is now stored in all IRC buffers: server (like it always has been),
|
||||
channels and private buffers.
|
||||
|
||||
Consequently, if you use `${format_lag}` in buflist options, this lag will be
|
||||
displayed on server and all channels and private buffers.
|
||||
|
||||
If you want to display the lag only on server buffer in buflist, you can use
|
||||
such format:
|
||||
|
||||
----
|
||||
${if:${type}==server?${format_lag}}
|
||||
----
|
||||
|
||||
[[v4.3.0_irc_color_channel_modes]]
|
||||
=== Color of IRC channel modes
|
||||
|
||||
The option `irc.color.item_channel_modes` has been moved to core and renamed to
|
||||
`weechat.color.status_modes`.
|
||||
|
||||
[[v4.3.0_signal_buffer_line_added]]
|
||||
=== Signal "buffer_line_added"
|
||||
|
||||
The signal "buffer_line_added" is now sent for every line added or modified
|
||||
on a buffer with free content.
|
||||
|
||||
[[v4.3.0_script_keys]]
|
||||
=== Script keys
|
||||
|
||||
Some arguments to the `/script` command were renamed in version 4.1.0, but the
|
||||
keys using these arguments were not changed at same time.
|
||||
|
||||
They're now using the new arguments by default, but you must reset manually
|
||||
the keys with the following commands:
|
||||
|
||||
----
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button1
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button2
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheeldown
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheelup
|
||||
----
|
||||
|
||||
[[v4.2.3]]
|
||||
== Version 4.2.3 (2024-05-31)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.2.2]]
|
||||
== Version 4.2.2 (2024-04-07)
|
||||
|
||||
[[v4.2.2_script_keys]]
|
||||
=== Script keys
|
||||
|
||||
Some arguments to the `/script` command were renamed in version 4.1.0, but the
|
||||
keys using these arguments were not changed at same time.
|
||||
|
||||
They're now using the new arguments by default, but you must reset manually
|
||||
the keys with the following commands:
|
||||
|
||||
----
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button1
|
||||
/reset weechat.key_mouse.@chat(script.scripts):button2
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheeldown
|
||||
/reset weechat.key_mouse.@chat(script.scripts):wheelup
|
||||
----
|
||||
|
||||
[[v4.2.1]]
|
||||
== Version 4.2.1 (2024-01-22)
|
||||
|
||||
No release notes.
|
||||
|
||||
[[v4.2.0]]
|
||||
== Version 4.2.0 (2024-01-21)
|
||||
|
||||
@@ -2952,13 +3052,12 @@ disable IPv6 in relay if you don't plan to use it at all:
|
||||
[[v0.3.9.2]]
|
||||
== Version 0.3.9.2 (2012-11-18)
|
||||
|
||||
This version fixes a security vulnerability when a plugin/script gives
|
||||
untrusted command to API function link:https://weechat.org/doc/weechat/plugin/#_hook_process[hook_process].
|
||||
No release notes.
|
||||
|
||||
[[v0.3.9.1]]
|
||||
== Version 0.3.9.1 (2012-11-09)
|
||||
|
||||
This version fixes crash when decoding IRC colors in strings.
|
||||
No release notes.
|
||||
|
||||
[[v0.3.9]]
|
||||
== Version 0.3.9 (2012-09-29)
|
||||
@@ -3266,17 +3365,17 @@ Major differences:
|
||||
[[v0.2.6.3]]
|
||||
== Version 0.2.6.3 (2009-06-13)
|
||||
|
||||
This version fixes gnutls detection.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.6.2]]
|
||||
== Version 0.2.6.2 (2009-04-18)
|
||||
|
||||
This version fixes a bug with charset decoding (like "iso2022jp").
|
||||
No release notes.
|
||||
|
||||
[[v0.2.6.1]]
|
||||
== Version 0.2.6.1 (2009-03-14)
|
||||
|
||||
This version fixes a major bug: crash with some special chars in IRC messages.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.6]]
|
||||
== Version 0.2.6 (2007-09-06)
|
||||
@@ -3296,9 +3395,7 @@ No release notes.
|
||||
[[v0.2.3]]
|
||||
== Version 0.2.3 (2007-01-10)
|
||||
|
||||
This version fixes several major bugs of version 0.2.2.
|
||||
|
||||
All users of version 0.2.2 should upgrade to this version.
|
||||
No release notes.
|
||||
|
||||
[[v0.2.2]]
|
||||
== Version 0.2.2 (2007-01-06)
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
#
|
||||
# This file is part of WeeChat, the extensible chat client.
|
||||
#
|
||||
# WeeChat is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# WeeChat is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# - Find Gcrypt
|
||||
# This module finds if libgcrypt is installed and determines where
|
||||
# the include files and libraries are.
|
||||
#
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# GCRYPT_CFLAGS = cflags to use to compile
|
||||
# GCRYPT_LDFLAGS = ldflags to use to compile
|
||||
#
|
||||
|
||||
find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES libgcrypt-config)
|
||||
|
||||
set(GCRYPT_LDFLAGS)
|
||||
set(GCRYPT_CFLAGS)
|
||||
|
||||
if(LIBGCRYPT_CONFIG_EXECUTABLE)
|
||||
|
||||
execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
|
||||
execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
|
||||
|
||||
if(NOT DEFINED ${GCRYPT_CFLAGS})
|
||||
set(GCRYPT_CFLAGS " ")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GCRYPT REQUIRED_VARS GCRYPT_LDFLAGS GCRYPT_CFLAGS)
|
||||
|
||||
if(GCRYPT_FOUND)
|
||||
mark_as_advanced(GCRYPT_CFLAGS GCRYPT_LDFLAGS)
|
||||
endif()
|
||||
@@ -5,6 +5,8 @@
|
||||
#cmakedefine ICONV_2ARG_IS_CONST 1
|
||||
#cmakedefine HAVE_MALLINFO
|
||||
#cmakedefine HAVE_MALLINFO2
|
||||
#cmakedefine HAVE_MALLOC_H
|
||||
#cmakedefine HAVE_MALLOC_TRIM
|
||||
#cmakedefine HAVE_EAT_NEWLINE_GLITCH
|
||||
#cmakedefine HAVE_ASPELL_VERSION_STRING
|
||||
#cmakedefine HAVE_ENCHANT_GET_VERSION
|
||||
|
||||
@@ -21,7 +21,8 @@ Build-Depends:
|
||||
libgcrypt20-dev,
|
||||
libgnutls28-dev,
|
||||
libzstd-dev,
|
||||
zlib1g-dev
|
||||
zlib1g-dev,
|
||||
libcjson-dev
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
|
||||
@@ -21,7 +21,8 @@ Build-Depends:
|
||||
libgcrypt20-dev,
|
||||
libgnutls28-dev,
|
||||
libzstd-dev,
|
||||
zlib1g-dev
|
||||
zlib1g-dev,
|
||||
libcjson-dev
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://weechat.org/
|
||||
Vcs-Git: https://salsa.debian.org/kolter/weechat.git
|
||||
|
||||
+12
-12
@@ -7,23 +7,23 @@ Files: *
|
||||
Copyright: 2003-2024, Sébastien Helleu <flashcode@flashtux.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-command.c
|
||||
src/core/wee-command.h
|
||||
Files: src/core/core-command.c
|
||||
src/core/core-command.h
|
||||
Copyright: 2005-2006, Emmanuel Bouthenot <kolter@openics.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-config-file.c
|
||||
src/core/wee-config-file.h
|
||||
src/core/wee-config.c
|
||||
src/core/wee-config.h
|
||||
Files: src/core/core-config-file.c
|
||||
src/core/core-config-file.h
|
||||
src/core/core-config.c
|
||||
src/core/core-config.h
|
||||
Copyright: 2005-2006, Emmanuel Bouthenot <kolter@openics.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/hook/wee-hook-connect.c
|
||||
Files: src/core/hook/hook-connect.c
|
||||
Copyright: 2012, Simon Arlott
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/hook/wee-hook-connect.h
|
||||
Files: src/core/hook/hook-connect.h
|
||||
Copyright: 2012, Simon Arlott
|
||||
License: GPL-3+
|
||||
|
||||
@@ -31,9 +31,9 @@ Files: src/gui/gui-history.c
|
||||
Copyright: 2005, Emmanuel Bouthenot <kolter@openics.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-completion.c
|
||||
src/core/wee-log.c
|
||||
src/core/wee-utf8.c
|
||||
Files: src/core/core-completion.c
|
||||
src/core/core-log.c
|
||||
src/core/core-utf8.c
|
||||
src/core/weechat.h
|
||||
src/plugins/spell/spell-config.c
|
||||
src/plugins/spell/spell-config.h
|
||||
@@ -45,7 +45,7 @@ Files: src/core/wee-completion.c
|
||||
Copyright: 2006, Emmanuel Bouthenot <kolter@openics.org>
|
||||
License: GPL-3+
|
||||
|
||||
Files: src/core/wee-network.c
|
||||
Files: src/core/core-network.c
|
||||
Copyright: 2005-2010, Emmanuel Bouthenot <kolter@openics.org>
|
||||
2010, Gu1ll4um3r0m41n <aeroxteam@gmail.com>
|
||||
2012, Simon Arlott
|
||||
|
||||
@@ -177,6 +177,9 @@ if(ENABLE_MAN OR ENABLE_DOC)
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_user_default_aliases.${lang}.adoc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_user_irc_colors.${lang}.adoc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_user_options.${lang}.adoc"
|
||||
# scripting duide
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_scripting_functions.${lang}.adoc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_scripting_constants.${lang}.adoc"
|
||||
)
|
||||
endforeach()
|
||||
add_custom_target(doc-autogen ALL
|
||||
@@ -283,6 +286,9 @@ if(ENABLE_MAN OR ENABLE_DOC)
|
||||
DEPENDS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/docinfo.html"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${lang}/weechat_scripting.${lang}.adoc"
|
||||
doc-autogen
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_scripting_functions.${lang}.adoc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/autogen/autogen_scripting_constants.${lang}.adoc"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Building weechat_scripting.${lang}.html"
|
||||
)
|
||||
|
||||
@@ -564,317 +564,14 @@ lesen Sie bitte link:weechat_plugin_api.en.html[WeeChat Plugin API Reference ^
|
||||
|
||||
Liste der Skript API Funktionen:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Kategorie | Funktionen
|
||||
|
||||
| Allgemein
|
||||
| register
|
||||
|
||||
| Erweiterungen
|
||||
| plugin_get_name
|
||||
|
||||
| Strings
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| Verzeichnisse
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| sortierte Listen
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| Konfigurationsdatei
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| Tastenbelegung
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| Ausgabe
|
||||
| prefix +
|
||||
color +
|
||||
print (für Python: prnt) +
|
||||
print_date_tags (für Python: prnt_date_tags) +
|
||||
print_datetime_tags (für Python: prnt_datetime_tags) +
|
||||
print_y (für Python: prnt_y) +
|
||||
print_y_date_tags (für Python: prnt_y_date_tags) +
|
||||
print_y_datetime_tags (für Python: prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| Hooks
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| Buffer
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| Fenster
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| Nickliste
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| Bars
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| Befehle
|
||||
| command +
|
||||
command_options
|
||||
|
||||
| Vervollständigung
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| Informationen
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| Infolisten
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| Upgrade
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.de.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Konstanten
|
||||
|
||||
Liste der Konstanten in Skript API:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Kategorie | Konstanten
|
||||
|
||||
| return codes
|
||||
| `WEECHAT_RC_OK` (integer) +
|
||||
`WEECHAT_RC_OK_EAT` (integer) +
|
||||
`WEECHAT_RC_ERROR` (integer)
|
||||
|
||||
| Konfigurationsdatei
|
||||
| `WEECHAT_CONFIG_READ_OK` (integer) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (integer)
|
||||
|
||||
| sortierte Listen
|
||||
| `WEECHAT_LIST_POS_SORT` (string) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (string) +
|
||||
`WEECHAT_LIST_POS_END` (string)
|
||||
|
||||
| Hotlist
|
||||
| `WEECHAT_HOTLIST_LOW` (string) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (string) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (string) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (string)
|
||||
|
||||
| hook Prozesse
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (integer) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (integer)
|
||||
|
||||
| hook Connect
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (integer)
|
||||
|
||||
| hook Signal
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (string)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.de.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Gemeinschaftsaufgabe
|
||||
|
||||
+95
-32
@@ -35,7 +35,7 @@ wesentliche Merkmale:
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^],
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] und
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]
|
||||
* IRC proxy und relay für remote Schnittstellen
|
||||
* IRC proxy und relay für WeeChat und Remote-Schnittstellen
|
||||
* Betriebssystemunabhängig (GNU/Linux, *BSD, macOS, Windows und weitere)
|
||||
* 100% GPL, freie Software
|
||||
|
||||
@@ -133,7 +133,8 @@ Die folgende Tabelle zeigt eine Auflistung der Pakete, die zum Erstellen von Wee
|
||||
|
||||
| zlib1g-dev |
|
||||
| Logger-Erweitertung: Kompression von rotierenden Protokolldateien (gzip). +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://zlib.net/[zlib ^↗^^]
|
||||
(api und weechat Protokollen). +
|
||||
Script-Erweiterung: Lesen der Repository-Indexdatei (gzip).
|
||||
|===
|
||||
|
||||
@@ -159,9 +160,14 @@ WeeChat optional sind:
|
||||
| ca-certificates |
|
||||
| Zertifikate für TLS Verbindungen.
|
||||
|
||||
| libcjson-dev |
|
||||
| Relay-Erweiterung: Protokoll "api" (HTTP REST API).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
// TRANLSATION MISSING
|
||||
| Logger-Erweiterung: Kompression von rotierenden Protokolldateien (zstandard). +
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
Relay-Erweiterung: Kompression von Nachrichten (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(api and weechat protocols).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell Erweiterung.
|
||||
@@ -279,6 +285,9 @@ Liste der verfügbaren Optionen:
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| kompiliert <<charset,Charset Erweiterung>>.
|
||||
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Unterstützung von JSON mittels https://github.com/DaveGamble/cJSON[cJSON ^↗^^] Bibliothek.
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| erstellt die man page.
|
||||
|
||||
@@ -527,11 +536,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -1857,10 +1866,10 @@ wurde (Befehl: `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat: /list buffer | gehe fünf Zeilen im /list-Buffer nach unten. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Zeile im /list-Buffer auswählen. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | tritt dem IRC-Kanal, in der ausgewählten Zeile, bei. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | fünf Zeilen nach oben blättern, im Script-Buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | fünf Zeilen nach unten blättern, im Script-Buffer. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: script buffer | fünf Zeilen nach oben blättern, im Script-Buffer. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | fünf Zeilen nach unten blättern, im Script-Buffer. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | wählt einen Eintrag im Script-Buffer aus. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | installiert/entfernt ein Skript. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | verschiebt Buffer in der Reihenfolge nach unten. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | verschiebt Buffer in der Reihenfolge nach oben. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | wechselt zum Buffer (oder zum vorherigen Buffer, falls der aktuell genutzte Buffer angewählt wurde). | Signal `+buflist_mouse+`.
|
||||
@@ -1978,8 +1987,8 @@ Diese Tasten und Aktionen werden im fset-Buffer verwendet (siehe <<script_manage
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Taste | Action ^(1)^ | Beschreibung | Befehl
|
||||
| kbd:[↑] | | eine Zeile nach oben. | `+/script up+`
|
||||
| kbd:[↓] | | eine Zeile nach unten. | `+/script down+`
|
||||
| kbd:[↑] | | eine Zeile nach oben. | `+/script -up+`
|
||||
| kbd:[↓] | | eine Zeile nach unten. | `+/script -down+`
|
||||
| kbd:[PgUp] | | eine Seite hoch blättern. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | eine Seite nach unten blättern. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Skript installieren. | `+/script install+`
|
||||
@@ -2712,27 +2721,37 @@ und löschen (für die Syntax, siehe Befehl <<command_weechat_key,/key>>).
|
||||
Der Name eines Ereignisses besteht aus einem Modifier (optional), einer Maustaste/Mausrad
|
||||
und der Mausgeste (optional). Die unterschiedlichen Elemente werden durch ein `+-+` getrennt.
|
||||
|
||||
Liste der Modifiers:
|
||||
Liste der Modifikatoren (in der Reihenfolge des Ereignisnamens):
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Modifier | Beschreibung
|
||||
| ctrl | Taste kbd:[Ctrl]
|
||||
| alt | Taste kbd:[Alt]
|
||||
| ctrl-alt | Taste kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Taste kbd:[Ctrl]
|
||||
| shift | Taste kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Der `shift` Modifikator sollte in WeeChat selten verwendet werden, da es viele Terminals gibt
|
||||
die diesen Modifikator nutzen, um Mausereignisse direkt abzufangen.
|
||||
|
||||
Verschiedene Modifikatoren können kombiniert werden, zum Beispiel:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
Liste der Maustasten/Mausrad:
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Maustaste/-rad | Beschreibung
|
||||
| button1 | Linker Mausknopf wird gedrückt
|
||||
| button2 | Rechter Mausknopf wird gedrückt
|
||||
| button3 | Mittlerer Mausknopf wird gedrückt (häufig der Druck auf das Mausrad)
|
||||
| button4 ... button9 | Ein zusätzlicher Mausknopf wird gedrückt
|
||||
| wheelup | Mausrad wird nach oben gescrollt
|
||||
| wheeldown | Mausrad wird nach unten gescrollt
|
||||
| Maustaste/-rad | Beschreibung
|
||||
| button1 | Linker Mausknopf wird gedrückt
|
||||
| button2 | Rechter Mausknopf wird gedrückt
|
||||
| button3 | Mittlerer Mausknopf wird gedrückt (häufig der Druck auf das Mausrad)
|
||||
| button4 ... button11 | Ein zusätzlicher Mausknopf wird gedrückt
|
||||
| wheelup | Mausrad wird nach oben gescrollt
|
||||
| wheeldown | Mausrad wird nach unten gescrollt
|
||||
|===
|
||||
|
||||
Liste der Mausgesten (nur für Maustasten, nicht für das Mausrad, anwendbar):
|
||||
@@ -2768,7 +2787,7 @@ Bespiele von Ereignissen:
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
|
||||
[TIP]
|
||||
Wird eine Funktion im "mouse"-Kontext hinzufügt ist es möglich, mehrere
|
||||
@@ -4590,8 +4609,13 @@ Die Relay-Erweiterung wird genutzt um Daten, mittels unterschiedlicher Protokoll
|
||||
|
||||
* _irc_: IRC Proxy: um mittels einem oder mehreren IRC-Clients eine Verbindung zu
|
||||
IRC Servern zu unterhalten.
|
||||
* _weechat_: Protokoll, das von Remote-Schnittstellen zur Anzeige und Interaktion verwendet wird
|
||||
WeeChat, siehe https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
* _api_: HTTP REST API, wird von WeeChat und Remote-Schnittstellen zur Anzeige und
|
||||
Interaktion mit WeeChat verwendet
|
||||
* _weechat_: von Remote-Schnittstellen verwendetes Protokoll zur Anzeige und Interaktion mit
|
||||
WeeChat.
|
||||
|
||||
Für die _api_ und _weechat_ Protokolle findet man eine Liste der Remote-Schnittstellen auf
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== Passwort
|
||||
@@ -4603,14 +4627,13 @@ Es wird dringend empfohlen, mit diesen Befehlen ein Passwort für das Relay fest
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
Dieses Passwort wird sowohl für das _irc_ als auch für das _weechat_ Protokoll
|
||||
verwendet.
|
||||
Dieses Passwort wird bei allen Protokollen verwendet.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
TOTP (Time-based One-Time Passwort) ist eine Zwei-Faktor-Authentifizierung
|
||||
für das _weechat_ Protokoll, als Ergänzung zum eigentlichen Passwort.
|
||||
TOTP (Time-based One-Time Password) kann als sekundärer Authentifizierungsfaktor
|
||||
für die Protokolle _api_ und _weechat_ zusätzlich zum Passwort verwendet werden.
|
||||
|
||||
Diese Funktion is optional und erhöht den Sicherheitsgrad.
|
||||
|
||||
@@ -4707,6 +4730,38 @@ folgenden Befehlen einrichten:
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
Die Relay-Erweiterung kann Daten über ein HTTP REST API-Protokoll an einen Remote-WeeChat oder eine Remote-Schnittstelle senden.
|
||||
|
||||
Die API kann online durchstöbert und getestet werden:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
Sie können sich mit WeeChat oder einer Remote-Schnittstelle verbinden, siehe
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
Zum Beispiel:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Jetzt kann man sich über Port 9000 mit einem WeeChat oder einer Remote-Schnittstelle
|
||||
verbinden, indem das Passwort „mypassword“ verwendet wird.
|
||||
|
||||
So stellt man mit WeeChat eine Verbindung zu einem _api_ Relay her:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Der Remote-WeeChat muss dieselbe API-Version wie der lokale WeeChat nutzen.
|
||||
Daher wird dringend empfohlen, auf dem Remote- und dem lokalen Client genau
|
||||
dieselbe WeeChat-Version zu verwenden.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== WeeChat Protokoll
|
||||
|
||||
@@ -4747,7 +4802,9 @@ websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
Der Port (im Beispiel: 9000) ist der Port der in der Relay Erweiterung angegeben wurde.
|
||||
Die URI muss immer auf "/weechat" enden (_irc_ und _weechat_ Protokoll).
|
||||
|
||||
Die URI muss mit „/weechat“ für die Protokolle _irc_ und _weechat_ und mit „/api“
|
||||
für das Protokoll _api_ enden.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== UNIX Domain Sockets
|
||||
@@ -4792,7 +4849,7 @@ Sektionen in Datei _relay.conf_:
|
||||
| network | /set relay.network.* | Netzwerkoptionen.
|
||||
| irc | /set relay.irc.* | für das IRC Protokoll spezifische Optionen (IRC Proxy).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Ports zur Nutzung der Relay-Erweiterung (IRC und weechat Protokolle) (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
/set relay.port.* | Ports zur Nutzung der Relay-Erweiterung (Optionen können in Sektion hinzugefügt/entfernt werden).
|
||||
|===
|
||||
|
||||
Optionen:
|
||||
@@ -5217,7 +5274,9 @@ Zutreffende Gruppen können in _replace_ verwendet werden:
|
||||
|
||||
* `+${re:0}+` nach `+${re:99}+`: `+${re:0}+` ist die ganze Trefferanzahl, `+${re:1}+` nach
|
||||
`+${re:99}+` sind als Gruppen erfasst.
|
||||
* `+${re:+}+`: das letzte Treffer (mit der höchsten Zahl)
|
||||
* `pass:[${re:+}]`: das letzte Treffer (mit der höchsten Zahl)
|
||||
* `+${re:#}+`: index of last group captured
|
||||
* `+${re:repl_index}+`: index of replacement being done (starts to 1)
|
||||
* `+${hide:c,${re:N}}+`: Treffer "N" mit allen Zeichen die durch "c" ersetzt wurden
|
||||
(Beispiele: `+${hide:*,${re:2}}+` ist die Gruppe #2, mit allen Zeichen die durch
|
||||
`+*+` ersetzt wurden).
|
||||
@@ -5369,7 +5428,7 @@ und die Daten in einer Hashtable gesichert:
|
||||
| server | string | Name des Server (Beispiel: "libera").
|
||||
| tags | string | Tags in Nachricht (findet selten Verwendung).
|
||||
| message_without_tags | string | Nachricht ohne Tags.
|
||||
| nick | string | Nick.
|
||||
| nick | string | Nick. ^(1)^
|
||||
| host | string | Hostname.
|
||||
| command | string | IRC Befehl (Beispiel: "PRIVMSG", "NOTICE", ...).
|
||||
| channel | string | IRC Channel.
|
||||
@@ -5381,6 +5440,10 @@ und die Daten in einer Hashtable gesichert:
|
||||
| pos_text | string | Index von _text_ innerhalb einer Nachricht ("-1" falls _text_ nicht gefunden wird).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Der Nick, ist der Absender der Nachricht. +
|
||||
Der eigene Nick für den Server ist `${irc_server.nick}`.
|
||||
|
||||
Sofern es sich bei den Daten um einen Pointer handelt, kann die Variable `+tg_signal_data+`
|
||||
wie im folgenden Beispiel genutzt werden um den Inhalt von hdata zu lesen (im Beispiel
|
||||
wird der Pointer eines Buffer verwendet):
|
||||
|
||||
+392
-354
@@ -112,97 +112,97 @@ WeeChat "core" is located in following directories:
|
||||
|
||||
[width="100%",cols="2m,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-calc.c | Calculate result of expressions.
|
||||
| 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-crypto.c | Cryptographic functions.
|
||||
| wee-debug.c | Some debug functions.
|
||||
| wee-doc.c | Build of files for documentation.
|
||||
| wee-dir.c | Directory/file 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 functions.
|
||||
| wee-secure-buffer.c | Secured data buffer.
|
||||
| wee-secure-config.c | Secured data options (file sec.conf).
|
||||
| wee-signal.c | Signal functions.
|
||||
| wee-string.c | Functions on strings.
|
||||
| wee-sys.c | System functions.
|
||||
| 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".
|
||||
| wee-hook-url.c | Hook "url".
|
||||
| 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.
|
||||
| core-arraylist.c | Array lists.
|
||||
| core-backtrace.c | Display a backtrace after a crash.
|
||||
| core-calc.c | Calculate result of expressions.
|
||||
| core-command.c | WeeChat core commands.
|
||||
| core-completion.c | Default completions.
|
||||
| core-config-file.c | Configuration file management.
|
||||
| core-config.c | Configuration options for WeeChat core (file weechat.conf).
|
||||
| core-crypto.c | Cryptographic functions.
|
||||
| core-debug.c | Some debug functions.
|
||||
| core-doc.c | Build of files for documentation.
|
||||
| core-dir.c | Directory/file functions.
|
||||
| core-eval.c | Evaluation of expressions with references to internal vars.
|
||||
| core-hashtable.c | Hashtables.
|
||||
| core-hdata.c | Hdata (direct access to data using hashtables).
|
||||
| core-hook.c | Hooks.
|
||||
| core-infolist.c | Infolists (lists with objects data).
|
||||
| core-input.c | Input of commands/text.
|
||||
| core-list.c | Sorted lists.
|
||||
| core-log.c | Write to WeeChat log file (weechat.log).
|
||||
| core-network.c | Network functions (connection to servers/proxies).
|
||||
| core-proxy.c | Proxy management.
|
||||
| core-secure.c | Secured data functions.
|
||||
| core-secure-buffer.c | Secured data buffer.
|
||||
| core-secure-config.c | Secured data options (file sec.conf).
|
||||
| core-signal.c | Signal functions.
|
||||
| core-string.c | Functions on strings.
|
||||
| core-sys.c | System functions.
|
||||
| core-upgrade-file.c | Internal upgrade system.
|
||||
| core-upgrade.c | Upgrade for WeeChat core (buffers, lines, history, ...).
|
||||
| core-url.c | URL transfer (using libcurl).
|
||||
| core-utf8.c | UTF-8 functions.
|
||||
| core-util.c | Some other functions.
|
||||
| core-version.c | Functions for WeeChat version.
|
||||
| weechat.c | Main functions: command line options, startup.
|
||||
| hook/ | Hook functions.
|
||||
| hook-command-run.c | Hook "command_run".
|
||||
| hook-command.c | Hook "command".
|
||||
| hook-completion.c | Hook "completion".
|
||||
| hook-config.c | Hook "config".
|
||||
| hook-connect.c | Hook "connect".
|
||||
| hook-fd.c | Hook "fd".
|
||||
| hook-focus.c | Hook "focus".
|
||||
| hook-hdata.c | Hook "hdata".
|
||||
| hook-hsignal.c | Hook "hsignal".
|
||||
| hook-info-hashtable.c | Hook "info_hashtable".
|
||||
| hook-info.c | Hook "info".
|
||||
| hook-infolist.c | Hook "infolist".
|
||||
| hook-line.c | Hook "line".
|
||||
| hook-modifier.c | Hook "modifier".
|
||||
| hook-print.c | Hook "print".
|
||||
| hook-process.c | Hook "process".
|
||||
| hook-signal.c | Hook "signal".
|
||||
| hook-timer.c | Hook "timer".
|
||||
| hook-url.c | Hook "url".
|
||||
| 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]]
|
||||
@@ -210,180 +210,189 @@ WeeChat "core" is located in following directories:
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Path/file | Description
|
||||
| plugins/ | Root of plugins.
|
||||
| plugin.c | Plugins management (load/unload dynamic C libraries).
|
||||
| plugin-api.c | Extra functions for plugin API (wrapper around WeeChat core functions).
|
||||
| plugin-api-info.c | Extra info/infolist functions for plugin API.
|
||||
| plugin-config.c | Plugin configuration options (file plugins.conf).
|
||||
| plugin-script.c | Common functions used by script plugins.
|
||||
| plugin-script-api.c | Script API functions: wrappers around some plugin API functions.
|
||||
| plugin-script-config.c | Script plugin configuration options (files python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | Header designed to be distributed with WeeChat plugins, in order to compile them.
|
||||
| alias/ | Alias plugin.
|
||||
| alias.c | Main alias functions.
|
||||
| alias-command.c | Alias commands.
|
||||
| alias-completion.c | Alias completions.
|
||||
| alias-config.c | Alias config options (file alias.conf).
|
||||
| alias-info.c | Alias info/infolists/hdata.
|
||||
| spell/ | Spell checker plugin.
|
||||
| spell.c | Main spell checker functions.
|
||||
| spell-bar-item.c | Spell checker bar items.
|
||||
| spell-command.c | Spell checker commands.
|
||||
| spell-completion.c | Spell checker completions.
|
||||
| spell-config.c | Spell checker config options (file spell.conf).
|
||||
| spell-info.c | Spell checker info/infolists/hdata.
|
||||
| spell-speller.c | Spellers management.
|
||||
| buflist/ | Buflist plugin.
|
||||
| buflist.c | Main buflist functions.
|
||||
| buflist-bar-item.c | Buflist bar items.
|
||||
| buflist-command.c | Buflist commands.
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | Buflist config options (file buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist mouse actions.
|
||||
| charset/ | Charset plugin.
|
||||
| charset.c | Charset functions.
|
||||
| exec/ | Exec plugin.
|
||||
| exec.c | Main exec functions.
|
||||
| exec-buffer.c | Exec buffer.
|
||||
| exec-command.c | Exec commands.
|
||||
| exec-completion.c | Exec completions.
|
||||
| exec-config.c | Exec config options (file exec.conf).
|
||||
| fifo/ | Fifo plugin.
|
||||
| fifo.c | Main fifo functions.
|
||||
| fifo-command.c | Fifo commands.
|
||||
| fifo-config.c | Fifo config options (file fifo.conf).
|
||||
| fifo-info.c | Fifo info/infolists/hdata.
|
||||
| fset/ | Fset plugin.
|
||||
| fset.c | Main fset functions.
|
||||
| fset-bar-item.c | Fset bar items.
|
||||
| fset-buffer.c | Fset buffer.
|
||||
| fset-command.c | Fset commands.
|
||||
| fset-completion.c | Fset completions.
|
||||
| fset-config.c | Fset config options (file fset.conf).
|
||||
| fset-info.c | Fset info/infolists/hdata.
|
||||
| fset-mouse.c | Fset mouse actions.
|
||||
| fset-option.c | Fset options management.
|
||||
| guile/ | Guile (scheme) plugin.
|
||||
| weechat-guile.c | Main guile functions (load/unload scripts, execute guile code).
|
||||
| weechat-guile-api.c | Guile scripting API functions.
|
||||
| irc/ | IRC (Internet Relay Chat) plugin.
|
||||
| irc.c | Main IRC functions.
|
||||
| irc-bar-item.c | IRC bar items.
|
||||
| irc-batch.c | IRC batched events.
|
||||
| irc-buffer.c | IRC buffers.
|
||||
| irc-channel.c | IRC channels.
|
||||
| irc-color.c | IRC colors.
|
||||
| irc-command.c | IRC commands.
|
||||
| irc-completion.c | IRC completions.
|
||||
| irc-config.c | IRC config options (file irc.conf).
|
||||
| irc-ctcp.c | IRC CTCP.
|
||||
| irc-debug.c | IRC debug functions.
|
||||
| irc-ignore.c | IRC Ignore.
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Input of commands/text.
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | Functions to manipulate IRC messages.
|
||||
| irc-mode.c | Functions about channel/nick modes.
|
||||
| irc-modelist.c | IRC channel mode lists (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Target buffer for IRC messages.
|
||||
| irc-nick.c | IRC nicks.
|
||||
| irc-notify.c | IRC notify lists.
|
||||
| irc-protocol.c | IRC protocol (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | IRC raw buffer.
|
||||
| irc-redirect.c | Redirection of IRC command output.
|
||||
| irc-sasl.c | SASL authentication with IRC server.
|
||||
| irc-server.c | I/O communication with IRC server.
|
||||
| irc-tag.c | Functions to manipulate IRC message tags.
|
||||
| irc-typing.c | Typing status.
|
||||
| irc-upgrade.c | Save/restore of IRC data when upgrading WeeChat.
|
||||
| javascript/ | JavaScript plugin.
|
||||
| weechat-js.cpp | Main JavaScript functions (load/unload scripts, execute JavaScript code).
|
||||
| weechat-js-api.cpp | JavaScript scripting API functions.
|
||||
| weechat-js-v8.cpp | JavaScript v8 functions.
|
||||
| logger/ | Logger plugin.
|
||||
| logger.c | Main logger functions.
|
||||
| logger-backlog.c | Logger backlog 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.
|
||||
| lua/ | Lua plugin.
|
||||
| weechat-lua.c | Main lua functions (load/unload scripts, execute lua code).
|
||||
| weechat-lua-api.c | Lua scripting API functions.
|
||||
| perl/ | Perl plugin.
|
||||
| weechat-perl.c | Main perl functions (load/unload scripts, execute perl code).
|
||||
| weechat-perl-api.c | Perl scripting API functions.
|
||||
| php/ | PHP plugin.
|
||||
| weechat-php.c | Main PHP functions (load/unload scripts, execute PHP code).
|
||||
| weechat-php-api.c | PHP scripting API functions.
|
||||
| python/ | Python plugin.
|
||||
| weechat-python.c | Main python functions (load/unload scripts, execute python code).
|
||||
| weechat-python-api.c | Python scripting API functions.
|
||||
| relay/ | Relay plugin (IRC proxy and relay for remote interfaces).
|
||||
| relay.c | Main relay functions.
|
||||
| relay-auth.c | Clients authentication.
|
||||
| relay-buffer.c | Relay buffer.
|
||||
| relay-client.c | Clients of relay.
|
||||
| relay-command.c | Relay commands.
|
||||
| relay-completion.c | Relay completions.
|
||||
| relay-config.c | Relay config options (file relay.conf).
|
||||
| relay-info.c | Relay info/infolists/hdata.
|
||||
| relay-network.c | Network functions for relay.
|
||||
| relay-raw.c | Relay raw buffer.
|
||||
| relay-server.c | Relay server.
|
||||
| relay-upgrade.c | Save/restore of relay data when upgrading WeeChat.
|
||||
| relay-websocket.c | WebSocket server functions (RFC 6455).
|
||||
| irc/ | IRC proxy.
|
||||
| relay-irc.c | Main IRC proxy functions.
|
||||
| weechat/ | Relay for remote interfaces.
|
||||
| relay-weechat.c | Relay for remote interfaces (main functions).
|
||||
| relay-weechat-msg.c | Send binary messages to clients.
|
||||
| relay-weechat-nicklist.c | Nicklist functions.
|
||||
| relay-weechat-protocol.c | Read commands from clients.
|
||||
| ruby/ | Ruby plugin.
|
||||
| weechat-ruby.c | Main ruby functions (load/unload scripts, execute ruby code).
|
||||
| weechat-ruby-api.c | Ruby scripting API functions.
|
||||
| script/ | Script manager.
|
||||
| script.c | Main functions for script manager.
|
||||
| script-action.c | Actions on scripts (load/unload, install/remove, ...).
|
||||
| script-buffer.c | Buffer for script manager.
|
||||
| script-command.c | Commands for script manager.
|
||||
| script-completion.c | Completions for script manager.
|
||||
| script-config.c | Config options for script manager (file script.conf).
|
||||
| script-info.c | Script manager info/infolists/hdata.
|
||||
| script-mouse.c | Script mouse actions.
|
||||
| script-repo.c | Download and read repository file.
|
||||
| tcl/ | Tcl plugin.
|
||||
| weechat-tcl.c | Main tcl functions (load/unload scripts, execute tcl code).
|
||||
| weechat-tcl-api.c | Tcl scripting API functions.
|
||||
| trigger/ | Trigger plugin.
|
||||
| trigger.c | Main trigger functions.
|
||||
| trigger-buffer.c | Trigger buffer.
|
||||
| trigger-callback.c | Trigger callbacks.
|
||||
| trigger-command.c | Trigger commands.
|
||||
| trigger-completion.c | Trigger completions.
|
||||
| trigger-config.c | Trigger config options (file trigger.conf).
|
||||
| typing/ | Typing plugin.
|
||||
| typing.c | Main typing functions.
|
||||
| typing-bar-item.c | Typing bar items.
|
||||
| typing-config.c | Typing config options (file typing.conf).
|
||||
| typing-status.c | Messages typing status on buffers.
|
||||
| xfer/ | Xfer plugin (IRC DCC file/chat).
|
||||
| xfer.c | Main xfer functions.
|
||||
| xfer-buffer.c | Xfer buffer.
|
||||
| xfer-chat.c | DCC chat.
|
||||
| xfer-command.c | Xfer commands.
|
||||
| xfer-completion.c | Xfer completions.
|
||||
| xfer-config.c | Xfer config options (file xfer.conf).
|
||||
| xfer-dcc.c | DCC file transfer.
|
||||
| xfer-file.c | File functions for xfer.
|
||||
| xfer-info.c | Xfer info/infolists/hdata.
|
||||
| xfer-network.c | Network functions for xfer.
|
||||
| xfer-upgrade.c | Save/restore of xfer data when upgrading WeeChat.
|
||||
| Path/file | Description
|
||||
| plugins/ | Root of plugins.
|
||||
| plugin.c | Plugins management (load/unload dynamic C libraries).
|
||||
| plugin-api.c | Extra functions for plugin API (wrapper around WeeChat core functions).
|
||||
| plugin-api-info.c | Extra info/infolist functions for plugin API.
|
||||
| plugin-config.c | Plugin configuration options (file plugins.conf).
|
||||
| plugin-script.c | Common functions used by script plugins.
|
||||
| plugin-script-api.c | Script API functions: wrappers around some plugin API functions.
|
||||
| plugin-script-config.c | Script plugin configuration options (files python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | Header designed to be distributed with WeeChat plugins, in order to compile them.
|
||||
| alias/ | Alias plugin.
|
||||
| alias.c | Main alias functions.
|
||||
| alias-command.c | Alias commands.
|
||||
| alias-completion.c | Alias completions.
|
||||
| alias-config.c | Alias config options (file alias.conf).
|
||||
| alias-info.c | Alias info/infolists/hdata.
|
||||
| spell/ | Spell checker plugin.
|
||||
| spell.c | Main spell checker functions.
|
||||
| spell-bar-item.c | Spell checker bar items.
|
||||
| spell-command.c | Spell checker commands.
|
||||
| spell-completion.c | Spell checker completions.
|
||||
| spell-config.c | Spell checker config options (file spell.conf).
|
||||
| spell-info.c | Spell checker info/infolists/hdata.
|
||||
| spell-speller.c | Spellers management.
|
||||
| buflist/ | Buflist plugin.
|
||||
| buflist.c | Main buflist functions.
|
||||
| buflist-bar-item.c | Buflist bar items.
|
||||
| buflist-command.c | Buflist commands.
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | Buflist config options (file buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist mouse actions.
|
||||
| charset/ | Charset plugin.
|
||||
| charset.c | Charset functions.
|
||||
| exec/ | Exec plugin.
|
||||
| exec.c | Main exec functions.
|
||||
| exec-buffer.c | Exec buffer.
|
||||
| exec-command.c | Exec commands.
|
||||
| exec-completion.c | Exec completions.
|
||||
| exec-config.c | Exec config options (file exec.conf).
|
||||
| fifo/ | Fifo plugin.
|
||||
| fifo.c | Main fifo functions.
|
||||
| fifo-command.c | Fifo commands.
|
||||
| fifo-config.c | Fifo config options (file fifo.conf).
|
||||
| fifo-info.c | Fifo info/infolists/hdata.
|
||||
| fset/ | Fset plugin.
|
||||
| fset.c | Main fset functions.
|
||||
| fset-bar-item.c | Fset bar items.
|
||||
| fset-buffer.c | Fset buffer.
|
||||
| fset-command.c | Fset commands.
|
||||
| fset-completion.c | Fset completions.
|
||||
| fset-config.c | Fset config options (file fset.conf).
|
||||
| fset-info.c | Fset info/infolists/hdata.
|
||||
| fset-mouse.c | Fset mouse actions.
|
||||
| fset-option.c | Fset options management.
|
||||
| guile/ | Guile (scheme) plugin.
|
||||
| weechat-guile.c | Main guile functions (load/unload scripts, execute guile code).
|
||||
| weechat-guile-api.c | Guile scripting API functions.
|
||||
| irc/ | IRC (Internet Relay Chat) plugin.
|
||||
| irc.c | Main IRC functions.
|
||||
| irc-bar-item.c | IRC bar items.
|
||||
| irc-batch.c | IRC batched events.
|
||||
| irc-buffer.c | IRC buffers.
|
||||
| irc-channel.c | IRC channels.
|
||||
| irc-color.c | IRC colors.
|
||||
| irc-command.c | IRC commands.
|
||||
| irc-completion.c | IRC completions.
|
||||
| irc-config.c | IRC config options (file irc.conf).
|
||||
| irc-ctcp.c | IRC CTCP.
|
||||
| irc-debug.c | IRC debug functions.
|
||||
| irc-ignore.c | IRC Ignore.
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Input of commands/text.
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | Functions to manipulate IRC messages.
|
||||
| irc-mode.c | Functions about channel/nick modes.
|
||||
| irc-modelist.c | IRC channel mode lists (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Target buffer for IRC messages.
|
||||
| irc-nick.c | IRC nicks.
|
||||
| irc-notify.c | IRC notify lists.
|
||||
| irc-protocol.c | IRC protocol (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | IRC raw buffer.
|
||||
| irc-redirect.c | Redirection of IRC command output.
|
||||
| irc-sasl.c | SASL authentication with IRC server.
|
||||
| irc-server.c | I/O communication with IRC server.
|
||||
| irc-tag.c | Functions to manipulate IRC message tags.
|
||||
| irc-typing.c | Typing status.
|
||||
| irc-upgrade.c | Save/restore of IRC data when upgrading WeeChat.
|
||||
| javascript/ | JavaScript plugin.
|
||||
| weechat-js.cpp | Main JavaScript functions (load/unload scripts, execute JavaScript code).
|
||||
| weechat-js-api.cpp | JavaScript scripting API functions.
|
||||
| weechat-js-v8.cpp | JavaScript v8 functions.
|
||||
| logger/ | Logger plugin.
|
||||
| logger.c | Main logger functions.
|
||||
| logger-backlog.c | Logger backlog 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.
|
||||
| lua/ | Lua plugin.
|
||||
| weechat-lua.c | Main lua functions (load/unload scripts, execute lua code).
|
||||
| weechat-lua-api.c | Lua scripting API functions.
|
||||
| perl/ | Perl plugin.
|
||||
| weechat-perl.c | Main perl functions (load/unload scripts, execute perl code).
|
||||
| weechat-perl-api.c | Perl scripting API functions.
|
||||
| php/ | PHP plugin.
|
||||
| weechat-php.c | Main PHP functions (load/unload scripts, execute PHP code).
|
||||
| weechat-php-api.c | PHP scripting API functions.
|
||||
| python/ | Python plugin.
|
||||
| weechat-python.c | Main python functions (load/unload scripts, execute python code).
|
||||
| weechat-python-api.c | Python scripting API functions.
|
||||
| relay/ | Relay plugin (IRC proxy and relay for remote interfaces).
|
||||
| relay.c | Main relay functions.
|
||||
| relay-auth.c | Clients authentication.
|
||||
| relay-buffer.c | Relay buffer.
|
||||
| relay-client.c | Clients of relay.
|
||||
| relay-command.c | Relay commands.
|
||||
| relay-completion.c | Relay completions.
|
||||
| relay-config.c | Relay config options (file relay.conf).
|
||||
| relay-http.c | HTTP functions.
|
||||
| relay-info.c | Relay info/infolists/hdata.
|
||||
| relay-network.c | Network functions for relay.
|
||||
| relay-raw.c | Relay raw buffer.
|
||||
| relay-remote.c | Relay remote.
|
||||
| relay-server.c | Relay server.
|
||||
| relay-upgrade.c | Save/restore of relay data when upgrading WeeChat.
|
||||
| relay-websocket.c | WebSocket server functions (RFC 6455).
|
||||
| api/ | Relay for remote interfaces (using HTTP REST API).
|
||||
| relay-api.c | Main API functions for HTTP REST API.
|
||||
| relay-api-msg.c | Send JSON messages to clients.
|
||||
| relay-api-protocol.c | HTTP REST API protocol.
|
||||
| remote/ | Relay remote functions, specific to API.
|
||||
| relay-remote-event.c | Process events received from relay remote.
|
||||
| relay-remote-network.c | Network functions for relay remote.
|
||||
| irc/ | IRC proxy.
|
||||
| relay-irc.c | Main IRC proxy functions.
|
||||
| weechat/ | Relay for remote interfaces (using "weechat" binary protocol).
|
||||
| relay-weechat.c | Relay for remote interfaces (main functions).
|
||||
| relay-weechat-msg.c | Send binary messages to clients.
|
||||
| relay-weechat-nicklist.c | Nicklist functions.
|
||||
| relay-weechat-protocol.c | Read commands from clients.
|
||||
| ruby/ | Ruby plugin.
|
||||
| weechat-ruby.c | Main ruby functions (load/unload scripts, execute ruby code).
|
||||
| weechat-ruby-api.c | Ruby scripting API functions.
|
||||
| script/ | Script manager.
|
||||
| script.c | Main functions for script manager.
|
||||
| script-action.c | Actions on scripts (load/unload, install/remove, ...).
|
||||
| script-buffer.c | Buffer for script manager.
|
||||
| script-command.c | Commands for script manager.
|
||||
| script-completion.c | Completions for script manager.
|
||||
| script-config.c | Config options for script manager (file script.conf).
|
||||
| script-info.c | Script manager info/infolists/hdata.
|
||||
| script-mouse.c | Script mouse actions.
|
||||
| script-repo.c | Download and read repository file.
|
||||
| tcl/ | Tcl plugin.
|
||||
| weechat-tcl.c | Main tcl functions (load/unload scripts, execute tcl code).
|
||||
| weechat-tcl-api.c | Tcl scripting API functions.
|
||||
| trigger/ | Trigger plugin.
|
||||
| trigger.c | Main trigger functions.
|
||||
| trigger-buffer.c | Trigger buffer.
|
||||
| trigger-callback.c | Trigger callbacks.
|
||||
| trigger-command.c | Trigger commands.
|
||||
| trigger-completion.c | Trigger completions.
|
||||
| trigger-config.c | Trigger config options (file trigger.conf).
|
||||
| typing/ | Typing plugin.
|
||||
| typing.c | Main typing functions.
|
||||
| typing-bar-item.c | Typing bar items.
|
||||
| typing-config.c | Typing config options (file typing.conf).
|
||||
| typing-status.c | Messages typing status on buffers.
|
||||
| xfer/ | Xfer plugin (IRC DCC file/chat).
|
||||
| xfer.c | Main xfer functions.
|
||||
| xfer-buffer.c | Xfer buffer.
|
||||
| xfer-chat.c | DCC chat.
|
||||
| xfer-command.c | Xfer commands.
|
||||
| xfer-completion.c | Xfer completions.
|
||||
| xfer-config.c | Xfer config options (file xfer.conf).
|
||||
| xfer-dcc.c | DCC file transfer.
|
||||
| xfer-file.c | File functions for xfer.
|
||||
| xfer-info.c | Xfer info/infolists/hdata.
|
||||
| xfer-network.c | Network functions for xfer.
|
||||
| xfer-upgrade.c | Save/restore of xfer data when upgrading WeeChat.
|
||||
|===
|
||||
|
||||
[[sources_tests]]
|
||||
@@ -391,89 +400,119 @@ WeeChat "core" is located in following directories:
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Path/file | Description
|
||||
| tests/ | Root of tests.
|
||||
| tests.cpp | Program used to run all tests.
|
||||
| tests-record.cpp | Record and search in messages displayed.
|
||||
| scripts/ | Root of scripting API tests.
|
||||
| test-scripts.cpp | Program used to run the scripting API tests.
|
||||
| python/ | Python scripts to generate and run the scripting API tests.
|
||||
| testapigen.py | Python script generating scripts in all languages to test the scripting API.
|
||||
| testapi.py | Python script with scripting API tests, used by script testapigen.py.
|
||||
| unparse.py | Convert Python code to other languages, used by script testapigen.py.
|
||||
| unit/ | Root of unit tests.
|
||||
| test-plugins.cpp | Tests: plugins.
|
||||
| test-plugin-api-info.cpp | Tests: plugin API info functions.
|
||||
| test-plugin-config.cpp | Tests: plugin config functions.
|
||||
| core/ | Root of unit tests for core.
|
||||
| test-core-arraylist.cpp | Tests: arraylists.
|
||||
| test-core-calc.cpp | Tests: calculation of expressions.
|
||||
| test-core-command.cpp | Tests: commands.
|
||||
| test-core-config-file.cpp | Tests: configuration files.
|
||||
| test-core-crypto.cpp | Tests: cryptographic functions.
|
||||
| test-core-dir.cpp | Tests: directory/file functions.
|
||||
| test-core-eval.cpp | Tests: evaluation of expressions.
|
||||
| test-core-hashtble.cpp | Tests: hashtables.
|
||||
| test-core-hdata.cpp | Tests: hdata.
|
||||
| test-core-hook.cpp | Tests: hooks.
|
||||
| test-core-infolist.cpp | Tests: infolists.
|
||||
| test-core-list.cpp | Tests: lists.
|
||||
| test-core-network.cpp | Tests: network functions.
|
||||
| test-core-secure.cpp | Tests: secured data.
|
||||
| test-core-signal.cpp | Tests: signals.
|
||||
| test-core-string.cpp | Tests: strings.
|
||||
| test-core-url.cpp | Tests: URLs.
|
||||
| test-core-utf8.cpp | Tests: UTF-8.
|
||||
| test-core-util.cpp | Tests: utility functions.
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
| hook/ | Root of unit tests for hooks.
|
||||
| test-hook-command.cpp | Tests: hooks "command".
|
||||
| gui/ | Root of unit tests for interfaces.
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
| test-gui-buffer.cpp | Tests: buffer functions.
|
||||
| test-gui-chat.cpp | Tests: chat functions.
|
||||
| test-gui-color.cpp | Tests: colors.
|
||||
| test-gui-filter.cpp | Tests: filters.
|
||||
| test-gui-input.cpp | Tests: input functions.
|
||||
| test-gui-key.cpp | Tests: keys.
|
||||
| test-gui-line.cpp | Tests: lines.
|
||||
| test-gui-nick.cpp | Tests: nicks.
|
||||
| plugins/ | Root of unit tests for plugins.
|
||||
| irc/ | Root of unit tests for IRC plugin.
|
||||
| test-irc-batch.cpp | Tests: IRC batched events.
|
||||
| test-irc-buffer.cpp | Tests: IRC buffers.
|
||||
| test-irc-channel.cpp | Tests: IRC channels.
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
| test-irc-config.cpp | Tests: IRC configuration.
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
| test-irc-info.cpp | Tests: IRC info.
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
| test-irc-nick.cpp | Tests: IRC nicks.
|
||||
| test-irc-protocol.cpp | Tests: IRC protocol.
|
||||
| test-irc-sasl.cpp | Tests: SASL authentication with IRC protocol.
|
||||
| test-irc-server.cpp | Tests: IRC server.
|
||||
| test-irc-tag.cpp | Tests: IRC message tags.
|
||||
| logger/ | Root of unit tests for logger plugin.
|
||||
| test-logger.cpp | Tests: logger.
|
||||
| test-logger-backlog.cpp | Tests: logger backlog.
|
||||
| test-logger-tail.cpp | Tests: logger tail functions.
|
||||
| trigger/ | Root of unit tests for trigger plugin.
|
||||
| test-trigger.cpp | Tests: triggers.
|
||||
| test-trigger-config.cpp | Tests: trigger configuration.
|
||||
| typing/ | Root of unit tests for typing plugin.
|
||||
| test-typing.cpp | Tests: typing.
|
||||
| test-typing-status.cpp | Tests: typing status.
|
||||
| relay/ | Root of unit tests for Relay plugin.
|
||||
| test-relay-auth.cpp | Tests: clients authentication.
|
||||
| irc/ | Root of unit tests for Relay "irc" protocol.
|
||||
| test-relay-irc.cpp | Tests: Relay "irc" protocol.
|
||||
| xfer/ | Root of unit tests for Xfer plugin.
|
||||
| test-xfer-file.cpp | Tests: file functions.
|
||||
| test-xfer-network.cpp | Tests: network functions.
|
||||
| Path/file | Description
|
||||
| tests/ | Root of tests.
|
||||
| tests.cpp | Program used to run all tests.
|
||||
| tests-record.cpp | Record and search in messages displayed.
|
||||
| scripts/ | Root of scripting API tests.
|
||||
| test-scripts.cpp | Program used to run the scripting API tests.
|
||||
| python/ | Python scripts to generate and run the scripting API tests.
|
||||
| testapigen.py | Python script generating scripts in all languages to test the scripting API.
|
||||
| testapi.py | Python script with scripting API tests, used by script testapigen.py.
|
||||
| unparse.py | Convert Python code to other languages, used by script testapigen.py.
|
||||
| unit/ | Root of unit tests.
|
||||
| test-plugins.cpp | Tests: plugins.
|
||||
| test-plugin-api-info.cpp | Tests: plugin API info functions.
|
||||
| test-plugin-config.cpp | Tests: plugin config functions.
|
||||
| core/ | Root of unit tests for core.
|
||||
| test-core-arraylist.cpp | Tests: arraylists.
|
||||
| test-core-calc.cpp | Tests: calculation of expressions.
|
||||
| test-core-command.cpp | Tests: commands.
|
||||
| test-core-config-file.cpp | Tests: configuration files.
|
||||
| test-core-crypto.cpp | Tests: cryptographic functions.
|
||||
| test-core-dir.cpp | Tests: directory/file functions.
|
||||
| test-core-eval.cpp | Tests: evaluation of expressions.
|
||||
| test-core-hashtble.cpp | Tests: hashtables.
|
||||
| test-core-hdata.cpp | Tests: hdata.
|
||||
| test-core-hook.cpp | Tests: hooks.
|
||||
| test-core-infolist.cpp | Tests: infolists.
|
||||
| test-core-list.cpp | Tests: lists.
|
||||
| test-core-network.cpp | Tests: network functions.
|
||||
| test-core-secure.cpp | Tests: secured data.
|
||||
| test-core-signal.cpp | Tests: signals.
|
||||
| test-core-string.cpp | Tests: strings.
|
||||
| test-core-url.cpp | Tests: URLs.
|
||||
| test-core-utf8.cpp | Tests: UTF-8.
|
||||
| test-core-util.cpp | Tests: utility functions.
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
| hook/ | Root of unit tests for hooks.
|
||||
| test-hook-command.cpp | Tests: hooks "command".
|
||||
| test-hook-command-run.cpp | Tests: hooks "command_run".
|
||||
| test-hook-completion.cpp | Tests: hooks "completion".
|
||||
| test-hook-config.cpp | Tests: hooks "config".
|
||||
| test-hook-connect.cpp | Tests: hooks "connect".
|
||||
| test-hook-fd.cpp | Tests: hooks "fd".
|
||||
| test-hook-focus.cpp | Tests: hooks "focus".
|
||||
| test-hook-hdata.cpp | Tests: hooks "hdata".
|
||||
| test-hook-hsignal.cpp | Tests: hooks "hsignal".
|
||||
| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable".
|
||||
| test-hook-info.cpp | Tests: hooks "info".
|
||||
| test-hook-infolist.cpp | Tests: hooks "infolist".
|
||||
| test-hook-line.cpp | Tests: hooks "line".
|
||||
| test-hook-modifier.cpp | Tests: hooks "modifier".
|
||||
| test-hook-print.cpp | Tests: hooks "print".
|
||||
| test-hook-process.cpp | Tests: hooks "process".
|
||||
| test-hook-signal.cpp | Tests: hooks "signal".
|
||||
| test-hook-timer.cpp | Tests: hooks "timer".
|
||||
| test-hook-url.cpp | Tests: hooks "url".
|
||||
| gui/ | Root of unit tests for interfaces.
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
| test-gui-buffer.cpp | Tests: buffer functions.
|
||||
| test-gui-chat.cpp | Tests: chat functions.
|
||||
| test-gui-color.cpp | Tests: colors.
|
||||
| test-gui-filter.cpp | Tests: filters.
|
||||
| test-gui-hotlist.cpp | Tests: hotlist functions.
|
||||
| test-gui-input.cpp | Tests: input functions.
|
||||
| test-gui-key.cpp | Tests: keys.
|
||||
| test-gui-line.cpp | Tests: lines.
|
||||
| test-gui-nick.cpp | Tests: nicks.
|
||||
| test-gui-nicklist.cpp | Tests: nicklist functions.
|
||||
| curses/ | Root of unit tests for Curses interface.
|
||||
| test-gui-curses-mouse.cpp | Tests: mouse (Curses interface).
|
||||
| plugins/ | Root of unit tests for plugins.
|
||||
| irc/ | Root of unit tests for IRC plugin.
|
||||
| test-irc-batch.cpp | Tests: IRC batched events.
|
||||
| test-irc-buffer.cpp | Tests: IRC buffers.
|
||||
| test-irc-channel.cpp | Tests: IRC channels.
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
| test-irc-command.cpp | Tests: IRC commands.
|
||||
| test-irc-config.cpp | Tests: IRC configuration.
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
| test-irc-info.cpp | Tests: IRC info.
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
| test-irc-nick.cpp | Tests: IRC nicks.
|
||||
| test-irc-protocol.cpp | Tests: IRC protocol.
|
||||
| test-irc-sasl.cpp | Tests: SASL authentication with IRC protocol.
|
||||
| test-irc-server.cpp | Tests: IRC server.
|
||||
| test-irc-tag.cpp | Tests: IRC message tags.
|
||||
| logger/ | Root of unit tests for logger plugin.
|
||||
| test-logger.cpp | Tests: logger.
|
||||
| test-logger-backlog.cpp | Tests: logger backlog.
|
||||
| test-logger-tail.cpp | Tests: logger tail functions.
|
||||
| trigger/ | Root of unit tests for trigger plugin.
|
||||
| test-trigger.cpp | Tests: triggers.
|
||||
| test-trigger-config.cpp | Tests: trigger configuration.
|
||||
| typing/ | Root of unit tests for typing plugin.
|
||||
| test-typing.cpp | Tests: typing.
|
||||
| test-typing-status.cpp | Tests: typing status.
|
||||
| relay/ | Root of unit tests for Relay plugin.
|
||||
| test-relay-auth.cpp | Tests: clients authentication.
|
||||
| test-relay-http.cpp | Tests: HTTP functions for Relay plugin.
|
||||
| test-relay-remote.cpp | Tests: remote functions for Relay plugin.
|
||||
| test-relay-websocket.cpp | Tests: websocket functions for Relay plugin.
|
||||
| api/ | Root of unit tests for Relay "api" protocol.
|
||||
| test-relay-api.cpp | Tests: Relay "api" protocol: general functions.
|
||||
| test-relay-api-msg.cpp | Tests: Relay "api" protocol: messages.
|
||||
| test-relay-api-protocol.cpp | Tests: Relay "api" protocol: protocol.
|
||||
| irc/ | Root of unit tests for Relay "irc" protocol.
|
||||
| test-relay-irc.cpp | Tests: Relay "irc" protocol.
|
||||
| xfer/ | Root of unit tests for Xfer plugin.
|
||||
| test-xfer-file.cpp | Tests: file functions.
|
||||
| test-xfer-network.cpp | Tests: network functions.
|
||||
|===
|
||||
|
||||
[[documentation_translations]]
|
||||
@@ -557,9 +596,8 @@ Example in C:
|
||||
|
||||
Some basic rules you *must* follow when you write C code:
|
||||
|
||||
* Use 4 spaces for indentation. Don't use tabs, they are evil.
|
||||
* Try to not exceed 80 chars by line, except if this is needed to increase
|
||||
readability.
|
||||
* Use 4 spaces for indentation (no tabs).
|
||||
* Try to not exceed 80 chars by line, except if this is needed to increase readability.
|
||||
* Use comments `+/* comment */+` (not C99-style comments like `+// comment+`).
|
||||
* Add a comment before any function, to explain what it does (always use a
|
||||
multi-line comment, even if description is very short).
|
||||
@@ -771,7 +809,7 @@ Examples:
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Directory | Files
|
||||
| src/core/ | weechat.c, wee-backtrace.c, wee-command.c, ...
|
||||
| src/core/ | weechat.c, core-backtrace.c, core-command.c, ...
|
||||
| src/gui/ | gui-bar.c, gui-bar-item.c, gui-bar-window.c, ...
|
||||
| src/gui/curses/ | gui-curses-bar.c, gui-curses-bar-window.c, gui-curses-chat.c, ...
|
||||
| src/plugins/ | plugin.c, plugin-api.c, plugin-api-info.c, plugin-config.c, plugin-script.c, ...
|
||||
@@ -779,8 +817,8 @@ Examples:
|
||||
| src/plugins/python/ | weechat-python.c, weechat-python-api.c, ...
|
||||
|===
|
||||
|
||||
The headers of C files have same name as file, for example _wee-command.h_ for
|
||||
file _wee-command.c_.
|
||||
The headers of C files have same name as file, for example _core-command.h_ for
|
||||
file _core-command.c_.
|
||||
|
||||
[[naming_convention_structures]]
|
||||
==== Structures
|
||||
|
||||
@@ -537,6 +537,55 @@ num_files = 2
|
||||
str = weechat.ngettext("file", "files", num_files)
|
||||
----
|
||||
|
||||
==== asprintf
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Format a message in a string allocated by the function.
|
||||
|
||||
[NOTE]
|
||||
This function is defined for systems where the GNU function `asprintf()`
|
||||
is not available. +
|
||||
The behavior is almost the same except that `*result` is set to NULL on error.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_asprintf (char **result, const char *fmt, ...);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _result_: pointer to a string pointer
|
||||
* _fmt_: format string
|
||||
|
||||
Return value:
|
||||
|
||||
* number of bytes written in `*result` (excluding the final null byte),
|
||||
a negative value in case of error.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
char *str;
|
||||
|
||||
if (weechat_asprintf (&str, "%s, %d", "test", 42) >= 0)
|
||||
{
|
||||
/* *str == "test, 42" */
|
||||
/* ... */
|
||||
free (str);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* error: *str == NULL */
|
||||
}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
This function is not available in scripting API.
|
||||
|
||||
==== strndup
|
||||
|
||||
Return duplicated string, with a max number of bytes.
|
||||
@@ -2308,22 +2357,23 @@ size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7
|
||||
|
||||
==== string_remove_color
|
||||
|
||||
_Updated in 4.3.0._
|
||||
|
||||
Remove WeeChat colors from a string.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
char *weechat_string_remove_color (const char *string,
|
||||
const char *replacement);
|
||||
char *weechat_string_remove_color (const char *string, const char *replacement);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _string_: string
|
||||
* _replacement_: if not NULL and not empty, WeeChat color codes are replaced by
|
||||
first char of this string, otherwise WeeChat color codes and following chars
|
||||
(if related to color) are removed from string
|
||||
this string, otherwise WeeChat color codes and following chars (if related
|
||||
to color) are removed from string
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -2339,7 +2389,7 @@ char *str = weechat_string_remove_color (my_string1, NULL);
|
||||
free (str);
|
||||
|
||||
/* replace color codes by "?" */
|
||||
char *str = weechat_string_remove_color (my_string2, "?");
|
||||
char *str = weechat_string_remove_color (my_string2, "[color]");
|
||||
/* ... */
|
||||
free (str);
|
||||
----
|
||||
@@ -2352,12 +2402,12 @@ Script (Python):
|
||||
def string_remove_color(string: str, replacement: str) -> str: ...
|
||||
|
||||
# example
|
||||
str = weechat.string_remove_color(my_string, "?")
|
||||
str = weechat.string_remove_color(my_string, "[color]")
|
||||
----
|
||||
|
||||
==== string_base_encode
|
||||
|
||||
_WeeChat ≥ 2.4._
|
||||
_WeeChat ≥ 2.4, updated in 4.3.0._
|
||||
|
||||
Encode a string in base 16, 32, or 64.
|
||||
|
||||
@@ -2365,12 +2415,12 @@ Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_string_base_encode (int base, const char *from, int length, char *to);
|
||||
int weechat_string_base_encode (const char *base, const char *from, int length, char *to);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _base_: 16, 32, or 64
|
||||
* _base_: "16", "32", "64" or "64url"
|
||||
* _from_: string to encode
|
||||
* _length_: length of string to encode (for example `strlen(from)`)
|
||||
* _to_: pointer to string to store result (must be long enough, result is
|
||||
@@ -2386,11 +2436,11 @@ C example:
|
||||
----
|
||||
char *string = "abcdefgh", result[128];
|
||||
int length;
|
||||
length = weechat_string_base_encode (16, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("16", string, strlen (string), result);
|
||||
/* length == 16, result == "6162636465666768" */
|
||||
length = weechat_string_base_encode (32, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("32", string, strlen (string), result);
|
||||
/* length == 16, result == "MFRGGZDFMZTWQ===" */
|
||||
length = weechat_string_base_encode (64, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("64", string, strlen (string), result);
|
||||
/* length == 12, result == "YWJjZGVmZ2g=" */
|
||||
----
|
||||
|
||||
@@ -2399,7 +2449,7 @@ This function is not available in scripting API.
|
||||
|
||||
==== string_base_decode
|
||||
|
||||
_WeeChat ≥ 2.4._
|
||||
_WeeChat ≥ 2.4, updated in 4.3.0._
|
||||
|
||||
Decode a string encoded in base 16, 32, or 64.
|
||||
|
||||
@@ -2407,12 +2457,12 @@ Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_string_base_decode (int base, const char *from, char *to);
|
||||
int weechat_string_base_decode (const char *base, const char *from, char *to);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _base_: 16, 32, or 64
|
||||
* _base_: "16", "32", "64" or "64url"
|
||||
* _from_: string to decode
|
||||
* _to_: pointer to string to store result (must be long enough, result is
|
||||
shorter than initial string)
|
||||
@@ -2427,11 +2477,11 @@ C example:
|
||||
----
|
||||
char result[128];
|
||||
int length;
|
||||
length = weechat_string_base_decode (16, "6162636465666768", result);
|
||||
length = weechat_string_base_decode ("16", "6162636465666768", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
length = weechat_string_base_decode (32, "MFRGGZDFMZTWQ===", result);
|
||||
length = weechat_string_base_decode ("32", "MFRGGZDFMZTWQ===", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
length = weechat_string_base_decode (64, "YWJjZGVmZ2g=", result);
|
||||
length = weechat_string_base_decode ("64", "YWJjZGVmZ2g=", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
----
|
||||
|
||||
@@ -2567,7 +2617,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, updated in 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8, 2.0,
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0, 4.3.0._
|
||||
|
||||
Evaluate an expression and return result as a string.
|
||||
Special variables with format `+${variable}+` are expanded (see table below).
|
||||
@@ -2927,13 +2977,16 @@ expanded to last):
|
||||
|
||||
| `+${weechat_xxx_dir}+` | 3.2
|
||||
| A WeeChat directory: `+${weechat_config_dir}+`, `+${weechat_data_dir}+`,
|
||||
`+${weechat_cache_dir}+` or `+${weechat_runtime_dir}+`.
|
||||
`+${weechat_state_dir}+`, `+${weechat_cache_dir}+` or `+${weechat_runtime_dir}+`.
|
||||
| >> `+${weechat_config_dir}+` +
|
||||
== `+/home/user/.config/weechat+` +
|
||||
+
|
||||
>> `+${weechat_data_dir}+` +
|
||||
== `+/home/user/.local/share/weechat+` +
|
||||
+
|
||||
>> `+${weechat_state_dir}+` +
|
||||
== `+/home/user/.local/state/weechat+` +
|
||||
+
|
||||
>> `+${weechat_cache_dir}+` +
|
||||
== `+/home/user/.cache/weechat+` +
|
||||
+
|
||||
@@ -3144,7 +3197,7 @@ expanded to last):
|
||||
>> `+${re:2}+` +
|
||||
== `+test2+` +
|
||||
+
|
||||
>> `+${re:+}+` +
|
||||
>> `pass:[${re:+}]` +
|
||||
== `+test2+` +
|
||||
+
|
||||
>> `+${re:#}+` +
|
||||
@@ -3208,13 +3261,16 @@ expanded to last):
|
||||
|
||||
| `+${date}+` +
|
||||
`+${date:xxx}+` | 1.3
|
||||
| Current date/time, with custom format (see `man strftime`),
|
||||
| Current date/time, with custom format (see function <<_util_strftimeval,util_strftimeval>>),
|
||||
default format is `%F %T`.
|
||||
| >> `+${date}+` +
|
||||
== `+2015-06-30 19:02:45+` +
|
||||
+
|
||||
>> `+${date:%H:%M:%S}+` +
|
||||
== `+19:02:45+`
|
||||
== `+19:02:45+` +
|
||||
+
|
||||
>> `+${date:%!.%.3}+` +
|
||||
== `+1435683765.482+`
|
||||
|
||||
| `+${env:NAME}+` | 1.2
|
||||
| Value of the environment variable `NAME`.
|
||||
@@ -4290,6 +4346,7 @@ Arguments:
|
||||
strings to force a specific WeeChat directory (WeeChat ≥ 3.2):
|
||||
** `${weechat_config_dir}`
|
||||
** `${weechat_data_dir}` (default)
|
||||
** `${weechat_state_dir}`
|
||||
** `${weechat_cache_dir}`
|
||||
** `${weechat_runtime_dir}`
|
||||
* _mode_: mode for directory
|
||||
@@ -4698,10 +4755,10 @@ This function is not available in scripting API.
|
||||
|
||||
==== util_strftimeval
|
||||
|
||||
_WeeChat ≥ 4.2.0._
|
||||
_WeeChat ≥ 4.2.0, updated in 4.3.0._
|
||||
|
||||
Format date and time like function `strftime` in C library, using `struct timeval`
|
||||
as input, and supporting extra specifiers for microseconds.
|
||||
as input, and supporting extra specifiers.
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -4718,6 +4775,7 @@ Arguments:
|
||||
** `%.N` where `N` is between 1 and 6: zero-padded microseconds on N digits
|
||||
(for example `%.3` for milliseconds)
|
||||
** `%f`: alias of `%.6`
|
||||
** `%!`: timestamp as integer, in seconds (value of tv->tv_sec)
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -5257,7 +5315,7 @@ C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "user data of item: 0x%lx", weechat_list_user_data (item));
|
||||
weechat_printf (NULL, "user data of item: %p", weechat_list_user_data (item));
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -8013,6 +8071,49 @@ if weechat.config_boolean_default(option):
|
||||
# ...
|
||||
----
|
||||
|
||||
==== config_boolean_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited boolean value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_boolean_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value: see functions <<_config_boolean,config_boolean>> and
|
||||
<<_config_boolean_default,config_boolean_default>>.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.autoconnect");
|
||||
int autoconnect = weechat_config_boolean_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_boolean_inherited(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("irc.server.libera.autoconnect")
|
||||
autoconect = weechat.config_boolean_inherited(option)
|
||||
----
|
||||
|
||||
==== config_integer
|
||||
|
||||
Return integer value of option.
|
||||
@@ -8099,6 +8200,49 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_integer_default(option)
|
||||
----
|
||||
|
||||
==== config_integer_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited integer value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_integer_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value: see functions <<_config_integer,config_integer>> and
|
||||
<<_config_integer_default,config_integer_default>>.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.autojoin_delay");
|
||||
int delay = weechat_config_integer_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_integer_inherited(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("irc.server.libera.autojoin_delay")
|
||||
delay = weechat.config_integer_inherited(option)
|
||||
----
|
||||
|
||||
==== config_string
|
||||
|
||||
Return string value of option.
|
||||
@@ -8185,6 +8329,49 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_string_default(option)
|
||||
----
|
||||
|
||||
==== config_string_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited string value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
const char *weechat_config_string_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value: see functions <<_config_string,config_string>> and
|
||||
<<_config_string_default,config_string_default>>.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.msg_quit");
|
||||
const char *msg_quit = weechat_config_string_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_string_inherited(option: str) -> str: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("irc.server.libera.msg_quit")
|
||||
msg_quit = weechat.config_string_inherited(option)
|
||||
----
|
||||
|
||||
==== config_color
|
||||
|
||||
Return color value of option.
|
||||
@@ -8225,7 +8412,7 @@ def config_color(option: str) -> str: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color(option)
|
||||
color = weechat.config_color(option)
|
||||
----
|
||||
|
||||
==== config_color_default
|
||||
@@ -8268,7 +8455,50 @@ def config_color_default(option: str) -> str: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
color = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
==== config_color_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited color value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
const char *weechat_config_color_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value: see functions <<_config_color,config_color>> and
|
||||
<<_config_color_default,config_color_default>>.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
const char *color = weechat_config_color_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_color_inherited(option: str) -> str: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
color = weechat.config_color_inherited(option)
|
||||
----
|
||||
|
||||
==== config_enum
|
||||
@@ -8361,6 +8591,49 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_enum_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited enum value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _option_: option pointer
|
||||
|
||||
Return value: see functions <<_config_enum,config_enum>> and
|
||||
<<_config_enum_default,config_enum_default>>.
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.sasl_fail");
|
||||
int sasl_fail = weechat_config_enum_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_inherited(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
option = weechat.config_get("irc.server.libera.sasl_fail")
|
||||
sasl_fail = weechat.config_enum_inherited(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Write a line in a configuration file with option and its value (this function
|
||||
@@ -11873,6 +12146,10 @@ List of signals sent by WeeChat and plugins:
|
||||
| Pointer: buffer.
|
||||
| Title of buffer changed.
|
||||
|
||||
| weechat | [[hook_signal_buffer_modes_changed]] buffer_modes_changed | 4.3.0
|
||||
| Pointer: buffer.
|
||||
| Modes of buffer changed.
|
||||
|
||||
| weechat | [[hook_signal_buffer_type_changed]] buffer_type_changed |
|
||||
| Pointer: buffer.
|
||||
| Type of buffer changed.
|
||||
@@ -11947,6 +12224,10 @@ List of signals sent by WeeChat and plugins:
|
||||
| Pointer: buffer.
|
||||
| Text search in buffer.
|
||||
|
||||
| weechat | [[hook_signal_input_prompt_changed]] input_prompt_changed | 4.3.0
|
||||
| Pointer: buffer.
|
||||
| Input prompt changed.
|
||||
|
||||
| weechat | [[hook_signal_input_text_changed]] input_text_changed |
|
||||
| Pointer: buffer.
|
||||
| Input text changed.
|
||||
@@ -13066,6 +13347,12 @@ List of modifiers defined by WeeChat and plugins that can be used:
|
||||
| String with IRC tag value unescaped,
|
||||
see https://ircv3.net/specs/extensions/message-tags#escaping-values[this page ^↗^^].
|
||||
|
||||
| [[hook_modifier_color_decode]] color_decode | 4.3.0
|
||||
| Replacement string for colors removed
|
||||
| Any string.
|
||||
| String with WeeChat colors converted to a replacement string
|
||||
(colors stripped if the replacement string is empty).
|
||||
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi | 1.0
|
||||
| "1" to keep colors, "0" to remove colors
|
||||
| Any string.
|
||||
@@ -14065,9 +14352,9 @@ weechat.prnt(weechat.current_buffer(), "Text on current buffer")
|
||||
|
||||
==== buffer_search
|
||||
|
||||
_Updated in 1.0._
|
||||
_Updated in 1.0, 4.3.0._
|
||||
|
||||
Search a buffer by plugin and/or name.
|
||||
Search a buffer by plugin/name, full name or unique identifier (`id`).
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -14079,10 +14366,11 @@ struct t_gui_buffer *weechat_buffer_search (const char *plugin,
|
||||
|
||||
Arguments:
|
||||
|
||||
* _plugin_: name of plugin, following special value is allowed:
|
||||
* _plugin_: name of plugin, following special values are allowed:
|
||||
** `+==+`: the name used is the buffer full name (for example:
|
||||
`irc.libera.#weechat` instead of `libera.#weechat`)
|
||||
_(WeeChat ≥ 1.0)_
|
||||
** `+==id+`: the name used is the buffer unique identifier (`id`) _(WeeChat ≥ 4.3.0)_
|
||||
* _name_: name of buffer, if it is NULL or empty string, the current buffer is
|
||||
returned (buffer displayed by current window); if the name starts with
|
||||
`(?i)`, the search is case insensitive _(WeeChat ≥ 1.0)_
|
||||
@@ -14097,6 +14385,7 @@ C examples:
|
||||
----
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("==", "irc.libera.#test"); /* WeeChat ≥ 1.0 */
|
||||
struct t_gui_buffer *buffer3 = weechat_buffer_search ("==id", "1709797810942688"); /* WeeChat ≥ 4.3.0 */
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -14346,6 +14635,7 @@ Arguments:
|
||||
** _nicklist_nicks_count_: number of nicks in nicklist
|
||||
** _nicklist_nicks_visible_count_: number of nicks displayed
|
||||
** _input_: 1 if input is enabled, otherwise 0
|
||||
** _input_get_any_user_data_: 1 if any user data, including commands, are sent to input callback, otherwise 0
|
||||
** _input_get_unknown_commands_: 1 if unknown commands are sent to input callback, otherwise 0
|
||||
** _input_get_empty_: 1 if empty input is sent to input callback, otherwise 0
|
||||
** _input_multiline_: 1 if multiple lines are sent as one message to input callback, otherwise 0
|
||||
@@ -14413,6 +14703,7 @@ Arguments:
|
||||
|
||||
* _buffer_: buffer pointer
|
||||
* _property_: property name:
|
||||
** _id_: unique identifier _(WeeChat ≥ 4.3.0)_
|
||||
** _plugin_: name of plugin which created this buffer ("core" for WeeChat main buffer)
|
||||
** _name_: name of buffer
|
||||
** _full_name_: full name of buffer ("plugin.name") _(WeeChat ≥ 0.3.7)_
|
||||
@@ -14420,6 +14711,9 @@ Arguments:
|
||||
** _short_name_: short name of buffer (note: used for display only and can be changed by user, this must not be used to find name of buffer, use instead _name_, _full_name_ or local variable _channel_)
|
||||
** _type_: type of buffer: "formatted" or "free" _(WeeChat ≥ 4.2.0)_
|
||||
** _title_: title of buffer
|
||||
** _modes_: modes _(WeeChat ≥ 4.3.0)_
|
||||
** _nicklist_last_id_assigned_: last unique identifier used in this buffer for a group or nick _(WeeChat ≥ 4.3.0)_
|
||||
** _input_prompt_: input prompt _(WeeChat ≥ 4.3.0)_
|
||||
** _input_: input text
|
||||
** _text_search_input_: input saved before text search
|
||||
** _highlight_words_: list of words to highlight
|
||||
@@ -14594,6 +14888,9 @@ Properties:
|
||||
| title | | any string
|
||||
| Set new title for buffer.
|
||||
|
||||
| modes | 4.3.0 | any string
|
||||
| Set new modes for buffer.
|
||||
|
||||
| time_for_each_line | | "0" or "1"
|
||||
| "0" to hide time for all lines in buffer, "1" to see time for all lines
|
||||
(default for a new buffer).
|
||||
@@ -14655,12 +14952,19 @@ Properties:
|
||||
| key_unbind_xxx | | -
|
||||
| Unbind key _xxx_ for this buffer.
|
||||
|
||||
| input_prompt | 4.3.0 | any string
|
||||
| Set new value for input prompt.
|
||||
|
||||
| input | | any string
|
||||
| Set new value for buffer input.
|
||||
|
||||
| input_pos | | position
|
||||
| Set cursor position in buffer input.
|
||||
|
||||
| input_get_any_user_data | 4.3.0 | "0" or "1"
|
||||
| "0" to get only user messages (default behavior), "1" to get everything,
|
||||
including commands.
|
||||
|
||||
| input_get_unknown_commands | | "0" or "1"
|
||||
| "0" to disable unknown commands on this buffer (default behavior), "1" to
|
||||
get unknown commands, for example if user type "/unknowncmd", buffer will
|
||||
@@ -15213,7 +15517,9 @@ group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group",
|
||||
|
||||
==== nicklist_search_group
|
||||
|
||||
Search a group in a nicklist.
|
||||
_Updated in 4.3.0._
|
||||
|
||||
Search a group in a nicklist by name or unique identifier (`id`).
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -15229,7 +15535,8 @@ Arguments:
|
||||
* _buffer_: buffer pointer
|
||||
* _from_group_: search from this group only, if NULL, then search in whole
|
||||
nicklist
|
||||
* _name_: group name to search
|
||||
* _name_: group name to search; with WeeChat ≥ 4.3.0, a unique identifier can
|
||||
be given with the format: `==id:xxx` (where `xxx` is the identifier)
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -15239,8 +15546,10 @@ C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "test_group");
|
||||
struct t_gui_nick_group *ptr_group1 = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "test_group");
|
||||
struct t_gui_nick_group *ptr_group2 = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "==id:1714382231198764");
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -15250,8 +15559,9 @@ Script (Python):
|
||||
# prototype
|
||||
def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
|
||||
|
||||
# example
|
||||
group = weechat.nicklist_search_group(my_buffer, "", "test_group")
|
||||
# examples
|
||||
group1 = weechat.nicklist_search_group(my_buffer, "", "test_group")
|
||||
group2 = weechat.nicklist_search_group(my_buffer, "", "==id:1714382231198764")
|
||||
----
|
||||
|
||||
==== nicklist_add_nick
|
||||
@@ -15262,13 +15572,13 @@ Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick_group *weechat_nicklist_add_nick (struct t_gui_buffer *buffer,
|
||||
struct t_gui_nick_group *group,
|
||||
const char *name,
|
||||
const char *color,
|
||||
const char *prefix,
|
||||
const char *prefix_color,
|
||||
int visible);
|
||||
struct t_gui_nick *weechat_nicklist_add_nick (struct t_gui_buffer *buffer,
|
||||
struct t_gui_nick_group *group,
|
||||
const char *name,
|
||||
const char *color,
|
||||
const char *prefix,
|
||||
const char *prefix_color,
|
||||
int visible);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
@@ -15328,7 +15638,9 @@ nick = weechat.nicklist_add_nick(my_buffer, my_group, "test_nick", color, "@", "
|
||||
|
||||
==== nicklist_search_nick
|
||||
|
||||
Search a nick in a nicklist.
|
||||
_Updated in 4.3.0._
|
||||
|
||||
Search a nick in a nicklist by name or unique identifier (`id`).
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -15344,7 +15656,8 @@ Arguments:
|
||||
* _buffer_: buffer pointer
|
||||
* _from_group_: search from this group only, if NULL, then search in whole
|
||||
nicklist
|
||||
* _name_: nick name to search
|
||||
* _name_: nick name to search; with WeeChat ≥ 4.3.0, a unique identifier can
|
||||
be given with the format: `==id:xxx` (where `xxx` is the identifier)
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -15354,8 +15667,10 @@ C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "test_nick");
|
||||
struct t_gui_nick *ptr_nick1 = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "test_nick");
|
||||
struct t_gui_nick *ptr_nick2 = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "==id:1714382252187496");
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
@@ -15365,8 +15680,9 @@ Script (Python):
|
||||
# prototype
|
||||
def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
|
||||
|
||||
# example
|
||||
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
|
||||
# examples
|
||||
nick1 = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
|
||||
nick2 = weechat.nicklist_search_nick(my_buffer, "", "==id:1714382252187496")
|
||||
----
|
||||
|
||||
==== nicklist_remove_group
|
||||
@@ -15587,6 +15903,7 @@ Arguments:
|
||||
* _buffer_: buffer pointer
|
||||
* _group_: group pointer
|
||||
* _property_: property name:
|
||||
** _id_: unique identifier _(WeeChat ≥ 4.3.0)_
|
||||
** _name_: name of group
|
||||
** _color_: group color in nicklist
|
||||
|
||||
@@ -15658,7 +15975,7 @@ parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
|
||||
|
||||
==== nicklist_group_set
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, updated in 4.3.0._
|
||||
|
||||
Set string value of a group property.
|
||||
|
||||
@@ -15681,14 +15998,18 @@ Arguments:
|
||||
|
||||
Properties:
|
||||
|
||||
[width="100%",cols="^2,4,8",options="header"]
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Name | Value | Description
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
| color | WeeChat color option name
|
||||
| id | 4.3.0 | long long integer ≥ 0
|
||||
| New id for the group (it must be unique in the buffer). +
|
||||
Note: it is not recommended to change this identifier.
|
||||
|
||||
| color | | WeeChat color option name
|
||||
| See argument "color" of function <<_nicklist_add_group,nicklist_add_group>>.
|
||||
|
||||
| visible | "0", "1"
|
||||
| visible | | "0", "1"
|
||||
| "0" = hidden group, "1" = visible group.
|
||||
|===
|
||||
|
||||
@@ -15789,6 +16110,7 @@ Arguments:
|
||||
* _buffer_: buffer pointer
|
||||
* _nick_: nick pointer
|
||||
* _property_: property name:
|
||||
** _id_: unique identifier _(WeeChat ≥ 4.3.0)_
|
||||
** _name_: name of nick
|
||||
** _color_: nick color in nicklist
|
||||
** _prefix_: prefix of nick
|
||||
@@ -15862,7 +16184,7 @@ group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
|
||||
|
||||
==== nicklist_nick_set
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, updated in 4.3.0._
|
||||
|
||||
Set string value of a nick property.
|
||||
|
||||
@@ -15885,20 +16207,24 @@ Arguments:
|
||||
|
||||
Properties:
|
||||
|
||||
[width="100%",cols="^2,4,8",options="header"]
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Name | Value | Description
|
||||
| Name | Min WeeChat | Value | Description
|
||||
|
||||
| color | WeeChat color option name
|
||||
| id | 4.3.0 | long long integer ≥ 0
|
||||
| New id for the nick (it must be unique in the buffer). +
|
||||
Note: it is not recommended to change this identifier.
|
||||
|
||||
| color | | WeeChat color option name
|
||||
| See argument "color" of function <<_nicklist_add_nick,nicklist_add_nick>>.
|
||||
|
||||
| prefix | any string
|
||||
| prefix | | any string
|
||||
| Prefix of nick.
|
||||
|
||||
| prefix_color | WeeChat color option name
|
||||
| prefix_color | | WeeChat color option name
|
||||
| See argument "prefix_color" of function <<_nicklist_add_nick,nicklist_add_nick>>.
|
||||
|
||||
| visible | "0", "1"
|
||||
| visible | | "0", "1"
|
||||
| "0" = hidden nick, "1" = visible nick.
|
||||
|===
|
||||
|
||||
@@ -16401,7 +16727,7 @@ Functions for executing WeeChat commands.
|
||||
|
||||
==== command
|
||||
|
||||
_Updated in 1.1._
|
||||
_Updated in 1.1, 4.0.0._
|
||||
|
||||
Execute a command or send text to buffer.
|
||||
|
||||
@@ -16419,6 +16745,10 @@ Arguments:
|
||||
* _command_: command to execute (if beginning with a "/"), or text to send to
|
||||
buffer
|
||||
|
||||
[NOTE]
|
||||
On buffer with `input_multiline` set to `0` (default), only the first command
|
||||
is executed (before the first newline char: `\n`).
|
||||
|
||||
Return value _(WeeChat ≥ 1.1)_:
|
||||
|
||||
* _WEECHAT_RC_OK_ if successful
|
||||
@@ -16446,7 +16776,7 @@ rc = weechat.command(weechat.buffer_search("irc", "libera.#weechat"), "/whois Fl
|
||||
|
||||
==== command_options
|
||||
|
||||
_WeeChat ≥ 2.5._
|
||||
_WeeChat ≥ 2.5, updated in 4.0.0._
|
||||
|
||||
Execute a command or send text to buffer with options.
|
||||
|
||||
@@ -16470,6 +16800,7 @@ Arguments:
|
||||
this call; see function <<_string_match_list,string_match_list>> for the
|
||||
format
|
||||
** _delay_: delay to execute command, in milliseconds
|
||||
** _split_newline_: `1` to split commands on newline char (`\n`) (_WeeChat ≥ 4.0.0_)
|
||||
|
||||
Return value:
|
||||
|
||||
@@ -16500,7 +16831,7 @@ Script (Python):
|
||||
def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
|
||||
|
||||
# example: allow any command except /exec
|
||||
rc = weechat.command("", "/some_command arguments", {"commands": "*,!exec"})
|
||||
rc = weechat.command_options("", "/some_command arguments", {"commands": "*,!exec"})
|
||||
----
|
||||
|
||||
[[completion]]
|
||||
@@ -17669,7 +18000,7 @@ C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "pointer = 0x%lx",
|
||||
weechat_printf (NULL, "pointer = %p",
|
||||
weechat_infolist_pointer (infolist, "my_pointer"));
|
||||
----
|
||||
|
||||
@@ -17712,8 +18043,7 @@ C example:
|
||||
----
|
||||
int size;
|
||||
void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size);
|
||||
weechat_printf (NULL, "buffer = 0x%lx, size = %d",
|
||||
pointer, size);
|
||||
weechat_printf (NULL, "buffer = %p, size = %d", pointer, size);
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -17755,7 +18085,7 @@ Script (Python):
|
||||
def infolist_time(infolist: str, var: str) -> int: ...
|
||||
|
||||
# example
|
||||
weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time"))
|
||||
weechat.prnt("", "time = %d" % weechat.infolist_time(infolist, "my_time"))
|
||||
----
|
||||
|
||||
==== infolist_free
|
||||
@@ -17869,7 +18199,7 @@ This function is not available in scripting API.
|
||||
|
||||
==== hdata_new_var
|
||||
|
||||
_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4._
|
||||
_WeeChat ≥ 0.3.6, updated in 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._
|
||||
|
||||
Create a new variable in hdata.
|
||||
|
||||
@@ -17890,6 +18220,7 @@ Arguments:
|
||||
** _WEECHAT_HDATA_CHAR_
|
||||
** _WEECHAT_HDATA_INTEGER_
|
||||
** _WEECHAT_HDATA_LONG_
|
||||
** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_)
|
||||
** _WEECHAT_HDATA_STRING_
|
||||
** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_)
|
||||
** _WEECHAT_HDATA_POINTER_
|
||||
@@ -18170,6 +18501,9 @@ switch (type)
|
||||
case WEECHAT_HDATA_LONG:
|
||||
/* ... */
|
||||
break;
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
/* ... */
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
/* ... */
|
||||
break;
|
||||
@@ -18771,7 +19105,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number"))
|
||||
|
||||
_WeeChat ≥ 0.3.6._
|
||||
|
||||
Return value of long variable in structure using hdata.
|
||||
Return value of "long" variable in structure using hdata.
|
||||
|
||||
Prototype:
|
||||
|
||||
@@ -18806,7 +19140,49 @@ Script (Python):
|
||||
def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
|
||||
|
||||
# example
|
||||
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
|
||||
weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar"))
|
||||
----
|
||||
|
||||
==== hdata_longlong
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return value of "long long" variable in structure using hdata.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
||||
* _hdata_: hdata pointer
|
||||
* _pointer_: pointer to WeeChat/plugin object
|
||||
* _name_: variable name (must be type "long long"); for arrays, the name can be
|
||||
"N|name" where N is the index in array (starting at 0), for example: "2|name"
|
||||
|
||||
Return value:
|
||||
|
||||
* long long value of variable
|
||||
|
||||
C example:
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "longlongvar = %lld", weechat_hdata_longlong (hdata, pointer, "longlongvar"));
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ...
|
||||
|
||||
# example
|
||||
weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar"))
|
||||
----
|
||||
|
||||
==== hdata_string
|
||||
@@ -18898,7 +19274,7 @@ def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
|
||||
# example
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer = weechat.buffer_search_main()
|
||||
weechat.prnt("", "lines = %lx" % weechat.hdata_pointer(hdata, buffer, "lines"))
|
||||
weechat.prnt("", "lines = %x" % weechat.hdata_pointer(hdata, buffer, "lines"))
|
||||
----
|
||||
|
||||
==== hdata_time
|
||||
|
||||
@@ -707,6 +707,7 @@ inl:
|
||||
nicklist_visible_count: 0
|
||||
title: 'WeeChat 2.9-dev (C) 2003-2020 - https://weechat.org/'
|
||||
input: 1
|
||||
input_get_any_user_data: 0
|
||||
input_get_unknown_commands: 0
|
||||
input_get_empty: 0
|
||||
input_multiline: 0
|
||||
|
||||
@@ -549,317 +549,14 @@ link:weechat_plugin_api.en.html[WeeChat plugin API reference ^↗^^].
|
||||
|
||||
List of functions in script API:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Category | Functions
|
||||
|
||||
| general
|
||||
| register
|
||||
|
||||
| plugins
|
||||
| plugin_get_name
|
||||
|
||||
| strings
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| directories
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| sorted lists
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| configuration files
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| key bindings
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| display
|
||||
| prefix +
|
||||
color +
|
||||
print (for python: prnt) +
|
||||
print_date_tags (for python: prnt_date_tags) +
|
||||
print_datetime_tags (for python: prnt_datetime_tags) +
|
||||
print_y (for python: prnt_y) +
|
||||
print_y_date_tags (for python: prnt_y_date_tags) +
|
||||
print_y_datetime_tags (for python: prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| hooks
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| buffers
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| windows
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| nicklist
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| bars
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| commands
|
||||
| command +
|
||||
command_options
|
||||
|
||||
| completion
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| infos
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| infolists
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| upgrade
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.en.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Constants
|
||||
|
||||
List of constants in script API:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Category | Constants
|
||||
|
||||
| return codes
|
||||
| `WEECHAT_RC_OK` (integer) +
|
||||
`WEECHAT_RC_OK_EAT` (integer) +
|
||||
`WEECHAT_RC_ERROR` (integer)
|
||||
|
||||
| configuration files
|
||||
| `WEECHAT_CONFIG_READ_OK` (integer) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (integer)
|
||||
|
||||
| sorted lists
|
||||
| `WEECHAT_LIST_POS_SORT` (string) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (string) +
|
||||
`WEECHAT_LIST_POS_END` (string)
|
||||
|
||||
| hotlist
|
||||
| `WEECHAT_HOTLIST_LOW` (string) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (string) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (string) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (string)
|
||||
|
||||
| hook process
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (integer) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (integer)
|
||||
|
||||
| hook connect
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (integer)
|
||||
|
||||
| hook signal
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (string)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.en.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Common tasks
|
||||
|
||||
+93
-29
@@ -30,7 +30,7 @@ Main features are:
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^],
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] and
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]
|
||||
* IRC proxy and relay for remote interfaces
|
||||
* IRC proxy and relay for WeeChat and remote interfaces
|
||||
* multi-platform (GNU/Linux, *BSD, macOS, Windows and other)
|
||||
* 100% GPL, free software
|
||||
|
||||
@@ -128,7 +128,8 @@ WeeChat:
|
||||
|
||||
| zlib1g-dev |
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Relay plugin: compression of messages with https://zlib.net/[zlib ^↗^^]
|
||||
(api and weechat protocols). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|===
|
||||
|
||||
@@ -154,9 +155,13 @@ WeeChat:
|
||||
| ca-certificates |
|
||||
| Certificates for TLS connections.
|
||||
|
||||
| libcjson-dev |
|
||||
| Relay plugin: protocol "api" (HTTP REST API).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
Relay plugin: compression of messages with https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(api and weechat protocols).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell plugin.
|
||||
@@ -273,6 +278,9 @@ List of available options:
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| Compile <<charset,Charset plugin>>.
|
||||
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Support of JSON with https://github.com/DaveGamble/cJSON[cJSON ^↗^^] library.
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| Build man page.
|
||||
|
||||
@@ -520,11 +528,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -1845,10 +1853,10 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
| kbd:[▼] | - | chat: /list buffer | Move five lines down in /list buffer. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move five lines up in script buffer. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move five lines down in script buffer. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move five lines up in script buffer. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move five lines down in script buffer. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | down / right | buflist | Move buffer to a higher number. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Switch to buffer (previously visited buffer if the buffer is the current one). | Signal `+buflist_mouse+`.
|
||||
@@ -1966,8 +1974,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
@@ -2673,27 +2681,37 @@ You can change or add bindings with the command `/key` using context "mouse"
|
||||
Event name consists of a modifier (optional), a button/wheel name and a gesture
|
||||
(optional). Different elements are separated by `+-+`.
|
||||
|
||||
List of modifiers:
|
||||
List of modifiers (by order in the event name):
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Modifier | Description
|
||||
| ctrl | Key kbd:[Ctrl]
|
||||
| alt | Key kbd:[Alt]
|
||||
| ctrl-alt | Keys kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Key kbd:[Ctrl]
|
||||
| shift | Key kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
|
||||
use this modifier to catch directly mouse events.
|
||||
|
||||
Several modifiers can be combined, for example:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
List of buttons/wheel:
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Button/wheel | Description
|
||||
| button1 | Click on left button
|
||||
| button2 | Click on right button
|
||||
| button3 | Click on middle button (often click on wheel)
|
||||
| button4 ... button9 | Click on extra buttons
|
||||
| wheelup | Wheel (up)
|
||||
| wheeldown | Wheel (down)
|
||||
| Button/wheel | Description
|
||||
| button1 | Click on left button
|
||||
| button2 | Click on right button
|
||||
| button3 | Click on middle button (often click on wheel)
|
||||
| button4 ... button11 | Click on extra buttons
|
||||
| wheelup | Wheel (up)
|
||||
| wheeldown | Wheel (down)
|
||||
|===
|
||||
|
||||
List of gestures (only for buttons, not wheel):
|
||||
@@ -2729,7 +2747,7 @@ Example of events:
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -4511,8 +4529,13 @@ The Relay plugin is used to relay data via network, using different protocols:
|
||||
|
||||
* _irc_: IRC proxy: used to share connections to IRC servers with one or many
|
||||
other IRC clients
|
||||
* _api_: HTTP REST API, used by WeeChat and remote interfaces to display and
|
||||
interact with WeeChat
|
||||
* _weechat_: protocol used by remote interfaces to display and interact with
|
||||
WeeChat, see https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
WeeChat.
|
||||
|
||||
For _api_ and _weechat_ protocols, see the list of remote interfaces on
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== Password
|
||||
@@ -4524,13 +4547,13 @@ It is highly recommended to set a password for relay, with these commands:
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
This password is used for _irc_ and _weechat_ protocols.
|
||||
This password is used with all protocols.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
TOTP (Time-based One-Time Password) can be used as secondary authentication
|
||||
factor for _weechat_ protocol, in addition to the password.
|
||||
factor for _api_ and _weechat_ protocols, in addition to the password.
|
||||
|
||||
This is optional and increases the security level.
|
||||
|
||||
@@ -4622,6 +4645,39 @@ commands:
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
The Relay plugin can send data to a remote WeeChat or interface using an
|
||||
HTTP REST API protocol.
|
||||
|
||||
You can browse and test the API online:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
You can connect with WeeChat or a remote interface, see
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
For example:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Now you can connect on port 9000 with a WeeChat or a remote interface using
|
||||
password "mypassword".
|
||||
|
||||
To connect to an _api_ relay with WeeChat:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The remote WeeChat must expose the same API version as the local WeeChat, so
|
||||
it's highly recommended to use exactly the same WeeChat version on remote
|
||||
and local client.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== WeeChat protocol
|
||||
|
||||
@@ -4661,7 +4717,9 @@ websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
The port (9000 in example) is the port defined in Relay plugin.
|
||||
The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols).
|
||||
|
||||
The URI must end with "/weechat" for _irc_ and _weechat_ protocols and "/api"
|
||||
for _api_ protocol.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== UNIX domain sockets
|
||||
@@ -4704,7 +4762,7 @@ Sections in file _relay.conf_:
|
||||
| network | /set relay.network.* | Network options.
|
||||
| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section).
|
||||
/set relay.port.* | Ports used for relay (options can be added/removed in section).
|
||||
|===
|
||||
|
||||
Options:
|
||||
@@ -5110,7 +5168,9 @@ Matching groups can be used in _replace_:
|
||||
|
||||
* `+${re:0}+` to `+${re:99}+`: `+${re:0}+` is the whole match, `+${re:1}+` to
|
||||
`+${re:99}+` are groups captured
|
||||
* `+${re:+}+`: the last match (with highest number)
|
||||
* `pass:[${re:+}]`: the last match (with highest number)
|
||||
* `+${re:#}+`: index of last group captured
|
||||
* `+${re:repl_index}+`: index of replacement being done (starts to 1)
|
||||
* `+${hide:c,${re:N}}+`: match "N" with all chars replaced by "c"
|
||||
(example: `+${hide:*,${re:2}}+` is the group #2 with all chars replaced by
|
||||
`+*+`).
|
||||
@@ -5259,7 +5319,7 @@ is added in hashtable:
|
||||
| server | string | Name of server (example: "libera").
|
||||
| tags | string | Tags in message (rarely used).
|
||||
| message_without_tags | string | Message without tags.
|
||||
| nick | string | Nick.
|
||||
| nick | string | Nick. ^(1)^
|
||||
| host | string | Hostname.
|
||||
| command | string | IRC command (example: "PRIVMSG", "NOTICE", ...).
|
||||
| channel | string | IRC channel.
|
||||
@@ -5271,6 +5331,10 @@ is added in hashtable:
|
||||
| pos_text | string | The index of _text_ in message ("-1" if _text_ was not found).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ The nick is the sender of the message. +
|
||||
Your own nick on the server is `${irc_server.nick}`.
|
||||
|
||||
When the data is a pointer, the variable `+tg_signal_data+` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
|
||||
+390
-352
@@ -114,97 +114,97 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
|
||||
[width="100%",cols="2m,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-calc.c | Calcul du résultat d'expressions.
|
||||
| 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-crypto.c | Fonctions de cryptographie.
|
||||
| wee-debug.c | Quelques fonctions de debug.
|
||||
| wee-dir.c | Fonctions sur les répertoires/fichiers.
|
||||
| wee-doc.c | Génération de fichiers pour la documentation.
|
||||
| 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 | Fonctions pour les données sécurisées.
|
||||
| wee-secure-buffer.c | Tampon pour les données sécurisées.
|
||||
| wee-secure-config.c | Options des données sécurisées (fichier sec.conf).
|
||||
| wee-signal.c | Fonctions sur les signaux.
|
||||
| wee-string.c | Fonctions sur les chaînes de caractères.
|
||||
| wee-sys.c | Fonctions système.
|
||||
| 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/ | Fonctions "hook".
|
||||
| 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".
|
||||
| wee-hook-url.c | Hook "url".
|
||||
| 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.
|
||||
| core-arraylist.c | Listes avec tableau (« arraylists »).
|
||||
| core-backtrace.c | Afficher une trace après un plantage.
|
||||
| core-calc.c | Calcul du résultat d'expressions.
|
||||
| core-command.c | Commandes du cœur de WeeChat.
|
||||
| core-completion.c | Complétions par défaut.
|
||||
| core-config-file.c | Gestion des fichiers de configuration.
|
||||
| core-config.c | Options de configuration du cœur de WeeChat (fichier weechat.conf).
|
||||
| core-crypto.c | Fonctions de cryptographie.
|
||||
| core-debug.c | Quelques fonctions de debug.
|
||||
| core-dir.c | Fonctions sur les répertoires/fichiers.
|
||||
| core-doc.c | Génération de fichiers pour la documentation.
|
||||
| core-eval.c | Évaluation d'expressions avec des références à des variables internes.
|
||||
| core-hashtable.c | Tables de hachage.
|
||||
| core-hdata.c | Hdata (accès direct aux données en utilisant des tables de hachage).
|
||||
| core-hook.c | Crochets ("hooks").
|
||||
| core-infolist.c | Infolists (listes avec les données des objets).
|
||||
| core-input.c | Entrée de commandes/texte.
|
||||
| core-list.c | Listes triées.
|
||||
| core-log.c | Écriture dans le fichier de log WeeChat (weechat.log).
|
||||
| core-network.c | Fonctions réseau (connexion aux serveurs/proxies).
|
||||
| core-proxy.c | Gestion des proxies.
|
||||
| core-secure.c | Fonctions pour les données sécurisées.
|
||||
| core-secure-buffer.c | Tampon pour les données sécurisées.
|
||||
| core-secure-config.c | Options des données sécurisées (fichier sec.conf).
|
||||
| core-signal.c | Fonctions sur les signaux.
|
||||
| core-string.c | Fonctions sur les chaînes de caractères.
|
||||
| core-sys.c | Fonctions système.
|
||||
| core-upgrade-file.c | Système de mise à jour interne.
|
||||
| core-upgrade.c | Mise à jour du cœur de WeeChat (tampons, lignes, historique, ...).
|
||||
| core-url.c | Transfert d'URL (en utilisant libcurl).
|
||||
| core-utf8.c | Fonctions UTF-8.
|
||||
| core-util.c | Quelques autres fonctions utilitaires.
|
||||
| core-version.c | Fonctions pour la version de WeeChat.
|
||||
| weechat.c | Fonctions principales : options de ligne de commande, démarrage.
|
||||
| hook/ | Fonctions "hook".
|
||||
| hook-command-run.c | Hook "command_run".
|
||||
| hook-command.c | Hook "command".
|
||||
| hook-completion.c | Hook "completion".
|
||||
| hook-config.c | Hook "config".
|
||||
| hook-connect.c | Hook "connect".
|
||||
| hook-fd.c | Hook "fd".
|
||||
| hook-focus.c | Hook "focus".
|
||||
| hook-hdata.c | Hook "hdata".
|
||||
| hook-hsignal.c | Hook "hsignal".
|
||||
| hook-info-hashtable.c | Hook "info".
|
||||
| hook-info.c | Hook "info".
|
||||
| hook-infolist.c | Hook "infolist".
|
||||
| hook-line.c | Hook "line".
|
||||
| hook-modifier.c | Hook "modifier".
|
||||
| hook-print.c | Hook "print".
|
||||
| hook-process.c | Hook "process".
|
||||
| hook-signal.c | Hook "signal".
|
||||
| hook-timer.c | Hook "timer".
|
||||
| hook-url.c | Hook "url".
|
||||
| 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]]
|
||||
@@ -212,180 +212,189 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Chemin/fichier | Description
|
||||
| plugins/ | Racine des extensions.
|
||||
| plugin.c | Gestion des extensions (chargement/déchargement des bibliothèques C dynamiques).
|
||||
| plugin-api.c | Fonctions supplémentaires pour l'API extension (enveloppes autour des fonctions du cœur de WeeChat).
|
||||
| plugin-api-info.c | Fonctions supplémentaires info/infolist pour l'API extension.
|
||||
| plugin-config.c | Options de configuration des extensions (fichier plugins.conf).
|
||||
| plugin-script.c | Fonctions communes utilisés par les extensions pour les scripts.
|
||||
| plugin-script-api.c | Fonctions pour l'API script : enveloppes autour de quelques fonctions de l'API extension.
|
||||
| plugin-script-config.c | Options de configuration des extensions pour les scripts (fichiers python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | En-tête destiné à être distribué avec les extensions WeeChat, pour les compiler.
|
||||
| alias/ | Extension Alias.
|
||||
| alias.c | Fonctions principales pour les alias.
|
||||
| alias-command.c | Commandes Alias.
|
||||
| alias-completion.c | Complétions pour Alias.
|
||||
| alias-config.c | Options de configuration des alias (fichier alias.conf).
|
||||
| alias-info.c | Info/infolists/hdata pour les alias.
|
||||
| spell/ | Extension Spell.
|
||||
| spell.c | Fonctions principales pour Spell.
|
||||
| spell-bar-item.c | Objets de barre Spell.
|
||||
| spell-command.c | Commandes Spell.
|
||||
| spell-completion.c | Complétions pour Spell.
|
||||
| spell-config.c | Options de configuration pour Spell (fichier spell.conf).
|
||||
| spell-info.c | Info/infolists/hdata pour Spell.
|
||||
| spell-speller.c | Gestion des correcteurs orthographiques.
|
||||
| buflist/ | Extension Buflist.
|
||||
| buflist.c | Fonctions principales de Buflist.
|
||||
| buflist-bar-item.c | Objets de barre Buflist.
|
||||
| buflist-command.c | Commandes pour Buflist.
|
||||
| buflist-completion.c | Complétions pour Buflist.
|
||||
| buflist-config.c | Options de configuration pour Buflist (fichier buflist.conf).
|
||||
| buflist-info.c | Info/infolists/hdata pour Buflist.
|
||||
| buflist-mouse.c | Actions souris pour Buflist.
|
||||
| charset/ | Extension Charset.
|
||||
| charset.c | Fonctions pour Charset.
|
||||
| exec/ | Extension Exec.
|
||||
| exec.c | Fonctions principales de Exec.
|
||||
| exec-buffer.c | Tampon Exec.
|
||||
| exec-command.c | Commandes pour Exec.
|
||||
| exec-completion.c | Complétions pour Exec.
|
||||
| exec-config.c | Options de configuration pour Exec (fichier exec.conf).
|
||||
| fifo/ | Extension Fifo.
|
||||
| fifo.c | Fonctions principales de Fifo.
|
||||
| fifo-command.c | Commandes pour Fifo.
|
||||
| fifo-config.c | Options de configuration pour Fifo (fichier fifo.conf).
|
||||
| fifo-info.c | Info/infolists/hdata pour Fifo.
|
||||
| fset/ | Extension Fset.
|
||||
| fset.c | Fonctions principales de Fset.
|
||||
| fset-bar-item.c | Objets de barre Fset.
|
||||
| fset-buffer.c | Tampon Fset.
|
||||
| fset-command.c | Commandes pour Fset.
|
||||
| fset-completion.c | Complétions pour Fset.
|
||||
| fset-config.c | Options de configuration pour Fset (fichier fset.conf).
|
||||
| fset-info.c | Info/infolists/hdata pour Fset.
|
||||
| fset-mouse.c | Actions souris pour Fset.
|
||||
| fset-option.c | Gestion des options Fset.
|
||||
| guile/ | Extension Guile (scheme).
|
||||
| weechat-guile.c | Fonctions principales pour Guile (chargement/déchargement des scripts, exécution de code Guile).
|
||||
| weechat-guile-api.c | Fonctions de l'API script Guile.
|
||||
| irc/ | Extension IRC (Internet Relay Chat).
|
||||
| irc.c | Fonctions principales IRC.
|
||||
| irc-bar-item.c | Objets de barre IRC.
|
||||
| irc-batch.c | Évènements batch IRC.
|
||||
| irc-buffer.c | Tampons IRC.
|
||||
| irc-channel.c | Canaux IRC.
|
||||
| irc-color.c | Couleurs IRC.
|
||||
| irc-command.c | Commandes IRC.
|
||||
| irc-completion.c | Complétions IRC.
|
||||
| irc-config.c | Options de configuration IRC (fichier irc.conf).
|
||||
| irc-ctcp.c | CTCP IRC.
|
||||
| irc-debug.c | Fonctions de debug IRC.
|
||||
| irc-ignore.c | Ignore IRC.
|
||||
| irc-info.c | Info/infolists/hdata pour IRC.
|
||||
| irc-input.c | Entrée de commandes/texte.
|
||||
| irc-join.c | Fonctions pour les listes de canaux à rejoindre.
|
||||
| irc-list.c | Tampon pour la réponse à la commande /list.
|
||||
| irc-message.c | Fonctions pour manipuler les messages IRC.
|
||||
| irc-mode.c | Fonctions pour les modes de canal/pseudo.
|
||||
| irc-modelist.c | Listes de modes de canaux IRC (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Tampon cible pour les messages IRC.
|
||||
| irc-nick.c | Pseudos IRC.
|
||||
| irc-notify.c | Listes de notification IRC.
|
||||
| irc-protocol.c | Protocole IRC (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | Tampon des données brutes IRC.
|
||||
| irc-redirect.c | Redirection de la sortie des commandes IRC.
|
||||
| irc-sasl.c | Authentification SASL avec le serveur IRC.
|
||||
| irc-server.c | Communication avec le serveur IRC.
|
||||
| irc-tag.c | Fonctions pour manipuler les étiquettes de message IRC.
|
||||
| irc-typing.c | Statut d'écriture.
|
||||
| irc-upgrade.c | Sauvegarde/restauration des données IRC lors de la mise à jour de WeeChat.
|
||||
| javascript/ | Extension JavaScript.
|
||||
| weechat-js.cpp | Fonctions principales pour JavaScript (chargement/déchargement des scripts, exécution de code JavaScript).
|
||||
| weechat-js-api.cpp | Fonctions de l'API script JavaScript.
|
||||
| weechat-js-v8.cpp | Fonctions JavaScript v8.
|
||||
| logger/ | Extension Logger.
|
||||
| logger.c | Fonctions principales pour Logger.
|
||||
| logger-backlog.c | Fonctions de backlog 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.
|
||||
| lua/ | Extension Lua.
|
||||
| weechat-lua.c | Fonctions principales pour Lua (chargement/déchargement des scripts, exécution de code Lua).
|
||||
| weechat-lua-api.c | Fonctions de l'API script Lua.
|
||||
| perl/ | Extension Perl.
|
||||
| weechat-perl.c | Fonctions principales pour Perl (chargement/déchargement des scripts, exécution de code Perl).
|
||||
| weechat-perl-api.c | Fonctions de l'API script Perl.
|
||||
| php/ | Extension PHP.
|
||||
| weechat-php.c | Fonctions principales pour PHP (chargement/déchargement des scripts, exécution de code PHP).
|
||||
| weechat-php-api.c | Fonctions de l'API script PHP.
|
||||
| python/ | Extension Python.
|
||||
| weechat-python.c | Fonctions principales pour Python (chargement/déchargement des scripts, exécution de code Python).
|
||||
| weechat-python-api.c | Fonctions de l'API script Python.
|
||||
| relay/ | Extension Relay (proxy IRC et relai pour des interfaces distantes).
|
||||
| relay.c | Fonctions principales de Relay.
|
||||
| relay-auth.c | Authentification des clients.
|
||||
| relay-buffer.c | Tampon Relay.
|
||||
| relay-client.c | Clients du relai.
|
||||
| relay-command.c | Commandes de Relay.
|
||||
| relay-completion.c | Complétions de Relay.
|
||||
| relay-config.c | Options de configuration pour Relay (fichier relay.conf).
|
||||
| relay-info.c | Info/infolists/hdata pour Relay.
|
||||
| relay-network.c | Fonctions de réseau pour Relay.
|
||||
| relay-raw.c | Tampon des données brutes de Relay.
|
||||
| relay-server.c | Serveur Relay.
|
||||
| relay-upgrade.c | Sauvegarde/restauration des données Relay lors de la mise à jour de WeeChat.
|
||||
| relay-websocket.c | Fonctions pour le serveur WebSocket (RFC 6455).
|
||||
| irc/ | Proxy IRC.
|
||||
| relay-irc.c | Fonctions principales pour le proxy IRC.
|
||||
| weechat/ | Relai pour les interfaces distantes.
|
||||
| relay-weechat.c | Relai pour les interfaces distantes (fonctions principales).
|
||||
| relay-weechat-msg.c | Envoi de messages binaires aux clients.
|
||||
| relay-weechat-nicklist.c | Fonctions pour la liste de pseudos.
|
||||
| relay-weechat-protocol.c | Lecture des commandes des clients.
|
||||
| ruby/ | Extension Ruby.
|
||||
| weechat-ruby.c | Fonctions principales pour Ruby (chargement/déchargement des scripts, exécution de code Ruby).
|
||||
| weechat-ruby-api.c | Fonctions de l'API script Ruby.
|
||||
| script/ | Gestionnaire de scripts.
|
||||
| script.c | Fonctions principales du gestionnaire de scripts.
|
||||
| script-action.c | Actions sur les scripts (chargement/déchargement, installation/suppression, ...).
|
||||
| script-buffer.c | Tampon pour le gestionnaire de scripts.
|
||||
| script-command.c | Commandes pour le gestionnaire de scripts.
|
||||
| script-completion.c | Complétions pour le gestionnaire de scripts.
|
||||
| script-config.c | Options de configuration pour le gestionnaire de scripts (fichier script.conf).
|
||||
| script-info.c | Info/infolists/hdata pour le gestionnaire de scripts.
|
||||
| script-mouse.c | Actions souris pour le gestionnaire de scripts.
|
||||
| script-repo.c | Téléchargement et lecture du dépôt de scripts.
|
||||
| tcl/ | Extension Tcl.
|
||||
| weechat-tcl.c | Fonctions principales pour Tcl (chargement/déchargement des scripts, exécution de code Tcl).
|
||||
| weechat-tcl-api.c | Fonctions de l'API script Tcl.
|
||||
| trigger/ | Extension Trigger.
|
||||
| trigger.c | Fonctions principales de Trigger.
|
||||
| trigger-buffer.c | Tampon Trigger.
|
||||
| trigger-callback.c | Fonctions de rappel de Trigger.
|
||||
| trigger-command.c | Commandes pour Trigger.
|
||||
| trigger-completion.c | Complétions pour Trigger.
|
||||
| trigger-config.c | Options de configuration pour Trigger (fichier trigger.conf).
|
||||
| typing/ | Extension Typing.
|
||||
| typing.c | Fonctions principales de Typing.
|
||||
| typing-bar-item.c | Objets de barre Typing.
|
||||
| typing-config.c | Options de configuration pour Typing (fichier typing.conf).
|
||||
| typing-status.c | Statut d'écriture de messages sur les tampons.
|
||||
| xfer/ | Extension Xfer (IRC DCC fichier/discussion).
|
||||
| xfer.c | Fonctions principales de Xfer.
|
||||
| xfer-buffer.c | Tampon Xfer.
|
||||
| xfer-chat.c | Discussion DCC.
|
||||
| xfer-command.c | Commandes pour Xfer.
|
||||
| xfer-completion.c | Complétions pour Xfer.
|
||||
| xfer-config.c | Options de configuration pour Xfer (fichier xfer.conf).
|
||||
| xfer-dcc.c | Transfert de fichier par DCC.
|
||||
| xfer-file.c | Fonctions pour les fichiers dans Xfer.
|
||||
| xfer-info.c | Info/infolists/hdata pour Xfer.
|
||||
| xfer-network.c | Fonctions réseau pour Xfer.
|
||||
| xfer-upgrade.c | Sauvegarde/restauration des données Xfer lors de la mise à jour de WeeChat.
|
||||
| Chemin/fichier | Description
|
||||
| plugins/ | Racine des extensions.
|
||||
| plugin.c | Gestion des extensions (chargement/déchargement des bibliothèques C dynamiques).
|
||||
| plugin-api.c | Fonctions supplémentaires pour l'API extension (enveloppes autour des fonctions du cœur de WeeChat).
|
||||
| plugin-api-info.c | Fonctions supplémentaires info/infolist pour l'API extension.
|
||||
| plugin-config.c | Options de configuration des extensions (fichier plugins.conf).
|
||||
| plugin-script.c | Fonctions communes utilisés par les extensions pour les scripts.
|
||||
| plugin-script-api.c | Fonctions pour l'API script : enveloppes autour de quelques fonctions de l'API extension.
|
||||
| plugin-script-config.c | Options de configuration des extensions pour les scripts (fichiers python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | En-tête destiné à être distribué avec les extensions WeeChat, pour les compiler.
|
||||
| alias/ | Extension Alias.
|
||||
| alias.c | Fonctions principales pour les alias.
|
||||
| alias-command.c | Commandes Alias.
|
||||
| alias-completion.c | Complétions pour Alias.
|
||||
| alias-config.c | Options de configuration des alias (fichier alias.conf).
|
||||
| alias-info.c | Info/infolists/hdata pour les alias.
|
||||
| spell/ | Extension Spell.
|
||||
| spell.c | Fonctions principales pour Spell.
|
||||
| spell-bar-item.c | Objets de barre Spell.
|
||||
| spell-command.c | Commandes Spell.
|
||||
| spell-completion.c | Complétions pour Spell.
|
||||
| spell-config.c | Options de configuration pour Spell (fichier spell.conf).
|
||||
| spell-info.c | Info/infolists/hdata pour Spell.
|
||||
| spell-speller.c | Gestion des correcteurs orthographiques.
|
||||
| buflist/ | Extension Buflist.
|
||||
| buflist.c | Fonctions principales de Buflist.
|
||||
| buflist-bar-item.c | Objets de barre Buflist.
|
||||
| buflist-command.c | Commandes pour Buflist.
|
||||
| buflist-completion.c | Complétions pour Buflist.
|
||||
| buflist-config.c | Options de configuration pour Buflist (fichier buflist.conf).
|
||||
| buflist-info.c | Info/infolists/hdata pour Buflist.
|
||||
| buflist-mouse.c | Actions souris pour Buflist.
|
||||
| charset/ | Extension Charset.
|
||||
| charset.c | Fonctions pour Charset.
|
||||
| exec/ | Extension Exec.
|
||||
| exec.c | Fonctions principales de Exec.
|
||||
| exec-buffer.c | Tampon Exec.
|
||||
| exec-command.c | Commandes pour Exec.
|
||||
| exec-completion.c | Complétions pour Exec.
|
||||
| exec-config.c | Options de configuration pour Exec (fichier exec.conf).
|
||||
| fifo/ | Extension Fifo.
|
||||
| fifo.c | Fonctions principales de Fifo.
|
||||
| fifo-command.c | Commandes pour Fifo.
|
||||
| fifo-config.c | Options de configuration pour Fifo (fichier fifo.conf).
|
||||
| fifo-info.c | Info/infolists/hdata pour Fifo.
|
||||
| fset/ | Extension Fset.
|
||||
| fset.c | Fonctions principales de Fset.
|
||||
| fset-bar-item.c | Objets de barre Fset.
|
||||
| fset-buffer.c | Tampon Fset.
|
||||
| fset-command.c | Commandes pour Fset.
|
||||
| fset-completion.c | Complétions pour Fset.
|
||||
| fset-config.c | Options de configuration pour Fset (fichier fset.conf).
|
||||
| fset-info.c | Info/infolists/hdata pour Fset.
|
||||
| fset-mouse.c | Actions souris pour Fset.
|
||||
| fset-option.c | Gestion des options Fset.
|
||||
| guile/ | Extension Guile (scheme).
|
||||
| weechat-guile.c | Fonctions principales pour Guile (chargement/déchargement des scripts, exécution de code Guile).
|
||||
| weechat-guile-api.c | Fonctions de l'API script Guile.
|
||||
| irc/ | Extension IRC (Internet Relay Chat).
|
||||
| irc.c | Fonctions principales IRC.
|
||||
| irc-bar-item.c | Objets de barre IRC.
|
||||
| irc-batch.c | Évènements batch IRC.
|
||||
| irc-buffer.c | Tampons IRC.
|
||||
| irc-channel.c | Canaux IRC.
|
||||
| irc-color.c | Couleurs IRC.
|
||||
| irc-command.c | Commandes IRC.
|
||||
| irc-completion.c | Complétions IRC.
|
||||
| irc-config.c | Options de configuration IRC (fichier irc.conf).
|
||||
| irc-ctcp.c | CTCP IRC.
|
||||
| irc-debug.c | Fonctions de debug IRC.
|
||||
| irc-ignore.c | Ignore IRC.
|
||||
| irc-info.c | Info/infolists/hdata pour IRC.
|
||||
| irc-input.c | Entrée de commandes/texte.
|
||||
| irc-join.c | Fonctions pour les listes de canaux à rejoindre.
|
||||
| irc-list.c | Tampon pour la réponse à la commande /list.
|
||||
| irc-message.c | Fonctions pour manipuler les messages IRC.
|
||||
| irc-mode.c | Fonctions pour les modes de canal/pseudo.
|
||||
| irc-modelist.c | Listes de modes de canaux IRC (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Tampon cible pour les messages IRC.
|
||||
| irc-nick.c | Pseudos IRC.
|
||||
| irc-notify.c | Listes de notification IRC.
|
||||
| irc-protocol.c | Protocole IRC (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | Tampon des données brutes IRC.
|
||||
| irc-redirect.c | Redirection de la sortie des commandes IRC.
|
||||
| irc-sasl.c | Authentification SASL avec le serveur IRC.
|
||||
| irc-server.c | Communication avec le serveur IRC.
|
||||
| irc-tag.c | Fonctions pour manipuler les étiquettes de message IRC.
|
||||
| irc-typing.c | Statut d'écriture.
|
||||
| irc-upgrade.c | Sauvegarde/restauration des données IRC lors de la mise à jour de WeeChat.
|
||||
| javascript/ | Extension JavaScript.
|
||||
| weechat-js.cpp | Fonctions principales pour JavaScript (chargement/déchargement des scripts, exécution de code JavaScript).
|
||||
| weechat-js-api.cpp | Fonctions de l'API script JavaScript.
|
||||
| weechat-js-v8.cpp | Fonctions JavaScript v8.
|
||||
| logger/ | Extension Logger.
|
||||
| logger.c | Fonctions principales pour Logger.
|
||||
| logger-backlog.c | Fonctions de backlog 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.
|
||||
| lua/ | Extension Lua.
|
||||
| weechat-lua.c | Fonctions principales pour Lua (chargement/déchargement des scripts, exécution de code Lua).
|
||||
| weechat-lua-api.c | Fonctions de l'API script Lua.
|
||||
| perl/ | Extension Perl.
|
||||
| weechat-perl.c | Fonctions principales pour Perl (chargement/déchargement des scripts, exécution de code Perl).
|
||||
| weechat-perl-api.c | Fonctions de l'API script Perl.
|
||||
| php/ | Extension PHP.
|
||||
| weechat-php.c | Fonctions principales pour PHP (chargement/déchargement des scripts, exécution de code PHP).
|
||||
| weechat-php-api.c | Fonctions de l'API script PHP.
|
||||
| python/ | Extension Python.
|
||||
| weechat-python.c | Fonctions principales pour Python (chargement/déchargement des scripts, exécution de code Python).
|
||||
| weechat-python-api.c | Fonctions de l'API script Python.
|
||||
| relay/ | Extension Relay (proxy IRC et relai pour des interfaces distantes).
|
||||
| relay.c | Fonctions principales de Relay.
|
||||
| relay-auth.c | Authentification des clients.
|
||||
| relay-buffer.c | Tampon Relay.
|
||||
| relay-client.c | Clients du relai.
|
||||
| relay-command.c | Commandes de Relay.
|
||||
| relay-completion.c | Complétions de Relay.
|
||||
| relay-config.c | Options de configuration pour Relay (fichier relay.conf).
|
||||
| relay-http.c | Fonctions HTTP.
|
||||
| relay-info.c | Info/infolists/hdata pour Relay.
|
||||
| relay-network.c | Fonctions de réseau pour Relay.
|
||||
| relay-raw.c | Tampon des données brutes de Relay.
|
||||
| relay-remote.c | Relai distant.
|
||||
| relay-server.c | Serveur Relay.
|
||||
| relay-upgrade.c | Sauvegarde/restauration des données Relay lors de la mise à jour de WeeChat.
|
||||
| relay-websocket.c | Fonctions pour le serveur WebSocket (RFC 6455).
|
||||
| api/ | Relai pour les interfaces distantes (en utilisant une API REST HTTP).
|
||||
| relay-api.c | Fonctions principales pour l'API REST HTTP.
|
||||
| relay-api-msg.c | Envoi de messages JSON aux clients.
|
||||
| relay-api-protocol.c | Protocole HTTP REST API.
|
||||
| remote/ | Relai distant.
|
||||
| relay-remote-event.c | Traitement des évènements reçus du relai distant.
|
||||
| relay-remote-network.c | Fonctions réseau pour le relai distant.
|
||||
| irc/ | Proxy IRC.
|
||||
| relay-irc.c | Fonctions principales pour le proxy IRC.
|
||||
| weechat/ | Relai pour les interfaces distantes (en utilisant le protocole binaire "weechat").
|
||||
| relay-weechat.c | Relai pour les interfaces distantes (fonctions principales).
|
||||
| relay-weechat-msg.c | Envoi de messages binaires aux clients.
|
||||
| relay-weechat-nicklist.c | Fonctions pour la liste de pseudos.
|
||||
| relay-weechat-protocol.c | Lecture des commandes des clients.
|
||||
| ruby/ | Extension Ruby.
|
||||
| weechat-ruby.c | Fonctions principales pour Ruby (chargement/déchargement des scripts, exécution de code Ruby).
|
||||
| weechat-ruby-api.c | Fonctions de l'API script Ruby.
|
||||
| script/ | Gestionnaire de scripts.
|
||||
| script.c | Fonctions principales du gestionnaire de scripts.
|
||||
| script-action.c | Actions sur les scripts (chargement/déchargement, installation/suppression, ...).
|
||||
| script-buffer.c | Tampon pour le gestionnaire de scripts.
|
||||
| script-command.c | Commandes pour le gestionnaire de scripts.
|
||||
| script-completion.c | Complétions pour le gestionnaire de scripts.
|
||||
| script-config.c | Options de configuration pour le gestionnaire de scripts (fichier script.conf).
|
||||
| script-info.c | Info/infolists/hdata pour le gestionnaire de scripts.
|
||||
| script-mouse.c | Actions souris pour le gestionnaire de scripts.
|
||||
| script-repo.c | Téléchargement et lecture du dépôt de scripts.
|
||||
| tcl/ | Extension Tcl.
|
||||
| weechat-tcl.c | Fonctions principales pour Tcl (chargement/déchargement des scripts, exécution de code Tcl).
|
||||
| weechat-tcl-api.c | Fonctions de l'API script Tcl.
|
||||
| trigger/ | Extension Trigger.
|
||||
| trigger.c | Fonctions principales de Trigger.
|
||||
| trigger-buffer.c | Tampon Trigger.
|
||||
| trigger-callback.c | Fonctions de rappel de Trigger.
|
||||
| trigger-command.c | Commandes pour Trigger.
|
||||
| trigger-completion.c | Complétions pour Trigger.
|
||||
| trigger-config.c | Options de configuration pour Trigger (fichier trigger.conf).
|
||||
| typing/ | Extension Typing.
|
||||
| typing.c | Fonctions principales de Typing.
|
||||
| typing-bar-item.c | Objets de barre Typing.
|
||||
| typing-config.c | Options de configuration pour Typing (fichier typing.conf).
|
||||
| typing-status.c | Statut d'écriture de messages sur les tampons.
|
||||
| xfer/ | Extension Xfer (IRC DCC fichier/discussion).
|
||||
| xfer.c | Fonctions principales de Xfer.
|
||||
| xfer-buffer.c | Tampon Xfer.
|
||||
| xfer-chat.c | Discussion DCC.
|
||||
| xfer-command.c | Commandes pour Xfer.
|
||||
| xfer-completion.c | Complétions pour Xfer.
|
||||
| xfer-config.c | Options de configuration pour Xfer (fichier xfer.conf).
|
||||
| xfer-dcc.c | Transfert de fichier par DCC.
|
||||
| xfer-file.c | Fonctions pour les fichiers dans Xfer.
|
||||
| xfer-info.c | Info/infolists/hdata pour Xfer.
|
||||
| xfer-network.c | Fonctions réseau pour Xfer.
|
||||
| xfer-upgrade.c | Sauvegarde/restauration des données Xfer lors de la mise à jour de WeeChat.
|
||||
|===
|
||||
|
||||
[[sources_tests]]
|
||||
@@ -393,89 +402,119 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Chemin/fichier | Description
|
||||
| tests/ | Racine des tests.
|
||||
| tests.cpp | Programme utilisé pour lancer tous les tests.
|
||||
| tests-record.cpp | Enregistrement et recherche dans les messages affichés.
|
||||
| scripts/ | Racine des tests de l'API script.
|
||||
| test-scripts.cpp | Programme utilisé pour lancer les tests de l'API script.
|
||||
| python/ | Scripts Python pour générer et lancer les tests de l'API script.
|
||||
| testapigen.py | Script Python générant des scripts dans tous les languages pour tester l'API script.
|
||||
| testapi.py | Script Python avec les tests API, utilisé par le script testapigen.py.
|
||||
| unparse.py | Conversion de code Python vers d'autres langages, utilisé par le script testapigen.py.
|
||||
| unit/ | Racine des tests unitaires.
|
||||
| test-plugins.cpp | Tests : extensions.
|
||||
| test-plugin-api-info.cpp | Tests : fonctions info de l'API extension.
|
||||
| test-plugin-config.cpp | Tests : fonctions config de l'extension.
|
||||
| core/ | Racine des tests unitaires pour le cœur.
|
||||
| test-core-arraylist.cpp | Tests : listes avec tableau (« arraylists »).
|
||||
| test-core-calc.cpp | Tests : calcul d'expressions.
|
||||
| test-core-command.cpp | Tests : commandes.
|
||||
| test-core-config-file.cpp | Tests : fichiers de configuration.
|
||||
| test-core-crypto.cpp | Tests : fonctions cryptographiques.
|
||||
| test-core-dir.cpp | Tests : répertoires/fichiers.
|
||||
| test-core-eval.cpp | Tests : évaluation d'expressions.
|
||||
| test-core-hashtble.cpp | Tests : tables de hachage.
|
||||
| test-core-hdata.cpp | Tests : hdata.
|
||||
| test-core-hook.cpp | Tests : hooks.
|
||||
| test-core-infolist.cpp | Tests : infolists.
|
||||
| test-core-list.cpp | Tests : listes.
|
||||
| test-core-network.cpp | Tests : fonctions réseau.
|
||||
| test-core-secure.cpp | Tests : données sécurisées.
|
||||
| test-core-signal.cpp | Tests : signaux.
|
||||
| test-core-string.cpp | Tests : chaînes.
|
||||
| test-core-url.cpp | Tests : URLs.
|
||||
| test-core-utf8.cpp | Tests : UTF-8.
|
||||
| test-core-util.cpp | Tests : fonctions utiles.
|
||||
| test-core-sys.cpp | Tests : fonctions système.
|
||||
| hook/ | Racine des tests pour les hooks.
|
||||
| test-hook-command.cpp | Tests : hooks "command".
|
||||
| gui/ | Racine des tests unitaires pour les interfaces.
|
||||
| test-gui-bar-window.cpp | Tests : fonctions de fenêtres de barre.
|
||||
| test-gui-buffer.cpp | Tests : fonctions de tampons.
|
||||
| test-gui-chat.cpp | Tests : fonctions de discussion.
|
||||
| test-gui-color.cpp | Tests : couleurs.
|
||||
| test-gui-filter.cpp | Tests : filtres.
|
||||
| test-gui-input.cpp | Tests : fonctions d'entrée.
|
||||
| test-gui-key.cpp | Tests : touches.
|
||||
| test-gui-line.cpp | Tests : lignes.
|
||||
| test-gui-nick.cpp | Tests : pseudos.
|
||||
| plugins/ | Racine des tests unitaires pour les extensions.
|
||||
| irc/ | Racine des tests unitaires pour l'extension IRC.
|
||||
| test-irc-batch.cpp | Tests : évènements batch IRC.
|
||||
| test-irc-buffer.cpp | Tests : tampons IRC.
|
||||
| test-irc-channel.cpp | Tests : canaux IRC.
|
||||
| test-irc-color.cpp | Tests : couleurs IRC.
|
||||
| test-irc-config.cpp | Tests : configuration IRC.
|
||||
| test-irc-ctcp.cpp | Tests : CTCP IRC.
|
||||
| test-irc-ignore.cpp | Tests : ignores IRC.
|
||||
| test-irc-info.cpp | Tests : infos IRC.
|
||||
| test-irc-join.cpp | Tests : fonctions de join IRC.
|
||||
| test-irc-list.cpp | Tests : tampon IRC pour la réponse à la commande /list.
|
||||
| test-irc-message.cpp | Tests : messages IRC.
|
||||
| test-irc-mode.cpp | Tests : modes IRC.
|
||||
| test-irc-nick.cpp | Tests : pseudos IRC.
|
||||
| test-irc-protocol.cpp | Tests : protocole IRC.
|
||||
| test-irc-sasl.cpp | Tests : authentification SASL avec le protocole IRC.
|
||||
| test-irc-server.cpp | Tests : serveur IRC.
|
||||
| test-irc-tag.cpp | Tests : étiquettes des messages IRC.
|
||||
| logger/ | Racine des tests unitaires pour l'extension logger.
|
||||
| test-logger.cpp | Tests : logger.
|
||||
| test-logger-backlog.cpp | Tests : backlog logger.
|
||||
| test-logger-tail.cpp | Tests : fonctions "tail".
|
||||
| trigger/ | Racine des tests unitaires pour l'extension trigger.
|
||||
| test-trigger.cpp | Tests : triggers.
|
||||
| test-trigger-config.cpp | Tests : configuration trigger.
|
||||
| typing/ | Racine des tests unitaires pour l'extension typing.
|
||||
| test-typing.cpp | Tests : typing.
|
||||
| test-typing-status.cpp | Tests : statut d'écriture.
|
||||
| relay/ | Racine des tests unitaires pour l'extension Relay.
|
||||
| test-relay-auth.cpp | Tests : authentification des clients.
|
||||
| irc/ | Racine des tests unitaires pour le protocole relay "irc".
|
||||
| test-relay-irc.cpp | Tests : Protocole relay "irc".
|
||||
| xfer/ | Racine des tests unitaires pour l'extension Xfer.
|
||||
| test-xfer-file.cpp | Tests : fonctions sur les fichiers.
|
||||
| test-xfer-network.cpp | Tests : fonctions réseau.
|
||||
| Chemin/fichier | Description
|
||||
| tests/ | Racine des tests.
|
||||
| tests.cpp | Programme utilisé pour lancer tous les tests.
|
||||
| tests-record.cpp | Enregistrement et recherche dans les messages affichés.
|
||||
| scripts/ | Racine des tests de l'API script.
|
||||
| test-scripts.cpp | Programme utilisé pour lancer les tests de l'API script.
|
||||
| python/ | Scripts Python pour générer et lancer les tests de l'API script.
|
||||
| testapigen.py | Script Python générant des scripts dans tous les languages pour tester l'API script.
|
||||
| testapi.py | Script Python avec les tests API, utilisé par le script testapigen.py.
|
||||
| unparse.py | Conversion de code Python vers d'autres langages, utilisé par le script testapigen.py.
|
||||
| unit/ | Racine des tests unitaires.
|
||||
| test-plugins.cpp | Tests : extensions.
|
||||
| test-plugin-api-info.cpp | Tests : fonctions info de l'API extension.
|
||||
| test-plugin-config.cpp | Tests : fonctions config de l'extension.
|
||||
| core/ | Racine des tests unitaires pour le cœur.
|
||||
| test-core-arraylist.cpp | Tests : listes avec tableau (« arraylists »).
|
||||
| test-core-calc.cpp | Tests : calcul d'expressions.
|
||||
| test-core-command.cpp | Tests : commandes.
|
||||
| test-core-config-file.cpp | Tests : fichiers de configuration.
|
||||
| test-core-crypto.cpp | Tests : fonctions cryptographiques.
|
||||
| test-core-dir.cpp | Tests : répertoires/fichiers.
|
||||
| test-core-eval.cpp | Tests : évaluation d'expressions.
|
||||
| test-core-hashtble.cpp | Tests : tables de hachage.
|
||||
| test-core-hdata.cpp | Tests : hdata.
|
||||
| test-core-hook.cpp | Tests : hooks.
|
||||
| test-core-infolist.cpp | Tests : infolists.
|
||||
| test-core-list.cpp | Tests : listes.
|
||||
| test-core-network.cpp | Tests : fonctions réseau.
|
||||
| test-core-secure.cpp | Tests : données sécurisées.
|
||||
| test-core-signal.cpp | Tests : signaux.
|
||||
| test-core-string.cpp | Tests : chaînes.
|
||||
| test-core-url.cpp | Tests : URLs.
|
||||
| test-core-utf8.cpp | Tests : UTF-8.
|
||||
| test-core-util.cpp | Tests : fonctions utiles.
|
||||
| test-core-sys.cpp | Tests : fonctions système.
|
||||
| hook/ | Racine des tests pour les hooks.
|
||||
| test-hook-command.cpp | Tests : hooks "command".
|
||||
| test-hook-command-run.cpp | Tests: hooks "command_run".
|
||||
| test-hook-completion.cpp | Tests: hooks "completion".
|
||||
| test-hook-config.cpp | Tests: hooks "config".
|
||||
| test-hook-connect.cpp | Tests: hooks "connect".
|
||||
| test-hook-fd.cpp | Tests: hooks "fd".
|
||||
| test-hook-focus.cpp | Tests: hooks "focus".
|
||||
| test-hook-hdata.cpp | Tests: hooks "hdata".
|
||||
| test-hook-hsignal.cpp | Tests: hooks "hsignal".
|
||||
| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable".
|
||||
| test-hook-info.cpp | Tests: hooks "info".
|
||||
| test-hook-infolist.cpp | Tests: hooks "infolist".
|
||||
| test-hook-line.cpp | Tests: hooks "line".
|
||||
| test-hook-modifier.cpp | Tests : hooks "modifier".
|
||||
| test-hook-print.cpp | Tests: hooks "print".
|
||||
| test-hook-process.cpp | Tests: hooks "process".
|
||||
| test-hook-signal.cpp | Tests: hooks "signal".
|
||||
| test-hook-timer.cpp | Tests: hooks "timer".
|
||||
| test-hook-url.cpp | Tests: hooks "url".
|
||||
| gui/ | Racine des tests unitaires pour les interfaces.
|
||||
| test-gui-bar-window.cpp | Tests : fonctions de fenêtres de barre.
|
||||
| test-gui-buffer.cpp | Tests : fonctions de tampons.
|
||||
| test-gui-chat.cpp | Tests : fonctions de discussion.
|
||||
| test-gui-color.cpp | Tests : couleurs.
|
||||
| test-gui-filter.cpp | Tests : filtres.
|
||||
| test-gui-hotlist.cpp | Tests : fonctions hotlist.
|
||||
| test-gui-input.cpp | Tests : fonctions d'entrée.
|
||||
| test-gui-key.cpp | Tests : touches.
|
||||
| test-gui-line.cpp | Tests : lignes.
|
||||
| test-gui-nick.cpp | Tests : pseudos.
|
||||
| test-gui-nicklist.cpp | Tests : fonctions de liste de pseudos.
|
||||
| curses/ | Racine des tests unitaires pour l'interface Curses.
|
||||
| test-gui-curses-mouse.cpp | Tests : souris (interface Curses).
|
||||
| plugins/ | Racine des tests unitaires pour les extensions.
|
||||
| irc/ | Racine des tests unitaires pour l'extension IRC.
|
||||
| test-irc-batch.cpp | Tests : évènements batch IRC.
|
||||
| test-irc-buffer.cpp | Tests : tampons IRC.
|
||||
| test-irc-channel.cpp | Tests : canaux IRC.
|
||||
| test-irc-color.cpp | Tests : couleurs IRC.
|
||||
| test-irc-command.cpp | Tests : commandes IRC.
|
||||
| test-irc-config.cpp | Tests : configuration IRC.
|
||||
| test-irc-ctcp.cpp | Tests : CTCP IRC.
|
||||
| test-irc-ignore.cpp | Tests : ignores IRC.
|
||||
| test-irc-info.cpp | Tests : infos IRC.
|
||||
| test-irc-join.cpp | Tests : fonctions de join IRC.
|
||||
| test-irc-list.cpp | Tests : tampon IRC pour la réponse à la commande /list.
|
||||
| test-irc-message.cpp | Tests : messages IRC.
|
||||
| test-irc-mode.cpp | Tests : modes IRC.
|
||||
| test-irc-nick.cpp | Tests : pseudos IRC.
|
||||
| test-irc-protocol.cpp | Tests : protocole IRC.
|
||||
| test-irc-sasl.cpp | Tests : authentification SASL avec le protocole IRC.
|
||||
| test-irc-server.cpp | Tests : serveur IRC.
|
||||
| test-irc-tag.cpp | Tests : étiquettes des messages IRC.
|
||||
| logger/ | Racine des tests unitaires pour l'extension logger.
|
||||
| test-logger.cpp | Tests : logger.
|
||||
| test-logger-backlog.cpp | Tests : backlog logger.
|
||||
| test-logger-tail.cpp | Tests : fonctions "tail".
|
||||
| trigger/ | Racine des tests unitaires pour l'extension trigger.
|
||||
| test-trigger.cpp | Tests : triggers.
|
||||
| test-trigger-config.cpp | Tests : configuration trigger.
|
||||
| typing/ | Racine des tests unitaires pour l'extension typing.
|
||||
| test-typing.cpp | Tests : typing.
|
||||
| test-typing-status.cpp | Tests : statut d'écriture.
|
||||
| relay/ | Racine des tests unitaires pour l'extension Relay.
|
||||
| test-relay-auth.cpp | Tests : authentification des clients.
|
||||
| test-relay-http.cpp | Tests : fonctions HTTP pour l'extension Relay.
|
||||
| test-relay-remote.cpp | Tests : fonctions remote pour l'extension Relay.
|
||||
| test-relay-websocket.cpp | Tests : fonctions websocket pour l'extension Relay.
|
||||
| api/ | Racine des tests unitaires pour le protocole relay "api".
|
||||
| test-relay-api.cpp | Tests : protocole relay "api" : fonctions générales.
|
||||
| test-relay-api-msg.cpp | Tests : protocole relay "api" : messages.
|
||||
| test-relay-api-protocol.cpp | Tests : protocole relay "api" : protocole.
|
||||
| irc/ | Racine des tests unitaires pour le protocole relay "irc".
|
||||
| test-relay-irc.cpp | Tests : protocole relay "irc".
|
||||
| xfer/ | Racine des tests unitaires pour l'extension Xfer.
|
||||
| test-xfer-file.cpp | Tests : fonctions sur les fichiers.
|
||||
| test-xfer-network.cpp | Tests : fonctions réseau.
|
||||
|===
|
||||
|
||||
[[documentation_translations]]
|
||||
@@ -559,8 +598,7 @@ Exemple en C :
|
||||
|
||||
Quelques règles basiques que vous *devez* suivre quand vous écrivez du code C :
|
||||
|
||||
* Utilisez 4 espaces pour l'indentation. N'utilisez pas de tabulations, c'est le
|
||||
mal.
|
||||
* Utilisez 4 espaces pour l'indentation (pas de tabulations).
|
||||
* Essayez de ne pas dépasser 80 caractères par ligne, sauf si cela est
|
||||
nécessaire pour améliorer la lisibilité.
|
||||
* Utilisez les commentaires `+/* comment */+` (pas de style C99 comme
|
||||
@@ -782,7 +820,7 @@ Exemples :
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| Répertoire | Fichiers
|
||||
| src/core/ | weechat.c, wee-backtrace.c, wee-command.c, ...
|
||||
| src/core/ | weechat.c, core-backtrace.c, core-command.c, ...
|
||||
| src/gui/ | gui-bar.c, gui-bar-item.c, gui-bar-window.c, ...
|
||||
| src/gui/curses/ | gui-curses-bar.c, gui-curses-bar-window.c, gui-curses-chat.c, ...
|
||||
| src/plugins/ | plugin.c, plugin-api.c, plugin-api-info.c, plugin-config.c, plugin-script.c, ...
|
||||
@@ -791,7 +829,7 @@ Exemples :
|
||||
|===
|
||||
|
||||
Les en-têtes des fichiers C doivent avoir le même nom que le fichier, par
|
||||
exemple _wee-command.h_ pour le fichier _wee-command.c_.
|
||||
exemple _core-command.h_ pour le fichier _core-command.c_.
|
||||
|
||||
[[naming_convention_structures]]
|
||||
==== Structures
|
||||
|
||||
@@ -547,6 +547,56 @@ num_files = 2
|
||||
str = weechat.ngettext("file", "files", num_files)
|
||||
----
|
||||
|
||||
==== asprintf
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Formater un message dans une chaîne allouée par la fonction.
|
||||
|
||||
[NOTE]
|
||||
Cette fonction est définie pour les systèmes où la fonction GNU `asprintf()`
|
||||
n'est pas disponible. +
|
||||
Le comportement est quasiment le même à l'exception de `*result` qui est mis à
|
||||
NULL en cas d'erreur.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_asprintf (char **result, const char *fmt, ...);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _result_ : pointeur vers un pointeur de chaîne
|
||||
* _fmt_ : chaîne de formatage
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* nombre d'octets écrits dans `*result` (en excluant le caractère nul de fin),
|
||||
une valeur négative en cas d'erreur.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
char *str;
|
||||
|
||||
if (weechat_asprintf (&str, "%s, %d", "test", 42) >= 0)
|
||||
{
|
||||
/* *str == "test, 42" */
|
||||
/* ... */
|
||||
free (str);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* erreur : *str == NULL */
|
||||
}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
==== strndup
|
||||
|
||||
Retourner la chaîne dupliquée, avec un nombre maximum d'octets.
|
||||
@@ -2349,22 +2399,23 @@ size = weechat.string_color_code_size(weechat.color("yellow,red")) # size == 7
|
||||
|
||||
==== string_remove_color
|
||||
|
||||
_Mis à jour dans la 4.3.0._
|
||||
|
||||
Supprimer les couleurs WeeChat dans une chaîne.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
char *weechat_string_remove_color (const char *string,
|
||||
const char *replacement);
|
||||
char *weechat_string_remove_color (const char *string, const char *replacement);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _string_ : chaîne
|
||||
* _replacement_ : si non NULL et non vide, les couleurs WeeChat sont remplacées
|
||||
par le premier caractère de cette chaîne, sinon les codes couleurs WeeChat et
|
||||
les caractères suivants (rattachés à la couleur) sont supprimés de la chaîne
|
||||
par cette chaîne, sinon les codes couleurs WeeChat et les caractères suivants
|
||||
(rattachés à la couleur) sont supprimés de la chaîne
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -2381,7 +2432,7 @@ char *str = weechat_string_remove_color (ma_chaine1, NULL);
|
||||
free (str);
|
||||
|
||||
/* remplace les codes couleur par "?" */
|
||||
char *str = weechat_string_remove_color (ma_chaine2, "?");
|
||||
char *str = weechat_string_remove_color (ma_chaine2, "[color]");
|
||||
/* ... */
|
||||
free (str);
|
||||
----
|
||||
@@ -2394,12 +2445,12 @@ Script (Python) :
|
||||
def string_remove_color(string: str, replacement: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
str = weechat.string_remove_color(ma_chaine, "?")
|
||||
str = weechat.string_remove_color(ma_chaine, "[color]")
|
||||
----
|
||||
|
||||
==== string_base_encode
|
||||
|
||||
_WeeChat ≥ 2.4._
|
||||
_WeeChat ≥ 2.4, mis à jour dans la 4.3.0._
|
||||
|
||||
Encoder une chaîne en base 16, 32 ou 64.
|
||||
|
||||
@@ -2407,12 +2458,12 @@ Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_string_base_encode (int base, const char *from, int length, char *to);
|
||||
int weechat_string_base_encode (const char *base, const char *from, int length, char *to);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _base_ : 16, 32 ou 64
|
||||
* _base_ : "16", "32", "64" ou "64url"
|
||||
* _from_ : chaîne à encoder
|
||||
* _length_ : longueur de chaîne à encoder (par exemple `strlen(from)`)
|
||||
* _to_ : pointeur vers la chaîne pour stocker le résultat (doit être
|
||||
@@ -2429,11 +2480,11 @@ Exemple en C :
|
||||
----
|
||||
char *string = "abcdefgh", result[128];
|
||||
int length;
|
||||
length = weechat_string_base_encode (16, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("16", string, strlen (string), result);
|
||||
/* length == 16, result == "6162636465666768" */
|
||||
length = weechat_string_base_encode (32, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("32", string, strlen (string), result);
|
||||
/* length == 16, result == "MFRGGZDFMZTWQ===" */
|
||||
length = weechat_string_base_encode (64, string, strlen (string), result);
|
||||
length = weechat_string_base_encode ("64", string, strlen (string), result);
|
||||
/* length == 12, result == "YWJjZGVmZ2g=" */
|
||||
----
|
||||
|
||||
@@ -2442,7 +2493,7 @@ Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
==== string_base_decode
|
||||
|
||||
_WeeChat ≥ 2.4._
|
||||
_WeeChat ≥ 2.4, mis à jour dans la 4.3.0._
|
||||
|
||||
Décoder une chaîne encodée en base 16, 32 ou 64.
|
||||
|
||||
@@ -2450,12 +2501,12 @@ Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_string_base_decode (int base, const char *from, char *to);
|
||||
int weechat_string_base_decode (const char *base, const char *from, char *to);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _base_ : 16, 32 ou 64
|
||||
* _base_ : "16", "32", "64" ou "64url"
|
||||
* _from_ : chaîne à décoder
|
||||
* _to_ : pointeur vers la chaîne pour stocker le résultat (doit être
|
||||
suffisamment long, le résultat est plus court que la chaîne initiale)
|
||||
@@ -2471,11 +2522,11 @@ Exemple en C :
|
||||
----
|
||||
char result[128];
|
||||
int length;
|
||||
length = weechat_string_base_decode (16, "6162636465666768", result);
|
||||
length = weechat_string_base_decode ("16", "6162636465666768", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
length = weechat_string_base_decode (32, "MFRGGZDFMZTWQ===", result);
|
||||
length = weechat_string_base_decode ("32", "MFRGGZDFMZTWQ===", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
length = weechat_string_base_decode (64, "YWJjZGVmZ2g=", result);
|
||||
length = weechat_string_base_decode ("64", "YWJjZGVmZ2g=", result);
|
||||
/* length == 8, result == "abcdefgh" */
|
||||
----
|
||||
|
||||
@@ -2613,7 +2664,7 @@ str3 = weechat.string_input_for_buffer("//test") # "/test"
|
||||
==== string_eval_expression
|
||||
|
||||
_WeeChat ≥ 0.4.0, mis à jour dans la 0.4.2, 0.4.3, 1.0, 1.1, 1.2, 1.3, 1.6, 1.8,
|
||||
2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0._
|
||||
2.0, 2.2, 2.3, 2.7, 2.9, 3.1, 3.2, 3.3, 3.4, 3.6, 3.8, 4.0.0, 4.2.0, 4.3.0._
|
||||
|
||||
Évaluer l'expression et retourner le résultat sous forme de chaîne.
|
||||
Les variables spéciales avec le format `+${variable}+` sont étendues (voir le
|
||||
@@ -2980,13 +3031,16 @@ première étendue à la dernière) :
|
||||
|
||||
| `+${weechat_xxx_dir}+` | 3.2
|
||||
| Un répertoire WeeChat : `+${weechat_config_dir}+`, `+${weechat_data_dir}+`,
|
||||
`+${weechat_cache_dir}+` ou `+${weechat_runtime_dir}+`.
|
||||
`+${weechat_state_dir}+`, `+${weechat_cache_dir}+` ou `+${weechat_runtime_dir}+`.
|
||||
| >> `+${weechat_config_dir}+` +
|
||||
== `+/home/user/.config/weechat+` +
|
||||
+
|
||||
>> `+${weechat_data_dir}+` +
|
||||
== `+/home/user/.local/share/weechat+` +
|
||||
+
|
||||
>> `+${weechat_state_dir}+` +
|
||||
== `+/home/user/.local/state/weechat+` +
|
||||
+
|
||||
>> `+${weechat_cache_dir}+` +
|
||||
== `+/home/user/.cache/weechat+` +
|
||||
+
|
||||
@@ -3200,7 +3254,7 @@ première étendue à la dernière) :
|
||||
>> `+${re:2}+` +
|
||||
== `+test2+` +
|
||||
+
|
||||
>> `+${re:+}+` +
|
||||
>> `pass:[${re:+}]` +
|
||||
== `+test2+` +
|
||||
+
|
||||
>> `+${re:#}+` +
|
||||
@@ -3263,13 +3317,16 @@ première étendue à la dernière) :
|
||||
|
||||
| `+${date}+` +
|
||||
`+${date:xxx}+` | 1.3
|
||||
| La date/heure courante, avec un format personnalisé (voir `man strftime`),
|
||||
le format par défaut est `%F %T`.
|
||||
| La date/heure courante, avec un format personnalisé (voir la fonction
|
||||
<<_util_strftimeval,util_strftimeval>>), le format par défaut est `%F %T`.
|
||||
| >> `+${date}+` +
|
||||
== `+2015-06-30 19:02:45+` +
|
||||
+
|
||||
>> `+${date:%H:%M:%S}+` +
|
||||
== `+19:02:45+`
|
||||
== `+19:02:45+` +
|
||||
+
|
||||
>> `+${date:%!.%.3}+` +
|
||||
== `+1435683765.482+`
|
||||
|
||||
| `+${env:NOM}+` | 1.2
|
||||
| Valeur de la variable d'environnement `NOM`.
|
||||
@@ -4366,6 +4423,7 @@ Paramètres :
|
||||
chaînes pour forcer un répertoire spécifique de WeeChat (WeeChat ≥ 3.2) :
|
||||
** `${weechat_config_dir}`
|
||||
** `${weechat_data_dir}` (par défaut)
|
||||
** `${weechat_state_dir}`
|
||||
** `${weechat_cache_dir}`
|
||||
** `${weechat_runtime_dir}`
|
||||
* _mode_ : mode pour le répertoire
|
||||
@@ -4777,11 +4835,11 @@ Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
==== util_strftimeval
|
||||
|
||||
_WeeChat ≥ 4.2.0._
|
||||
_WeeChat ≥ 4.2.0, mis à jour dans la 4.3.0._
|
||||
|
||||
Formatter la date et l'heure comme la fonction `strftime` de la bibliothèque C,
|
||||
en utilisant un `struct timeval` en entrée et en supportant des caractères de
|
||||
conversion pour les microsecondes.
|
||||
conversion supplémentaires.
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -4792,13 +4850,14 @@ int weechat_util_strftimeval (char *string, int max, const char *format, struct
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _string_ : tampon où stocker la chaîne formattée
|
||||
* _string_ : tampon où stocker la chaîne formatée
|
||||
* _max_ : taille de la chaîne
|
||||
* _format_ : format, le même que celui de la fonction _strftime_, avec des
|
||||
caractères de conversion supplémentaires :
|
||||
** `%.N` où `N` est entre 1 and 6: microsecondes remplies avec des zéros sur
|
||||
N chiffres (par exemple `%.3` pour les millisecondes)
|
||||
** `%f` : alias de `%.6`
|
||||
** `%!` : horodatage sous forme d'entier, en secondes (valeur de tv->tv_sec)
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -5342,7 +5401,7 @@ Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "données utilisateur de l'élément : 0x%lx", weechat_list_user_data (item));
|
||||
weechat_printf (NULL, "données utilisateur de l'élément : %p", weechat_list_user_data (item));
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -6374,7 +6433,7 @@ _WeeChat ≥ 2.2._
|
||||
|
||||
Ajouter les éléments d'une infolist dans une table de hachage.
|
||||
|
||||
Prototype:
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
@@ -8147,6 +8206,49 @@ if weechat.config_boolean_default(option):
|
||||
# ...
|
||||
----
|
||||
|
||||
==== config_boolean_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Retourner la valeur booléenne héritée de l'option : la valeur si l'option n'est
|
||||
pas NULL, ou la valeur de l'option parente (si l'option hérite d'une autre option). +
|
||||
Si l'option parente n'est pas trouvée, retourner la valeur par défaut de l'option. +
|
||||
Si la valeur parente est NULL, retourner la valeur par défaut de l'option parente.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_boolean_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour : voir les fonctions <<_config_boolean,config_boolean>> et
|
||||
<<_config_boolean_default,config_boolean_default>>.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.autoconnect");
|
||||
int autoconnect = weechat_config_boolean_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_boolean_inherited(option: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("irc.server.libera.autoconnect")
|
||||
autoconect = weechat.config_boolean_inherited(option)
|
||||
----
|
||||
|
||||
==== config_integer
|
||||
|
||||
Retourner la valeur entière de l'option.
|
||||
@@ -8233,6 +8335,49 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_integer_default(option)
|
||||
----
|
||||
|
||||
==== config_integer_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited integer value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_integer_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour : voir les fonctions <<_config_integer,config_integer>> et
|
||||
<<_config_integer_default,config_integer_default>>.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.autojoin_delay");
|
||||
int delay = weechat_config_integer_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_integer_inherited(option: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("irc.server.libera.autojoin_delay")
|
||||
delay = weechat.config_integer_inherited(option)
|
||||
----
|
||||
|
||||
==== config_string
|
||||
|
||||
Retourner la valeur de l'option, sous forme de chaîne.
|
||||
@@ -8319,6 +8464,49 @@ option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_string_default(option)
|
||||
----
|
||||
|
||||
==== config_string_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited string value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
const char *weechat_config_string_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour : voir les fonctions <<_config_string,config_string>> et
|
||||
<<_config_string_default,config_string_default>>.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.msg_quit");
|
||||
const char *msg_quit = weechat_config_string_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_string_inherited(option: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("irc.server.libera.msg_quit")
|
||||
msg_quit = weechat.config_string_inherited(option)
|
||||
----
|
||||
|
||||
==== config_color
|
||||
|
||||
Retourner la valeur de l'option, sous forme de couleur.
|
||||
@@ -8359,7 +8547,7 @@ def config_color(option: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color(option)
|
||||
color = weechat.config_color(option)
|
||||
----
|
||||
|
||||
==== config_color_default
|
||||
@@ -8402,7 +8590,50 @@ def config_color_default(option: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_color_default(option)
|
||||
color = weechat.config_color_default(option)
|
||||
----
|
||||
|
||||
==== config_color_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited color value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
const char *weechat_config_color_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour : voir les fonctions <<_config_color,config_color>> et
|
||||
<<_config_color_default,config_color_default>>.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("plugin.section.option");
|
||||
const char *color = weechat_config_color_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_color_inherited(option: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
color = weechat.config_color_inherited(option)
|
||||
----
|
||||
|
||||
==== config_enum
|
||||
@@ -8490,11 +8721,54 @@ Script (Python) :
|
||||
# prototype
|
||||
def config_enum_default(option: str) -> int: ...
|
||||
|
||||
# example
|
||||
# exemple
|
||||
option = weechat.config_get("plugin.section.option")
|
||||
value = weechat.config_enum_default(option)
|
||||
----
|
||||
|
||||
==== config_enum_inherited
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Return inherited enum value of option: value of option if not NULL,
|
||||
or value of the parent option (if option inherits from another option). +
|
||||
If the parent option is not found, return the default value of the option. +
|
||||
If the parent value is NULL, return the default value of the parent option.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
int weechat_config_enum_inherited (struct t_config_option *option);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _option_ : pointeur vers l'option
|
||||
|
||||
Valeur de retour : voir les fonctions <<_config_enum,config_enum>> et
|
||||
<<_config_enum_default,config_enum_default>>.
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_config_option *option = weechat_config_get ("irc.server.libera.sasl_fail");
|
||||
int sasl_fail = weechat_config_enum_inherited (option);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def config_enum_inherited(option: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
option = weechat.config_get("irc.server.libera.sasl_fail")
|
||||
sasl_fail = weechat.config_enum_inherited(option)
|
||||
----
|
||||
|
||||
==== config_write_option
|
||||
|
||||
Écrire une ligne dans le fichier de configuration avec l'option et sa valeur
|
||||
@@ -12123,6 +12397,10 @@ Liste des signaux envoyés par WeeChat et les extensions :
|
||||
| Pointeur : tampon.
|
||||
| Titre du tampon changé.
|
||||
|
||||
| weechat | [[hook_signal_buffer_modes_changed]] buffer_modes_changed | 4.3.0
|
||||
| Pointeur : tampon.
|
||||
| Modes du tampon changés.
|
||||
|
||||
| weechat | [[hook_signal_buffer_type_changed]] buffer_type_changed |
|
||||
| Pointeur : tampon.
|
||||
| Type de tampon changé.
|
||||
@@ -12199,6 +12477,10 @@ Liste des signaux envoyés par WeeChat et les extensions :
|
||||
| Pointeur : tampon.
|
||||
| Recherche de texte dans le tampon.
|
||||
|
||||
| weechat | [[hook_signal_input_prompt_changed]] input_prompt_changed | 4.3.0
|
||||
| Pointer: buffer.
|
||||
| Invite de la zone de saisie modifiée.
|
||||
|
||||
| weechat | [[hook_signal_input_text_changed]] input_text_changed |
|
||||
| Pointeur : tampon.
|
||||
| Texte modifié dans la barre "input".
|
||||
@@ -13354,6 +13636,12 @@ utilisés :
|
||||
| Chaîne avec la valeur de l'étiquette IRC sans échappements,
|
||||
voir https://ircv3.net/specs/extensions/message-tags#escaping-values[cette page ^↗^^].
|
||||
|
||||
| [[hook_modifier_color_decode]] color_decode | 4.3.0
|
||||
| Chaîne de remplacement pour les couleurs supprimées
|
||||
| Toute chaîne.
|
||||
| Chaîne avec les couleurs WeeChat converties vers la chaîne de remplacement
|
||||
(couleurs supprimées si la chaîne de remplacement est vide).
|
||||
|
||||
| [[hook_modifier_color_decode_ansi]] color_decode_ansi | 1.0
|
||||
| "1" pour garder les couleurs, "0" pour les supprimer
|
||||
| Toute chaîne.
|
||||
@@ -14381,9 +14669,9 @@ weechat.prnt(weechat.current_buffer(), "Texte sur le tampon courant")
|
||||
|
||||
==== buffer_search
|
||||
|
||||
_Mis à jour dans la 1.0._
|
||||
_Mis à jour dans la 1.0, 4.3.0._
|
||||
|
||||
Rechercher un tampon par l'extension et/ou le nom.
|
||||
Rechercher un tampon par l'extension/nom, nom complet ou identifiant unique (`id`).
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -14395,10 +14683,11 @@ struct t_gui_buffer *weechat_buffer_search (const char *plugin,
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _plugin_ : nom de l'extension, la valeur spéciale suivante est autorisée :
|
||||
* _plugin_ : nom de l'extension, les valeurs spéciales suivantes sont autorisées :
|
||||
** `+==+` : le nom utilisé est le nom complet du tampon (par exemple :
|
||||
`irc.libera.#weechat` au lieu de `libera.#weechat`)
|
||||
_(WeeChat ≥ 1.0)_
|
||||
** `+==id+` : le nom utilisé est l'identifiant unique du tampon (`id`) _(WeeChat ≥ 4.3.0)_
|
||||
* _name_ : nom du tampon, si c'est NULL ou une chaîne vide, le tampon courant
|
||||
est retourné (tampon affiché par la fenêtre courante); si le nom commence par
|
||||
`(?i)`, la recherche est insensible à la casse _(WeeChat ≥ 1.0)_
|
||||
@@ -14413,6 +14702,7 @@ Exemples en C :
|
||||
----
|
||||
struct t_gui_buffer *buffer1 = weechat_buffer_search ("irc", "libera.#weechat");
|
||||
struct t_gui_buffer *buffer2 = weechat_buffer_search ("==", "irc.libera.#test"); /* WeeChat ≥ 1.0 */
|
||||
struct t_gui_buffer *buffer3 = weechat_buffer_search ("==id", "1709797810942688"); /* WeeChat ≥ 4.3.0 */
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -14662,6 +14952,7 @@ Paramètres :
|
||||
** _nicklist_nicks_count_ : nombre de pseudos dans la liste de pseudos
|
||||
** _nicklist_nicks_visible_count_ : nombre de pseudos affichés
|
||||
** _input_ : 1 si la zone de saisie est activée, sinon 0
|
||||
** _input_get_any_user_data_ : 1 si toutes les données utilisateur, y compris les commandes, sont envoyées à la fonction de rappel "input", sinon 0
|
||||
** _input_get_unknown_commands_ : 1 si les commandes inconnues sont envoyées à la fonction de rappel "input", sinon 0
|
||||
** _input_get_empty_ : 1 si une entrée vide est envoyée à la fonction de rappel "input", sinon 0
|
||||
** _input_multiline_ : 1 si plusieurs lignes sont envoyées comme un seul message à la fonction de rappel "input", sinon 0
|
||||
@@ -14729,6 +15020,7 @@ Paramètres :
|
||||
|
||||
* _buffer_ : pointeur vers le tampon
|
||||
* _property_ : nom de la propriété :
|
||||
** _id_ : identifiant unique _(WeeChat ≥ 4.3.0)_
|
||||
** _plugin_ : nom de l'extension qui a créé ce tampon ("core" pour le tampon principal WeeChat)
|
||||
** _name_ : nom du tampon
|
||||
** _full_name_ : nom complet du tampon ("extension.nom") _(WeeChat ≥ 0.3.7)_
|
||||
@@ -14736,6 +15028,9 @@ Paramètres :
|
||||
** _short_name_ : nom court du tampon (note : utilisé pour l'affichage seulement et peut être changé par l'utilisateur, il ne doit pas être utilisé pour trouver le nom du tampon, utilisez à la place _name_, _full_name_ ou bien la variable locale _channel_)
|
||||
** _type_ : type de tampon : "formatted" (formaté) ou "free" (contenu libre) _(WeeChat ≥ 4.2.0)_
|
||||
** _title_ : titre du tampon
|
||||
** _modes_ : modes _(WeeChat ≥ 4.3.0)_
|
||||
** _nicklist_last_id_assigned_ : dernier identifiant unique utilisé dans ce tampon pour un groupe ou un pseudo _(WeeChat ≥ 4.3.0)_
|
||||
** _input_prompt_ : invite de la zone saisie _(WeeChat ≥ 4.3.0)_
|
||||
** _input_ : texte saisi
|
||||
** _text_search_input_ : texte saisi sauvegardé avant la recherche de texte
|
||||
** _highlight_words_ : liste des mots pour le highlight
|
||||
@@ -14914,6 +15209,9 @@ Propriétés :
|
||||
| title | | toute chaîne
|
||||
| Change le titre du tampon.
|
||||
|
||||
| modes | 4.3.0 | toue chaîne
|
||||
| Change les modes du tampon.
|
||||
|
||||
| time_for_each_line | | "0" ou "1"
|
||||
| "0" pour cacher l'heure sur toutes les lignes du tampon, "1" pour afficher
|
||||
l'heure sur toutes les lignes (par défaut pour un nouveau tampon).
|
||||
@@ -14980,12 +15278,19 @@ Propriétés :
|
||||
| key_unbind_xxx | | -
|
||||
| Supprime la touche _xxx_ pour ce tampon.
|
||||
|
||||
| input_prompt | 4.3.0 | toute chaîne
|
||||
| Change le contenu de l'invite dans la zone de saisie.
|
||||
|
||||
| input | | toute chaîne
|
||||
| Change le contenu de la zone de saisie.
|
||||
|
||||
| input_pos | | position
|
||||
| Change la position du curseur dans la zone de saisie.
|
||||
|
||||
| input_get_any_user_data | 4.3.0 | "0" or "1"
|
||||
| "0" pour recevoir seulement les messages utilisateur (comportement par défaut),
|
||||
"1" pour tout recevoir, y compris les commandes.
|
||||
|
||||
| input_get_unknown_commands | | "0" ou "1"
|
||||
| "0" pour désactiver les commandes inconnues sur ce tampon (comportement par
|
||||
défaut), "1" pour recevoir les commandes inconnues, par exemple si
|
||||
@@ -15553,7 +15858,9 @@ group = weechat.nicklist_add_group(my_buffer, my_parent_group, "groupe_test",
|
||||
|
||||
==== nicklist_search_group
|
||||
|
||||
Rechercher un groupe dans la liste des pseudos.
|
||||
_Mis à jour dans la 4.3.0._
|
||||
|
||||
Rechercher un groupe dans la liste des pseudos par nom ou identifiant unique (`id`).
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -15569,7 +15876,8 @@ Paramètres :
|
||||
* _buffer_ : pointeur vers le tampon
|
||||
* _from_group_ : recherche depuis ce groupe seulement, si NULL, alors recherche
|
||||
dans toute la liste des pseudos
|
||||
* _name_ : nom du groupes à rechercher
|
||||
* _name_ : nom du groupe à rechercher ; avec WeeChat ≥ 4.3.0, un identifiant
|
||||
unique peut être donné avec le format : `==id:xxx` (où `xxx` est l'identifiant)
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -15579,8 +15887,10 @@ Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "groupe_test");
|
||||
struct t_gui_nick_group *ptr_group1 = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "groupe_test");
|
||||
struct t_gui_nick_group *ptr_group2 = weechat_nicklist_search_group (my_buffer,
|
||||
NULL, "==id:1714382231198764");
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -15590,8 +15900,9 @@ Script (Python) :
|
||||
# prototype
|
||||
def nicklist_search_group(buffer: str, from_group: str, name: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
group = weechat.nicklist_search_group(my_buffer, "", "groupe_test")
|
||||
# exemples
|
||||
group1 = weechat.nicklist_search_group(my_buffer, "", "groupe_test")
|
||||
group2 = weechat.nicklist_search_group(my_buffer, "", "==id:1714382231198764")
|
||||
----
|
||||
|
||||
==== nicklist_add_nick
|
||||
@@ -15602,13 +15913,13 @@ Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick_group *weechat_nicklist_add_nick (struct t_gui_buffer *buffer,
|
||||
struct t_gui_nick_group *group,
|
||||
const char *name,
|
||||
const char *color,
|
||||
const char *prefix,
|
||||
const char *prefix_color,
|
||||
int visible);
|
||||
struct t_gui_nick *weechat_nicklist_add_nick (struct t_gui_buffer *buffer,
|
||||
struct t_gui_nick_group *group,
|
||||
const char *name,
|
||||
const char *color,
|
||||
const char *prefix,
|
||||
const char *prefix_color,
|
||||
int visible);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
@@ -15668,7 +15979,9 @@ nick = weechat.nicklist_add_nick(my_buffer, my_group, "test_nick", color, "@", "
|
||||
|
||||
==== nicklist_search_nick
|
||||
|
||||
Rechercher un pseudo dans la liste des pseudos.
|
||||
_Mis à jour dans la 4.3.0._
|
||||
|
||||
Rechercher un pseudo dans la liste des pseudos par nom ou identifiant unique (`id`).
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -15684,7 +15997,8 @@ Paramètres :
|
||||
* _buffer_ : pointeur vers le tampon
|
||||
* _from_group_ : recherche depuis ce groupe seulement, si NULL, alors recherche
|
||||
dans toute la liste des pseudos
|
||||
* _name_ : nom du pseudo à rechercher
|
||||
* _name_ : nom du pseudo à rechercher ; avec WeeChat ≥ 4.3.0, un identifiant
|
||||
unique peut être donné avec le format : `==id:xxx` (où `xxx` est l'identifiant)
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -15694,8 +16008,10 @@ Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "test_nick");
|
||||
struct t_gui_nick *ptr_nick1 = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "test_nick");
|
||||
struct t_gui_nick *ptr_nick2 = weechat_nicklist_search_nick (my_buffer,
|
||||
NULL, "==id:1714382252187496");
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -15705,8 +16021,9 @@ Script (Python) :
|
||||
# prototype
|
||||
def nicklist_search_nick(buffer: str, from_group: str, name: str) -> str: ...
|
||||
|
||||
# exemple
|
||||
nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
|
||||
# exemples
|
||||
nick1 = weechat.nicklist_search_nick(my_buffer, "", "test_nick")
|
||||
nick2 = weechat.nicklist_search_nick(my_buffer, "", "==id:1714382252187496")
|
||||
----
|
||||
|
||||
==== nicklist_remove_group
|
||||
@@ -15929,6 +16246,7 @@ Paramètres :
|
||||
* _buffer_ : pointeur vers le tampon
|
||||
* _group_ : pointeur vers le groupe
|
||||
* _property_ : nom de la propriété :
|
||||
** _id_ : identifiant unique _(WeeChat ≥ 4.3.0)_
|
||||
** _name_ : nom du groupe
|
||||
** _color_ : couleur du groupe dans la liste des pseudos
|
||||
|
||||
@@ -16000,7 +16318,7 @@ parent = weechat.nicklist_group_get_pointer(buffer, group, "parent")
|
||||
|
||||
==== nicklist_group_set
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, mis à jour dans la 4.3.0._
|
||||
|
||||
Affecter une valeur à une propriété d'un groupe.
|
||||
|
||||
@@ -16023,15 +16341,19 @@ Paramètres :
|
||||
|
||||
Propriétés :
|
||||
|
||||
[width="100%",cols="^2,4,8",options="header"]
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Nom | Valeur | Description
|
||||
| Nom | WeeChat mini | Valeur | Description
|
||||
|
||||
| color | nom d'option de couleur WeeChat
|
||||
| id | 4.3.0 | entier de type "long long" ≥ 0
|
||||
| Nouvel identifiant pour le groupe (il doit être unique dans le tampon). +
|
||||
Note : il n'est pas recommandé de changer cet identifiant.
|
||||
|
||||
| color | | nom d'option de couleur WeeChat
|
||||
| Voir le paramètre "color" de la fonction
|
||||
<<_nicklist_add_group,nicklist_add_group>>.
|
||||
|
||||
| visible | "0", "1"
|
||||
| visible | | "0", "1"
|
||||
| "0" = groupe caché, "1" = groupe visible.
|
||||
|===
|
||||
|
||||
@@ -16132,6 +16454,7 @@ Paramètres :
|
||||
* _buffer_ : pointeur vers le tampon
|
||||
* _nick_ : pointeur vers le pseudo
|
||||
* _property_ : nom de la propriété :
|
||||
** _id_ : identifiant unique _(WeeChat ≥ 4.3.0)_
|
||||
** _name_ : nom du pseudo
|
||||
** _color_ : couleur du pseudo dans la liste des pseudos
|
||||
** _prefix_ : préfixe du pseudo
|
||||
@@ -16205,7 +16528,7 @@ group = weechat.nicklist_nick_get_pointer(buffer, nick, "group")
|
||||
|
||||
==== nicklist_nick_set
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, mis à jour dans la 4.3.0._
|
||||
|
||||
Affecter une valeur à une propriété d'un pseudo.
|
||||
|
||||
@@ -16228,22 +16551,26 @@ Paramètres :
|
||||
|
||||
Propriétés :
|
||||
|
||||
[width="100%",cols="^2,4,8",options="header"]
|
||||
[width="100%",cols="^2,^1,4,8",options="header"]
|
||||
|===
|
||||
| Nom | Valeur | Description
|
||||
| Nom | WeeChat mini | Valeur | Description
|
||||
|
||||
| color | nom d'option de couleur WeeChat
|
||||
| id | 4.3.0 | entier de type "long long" ≥ 0
|
||||
| Nouvel identifiant pour le pseudo (il doit être unique dans le tampon). +
|
||||
Note : il n'est pas recommandé de changer cet identifiant.
|
||||
|
||||
| color | | nom d'option de couleur WeeChat
|
||||
| Voir le paramètre "color" de la fonction
|
||||
<<_nicklist_add_nick,nicklist_add_nick>>.
|
||||
|
||||
| prefix | toute chaîne
|
||||
| prefix | | toute chaîne
|
||||
| Préfixe du pseudo.
|
||||
|
||||
| prefix_color | nom d'option de couleur WeeChat
|
||||
| prefix_color | | nom d'option de couleur WeeChat
|
||||
| Voir le paramètre "prefix_color" de la fonction
|
||||
<<_nicklist_add_nick,nicklist_add_nick>>.
|
||||
|
||||
| visible | "0", "1"
|
||||
| visible | | "0", "1"
|
||||
| "0" = pseudo caché, "1" = pseudo visible.
|
||||
|===
|
||||
|
||||
@@ -16761,7 +17088,7 @@ Fonctions pour exécuter des commandes WeeChat.
|
||||
|
||||
==== command
|
||||
|
||||
_Mis à jour dans la 1.1._
|
||||
_Mis à jour dans la 1.1, 4.0.0._
|
||||
|
||||
Exécuter une commande ou envoyer du texte au tampon.
|
||||
|
||||
@@ -16779,6 +17106,10 @@ Paramètres :
|
||||
* _command_ : commande à exécuter (si elle commence par "/"), ou texte à
|
||||
envoyer au tampon
|
||||
|
||||
[NOTE]
|
||||
Sur un tampon avec `input_multiline` défini à `0` (par défaut), seule la première
|
||||
commande est exécutée (avant le premier caractère de retour à la ligne : `\n`).
|
||||
|
||||
Valeur de retour _(WeeChat ≥ 1.1)_ :
|
||||
|
||||
* _WEECHAT_RC_OK_ si ok
|
||||
@@ -16806,7 +17137,7 @@ rc = weechat.command(weechat.buffer_search("irc", "libera.#weechat"), "/whois Fl
|
||||
|
||||
==== command_options
|
||||
|
||||
_WeeChat ≥ 2.5._
|
||||
_WeeChat ≥ 2.5, mis à jour dans la 4.0.0._
|
||||
|
||||
Exécuter une commande ou envoyer du texte au tampon avec des options.
|
||||
|
||||
@@ -16830,6 +17161,8 @@ Paramètres :
|
||||
des virgules ; voir la fonction <<_string_match_list,string_match_list>>
|
||||
pour le format
|
||||
** _delay_ : délai pour exécuter la commande, en millisecondes
|
||||
** _split_newline_ : `1` pour découper les commandes sur le caractère de retour
|
||||
à la ligne (`\n`) (_WeeChat ≥ 4.0.0_)
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
@@ -16860,7 +17193,7 @@ Script (Python) :
|
||||
def command_options(buffer: str, command: str, options: Dict[str, str]) -> int: ...
|
||||
|
||||
# exemple : autoriser toute commande sauf /exec
|
||||
rc = weechat.command("", "/une_commande paramètres", {"commands": "*,!exec"})
|
||||
rc = weechat.command_options("", "/une_commande paramètres", {"commands": "*,!exec"})
|
||||
----
|
||||
|
||||
[[completion]]
|
||||
@@ -18041,8 +18374,7 @@ Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "pointeur = 0x%lx",
|
||||
weechat_infolist_pointer (infolist, "mon_pointeur"));
|
||||
weechat_printf (NULL, "pointeur = %p", weechat_infolist_pointer (infolist, "mon_pointeur"));
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
@@ -18086,8 +18418,7 @@ Exemple en C :
|
||||
----
|
||||
int size;
|
||||
void *pointer = weechat_infolist_buffer (infolist, "mon_buffer", &size);
|
||||
weechat_printf (NULL, "buffer = 0x%lx, taille = %d",
|
||||
pointer, size);
|
||||
weechat_printf (NULL, "buffer = %p, taille = %d", pointer, size);
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
@@ -18130,7 +18461,7 @@ Script (Python) :
|
||||
def infolist_time(infolist: str, var: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "date/heure = %ld" % weechat.infolist_time(infolist, "mon_time"))
|
||||
weechat.prnt("", "date/heure = %d" % weechat.infolist_time(infolist, "mon_time"))
|
||||
----
|
||||
|
||||
==== infolist_free
|
||||
@@ -18250,7 +18581,7 @@ Cette fonction n'est pas disponible dans l'API script.
|
||||
|
||||
==== hdata_new_var
|
||||
|
||||
_WeeChat ≥ 0.3.6, mis à jour dans la 0.3.7, 0.3.9, 0.4.3, 3.4._
|
||||
_WeeChat ≥ 0.3.6, mis à jour dans la 0.3.7, 0.3.9, 0.4.3, 3.4, 4.3.0._
|
||||
|
||||
Créer une nouvelle variable dans le hdata.
|
||||
|
||||
@@ -18271,6 +18602,7 @@ Paramètres :
|
||||
** _WEECHAT_HDATA_CHAR_
|
||||
** _WEECHAT_HDATA_INTEGER_
|
||||
** _WEECHAT_HDATA_LONG_
|
||||
** _WEECHAT_HDATA_LONGLONG_ (_WeeChat ≥ 4.3.0_)
|
||||
** _WEECHAT_HDATA_STRING_
|
||||
** _WEECHAT_HDATA_SHARED_STRING_ (_WeeChat ≥ 0.4.3_)
|
||||
** _WEECHAT_HDATA_POINTER_
|
||||
@@ -18555,6 +18887,9 @@ switch (type)
|
||||
case WEECHAT_HDATA_LONG:
|
||||
/* ... */
|
||||
break;
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
/* ... */
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
/* ... */
|
||||
break;
|
||||
@@ -19166,7 +19501,7 @@ weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number"))
|
||||
_WeeChat ≥ 0.3.6._
|
||||
|
||||
Retourner la valeur de la variable dans la structure en utilisant le hdata, sous
|
||||
forme d'entier long.
|
||||
forme d'entier "long".
|
||||
|
||||
Prototype :
|
||||
|
||||
@@ -19202,7 +19537,51 @@ Script (Python) :
|
||||
def hdata_long(hdata: str, pointer: str, name: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar"))
|
||||
weechat.prnt("", "longvar = %d" % weechat.hdata_long(hdata, pointer, "longvar"))
|
||||
----
|
||||
|
||||
==== hdata_longlong
|
||||
|
||||
_WeeChat ≥ 4.3.0._
|
||||
|
||||
Retourner la valeur de la variable dans la structure en utilisant le hdata, sous
|
||||
forme d'entier "long long".
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
long long weechat_hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
||||
* _hdata_ : pointeur vers le hdata
|
||||
* _pointer_ : pointeur vers un objet WeeChat ou d'une extension
|
||||
* _name_ : nom de la variable (doit être de type "long long"); pour les tableaux,
|
||||
le nom peut être "N|name" où N est un index dans le tableau (démarrant à 0),
|
||||
par exemple : "2|name"
|
||||
|
||||
Valeur de retour :
|
||||
|
||||
* valeur de la variable, sous forme d'entier "long long".
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,c]
|
||||
----
|
||||
weechat_printf (NULL, "longlongvar = %llu", weechat_hdata_longlong (hdata, pointer, "longlongvar"));
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
||||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
def hdata_longlong(hdata: str, pointer: str, name: str) -> int: ...
|
||||
|
||||
# exemple
|
||||
weechat.prnt("", "longlongvar = %d" % weechat.hdata_longlong(hdata, pointer, "longlongvar"))
|
||||
----
|
||||
|
||||
==== hdata_string
|
||||
@@ -19298,7 +19677,7 @@ def hdata_pointer(hdata: str, pointer: str, name: str) -> str: ...
|
||||
# exemple
|
||||
hdata = weechat.hdata_get("buffer")
|
||||
buffer = weechat.buffer_search_main()
|
||||
weechat.prnt("", "lines = %lx" % weechat.hdata_pointer(hdata, buffer, "lines"))
|
||||
weechat.prnt("", "lines = %x" % weechat.hdata_pointer(hdata, buffer, "lines"))
|
||||
----
|
||||
|
||||
==== hdata_time
|
||||
|
||||
@@ -723,6 +723,7 @@ inl:
|
||||
nicklist_visible_count: 0
|
||||
title: 'WeeChat 2.9-dev (C) 2003-2020 - https://weechat.org/'
|
||||
input: 1
|
||||
input_get_any_user_data: 0
|
||||
input_get_unknown_commands: 0
|
||||
input_get_empty: 0
|
||||
input_multiline: 0
|
||||
|
||||
@@ -570,318 +570,14 @@ link:weechat_plugin_api.fr.html[Référence API extension WeeChat ^↗^^].
|
||||
|
||||
Liste des fonctions de l'API script :
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Catégorie | Fonctions
|
||||
|
||||
| général
|
||||
| register
|
||||
|
||||
| extensions
|
||||
| plugin_get_name
|
||||
|
||||
| chaînes
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| répertoires
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| listes triées
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| fichiers de configuration
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| associations de touches
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| affichage
|
||||
| prefix +
|
||||
color +
|
||||
print (pour python : prnt) +
|
||||
print_date_tags (pour python : prnt_date_tags) +
|
||||
print_datetime_tags (pour python : prnt_datetime_tags) +
|
||||
print_y (pour python : prnt_y) +
|
||||
print_y_date_tags (pour python : prnt_y_date_tags) +
|
||||
print_y_datetime_tags (pour python : prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| hooks
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| tampons
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| fenêtres
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| liste des pseudos
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| barres
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| commandes
|
||||
| command +
|
||||
command_options
|
||||
|
||||
| complétion
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| infos
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| infolists
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| mise à jour
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.fr.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Constantes
|
||||
|
||||
Liste des constantes de l'API script :
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
|
||||
| Catégorie | Constantes
|
||||
|
||||
| codes retour
|
||||
| `WEECHAT_RC_OK` (entier) +
|
||||
`WEECHAT_RC_OK_EAT` (entier) +
|
||||
`WEECHAT_RC_ERROR` (entier)
|
||||
|
||||
| fichiers de configuration
|
||||
| `WEECHAT_CONFIG_READ_OK` (entier) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (entier) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (entier) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (entier) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (entier) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (entier) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (entier)
|
||||
|
||||
| listes triées
|
||||
| `WEECHAT_LIST_POS_SORT` (chaîne) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (chaîne) +
|
||||
`WEECHAT_LIST_POS_END` (chaîne)
|
||||
|
||||
| hotlist
|
||||
| `WEECHAT_HOTLIST_LOW` (chaîne) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (chaîne) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (chaîne) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (chaîne)
|
||||
|
||||
| hook process
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (entier) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (entier)
|
||||
|
||||
| hook connect
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (entier) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (entier)
|
||||
|
||||
| hook signal
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (chaîne) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (chaîne) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (chaîne)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.fr.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Tâches courantes
|
||||
|
||||
+95
-31
@@ -32,7 +32,7 @@ Ses principales fonctionnalités sont les suivantes :
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^],
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] et
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]
|
||||
* proxy IRC et relai pour interfaces distantes
|
||||
* proxy IRC et relai pour WeeChat et interfaces distantes
|
||||
* multi plates-formes (GNU/Linux, *BSD, macOS, Windows et d'autres systèmes)
|
||||
* 100% GPL, logiciel libre
|
||||
|
||||
@@ -128,7 +128,8 @@ Le tableau suivant liste les paquets *requis* pour construire WeeChat :
|
||||
|
||||
| zlib1g-dev |
|
||||
| Extension Logger : compression des fichiers de log qui tournent (gzip). +
|
||||
Extention Relay : compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^^] (protocole weechat). +
|
||||
Extention Relay : compression des messages (WeeChat -> client) avec https://zlib.net/[zlib ^↗^^]
|
||||
(protocoles api et weechat). +
|
||||
Extension Script : lecture du fichier d'index du dépôt (gzip).
|
||||
|===
|
||||
|
||||
@@ -153,9 +154,13 @@ Le tableau suivant liste les paquets optionnels pour compiler WeeChat :
|
||||
| ca-certificates |
|
||||
| Certificats pour les connexions TLS.
|
||||
|
||||
| libcjson-dev |
|
||||
| Extension Relay : protocole "api" (API REST HTTP).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Extension Logger : compression des fichiers de log qui tournent (zstandard). +
|
||||
Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^] (protocole weechat).
|
||||
Extension Relay : compression des messages (WeeChat -> client) avec https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(protocoles api et weechat).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Extension spell.
|
||||
@@ -272,6 +277,9 @@ Liste des options disponibles :
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| Compiler <<charset,l'extension Charset>>.
|
||||
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Support du JSON avec la bibliothèque https://github.com/DaveGamble/cJSON[cJSON ^↗^^].
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| Construire la page man.
|
||||
|
||||
@@ -523,11 +531,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -1880,10 +1888,10 @@ avec la touche kbd:[Alt+m] (commande : `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat : tampon /list | Descendre de cinq lignes dans le tampon /list. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon /list | Sélectionner la ligne dans le tampon /list. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon /list | Rejoindre le canal IRC sur la ligne sélectionnée. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon script | Installer/supprimer un script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat : tampon script | Monter de 5 lignes dans le tampon script. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat : tampon script | Descendre de 5 lignes dans le tampon script. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat : tampon script | Sélectionner la ligne dans le tampon script. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat : tampon script | Installer/supprimer un script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | haut / gauche | buflist | Déplacer le tampon vers un numéro inférieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | bas / droit | buflist | Déplacer le tampon vers un numéro supérieur. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Aller au tampon (tampon précédent dans la liste des tampons visités si le tampon est le courant). | Signal `+buflist_mouse+`.
|
||||
@@ -2004,8 +2012,8 @@ Ces touches et actions sont utilisées sur le tampon script
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Touche | Action ^(1)^ | Description | Commande
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/script up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/script down+`
|
||||
| kbd:[↑] | | Monter d'une ligne. | `+/script -up+`
|
||||
| kbd:[↓] | | Descendre d'une ligne. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Monter d'une page. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Descendre d'une page. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Installer le script. | `+/script install+`
|
||||
@@ -2737,27 +2745,38 @@ utilisant le contexte "mouse" (pour la syntaxe voir la commande
|
||||
Un nom d'évènement consiste en un modificateur (facultatif), un bouton/roulette
|
||||
et un geste (facultatif). Les différents éléments sont séparés par `+-+`.
|
||||
|
||||
Liste des modificateurs :
|
||||
Liste des modificateurs (par ordre dans le nom de l'évènement) :
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Modificateur | Description
|
||||
| ctrl | Touche kbd:[Ctrl]
|
||||
| alt | Touche kbd:[Alt]
|
||||
| ctrl-alt | Touches kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Touche kbd:[Ctrl]
|
||||
| shift | Touche kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Le modificateur `shift` peut rarement être utilisé dans WeeChat car
|
||||
beaucoup de terminaux utilisent ce modificateur pour attraper directement les
|
||||
évènements souris.
|
||||
|
||||
Plusieurs modificateurs peuvent être combinés, par exemple :
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
Liste des boutons/roulette :
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Bouton/roulette | Description
|
||||
| button1 | Clic sur le bouton gauche
|
||||
| button2 | Clic sur le bouton droit
|
||||
| button3 | Clic sur le bouton du milieu (souvent clic sur la roulette)
|
||||
| button4 ... button9 | Clic sur un bouton additionnel
|
||||
| wheelup | Roulette (haut)
|
||||
| wheeldown | Roulette (bas)
|
||||
| Bouton/roulette | Description
|
||||
| button1 | Clic sur le bouton gauche
|
||||
| button2 | Clic sur le bouton droit
|
||||
| button3 | Clic sur le bouton du milieu (souvent clic sur la roulette)
|
||||
| button4 ... button11 | Clic sur un bouton additionnel
|
||||
| wheelup | Roulette (haut)
|
||||
| wheeldown | Roulette (bas)
|
||||
|===
|
||||
|
||||
Liste des gestes (seulement pour les boutons, pas la roulette) :
|
||||
@@ -2794,7 +2813,7 @@ Exemples d'évènements :
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -4641,8 +4660,13 @@ utilisant divers protocoles :
|
||||
|
||||
* _irc_ : proxy IRC : utilisé pour partager la connexions aux serveurs IRC avec
|
||||
un ou plusieurs autres clients IRC
|
||||
* _api_ : API REST HTTP, utilisée par WeeChat et les interfaces distantes pour
|
||||
afficher et interagir avec WeeChat
|
||||
* _weechat_ : protocole utilisé par les interfaces distantes pour afficher et
|
||||
interagir avec WeeChat, voir https://weechat.org/about/interfaces/[cette page ^↗^^].
|
||||
interagir avec WeeChat.
|
||||
|
||||
Pour les protocoles _api_ et _weechat_, voir la liste des interfaces distantes
|
||||
sur https://weechat.org/about/interfaces/[cette page ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== Mot de passe
|
||||
@@ -4655,14 +4679,14 @@ commandes :
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
Ce mot de passe sera utilisé pour les protocoles _irc_ et _weechat_.
|
||||
Ce mot de passe est utilisé avec tous les protocoles.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
TOTP (« Time-based One-Time Password » : mot de passe à usage unique basé sur le
|
||||
temps) peut être utilisé comme second facteur d'authentification pour le protocole
|
||||
_weechat_, en plus du mot de passe.
|
||||
temps) peut être utilisé comme second facteur d'authentification pour les
|
||||
protocoles _api_ et _weechat_, en plus du mot de passe.
|
||||
|
||||
Il est optionnel et augmente le niveau de sécurité.
|
||||
|
||||
@@ -4759,6 +4783,39 @@ avec ces commandes :
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
L'extension Relay peut envoyer les données à un autre WeeChat ou une interface
|
||||
distante avec un protocol HTTP de type API REST.
|
||||
|
||||
Vous pouvez parcourir et tester l'API en ligne :
|
||||
https://weechat.org/api/[API Relay WeeChat ^↗^^].
|
||||
|
||||
Vous pouvez vous connecter avec WeeChat ou une interface distante, voir
|
||||
https://weechat.org/about/interfaces/[cette page ^↗^^].
|
||||
|
||||
Par exemple :
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Maintenant vous pouvez vous connecter sur le port 9000 avec une interface
|
||||
distante en utilisant le mot de passe "motdepasse".
|
||||
|
||||
Pour vous connecter à un relai _api_ avec WeeChat :
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=motdepasse
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Le WeeChat distant doit exposer exactement la même version d'API que le WeeChat
|
||||
local, il est donc fortement recommandé d'utiliser exactement la même version
|
||||
de WeeChat de chaque côté.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== Protocole WeeChat
|
||||
|
||||
@@ -4802,8 +4859,9 @@ websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
Le port (9000 dans l'exemple) est le port défini dans l'extension Relay.
|
||||
L'URI doit toujours se terminer par "/weechat" (pour les protocoles _irc_ et
|
||||
_weechat_).
|
||||
|
||||
L'URI doit se terminer par "/weechat" pour les protocoles _irc_ et _weechat_ et
|
||||
"/api" pour le protocole _api_.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== UNIX domain sockets
|
||||
@@ -4848,7 +4906,7 @@ Sections dans le fichier _relay.conf_ :
|
||||
| network | /set relay.network.* | Options réseau.
|
||||
| irc | /set relay.irc.* | Options spécifiques au protocole irc (proxy irc).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Ports utilisés pour le relai (protocoles irc et weechat) (les options peuvent être ajoutées/supprimées dans la section).
|
||||
/set relay.port.* | Ports utilisés pour le relai (les options peuvent être ajoutées/supprimées dans la section).
|
||||
|===
|
||||
|
||||
Options :
|
||||
@@ -5265,7 +5323,9 @@ Les groupes de correspondance peuvent être utilisés dans le _remplacement_ :
|
||||
|
||||
* `+${re:0}+` à `+${re:99}+` : `+${re:0}+` est la correspondance complète, `+${re:1}+`
|
||||
à `+${re:99}+` sont les groupes capturés
|
||||
* `+${re:+}+` : la dernière correspondance (avec le numéro le plus élevé)
|
||||
* `pass:[${re:+}]` : la dernière correspondance (avec le numéro le plus élevé)
|
||||
* `+${re:#}+` : index du dernier groupe capturé
|
||||
* `+${re:repl_index}+` : index du remplacement en cours (démarre à 1)
|
||||
* `+${hide:c,${re:N}}+` : la correspondance "N" avec tous les caractères
|
||||
remplacés par "c" (exemple : `+${hide:*,${re:2}}+` est le groupe n°2 avec tous
|
||||
les caractères remplacés par `+*+`).
|
||||
@@ -5421,7 +5481,7 @@ suivantes sont ajoutées dans la table de hachage :
|
||||
| server | chaîne | Nom du serveur (exemple : "libera").
|
||||
| tags | chaîne | Étiquettes dans le message (rarement utilisées).
|
||||
| message_without_tags | chaîne | Message sans les étiquettes.
|
||||
| nick | chaîne | Pseudo.
|
||||
| nick | chaîne | Pseudo. ^(1)^
|
||||
| host | chaîne | Nom d'hôte.
|
||||
| command | chaîne | Commande IRC (exemple : "PRIVMSG", "NOTICE", ...).
|
||||
| channel | chaîne | Canal IRC.
|
||||
@@ -5433,6 +5493,10 @@ suivantes sont ajoutées dans la table de hachage :
|
||||
| pos_text | chaîne | L'index de _text_ dans le message ("-1" si _text_ n'a pas été trouvé).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Le pseudo est l'expéditeur du message. +
|
||||
Votre propre pseudo sur le serveur est `${irc_server.nick}`.
|
||||
|
||||
Lorsque la donnée est un pointeur, la variable `+tg_signal_data+` peut être
|
||||
utilisée comme ceci pour lire une propriété hdata (dans cet exemple il s'agit
|
||||
d'un pointeur sur un tampon) :
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -579,331 +579,14 @@ link:weechat_plugin_api.it.html[WeeChat plugin API reference ^↗^^].
|
||||
|
||||
Elenco di funzioni nelle API per gli script:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Categoria | Funzioni
|
||||
|
||||
| generale
|
||||
| register
|
||||
|
||||
| plugin
|
||||
| plugin_get_name
|
||||
|
||||
| stringhe
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| directory
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| liste ordinate
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| file di configurazione
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| combinazione tasti
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| visualizzazione
|
||||
| prefix +
|
||||
color +
|
||||
// TRANSLATION MISSING
|
||||
print (for python: prnt) +
|
||||
// TRANSLATION MISSING
|
||||
print_date_tags (for python: prnt_date_tags) +
|
||||
// TRANSLATION MISSING
|
||||
print_datetime_tags (for python: prnt_datetime_tags) +
|
||||
// TRANSLATION MISSING
|
||||
print_y (for python: prnt_y) +
|
||||
// TRANSLATION MISSING
|
||||
print_y_date_tags (for python: prnt_y_date_tags) +
|
||||
// TRANSLATION MISSING
|
||||
print_y_datetime_tags (for python: prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| hook
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| buffer
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| finestre
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| lista nick
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| barre
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| comandi
|
||||
| command +
|
||||
command_options
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| completion
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| info
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| liste info
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| aggiornamento
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.it.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Costanti
|
||||
|
||||
Elenco di costanti nelle API per gli script:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Categoria | Costanti
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| codici restituiti
|
||||
| `WEECHAT_RC_OK` (integer) +
|
||||
`WEECHAT_RC_OK_EAT` (integer) +
|
||||
`WEECHAT_RC_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| file di configurazione
|
||||
| `WEECHAT_CONFIG_READ_OK` (integer) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| liste ordinate
|
||||
| `WEECHAT_LIST_POS_SORT` (string) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (string) +
|
||||
`WEECHAT_LIST_POS_END` (string)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| hotlist
|
||||
| `WEECHAT_HOTLIST_LOW` (string) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (string) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (string) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (string)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| hook su processo
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (integer) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| hook su connessione
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| hook su segnale
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (string)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.it.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Compiti comuni
|
||||
|
||||
+104
-29
@@ -40,7 +40,7 @@ Le principali caratteristiche:
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] e
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]
|
||||
// TRANSLATION MISSING
|
||||
* IRC proxy and relay for remote interfaces
|
||||
* IRC proxy and relay for WeeChat and remote interfaces
|
||||
* multi-piattaforma (GNU/Linux, *BSD, macOS, Windows ed altre)
|
||||
* 100% GPL, software libero
|
||||
|
||||
@@ -157,7 +157,8 @@ WeeChat:
|
||||
// TRANSLATION MISSING
|
||||
| zlib1g-dev |
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^]
|
||||
(api and weechat protocols). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|===
|
||||
|
||||
@@ -188,10 +189,15 @@ WeeChat:
|
||||
| ca-certificates |
|
||||
| Certificati per le connessioni TLS.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libcjson-dev |
|
||||
| Relay plugin: protocol "api" (HTTP REST API).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(api and weechat protocols).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Plugin spell.
|
||||
@@ -320,6 +326,10 @@ List of available options:
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| Compile <<charset,Charset plugin>>.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Support of JSON with https://github.com/DaveGamble/cJSON[cJSON ^↗^^] library.
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| Build man page.
|
||||
|
||||
@@ -582,11 +592,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -2061,13 +2071,13 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▲] | - | chat: script buffer | Move 5 lines up in script buffer. | `+/script up 5+`
|
||||
| kbd:[▲] | - | chat: script buffer | Move 5 lines up in script buffer. | `+/script -up 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[▼] | - | chat: script buffer | Move 5 lines down in script buffer. | `+/script down 5+`
|
||||
| kbd:[▼] | - | chat: script buffer | Move 5 lines down in script buffer. | `+/script -down 5+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[■ □ □] | - | chat: script buffer | Select line in script buffer. | `+/script -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[□ □ ■] | - | chat: script buffer | Install/remove script. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[■ □ □] | up / left | buflist | Move buffer to a lower number. | Signal `+buflist_mouse+`.
|
||||
// TRANSLATION MISSING
|
||||
@@ -2200,8 +2210,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
@@ -2947,27 +2957,40 @@ contesto "mouse" (per la sintassi, consultare comando
|
||||
Il nome dell'evento consiste di un modificatore (opzionale), il nome di un
|
||||
pulsante/rotellina e un'azione (opzionale). Elementi diversi sono separati da `+-+`.
|
||||
|
||||
Elenco di modificatori
|
||||
// TRANSLATION MISSING
|
||||
List of modifiers (by order in the event name):
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Modificatore | Descrizione
|
||||
| ctrl | Tasto kbd:[Ctrl]
|
||||
| alt | Tasto kbd:[Alt]
|
||||
| ctrl-alt | Tasto kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Tasto kbd:[Ctrl]
|
||||
| shift | Tasto kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
|
||||
use this modifier to catch directly mouse events.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Several modifiers can be combined, for example:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
Elenco di pulsanti/rotellina:
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Pulsante/rotellina | Descrizione
|
||||
| button1 | Click sul tasto sinistro
|
||||
| button2 | Click sul tasto destro
|
||||
| button3 | Click sul tasto centrale (spesso click sulla rotellina)
|
||||
| button4 ... button9 | Click sui pulsanti extra
|
||||
| wheelup | Rotellina (su)
|
||||
| wheeldown | Rotellina (giù)
|
||||
| Pulsante/rotellina | Descrizione
|
||||
| button1 | Click sul tasto sinistro
|
||||
| button2 | Click sul tasto destro
|
||||
| button3 | Click sul tasto centrale (spesso click sulla rotellina)
|
||||
| button4 ... button11 | Click sui pulsanti extra
|
||||
| wheelup | Rotellina (su)
|
||||
| wheeldown | Rotellina (giù)
|
||||
|===
|
||||
|
||||
Elenco di azioni (solo per i pulsanti, non la rotellina):
|
||||
@@ -3004,7 +3027,7 @@ Esempio di eventi:
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -4882,8 +4905,15 @@ protocolli differenti:
|
||||
* _irc_: proxy IRC: usato per condividere le connessioni ai server IRC con uno
|
||||
o più client IRC
|
||||
// TRANSLATION MISSING
|
||||
* _api_: HTTP REST API, used by WeeChat and remote interfaces to display and
|
||||
interact with WeeChat
|
||||
// TRANSLATION MISSING
|
||||
* _weechat_: protocol used by remote interfaces to display and interact with
|
||||
WeeChat, see https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
WeeChat.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For _api_ and _weechat_ protocols, see the list of remote interfaces on
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_password]]
|
||||
@@ -4896,14 +4926,16 @@ It is highly recommended to set a password for relay, with these commands:
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
This password is used for _irc_ and _weechat_ protocols.
|
||||
// TRANSLATION MISSING
|
||||
This password is used with all protocols.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
// TRANSLATION MISSING
|
||||
TOTP (Time-based One-Time Password) can be used as secondary authentication
|
||||
factor for _weechat_ protocol, in addition to the password.
|
||||
factor for _api_ and _weechat_ protocols, in addition to the password.
|
||||
|
||||
This is optional and increases the security level.
|
||||
|
||||
@@ -4998,6 +5030,40 @@ commands:
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
The Relay plugin can send data to a remote WeeChat or interface using an
|
||||
HTTP REST API protocol.
|
||||
|
||||
You can browse and test the API online:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
You can connect with WeeChat or a remote interface, see
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
For example:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Now you can connect on port 9000 with a WeeChat or a remote interface using
|
||||
password "mypassword".
|
||||
|
||||
To connect to an _api_ relay with WeeChat:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The remote WeeChat must expose the same API version as the local WeeChat, so
|
||||
it's highly recommended to use exactly the same WeeChat version on remote
|
||||
and local client.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== Protocollo WeeChat
|
||||
|
||||
@@ -5041,7 +5107,9 @@ websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
The port (9000 in example) is the port defined in Relay plugin.
|
||||
The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols).
|
||||
|
||||
The URI must end with "/weechat" for _irc_ and _weechat_ protocols and "/api"
|
||||
for _api_ protocol.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_unix_socket]]
|
||||
@@ -5087,7 +5155,7 @@ Sections in file _relay.conf_:
|
||||
| network | /set relay.network.* | Network options.
|
||||
| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section).
|
||||
/set relay.port.* | Ports used for relay (options can be added/removed in section).
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
@@ -5507,7 +5575,9 @@ Matching groups can be used in _replace_:
|
||||
|
||||
* `+${re:0}+` to `+${re:99}+`: `+${re:0}+` is the whole match, `+${re:1}+` to
|
||||
`+${re:99}+` are groups captured
|
||||
* `+${re:+}+`: the last match (with highest number)
|
||||
* `pass:[${re:+}]`: the last match (with highest number)
|
||||
* `+${re:#}+`: index of last group captured
|
||||
* `+${re:repl_index}+`: index of replacement being done (starts to 1)
|
||||
* `+${hide:c,${re:N}}+`: match "N" with all chars replaced by "c"
|
||||
(example: `+${hide:*,${re:2}}+` is the group #2 with all chars replaced by
|
||||
`+*+`).
|
||||
@@ -5656,7 +5726,7 @@ is added in hashtable:
|
||||
| server | string | Name of server (example: "libera").
|
||||
| tags | string | Tags in message (rarely used).
|
||||
| message_without_tags | string | Message without tags.
|
||||
| nick | string | Nick.
|
||||
| nick | string | Nick. ^(1)^
|
||||
| host | string | Hostname.
|
||||
| command | string | IRC command (example: "PRIVMSG", "NOTICE", ...).
|
||||
| channel | string | IRC channel.
|
||||
@@ -5668,6 +5738,11 @@ is added in hashtable:
|
||||
| pos_text | string | The index of _text_ in message ("-1" if _text_ was not found).
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ The nick is the sender of the message. +
|
||||
Your own nick on the server is `${irc_server.nick}`.
|
||||
|
||||
When the data is a pointer, the variable `+tg_signal_data+` can be used like this
|
||||
to read a hdata property (in this example this is a pointer on a buffer):
|
||||
|
||||
|
||||
+433
-351
@@ -119,103 +119,103 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| パス/ファイル名 | 説明
|
||||
| core/ | コア関数: エントリポイント、内部構造体
|
||||
| wee-arraylist.c | 配列リスト
|
||||
| wee-backtrace.c | クラッシュした際にバックトレースを表示
|
||||
| パス/ファイル名 | 説明
|
||||
| core/ | コア関数: エントリポイント、内部構造体
|
||||
| core-arraylist.c | 配列リスト
|
||||
| core-backtrace.c | クラッシュした際にバックトレースを表示
|
||||
// TRANSLATION MISSING
|
||||
| wee-calc.c | Calculate result of expressions.
|
||||
| wee-command.c | WeeChat コアコマンド
|
||||
| wee-completion.c | デフォルト補完
|
||||
| wee-config-file.c | 設定ファイル管理
|
||||
| wee-config.c | WeeChat コアの設定オプション (weechat.conf ファイル)
|
||||
| core-calc.c | Calculate result of expressions.
|
||||
| core-command.c | WeeChat コアコマンド
|
||||
| core-completion.c | デフォルト補完
|
||||
| core-config-file.c | 設定ファイル管理
|
||||
| core-config.c | WeeChat コアの設定オプション (weechat.conf ファイル)
|
||||
// TRANSLATION MISSING
|
||||
| wee-crypto.c | Cryptographic functions.
|
||||
| wee-debug.c | デバッグ用関数
|
||||
| core-crypto.c | Cryptographic functions.
|
||||
| core-debug.c | デバッグ用関数
|
||||
// TRANSLATION MISSING
|
||||
| wee-dir.c | Directory/file functions.
|
||||
| core-dir.c | Directory/file functions.
|
||||
// TRANSLATION MISSING
|
||||
| wee-doc.c | Build of files for documentation.
|
||||
| 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 | データ保護用の関数
|
||||
| wee-secure-buffer.c | データ保護用のバッファ
|
||||
| wee-secure-config.c | 安全なデータオプション (sec.conf ファイル)
|
||||
| core-doc.c | Build of files for documentation.
|
||||
| core-eval.c | 内部変数へのリファレンスを含む式を評価
|
||||
| core-hashtable.c | ハッシュテーブル
|
||||
| core-hdata.c | hdata (ハッシュテーブルを用いて直接データを読む)
|
||||
| core-hook.c | フック
|
||||
| core-infolist.c | インフォリスト (オブジェクトに関するデータを含むリスト)
|
||||
| core-input.c | コマンドおよびテキストの入力
|
||||
| core-list.c | ソート済みリスト
|
||||
| core-log.c | WeeChat ログファイル (weechat.log) に書き込む
|
||||
| core-network.c | ネットワーク関数 (サーバやプロキシへの接続)
|
||||
| core-proxy.c | プロキシ管理
|
||||
| core-secure.c | データ保護用の関数
|
||||
| core-secure-buffer.c | データ保護用のバッファ
|
||||
| core-secure-config.c | 安全なデータオプション (sec.conf ファイル)
|
||||
// TRANSLATION MISSING
|
||||
| wee-signal.c | Signal functions.
|
||||
| wee-string.c | 文字列関数
|
||||
| core-signal.c | Signal functions.
|
||||
| core-string.c | 文字列関数
|
||||
// TRANSLATION MISSING
|
||||
| wee-sys.c | System functions.
|
||||
| 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" フック
|
||||
| wee-hook-url.c | "url" フック
|
||||
| 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-sys.c | System functions.
|
||||
| core-upgrade-file.c | 内部アップグレードシステム
|
||||
| core-upgrade.c | WeeChat コアのアップグレード (バッファ、行、履歴、...)
|
||||
| core-url.c | URL 転送 (libcurl を使う)
|
||||
| core-utf8.c | UTF-8 関数
|
||||
| core-util.c | その他の関数
|
||||
| core-version.c | WeeChat バージョンについての関数
|
||||
| weechat.c | 主要関数: コマンドラインオプション、起動
|
||||
| hook/ | フック関数
|
||||
| hook-command-run.c | "command_run" フック
|
||||
| hook-command.c | "command" フック
|
||||
| hook-completion.c | "completion" フック
|
||||
| hook-config.c | "config" フック
|
||||
| hook-connect.c | "connect" フック
|
||||
| hook-fd.c | "fd" フック
|
||||
| hook-focus.c | "focus" フック
|
||||
| hook-hdata.c | "hdata" フック
|
||||
| hook-hsignal.c | "hsignal" フック
|
||||
| hook-info-hashtable.c | "info_hashtable" フック
|
||||
| hook-info.c | "info" フック
|
||||
| hook-infolist.c | "infolist" フック
|
||||
| hook-line.c | "line" フック
|
||||
| hook-modifier.c | "modifier" フック
|
||||
| hook-print.c | "print" フック
|
||||
| hook-process.c | "process" フック
|
||||
| hook-signal.c | "signal" フック
|
||||
| hook-timer.c | "timer" フック
|
||||
| hook-url.c | "url" フック
|
||||
| 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]]
|
||||
@@ -223,193 +223,213 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| パス/ファイル名 | 説明
|
||||
| plugins/ | プラグインのルートディレクトリ
|
||||
| plugin.c | プラグイン管理 (動的 C 言語ライブラリのロード/アンロード)
|
||||
| plugin-api.c | プラグイン API の追加関数 (WeeChat コア関数のラッパー)
|
||||
| plugin-api-info.c | プラグイン API 用のインフォ/インフォリストに関する追加関数
|
||||
| plugin-config.c | プラグイン設定オプション (plugins.conf ファイル)
|
||||
| plugin-script.c | スクリプトプラグインの共用関数
|
||||
| plugin-script-api.c | スクリプト API 関数: 一部のプラグイン API 関数のラッパー
|
||||
| plugin-script-config.c | スクリプトプラグインの設定オプション (python.conf、perl.conf 等のファイル)
|
||||
| weechat-plugin.h | WeeChat プラグインと一緒に配布されるヘッダファイル、プラグインのコンパイルに必要
|
||||
| alias/ | alias プラグイン
|
||||
| alias.c | alias の主要関数
|
||||
| alias-command.c | alias コマンド
|
||||
| alias-completion.c | alias 補完
|
||||
| alias-config.c | alias 設定オプション (alias.conf ファイル)
|
||||
| alias-info.c | alias の情報/インフォリスト/hdata
|
||||
| spell/ | spell プラグイン
|
||||
| spell.c | spell の主関数
|
||||
| spell-bar-item.c | spell バー要素
|
||||
| spell-command.c | spell コマンド
|
||||
| spell-completion.c | spell 補完
|
||||
| spell-config.c | spell 設定オプション (spell.conf ファイル)
|
||||
| spell-info.c | spell の情報/インフォリスト/hdata
|
||||
| spell-speller.c | spell のスペラー管理
|
||||
| buflist/ | buflist プラグイン
|
||||
| buflist.c | buflist の主要関数
|
||||
| buflist-bar-item.c | buflist バー要素
|
||||
| buflist-command.c | buflist コマンド
|
||||
| パス/ファイル名 | 説明
|
||||
| plugins/ | プラグインのルートディレクトリ
|
||||
| plugin.c | プラグイン管理 (動的 C 言語ライブラリのロード/アンロード)
|
||||
| plugin-api.c | プラグイン API の追加関数 (WeeChat コア関数のラッパー)
|
||||
| plugin-api-info.c | プラグイン API 用のインフォ/インフォリストに関する追加関数
|
||||
| plugin-config.c | プラグイン設定オプション (plugins.conf ファイル)
|
||||
| plugin-script.c | スクリプトプラグインの共用関数
|
||||
| plugin-script-api.c | スクリプト API 関数: 一部のプラグイン API 関数のラッパー
|
||||
| plugin-script-config.c | スクリプトプラグインの設定オプション (python.conf、perl.conf 等のファイル)
|
||||
| weechat-plugin.h | WeeChat プラグインと一緒に配布されるヘッダファイル、プラグインのコンパイルに必要
|
||||
| alias/ | alias プラグイン
|
||||
| alias.c | alias の主要関数
|
||||
| alias-command.c | alias コマンド
|
||||
| alias-completion.c | alias 補完
|
||||
| alias-config.c | alias 設定オプション (alias.conf ファイル)
|
||||
| alias-info.c | alias の情報/インフォリスト/hdata
|
||||
| spell/ | spell プラグイン
|
||||
| spell.c | spell の主関数
|
||||
| spell-bar-item.c | spell バー要素
|
||||
| spell-command.c | spell コマンド
|
||||
| spell-completion.c | spell 補完
|
||||
| spell-config.c | spell 設定オプション (spell.conf ファイル)
|
||||
| spell-info.c | spell の情報/インフォリスト/hdata
|
||||
| spell-speller.c | spell のスペラー管理
|
||||
| buflist/ | buflist プラグイン
|
||||
| buflist.c | buflist の主要関数
|
||||
| buflist-bar-item.c | buflist バー要素
|
||||
| buflist-command.c | buflist コマンド
|
||||
// TRANSLATION MISSING
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | buflist 設定オプション (buflist.conf ファイル)
|
||||
| buflist-info.c | buflist の情報/インフォリスト/hdata
|
||||
| buflist-mouse.c | buflist マウス動作
|
||||
| charset/ | charset プラグイン
|
||||
| charset.c | charset 関数
|
||||
| exec/ | exec プラグイン
|
||||
| exec.c | exec の主要関数
|
||||
| exec-buffer.c | exec バッファ
|
||||
| exec-command.c | exec コマンド
|
||||
| exec-completion.c | exec 補完
|
||||
| exec-config.c | exec 設定オプション (exec.conf ファイル)
|
||||
| fifo/ | fifo プラグイン
|
||||
| fifo.c | fifo の主要関数
|
||||
| fifo-command.c | fifo コマンド
|
||||
| fifo-config.c | fifo 設定オプション (fifo.conf ファイル)
|
||||
| fifo-info.c | fifo の情報/インフォリスト/hdata
|
||||
| fset/ | fset プラグイン
|
||||
| fset.c | fset の主要関数
|
||||
| fset-bar-item.c | fset バー要素
|
||||
| fset-buffer.c | fset バッファ
|
||||
| fset-command.c | fset コマンド
|
||||
| fset-completion.c | fset 補完
|
||||
| fset-config.c | fset 設定オプション (fset.conf ファイル)
|
||||
| fset-info.c | fset の情報/インフォリスト/hdata
|
||||
| fset-mouse.c | fset マウス動作
|
||||
| fset-option.c | fset オプション管理
|
||||
| guile/ | guile (scheme) プラグイン
|
||||
| weechat-guile.c | guile の主要関数 (スクリプトのロード/アンロード、guile コードの実行)
|
||||
| weechat-guile-api.c | guile スクリプト作成 API 関数
|
||||
| irc/ | IRC (Internet Relay Chat) プラグイン
|
||||
| irc.c | IRC の主要関数
|
||||
| irc-bar-item.c | IRC バー要素
|
||||
| buflist-completion.c | Buflist completions.
|
||||
| buflist-config.c | buflist 設定オプション (buflist.conf ファイル)
|
||||
| buflist-info.c | buflist の情報/インフォリスト/hdata
|
||||
| buflist-mouse.c | buflist マウス動作
|
||||
| charset/ | charset プラグイン
|
||||
| charset.c | charset 関数
|
||||
| exec/ | exec プラグイン
|
||||
| exec.c | exec の主要関数
|
||||
| exec-buffer.c | exec バッファ
|
||||
| exec-command.c | exec コマンド
|
||||
| exec-completion.c | exec 補完
|
||||
| exec-config.c | exec 設定オプション (exec.conf ファイル)
|
||||
| fifo/ | fifo プラグイン
|
||||
| fifo.c | fifo の主要関数
|
||||
| fifo-command.c | fifo コマンド
|
||||
| fifo-config.c | fifo 設定オプション (fifo.conf ファイル)
|
||||
| fifo-info.c | fifo の情報/インフォリスト/hdata
|
||||
| fset/ | fset プラグイン
|
||||
| fset.c | fset の主要関数
|
||||
| fset-bar-item.c | fset バー要素
|
||||
| fset-buffer.c | fset バッファ
|
||||
| fset-command.c | fset コマンド
|
||||
| fset-completion.c | fset 補完
|
||||
| fset-config.c | fset 設定オプション (fset.conf ファイル)
|
||||
| fset-info.c | fset の情報/インフォリスト/hdata
|
||||
| fset-mouse.c | fset マウス動作
|
||||
| fset-option.c | fset オプション管理
|
||||
| guile/ | guile (scheme) プラグイン
|
||||
| weechat-guile.c | guile の主要関数 (スクリプトのロード/アンロード、guile コードの実行)
|
||||
| weechat-guile-api.c | guile スクリプト作成 API 関数
|
||||
| irc/ | IRC (Internet Relay Chat) プラグイン
|
||||
| irc.c | IRC の主要関数
|
||||
| irc-bar-item.c | IRC バー要素
|
||||
// TRANSLATION MISSING
|
||||
| irc-batch.c | IRC batched events.
|
||||
| irc-buffer.c | IRC バッファ
|
||||
| irc-channel.c | IRC チャンネル
|
||||
| irc-color.c | IRC 色
|
||||
| irc-command.c | IRC コマンド
|
||||
| irc-completion.c | IRC 補完
|
||||
| irc-config.c | IRC 設定オプション (irc.conf ファイル)
|
||||
| irc-ctcp.c | IRC CTCP
|
||||
| irc-debug.c | IRC デバッグ関数
|
||||
| irc-ignore.c | IRC 無視
|
||||
| irc-info.c | IRC の情報/インフォリスト/hdata
|
||||
| irc-input.c | コマンドおよびテキストの入力
|
||||
| irc-batch.c | IRC batched events.
|
||||
| irc-buffer.c | IRC バッファ
|
||||
| irc-channel.c | IRC チャンネル
|
||||
| irc-color.c | IRC 色
|
||||
| irc-command.c | IRC コマンド
|
||||
| irc-completion.c | IRC 補完
|
||||
| irc-config.c | IRC 設定オプション (irc.conf ファイル)
|
||||
| irc-ctcp.c | IRC CTCP
|
||||
| irc-debug.c | IRC デバッグ関数
|
||||
| irc-ignore.c | IRC 無視
|
||||
| irc-info.c | IRC の情報/インフォリスト/hdata
|
||||
| irc-input.c | コマンドおよびテキストの入力
|
||||
// TRANSLATION MISSING
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
| irc-join.c | Functions for list of channels to join.
|
||||
// TRANSLATION MISSING
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | IRC メッセージを操作する関数
|
||||
| irc-mode.c | チャンネルおよびニックネームのモードを操作する関数
|
||||
| irc-modelist.c | IRC チャンネルモードリスト (+b、+e、+I、...).
|
||||
| irc-msgbuffer.c | IRC メッセージを送るバッファ
|
||||
| irc-nick.c | IRC ニックネーム
|
||||
| irc-notify.c | IRC 通知リスト
|
||||
| irc-protocol.c | IRC プロトコル (RFC 1459/2810/2811/2812/2813/7194)
|
||||
| irc-raw.c | IRC 生バッファ
|
||||
| irc-redirect.c | IRC コマンド出力のリダイレクト
|
||||
| irc-sasl.c | IRC サーバに対する SASL 認証
|
||||
| irc-server.c | IRC サーバとの入出力通信
|
||||
| irc-list.c | Buffer for reply to /list command.
|
||||
| irc-message.c | IRC メッセージを操作する関数
|
||||
| irc-mode.c | チャンネルおよびニックネームのモードを操作する関数
|
||||
| irc-modelist.c | IRC チャンネルモードリスト (+b、+e、+I、...).
|
||||
| irc-msgbuffer.c | IRC メッセージを送るバッファ
|
||||
| irc-nick.c | IRC ニックネーム
|
||||
| irc-notify.c | IRC 通知リスト
|
||||
| irc-protocol.c | IRC プロトコル (RFC 1459/2810/2811/2812/2813/7194)
|
||||
| irc-raw.c | IRC 生バッファ
|
||||
| irc-redirect.c | IRC コマンド出力のリダイレクト
|
||||
| irc-sasl.c | IRC サーバに対する SASL 認証
|
||||
| irc-server.c | IRC サーバとの入出力通信
|
||||
// TRANSLATION MISSING
|
||||
| irc-tag.c | Functions to manipulate IRC message tags.
|
||||
| irc-tag.c | Functions to manipulate IRC message tags.
|
||||
// TRANSLATION MISSING
|
||||
| irc-typing.c | Typing status.
|
||||
| irc-upgrade.c | WeeChat をアップグレードする際の IRC データの保存およびロード
|
||||
| javascript/ | JavaScript プラグイン
|
||||
| weechat-js.cpp | JavaScript の主要関数 (スクリプトのロード/アンロード、JavaScript コードの実行)
|
||||
| weechat-js-api.cpp | JavaScript スクリプト作成 API 関数
|
||||
| weechat-js-v8.cpp | JavaScript v8 関数
|
||||
| logger/ | logger プラグイン
|
||||
| logger.c | logger の主要関数
|
||||
| irc-typing.c | Typing status.
|
||||
| irc-upgrade.c | WeeChat をアップグレードする際の IRC データの保存およびロード
|
||||
| javascript/ | JavaScript プラグイン
|
||||
| weechat-js.cpp | JavaScript の主要関数 (スクリプトのロード/アンロード、JavaScript コードの実行)
|
||||
| weechat-js-api.cpp | JavaScript スクリプト作成 API 関数
|
||||
| weechat-js-v8.cpp | JavaScript v8 関数
|
||||
| logger/ | logger プラグイン
|
||||
| logger.c | logger の主要関数
|
||||
// TRANSLATION MISSING
|
||||
| logger-backlog.c | Logger backlog functions.
|
||||
| logger-buffer.c | logger バッファリスト管理
|
||||
| logger-command.c | logger コマンド
|
||||
| logger-config.c | logger 設定オプション (logger.conf ファイル)
|
||||
| logger-info.c | logger の情報/インフォリスト/hdata
|
||||
| logger-tail.c | ファイル末尾の行を返す
|
||||
| lua/ | lua プラグイン
|
||||
| weechat-lua.c | lua の主要関数 (スクリプトのロード/アンロード、lua コードの実行)
|
||||
| weechat-lua-api.c | lua スクリプト作成 API 関数
|
||||
| perl/ | perl プラグイン
|
||||
| weechat-perl.c | perl の主要関数 (スクリプトのロード/アンロード、perl コードの実行)
|
||||
| weechat-perl-api.c | perl スクリプト作成 API 関数
|
||||
| php/ | php プラグイン
|
||||
| weechat-php.c | php の主要関数 (スクリプトのロード/アンロード、php コードの実行)
|
||||
| weechat-php-api.c | php スクリプト作成 API 関数
|
||||
| python/ | python プラグイン
|
||||
| weechat-python.c | python の主要関数 (スクリプトのロード/アンロード、python コードの実行)
|
||||
| weechat-python-api.c | python スクリプト作成 API 関数
|
||||
| relay/ | relay プラグイン (IRC プロキシとリモートインターフェースへの中継)
|
||||
| relay.c | relay の主要関数
|
||||
| logger-backlog.c | Logger backlog functions.
|
||||
| logger-buffer.c | logger バッファリスト管理
|
||||
| logger-command.c | logger コマンド
|
||||
| logger-config.c | logger 設定オプション (logger.conf ファイル)
|
||||
| logger-info.c | logger の情報/インフォリスト/hdata
|
||||
| logger-tail.c | ファイル末尾の行を返す
|
||||
| lua/ | lua プラグイン
|
||||
| weechat-lua.c | lua の主要関数 (スクリプトのロード/アンロード、lua コードの実行)
|
||||
| weechat-lua-api.c | lua スクリプト作成 API 関数
|
||||
| perl/ | perl プラグイン
|
||||
| weechat-perl.c | perl の主要関数 (スクリプトのロード/アンロード、perl コードの実行)
|
||||
| weechat-perl-api.c | perl スクリプト作成 API 関数
|
||||
| php/ | php プラグイン
|
||||
| weechat-php.c | php の主要関数 (スクリプトのロード/アンロード、php コードの実行)
|
||||
| weechat-php-api.c | php スクリプト作成 API 関数
|
||||
| python/ | python プラグイン
|
||||
| weechat-python.c | python の主要関数 (スクリプトのロード/アンロード、python コードの実行)
|
||||
| weechat-python-api.c | python スクリプト作成 API 関数
|
||||
| relay/ | relay プラグイン (IRC プロキシとリモートインターフェースへの中継)
|
||||
| relay.c | relay の主要関数
|
||||
// TRANSLATION MISSING
|
||||
| relay-auth.c | Clients authentification.
|
||||
| relay-buffer.c | relay バッファ
|
||||
| relay-client.c | relay クライアント
|
||||
| relay-command.c | relay コマンド
|
||||
| relay-completion.c | relay 補完
|
||||
| relay-config.c | relay 設定オプション (relay.conf ファイル)
|
||||
| relay-info.c | relay の情報/インフォリスト/hdata
|
||||
| relay-network.c | relay 用のネットワーク関数
|
||||
| relay-raw.c | relay 生バッファ
|
||||
| relay-server.c | relay サーバ
|
||||
| relay-upgrade.c | WeeChat をアップグレードする際にデータを保存/回復
|
||||
| relay-websocket.c | リレー用の websocket サーバ関数 (RFC 6455)
|
||||
| irc/ | IRC プロキシ
|
||||
| relay-irc.c | IRC プロキシの主要関数
|
||||
| weechat/ | リモートインターフェースへの中継
|
||||
| relay-weechat.c | リモートインターフェースへの中継 (主要関数)
|
||||
| relay-weechat-msg.c | クライアントにバイナリメッセージを送信
|
||||
| relay-weechat-nicklist.c | ニックネームリスト関数
|
||||
| relay-weechat-protocol.c | クライアントからのコマンドを読み取る
|
||||
| ruby/ | ruby プラグイン
|
||||
| weechat-ruby.c | ruby の主要関数 (スクリプトのロード/アンロード、ruby コードの実行)
|
||||
| weechat-ruby-api.c | ruby スクリプト作成 API 関数
|
||||
| script/ | スクリプトマネージャ
|
||||
| script.c | スクリプトマネージャの主要関数
|
||||
| script-action.c | スクリプトに対する操作 (ロード/アンロード、インストール/削除、...)
|
||||
| script-buffer.c | スクリプトマネージャ用のバッファ
|
||||
| script-command.c | スクリプトマネージャ用のコマンド
|
||||
| script-completion.c | スクリプトマネージャ用の補完
|
||||
| script-config.c | スクリプトマネージャ用の設定オプション (script.conf ファイル)
|
||||
| script-info.c | スクリプトマネージャの情報/インフォリスト/hdata
|
||||
| script-mouse.c | スクリプトマネージャのマウス動作
|
||||
| script-repo.c | リポジトリファイルのダウンロードとロード
|
||||
| tcl/ | tcl プラグイン
|
||||
| weechat-tcl.c | tcl の主要関数 (スクリプトのロード/アンロード、tcl コードの実行)
|
||||
| weechat-tcl-api.c | tcl スクリプト作成 API 関数
|
||||
| trigger/ | trigger プラグイン
|
||||
| trigger.c | trigger の主要関数
|
||||
| trigger-buffer.c | trigger バッファ
|
||||
| trigger-callback.c | trigger コールバック
|
||||
| trigger-command.c | trigger コマンド
|
||||
| trigger-completion.c | trigger 補完
|
||||
| trigger-config.c | trigger 設定オプション (trigger.conf ファイル)
|
||||
| relay-auth.c | Clients authentification.
|
||||
| relay-buffer.c | relay バッファ
|
||||
| relay-client.c | relay クライアント
|
||||
| relay-command.c | relay コマンド
|
||||
| relay-completion.c | relay 補完
|
||||
| relay-config.c | relay 設定オプション (relay.conf ファイル)
|
||||
// TRANSLATION MISSING
|
||||
| typing/ | Typing plugin.
|
||||
| relay-http.c | HTTP functions.
|
||||
| relay-info.c | relay の情報/インフォリスト/hdata
|
||||
| relay-network.c | relay 用のネットワーク関数
|
||||
| relay-raw.c | relay 生バッファ
|
||||
// TRANSLATION MISSING
|
||||
| typing.c | Main typing functions.
|
||||
| relay-remote.c | Relay remote.
|
||||
| relay-server.c | relay サーバ
|
||||
| relay-upgrade.c | WeeChat をアップグレードする際にデータを保存/回復
|
||||
| relay-websocket.c | リレー用の websocket サーバ関数 (RFC 6455)
|
||||
// TRANSLATION MISSING
|
||||
| typing-bar-item.c | Typing bar items.
|
||||
| api/ | Relay for remote interfaces (using HTTP REST API).
|
||||
// TRANSLATION MISSING
|
||||
| typing-config.c | Typing config options (file typing.conf).
|
||||
| relay-api.c | Main API functions for HTTP REST API.
|
||||
// TRANSLATION MISSING
|
||||
| typing-status.c | Messages typing status on buffers.
|
||||
| xfer/ | xfer プラグイン (IRC DCC ファイル/チャット)
|
||||
| xfer.c | xfer の主要関数
|
||||
| xfer-buffer.c | xfer バッファ
|
||||
| xfer-chat.c | xfer DCC チャット
|
||||
| xfer-command.c | xfer コマンド
|
||||
| xfer-completion.c | xfer 補完
|
||||
| xfer-config.c | xfer 設定オプション (xfer.conf ファイル)
|
||||
| xfer-dcc.c | DCC ファイル転送
|
||||
| xfer-file.c | xfer のファイル関数
|
||||
| xfer-info.c | xfer の情報/インフォリスト/hdata
|
||||
| xfer-network.c | xfer のネットワーク関数
|
||||
| xfer-upgrade.c | WeeChat をアップグレードする際の xfer データの保存および回復
|
||||
| relay-api-msg.c | Send JSON messages to clients.
|
||||
// TRANSLATION MISSING
|
||||
| relay-api-protocol.c | HTTP REST API protocol.
|
||||
// TRANSLATION MISSING
|
||||
// TRANSLATION MISSING
|
||||
| remote/ | Relay remote functions, specific to API.
|
||||
// TRANSLATION MISSING
|
||||
| relay-remote-event.c | Process events received from relay remote.
|
||||
// TRANSLATION MISSING
|
||||
| relay-remote-network.c | Network functions for relay remote.
|
||||
| irc/ | IRC プロキシ
|
||||
| relay-irc.c | IRC プロキシの主要関数
|
||||
// TRANSLATION MISSING
|
||||
| weechat/ | Relay for remote interfaces (using "weechat" binary protocol).
|
||||
| relay-weechat.c | リモートインターフェースへの中継 (主要関数)
|
||||
| relay-weechat-msg.c | クライアントにバイナリメッセージを送信
|
||||
| relay-weechat-nicklist.c | ニックネームリスト関数
|
||||
| relay-weechat-protocol.c | クライアントからのコマンドを読み取る
|
||||
| ruby/ | ruby プラグイン
|
||||
| weechat-ruby.c | ruby の主要関数 (スクリプトのロード/アンロード、ruby コードの実行)
|
||||
| weechat-ruby-api.c | ruby スクリプト作成 API 関数
|
||||
| script/ | スクリプトマネージャ
|
||||
| script.c | スクリプトマネージャの主要関数
|
||||
| script-action.c | スクリプトに対する操作 (ロード/アンロード、インストール/削除、...)
|
||||
| script-buffer.c | スクリプトマネージャ用のバッファ
|
||||
| script-command.c | スクリプトマネージャ用のコマンド
|
||||
| script-completion.c | スクリプトマネージャ用の補完
|
||||
| script-config.c | スクリプトマネージャ用の設定オプション (script.conf ファイル)
|
||||
| script-info.c | スクリプトマネージャの情報/インフォリスト/hdata
|
||||
| script-mouse.c | スクリプトマネージャのマウス動作
|
||||
| script-repo.c | リポジトリファイルのダウンロードとロード
|
||||
| tcl/ | tcl プラグイン
|
||||
| weechat-tcl.c | tcl の主要関数 (スクリプトのロード/アンロード、tcl コードの実行)
|
||||
| weechat-tcl-api.c | tcl スクリプト作成 API 関数
|
||||
| trigger/ | trigger プラグイン
|
||||
| trigger.c | trigger の主要関数
|
||||
| trigger-buffer.c | trigger バッファ
|
||||
| trigger-callback.c | trigger コールバック
|
||||
| trigger-command.c | trigger コマンド
|
||||
| trigger-completion.c | trigger 補完
|
||||
| trigger-config.c | trigger 設定オプション (trigger.conf ファイル)
|
||||
// TRANSLATION MISSING
|
||||
| typing/ | Typing plugin.
|
||||
// TRANSLATION MISSING
|
||||
| typing.c | Main typing functions.
|
||||
// TRANSLATION MISSING
|
||||
| typing-bar-item.c | Typing bar items.
|
||||
// TRANSLATION MISSING
|
||||
| typing-config.c | Typing config options (file typing.conf).
|
||||
// TRANSLATION MISSING
|
||||
| typing-status.c | Messages typing status on buffers.
|
||||
| xfer/ | xfer プラグイン (IRC DCC ファイル/チャット)
|
||||
| xfer.c | xfer の主要関数
|
||||
| xfer-buffer.c | xfer バッファ
|
||||
| xfer-chat.c | xfer DCC チャット
|
||||
| xfer-command.c | xfer コマンド
|
||||
| xfer-completion.c | xfer 補完
|
||||
| xfer-config.c | xfer 設定オプション (xfer.conf ファイル)
|
||||
| xfer-dcc.c | DCC ファイル転送
|
||||
| xfer-file.c | xfer のファイル関数
|
||||
| xfer-info.c | xfer の情報/インフォリスト/hdata
|
||||
| xfer-network.c | xfer のネットワーク関数
|
||||
| xfer-upgrade.c | WeeChat をアップグレードする際の xfer データの保存および回復
|
||||
|===
|
||||
|
||||
[[sources_tests]]
|
||||
@@ -417,141 +437,202 @@ WeeChat "core" は以下のディレクトリに配置されています:
|
||||
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| パス/ファイル名 | 説明
|
||||
| tests/ | テスト用のルートディレクトリ
|
||||
| tests.cpp | 全テストの実行時に使われるプログラム
|
||||
| パス/ファイル名 | 説明
|
||||
| tests/ | テスト用のルートディレクトリ
|
||||
| tests.cpp | 全テストの実行時に使われるプログラム
|
||||
// TRANSLATION MISSING
|
||||
| tests-record.cpp | Record and search in messages displayed.
|
||||
| scripts/ | スクリプト API テスト用のルートディレクトリ
|
||||
| test-scripts.cpp | スクリプト API テストの実行時に使われるプログラム
|
||||
| python/ | スクリプト API テストを生成、実行する Python スクリプト
|
||||
| testapigen.py | スクリプト API のテスト時にすべての言語に関するスクリプトを生成する Python スクリプト
|
||||
| testapi.py | スクリプト API テスト時に使われる Python スクリプト (スクリプト testapigen.py から使われます)
|
||||
| unparse.py | Python コードを別の言語に変換 (スクリプト testapigen.py から使われます)
|
||||
| unit/ | 単体テスト用のルートディレクトリ
|
||||
| test-plugins.cpp | テスト: プラグイン
|
||||
| tests-record.cpp | Record and search in messages displayed.
|
||||
| scripts/ | スクリプト API テスト用のルートディレクトリ
|
||||
| test-scripts.cpp | スクリプト API テストの実行時に使われるプログラム
|
||||
| python/ | スクリプト API テストを生成、実行する Python スクリプト
|
||||
| testapigen.py | スクリプト API のテスト時にすべての言語に関するスクリプトを生成する Python スクリプト
|
||||
| testapi.py | スクリプト API テスト時に使われる Python スクリプト (スクリプト testapigen.py から使われます)
|
||||
| unparse.py | Python コードを別の言語に変換 (スクリプト testapigen.py から使われます)
|
||||
| unit/ | 単体テスト用のルートディレクトリ
|
||||
| test-plugins.cpp | テスト: プラグイン
|
||||
// TRANSLATION MISSING
|
||||
| test-plugin-api-info.cpp | Tests: plugin API info functions.
|
||||
| test-plugin-api-info.cpp | Tests: plugin API info functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-plugin-config.cpp | Tests: plugin config functions.
|
||||
| core/ | core 向け単体テスト用のルートディレクトリ
|
||||
| test-core-arraylist.cpp | テスト: 配列リスト
|
||||
| test-plugin-config.cpp | Tests: plugin config functions.
|
||||
| core/ | core 向け単体テスト用のルートディレクトリ
|
||||
| test-core-arraylist.cpp | テスト: 配列リスト
|
||||
// TRANSLATION MISSING
|
||||
| test-core-calc.cpp | Tests: calculation of expressions.
|
||||
| test-core-calc.cpp | Tests: calculation of expressions.
|
||||
// TRANSLATION MISSING
|
||||
| test-core-command.cpp | Tests: commands.
|
||||
| test-core-command.cpp | Tests: commands.
|
||||
// TRANSLATION MISSING
|
||||
| test-core-config-file.cpp | Tests: configuration files.
|
||||
| test-core-config-file.cpp | Tests: configuration files.
|
||||
// TRANSLATION MISSING
|
||||
| test-core-crypto.cpp | Tests: cryptographic functions.
|
||||
| test-core-crypto.cpp | Tests: cryptographic functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-core-dir.cpp | Tests: directory/file functions.
|
||||
| test-core-eval.cpp | テスト: 式の評価
|
||||
| test-core-hashtble.cpp | テスト: ハッシュテーブル
|
||||
| test-core-hdata.cpp | テスト: hdata
|
||||
| test-core-hook.cpp | テスト: フック
|
||||
| test-core-infolist.cpp | テスト: インフォリスト
|
||||
| test-core-list.cpp | テスト: リスト
|
||||
| test-core-dir.cpp | Tests: directory/file functions.
|
||||
| test-core-eval.cpp | テスト: 式の評価
|
||||
| test-core-hashtble.cpp | テスト: ハッシュテーブル
|
||||
| test-core-hdata.cpp | テスト: hdata
|
||||
| test-core-hook.cpp | テスト: フック
|
||||
| test-core-infolist.cpp | テスト: インフォリスト
|
||||
| test-core-list.cpp | テスト: リスト
|
||||
// TRANSLATION MISSING
|
||||
| test-core-network.cpp | Tests: network functions.
|
||||
| test-core-secure.cpp | テスト: データ保護
|
||||
| test-core-network.cpp | Tests: network functions.
|
||||
| test-core-secure.cpp | テスト: データ保護
|
||||
// TRANSLATION MISSING
|
||||
| test-core-signal.cpp | テスト: signals.
|
||||
| test-core-string.cpp | テスト: 文字列
|
||||
| test-core-url.cpp | テスト: URL
|
||||
| test-core-utf8.cpp | テスト: UTF-8
|
||||
| test-core-util.cpp | テスト: ユーティリティ関数
|
||||
| test-core-signal.cpp | テスト: signals.
|
||||
| test-core-string.cpp | テスト: 文字列
|
||||
| test-core-url.cpp | テスト: URL
|
||||
| test-core-utf8.cpp | テスト: UTF-8
|
||||
| test-core-util.cpp | テスト: ユーティリティ関数
|
||||
// TRANSLATION MISSING
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
| test-core-sys.cpp | Tests: system functions.
|
||||
// TRANSLATION MISSING
|
||||
| hook/ | Root of unit tests for hooks.
|
||||
| hook/ | Root of unit tests for hooks.
|
||||
// TRANSLATION MISSING
|
||||
| test-hook-command.cpp | Tests: hooks "command".
|
||||
| gui/ | インターフェースの単体テストを収める最上位ディレクトリ
|
||||
| test-hook-command.cpp | Tests: hooks "command".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
| test-hook-command-run.cpp | Tests: hooks "command_run".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-buffer.cpp | Tests: buffer functions.
|
||||
| test-hook-completion.cpp | Tests: hooks "completion".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-chat.cpp | Tests: chat functions.
|
||||
| test-hook-config.cpp | Tests: hooks "config".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-color.cpp | Tests: colors.
|
||||
| test-hook-connect.cpp | Tests: hooks "connect".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-filter.cpp | Tests: filters.
|
||||
| test-hook-fd.cpp | Tests: hooks "fd".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-input.cpp | Tests: input functions.
|
||||
| test-hook-focus.cpp | Tests: hooks "focus".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-key.cpp | Tests: keys.
|
||||
| test-gui-line.cpp | テスト: 行
|
||||
| test-hook-hdata.cpp | Tests: hooks "hdata".
|
||||
// TRANSLATION MISSING
|
||||
| test-gui-nick.cpp | テスト: nicks
|
||||
| plugins/ | プラグインの単体テストを収める最上位ディレクトリ
|
||||
| irc/ | IRC プラグインの単体テストを収める最上位ディレクトリ
|
||||
| test-hook-hsignal.cpp | Tests: hooks "hsignal".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-batch.cpp | Tests: IRC batched events.
|
||||
| test-hook-info-hashtable.cpp | Tests: hooks "info_hashtable".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-buffer.cpp | Tests: IRC buffers.
|
||||
| test-hook-info.cpp | Tests: hooks "info".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-channel.cpp | Tests: IRC channels.
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
| test-irc-config.cpp | テスト: IRC 設定
|
||||
| test-hook-infolist.cpp | Tests: hooks "infolist".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
| test-hook-line.cpp | Tests: hooks "line".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
| test-hook-modifier.cpp | Tests: hooks "modifier".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-info.cpp | Tests: IRC info.
|
||||
| test-hook-print.cpp | Tests: hooks "print".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
| test-hook-process.cpp | Tests: hooks "process".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
| test-hook-signal.cpp | Tests: hooks "signal".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
| test-hook-timer.cpp | Tests: hooks "timer".
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
| test-hook-url.cpp | Tests: hooks "url".
|
||||
|
||||
| gui/ | インターフェースの単体テストを収める最上位ディレクトリ
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-nick.cpp | Tests: IRC nicks.
|
||||
| test-irc-protocol.cpp | テスト: IRC プロトコル
|
||||
| test-gui-bar-window.cpp | Tests: bar window functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-sasl.cpp | Tests: SASL authentication with IRC protocol.
|
||||
| test-gui-buffer.cpp | Tests: buffer functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-server.cpp | Tests: IRC server.
|
||||
| test-gui-chat.cpp | Tests: chat functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-tag.cpp | Tests: IRC message tags.
|
||||
| test-gui-color.cpp | Tests: colors.
|
||||
// TRANSLATION MISSING
|
||||
| logger/ | Root of unit tests for logger plugin.
|
||||
| test-gui-filter.cpp | Tests: filters.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger.cpp | Tests: logger.
|
||||
| test-gui-hotlist.cpp | Tests: hotlist functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger-backlog.cpp | Tests: logger backlog.
|
||||
| test-gui-input.cpp | Tests: input functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger-tail.cpp | Tests: logger tail functions.
|
||||
| test-gui-key.cpp | Tests: keys.
|
||||
| test-gui-line.cpp | テスト: 行
|
||||
// TRANSLATION MISSING
|
||||
| trigger/ | Root of unit tests for trigger plugin.
|
||||
| test-gui-nick.cpp | テスト: nicks
|
||||
// TRANSLATION MISSING
|
||||
| test-trigger.cpp | Tests: triggers.
|
||||
| test-gui-nicklist.cpp | Tests: nicklist functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-trigger-config.cpp | Tests: trigger configuration.
|
||||
| curses/ | Root of unit tests for Curses interface.
|
||||
// TRANSLATION MISSING
|
||||
| typing/ | Root of unit tests for typing plugin.
|
||||
| test-gui-curses-mouse.cpp | Tests: mouse (Curses interface).
|
||||
| plugins/ | プラグインの単体テストを収める最上位ディレクトリ
|
||||
| irc/ | IRC プラグインの単体テストを収める最上位ディレクトリ
|
||||
// TRANSLATION MISSING
|
||||
| test-typing.cpp | Tests: typing.
|
||||
| test-irc-batch.cpp | Tests: IRC batched events.
|
||||
// TRANSLATION MISSING
|
||||
| test-typing-status.cpp | Tests: typing status.
|
||||
| test-irc-buffer.cpp | Tests: IRC buffers.
|
||||
// TRANSLATION MISSING
|
||||
| relay/ | Root of unit tests for Relay plugin.
|
||||
| test-irc-channel.cpp | Tests: IRC channels.
|
||||
| test-irc-color.cpp | Tests: IRC colors.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-auth.cpp | Tests: clients authentication.
|
||||
| test-irc-command.cpp | Tests: IRC commands.
|
||||
| test-irc-config.cpp | テスト: IRC 設定
|
||||
// TRANSLATION MISSING
|
||||
| irc/ | Root of unit tests for Relay "irc" protocol.
|
||||
| test-irc-ctcp.cpp | Tests: IRC CTCP.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-irc.cpp | Tests: Relay "irc" protocol.
|
||||
| test-irc-ignore.cpp | Tests: IRC ignores.
|
||||
// TRANSLATION MISSING
|
||||
| xfer/ | Root of unit tests for Xfer plugin.
|
||||
| test-irc-info.cpp | Tests: IRC info.
|
||||
// TRANSLATION MISSING
|
||||
| test-xfer-file.cpp | Tests: file functions.
|
||||
| test-irc-join.cpp | Tests: IRC join functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-xfer-network.cpp | Tests: network functions.
|
||||
| test-irc-list.cpp | Tests: IRC buffer for reply to /list command.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-message.cpp | Tests: IRC messages.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-mode.cpp | Tests: IRC modes.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-nick.cpp | Tests: IRC nicks.
|
||||
| test-irc-protocol.cpp | テスト: IRC プロトコル
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-sasl.cpp | Tests: SASL authentication with IRC protocol.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-server.cpp | Tests: IRC server.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-tag.cpp | Tests: IRC message tags.
|
||||
// TRANSLATION MISSING
|
||||
| logger/ | Root of unit tests for logger plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger.cpp | Tests: logger.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger-backlog.cpp | Tests: logger backlog.
|
||||
// TRANSLATION MISSING
|
||||
| test-logger-tail.cpp | Tests: logger tail functions.
|
||||
// TRANSLATION MISSING
|
||||
| trigger/ | Root of unit tests for trigger plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-trigger.cpp | Tests: triggers.
|
||||
// TRANSLATION MISSING
|
||||
| test-trigger-config.cpp | Tests: trigger configuration.
|
||||
// TRANSLATION MISSING
|
||||
| typing/ | Root of unit tests for typing plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-typing.cpp | Tests: typing.
|
||||
// TRANSLATION MISSING
|
||||
| test-typing-status.cpp | Tests: typing status.
|
||||
// TRANSLATION MISSING
|
||||
| relay/ | Root of unit tests for Relay plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-auth.cpp | Tests: clients authentication.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-http.cpp | Tests: HTTP functions for Relay plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-remote.cpp | Tests: remote functions for Relay plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-websocket.cpp | Tests: websocket functions for Relay plugin.
|
||||
// TRANSLATION MISSING
|
||||
| api/ | Root of unit tests for Relay "api" protocol.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-api.cpp | Tests: Relay "api" protocol: general functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-api-msg.cpp | Tests: Relay "api" protocol: messages.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-api-protocol.cpp | Tests: Relay "api" protocol: protocol.
|
||||
// TRANSLATION MISSING
|
||||
| irc/ | Root of unit tests for Relay "irc" protocol.
|
||||
// TRANSLATION MISSING
|
||||
| test-relay-irc.cpp | Tests: Relay "irc" protocol.
|
||||
// TRANSLATION MISSING
|
||||
| xfer/ | Root of unit tests for Xfer plugin.
|
||||
// TRANSLATION MISSING
|
||||
| test-xfer-file.cpp | Tests: file functions.
|
||||
// TRANSLATION MISSING
|
||||
| test-xfer-network.cpp | Tests: network functions.
|
||||
|===
|
||||
|
||||
[[documentation_translations]]
|
||||
@@ -635,7 +716,8 @@ WeeChat とプラグインの翻訳は gettext で行います、ファイルは
|
||||
|
||||
C 言語のコードを書く際には以下の基本的なルールを *必ず* 守ってください。:
|
||||
|
||||
* インデントは空白文字を 4 個使ってください。タブ文字を使わないでください、タブ文字は良くありません。
|
||||
// TRANSLATION MISSING
|
||||
* Use 4 spaces for indentation (no tabs).
|
||||
* 読みやすくする必要がある場合を除いて、1
|
||||
行は 80 文字以内に収めてください。
|
||||
* コメントは `+/* comment */+` のようにしてください (`+// comment+` のような C99 スタイルのコメントは使わないでください)。
|
||||
@@ -848,7 +930,7 @@ irc プラグインの _irc.c_ など。
|
||||
[width="100%",cols="2m,3",options="header"]
|
||||
|===
|
||||
| ディレクトリ | ファイル
|
||||
| src/core/ | weechat.c、wee-backtrace.c、wee-command.c、...
|
||||
| src/core/ | weechat.c、core-backtrace.c、core-command.c、...
|
||||
| src/gui/ | gui-bar.c、gui-bar-item.c、gui-bar-window.c、...
|
||||
| src/gui/curses/ | gui-curses-bar.c、gui-curses-bar-window.c、gui-curses-chat.c、...
|
||||
| src/plugins/ | plugin.c、plugin-api.c、plugin-api-info.c、plugin-config.c、plugin-script.c、...
|
||||
@@ -857,7 +939,7 @@ irc プラグインの _irc.c_ など。
|
||||
|===
|
||||
|
||||
C 言語ファイルのヘッダはファイルと同じ名前です、例えばファイル
|
||||
_wee-command.c_ のヘッダファイルは _wee-command.h_ です
|
||||
_core-command.c_ のヘッダファイルは _core-command.h_ です
|
||||
|
||||
[[naming_convention_structures]]
|
||||
==== 構造体
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -728,6 +728,7 @@ inl:
|
||||
nicklist_visible_count: 0
|
||||
title: 'WeeChat 2.9-dev (C) 2003-2020 - https://weechat.org/'
|
||||
input: 1
|
||||
input_get_any_user_data: 0
|
||||
input_get_unknown_commands: 0
|
||||
input_get_empty: 0
|
||||
input_multiline: 0
|
||||
|
||||
@@ -571,325 +571,14 @@ link:weechat_plugin_api.ja.html[WeeChat プラグイン API リファレンス
|
||||
|
||||
スクリプト API に含まれる関数のリスト:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| カテゴリ | 関数
|
||||
|
||||
| 一般
|
||||
| register
|
||||
|
||||
| プラグイン
|
||||
| plugin_get_name
|
||||
|
||||
| 設定
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| ディレクトリ操作
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| ソート済みリスト
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| 設定ファイル
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| キー割り当て
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| 表示
|
||||
| prefix +
|
||||
color +
|
||||
print (python では prnt) +
|
||||
print_date_tags (python では prnt_date_tags) +
|
||||
print_datetime_tags (python では prnt_datetime_tags) +
|
||||
print_y (python では prnt_y) +
|
||||
print_y_date_tags (python では prnt_y_date_tags) +
|
||||
print_y_datetime_tags (python では prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| フック
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| バッファ
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| ウィンドウ
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| ニックネームリスト
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| バー
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| コマンド
|
||||
| command +
|
||||
command_options
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| completion
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| インフォ
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| インフォリスト
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| アップグレード
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.ja.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== 定数
|
||||
|
||||
スクリプト API に含まれる定数のリスト:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| カテゴリ | 定数
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| リターンコード
|
||||
| `WEECHAT_RC_OK` (integer) +
|
||||
`WEECHAT_RC_OK_EAT` (integer) +
|
||||
`WEECHAT_RC_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| 設定ファイル
|
||||
| `WEECHAT_CONFIG_READ_OK` (integer) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (integer) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ソート済みリスト
|
||||
| `WEECHAT_LIST_POS_SORT` (string) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (string) +
|
||||
`WEECHAT_LIST_POS_END` (string)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ホットリスト
|
||||
| `WEECHAT_HOTLIST_LOW` (string) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (string) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (string) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (string)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| プロセスのフック
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (integer) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| 接続のフック
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (integer) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (integer)
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| シグナルのフック
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (string) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (string)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.ja.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== 良くあるタスク
|
||||
|
||||
+108
-31
@@ -36,7 +36,8 @@ WeeChat (Wee Enhanced Environment for Chat)
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^]、
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^]、
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]。
|
||||
* リモートインターフェース用の IRC プロキシとリレー
|
||||
// TRANSLATION MISSING
|
||||
* IRC proxy and relay for WeeChat and remote interfaces
|
||||
* マルチプラットフォーム (GNU/Linux、*BSD、macOS、Windows 等)
|
||||
* 完全な GPL、フリーソフトウェア
|
||||
|
||||
@@ -144,7 +145,8 @@ WeeChat:
|
||||
// TRANSLATION MISSING
|
||||
| zlib1g-dev |
|
||||
| Logger plugin: compression of rotated log files (gzip). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^] (weechat protocol). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://zlib.net/[zlib ^↗^^]
|
||||
(api and weechat protocols). +
|
||||
Script plugin: read of repository index file (gzip).
|
||||
|===
|
||||
|
||||
@@ -173,10 +175,15 @@ WeeChat:
|
||||
| ca-certificates |
|
||||
| TLS 接続に必要な証明書、relay プラグインで TLS サポート
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libcjson-dev |
|
||||
| Relay plugin: protocol "api" (HTTP REST API).
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Logger plugin: compression of rotated log files (zstandard). +
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat protocol).
|
||||
Relay plugin: compression of messages (WeeChat -> client) with https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(api and weechat protocols).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| spell プラグイン
|
||||
@@ -298,6 +305,10 @@ List of available options:
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| <<charset,Charset プラグイン>>のコンパイル。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Support of JSON with https://github.com/DaveGamble/cJSON[cJSON ^↗^^] library.
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| man ページのコンパイル。
|
||||
|
||||
@@ -557,11 +568,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -2010,10 +2021,10 @@ These mouse actions are possible only if mouse is enabled with key kbd:[Alt+m]
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Select line in /list buffer. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
// TRANSLATION MISSING
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Join IRC channel on selected line. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | チャット: スクリプトバッファ | スクリプトバッファを 5 行上方向にスクロール | `+/script -up 5+`
|
||||
| kbd:[▼] | - | チャット: スクリプトバッファ | スクリプトバッファで 5 行下方向にスクロール | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | チャット: スクリプトバッファ | スクリプトバッファで行選択 | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | チャット: スクリプトバッファ | スクリプトのインストール `+/ 削除 | /script -go ${_chat_line_y};/script installremove ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | 上 / 左 | バッファリスト | 指定したバッファを下の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | 下 / 右 | バッファリスト | 指定したバッファを上の番号に移動 | `+buflist_mouse+` シグナル
|
||||
| kbd:[■ □ □] | - | バッファリスト | 指定したバッファに切り替える (現在のバッファを指定した場合、バッファ切り替え履歴で前のバッファに切り替える) | `+buflist_mouse+` シグナル
|
||||
@@ -2140,8 +2151,8 @@ These keys and actions are used on the script buffer (see <<script_manager,scrip
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Key | Action ^(1)^ | Description | Command
|
||||
| kbd:[↑] | | Move one line up. | `+/script up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script down+`
|
||||
| kbd:[↑] | | Move one line up. | `+/script -up+`
|
||||
| kbd:[↓] | | Move one line down. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Move one page up. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Move one page down. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Install script. | `+/script install+`
|
||||
@@ -2857,27 +2868,40 @@ WeeChat はデフォルトマウスイベントの多くを定義しています
|
||||
イベント名には修飾キー (任意)、ボタン/ホイール名、ジェスチャー (任意)
|
||||
を利用できます。異なるイベントは `+-+` で分割してください。
|
||||
|
||||
修飾キーリスト:
|
||||
// TRANSLATION MISSING
|
||||
List of modifiers (by order in the event name):
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| 修飾キー | 説明
|
||||
| ctrl | kbd:[Ctrl] キー
|
||||
| alt | kbd:[Alt] キー
|
||||
| ctrl-alt | kbd:[Ctrl] + kbd:[Alt] キー
|
||||
| ctrl | kbd:[Ctrl] キー
|
||||
| shift | kbd:[Shift] キー ^(1)^
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ The `shift` modifier can rarely be used in WeeChat because many terminals
|
||||
use this modifier to catch directly mouse events.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Several modifiers can be combined, for example:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
ボタン/ホイールのリスト:
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| ボタン/ホイール | 説明
|
||||
| button1 | 左ボタンクリック
|
||||
| button2 | 右ボタンクリック
|
||||
| button3 | 中ボタンクリック (多くの場合ホイールクリック)
|
||||
| button4 ... button9 | その他のボタンクリック
|
||||
| wheelup | ホイール (上方向)
|
||||
| wheeldown | ホイール (下方向)
|
||||
| ボタン/ホイール | 説明
|
||||
| button1 | 左ボタンクリック
|
||||
| button2 | 右ボタンクリック
|
||||
| button3 | 中ボタンクリック (多くの場合ホイールクリック)
|
||||
| button4 ... button11 | その他のボタンクリック
|
||||
| wheelup | ホイール (上方向)
|
||||
| wheeldown | ホイール (下方向)
|
||||
|===
|
||||
|
||||
ジェスチャーのリスト (ボタンのみ対応、ホイール未対応):
|
||||
@@ -2913,7 +2937,7 @@ WeeChat はデフォルトマウスイベントの多くを定義しています
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -4731,8 +4755,15 @@ Relay プラグインはネットワークを介して異なるプロトコル
|
||||
* _irc_: IRC プロキシ: IRC サーバに対する接続を、単一または複数の IRC
|
||||
クライアントで共有するために用います。
|
||||
// TRANSLATION MISSING
|
||||
* _api_: HTTP REST API, used by WeeChat and remote interfaces to display and
|
||||
interact with WeeChat
|
||||
// TRANSLATION MISSING
|
||||
* _weechat_: protocol used by remote interfaces to display and interact with
|
||||
WeeChat, see https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
WeeChat.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For _api_ and _weechat_ protocols, see the list of remote interfaces on
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== パスワード
|
||||
@@ -4745,13 +4776,15 @@ secure set relay mypassword
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
このパスワードは _irc_ と _weechat_ プロトコルで利用されます。
|
||||
// TRANSLATION MISSING
|
||||
This password is used with all protocols.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
_weechat_ プロトコルでは、パスワードに加えて、二要素認証の
|
||||
TOTP (時間ベースのワンタイムパスワード) を使うことが可能です。
|
||||
// TRANSLATION MISSING
|
||||
TOTP (Time-based One-Time Password) can be used as secondary authentication
|
||||
factor for _api_ and _weechat_ protocols, in addition to the password.
|
||||
|
||||
これは任意設定項目であり、セキュリティレベルを向上させます。
|
||||
|
||||
@@ -4848,6 +4881,40 @@ commands:
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
The Relay plugin can send data to a remote WeeChat or interface using an
|
||||
HTTP REST API protocol.
|
||||
|
||||
You can browse and test the API online:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
You can connect with WeeChat or a remote interface, see
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
For example:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Now you can connect on port 9000 with a WeeChat or a remote interface using
|
||||
password "mypassword".
|
||||
|
||||
To connect to an _api_ relay with WeeChat:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The remote WeeChat must expose the same API version as the local WeeChat, so
|
||||
it's highly recommended to use exactly the same WeeChat version on remote
|
||||
and local client.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== WeeChat プロトコル
|
||||
|
||||
@@ -4887,8 +4954,11 @@ HTML5 を使えばたった 1 行の JavaScript で WebSocket をオープンす
|
||||
websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
ポート番号 (例では 9000 番) は Relay プラグインで定義したものです。URI
|
||||
の最後には必ず "/weechat" をつけます (_irc_ と _weechat_ プロトコルの場合)。
|
||||
ポート番号 (例では 9000 番) は Relay プラグインで定義したものです。
|
||||
|
||||
// TRANSLATION MISSING
|
||||
The URI must end with "/weechat" for _irc_ and _weechat_ protocols and "/api"
|
||||
for _api_ protocol.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== UNIX ドメインソケット
|
||||
@@ -4931,7 +5001,7 @@ _relay.conf_ ファイル内のセクション:
|
||||
| network | /set relay.network.* | ネットワークオプション
|
||||
| irc | /set relay.irc.* | 特定の irc プロトコルのオプション (irc プロキシ)
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | リレーに使うポート(irc や weechat プロトコル) (オプションをセクションに追加/削除出来ます)
|
||||
/set relay.port.* | リレーに使うポート (オプションをセクションに追加/削除出来ます)
|
||||
|===
|
||||
|
||||
オプション:
|
||||
@@ -5345,7 +5415,9 @@ Matching groups can be used in _replace_:
|
||||
|
||||
* `+${re:0}+` to `+${re:99}+`: `+${re:0}+` is the whole match, `+${re:1}+` to
|
||||
`+${re:99}+` are groups captured
|
||||
* `+${re:+}+`: the last match (with highest number)
|
||||
* `pass:[${re:+}]`: the last match (with highest number)
|
||||
* `+${re:#}+`: index of last group captured
|
||||
* `+${re:repl_index}+`: index of replacement being done (starts to 1)
|
||||
* `+${hide:c,${re:N}}+`: match "N" with all chars replaced by "c"
|
||||
(example: `+${hide:*,${re:2}}+` is the group #2 with all chars replaced by
|
||||
`+*+`).
|
||||
@@ -5497,7 +5569,7 @@ All callbacks set following variables in hashtable:
|
||||
| server | string | サーバの名前 (例: "libera")
|
||||
| tags | string | メッセージ内のタグ (使われることはまれです)
|
||||
| message_without_tags | string | タグを含まないメッセージ
|
||||
| nick | string | ニックネーム
|
||||
| nick | string | ニックネーム ^(1)^
|
||||
| host | string | ホスト名
|
||||
| command | string | IRC コマンド (例: "PRIVMSG"、"NOTICE"、...)
|
||||
| channel | string | IRC チャンネル
|
||||
@@ -5509,6 +5581,11 @@ All callbacks set following variables in hashtable:
|
||||
| pos_text | string | メッセージ内における _text_ のインデックス (_text_ が見つからない場合 "-1")
|
||||
|===
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[NOTE]
|
||||
^(1)^ The nick is the sender of the message. +
|
||||
Your own nick on the server is `${irc_server.nick}`.
|
||||
|
||||
データがポインタの場合、hdata の属性を読むために変数 `+tg_signal_data+`
|
||||
を以下のようにして使うことが可能です (以下の例では、バッファのポインタとして使っています):
|
||||
|
||||
|
||||
@@ -557,317 +557,14 @@ link:weechat_plugin_api.en.html[Opisu API wtyczek WeeChat ^↗^^] (Angielski).
|
||||
|
||||
Lista funkcji w API skryptów:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Kategoria | Funkcje
|
||||
|
||||
| ogólne
|
||||
| register
|
||||
|
||||
| wtyczki
|
||||
| plugin_get_name
|
||||
|
||||
| ciągi
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| katalogi
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| przechowywane listy
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| pliki konfiguracyjne
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| przypisania klawiszy
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| wyświetlanie
|
||||
| prefix +
|
||||
color +
|
||||
print (dla pythona: prnt) +
|
||||
print_date_tags (dla pythona: prnt_date_tags) +
|
||||
print_datetime_tags (dla pythona: prnt_datetime_tags) +
|
||||
print_y (dla pythona: prnt_y) +
|
||||
print_y_date_tags (dla pythona: prnt_y_date_tags) +
|
||||
print_y_datetime_tags (dla pythona: prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| hooks
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| bufory
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| okna
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| lista nicków
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| paski
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| komendy
|
||||
| command +
|
||||
command_options
|
||||
|
||||
| dopełnienia
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| informacje
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| infolisty
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| uaktualnienie
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.pl.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Stałe
|
||||
|
||||
Lista stałych w API skryptów:
|
||||
|
||||
[width="100%",cols="1,5",options="header"]
|
||||
|===
|
||||
| Kategoria | Stałe
|
||||
|
||||
| zwracane kody
|
||||
| `WEECHAT_RC_OK` (liczba całkowita) +
|
||||
`WEECHAT_RC_OK_EAT` (liczba całkowita) +
|
||||
`WEECHAT_RC_ERROR` (liczba całkowita)
|
||||
|
||||
| pliki konfiguracyjne
|
||||
| `WEECHAT_CONFIG_READ_OK` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (liczba całkowita) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (liczba całkowita)
|
||||
|
||||
| posortowane listy
|
||||
| `WEECHAT_LIST_POS_SORT` (ciąg) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (ciąg) +
|
||||
`WEECHAT_LIST_POS_END` (ciąg)
|
||||
|
||||
| hotlisty
|
||||
| `WEECHAT_HOTLIST_LOW` (ciąg) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (ciąg) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (ciąg) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (ciąg)
|
||||
|
||||
| hook process
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (liczba całkowita)
|
||||
|
||||
| hook connect
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (liczba całkowita) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (liczba całkowita)
|
||||
|
||||
| hook signal
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (ciąg) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (ciąg) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (ciąg)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.pl.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Częste zadania
|
||||
|
||||
+97
-30
@@ -35,7 +35,7 @@ Główne cechy to:
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^],
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] i
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^]
|
||||
* proxy IRC i pośrednik dla zdalnych interfejsów
|
||||
* proxy IRC i pośrednik dla WeeChat i zdalnych interfejsów
|
||||
* wielo-platformowy (GNU/Linux, *BSD, macOS, Windows i inne)
|
||||
* 100% GPL, darmowe oprogramowanie
|
||||
|
||||
@@ -132,7 +132,8 @@ WeeChat:
|
||||
|
||||
| zlib1g-dev |
|
||||
| Wtyczka logger: kompresja rotowanych plików z logami (gzip). +
|
||||
Wtyczka relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://zlib.net/[zlib ^↗^^] (protokół weechat). +
|
||||
Wtyczka relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://zlib.net/[zlib ^↗^^]
|
||||
(protokoły api i weechat). +
|
||||
Wtyczka script: odczyt repozytorium ze skryptami (gzip).
|
||||
|===
|
||||
|
||||
@@ -158,9 +159,13 @@ WeeChat:
|
||||
| ca-certificates |
|
||||
| Certyfikaty dla połączeń TLS.
|
||||
|
||||
| libcjson-dev |
|
||||
| Wtyczka relay: protokół "api" (HTTP REST API).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
| Wtyczka logger: kompresja rotowanych plików z logami (zstandard). +
|
||||
Wtyczka Relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://facebook.github.io/zstd/[Zstandard ^↗^^] (protokół weechat).
|
||||
Wtyczka relay: kompresja wiadomości (WeeChat -> klient) za pomocą https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(protokoły api i weechat).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Wtyczka spell.
|
||||
@@ -277,6 +282,9 @@ Lista dostępnych opcji:
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| Kompilacja <<charset,wtyczki charset>>.
|
||||
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Wsparcie dla JSON z użyciem biblioteki https://github.com/DaveGamble/cJSON[cJSON ^↗^^].
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| Generowanie strony manuala.
|
||||
|
||||
@@ -523,11 +531,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -1853,10 +1861,10 @@ za pomocą skrótu kbd:[Alt+m] (komenda: `+/mouse toggle+`).
|
||||
| kbd:[▼] | - | chat: /list buffer | Przesuń pięć linii w dół w buforze /list. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: /list buffer | Wybierz linię w buforze /list. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: /list buffer | Wejdź na kanał IRC w zaznaczonej linii. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | chat: bufor skryptów | Przejdź 5 linii w górę w buforze skryptów. | `+/script up 5+`
|
||||
| kbd:[▼] | - | chat: bufor skryptów | Przejdź 5 linii w dół w buforze skryptów. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | chat: bufor skryptów | Zaznacz linię w buforze skryptów. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: bufor skryptów | Zainstaluj/usuń skrypt. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | chat: bufor skryptów | Przejdź 5 linii w górę w buforze skryptów. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | chat: bufor skryptów | Przejdź 5 linii w dół w buforze skryptów. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | chat: bufor skryptów | Zaznacz linię w buforze skryptów. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | chat: bufor skryptów | Zainstaluj/usuń skrypt. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | góra / lewo | buflist | Przenieś bufor na niższy numer. | Sygnał `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | dół / prawo | buflist | Przenieś bufor na wyższy numer. | Sygnał `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | buflist | Przełącz na bufor (poprzednio odwiedzony bufor, jeśli jest to obecny bufor). | Sygnał `+buflist_mouse+`.
|
||||
@@ -1974,8 +1982,8 @@ Te skróty klawiszowe i akcje mogą zostać użyte w buforze skryptów (zobacz <
|
||||
[width="100%",cols="^.^3,^.^2,.^8,.^5",options="header"]
|
||||
|===
|
||||
| Skrót | Akcja ^(1)^ | Opis | Komenda
|
||||
| kbd:[↑] | | Przejdź linię wyżej. | `+/script up+`
|
||||
| kbd:[↓] | | Przejdź linię niżej. | `+/script down+`
|
||||
| kbd:[↑] | | Przejdź linię wyżej. | `+/script -up+`
|
||||
| kbd:[↓] | | Przejdź linię niżej. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Przewiń stronę do góry. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Przewiń stronę w dół. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Zainstaluj skrypt. | `+/script install+`
|
||||
@@ -2689,27 +2697,37 @@ Możesz zmienić lub dodać przypisania za pomocą komendy `/key` używając kon
|
||||
Nazwa zdarzenia zawiera modyfikator (opcjonalny), nazwę klawisza/rolki i gest
|
||||
(opcjonalny). Różne elementy są rozdzielane przez `+-+`.
|
||||
|
||||
Lista modyfikatorów:
|
||||
Lista modyfikatorów (według nazwy):
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Modyfikator | Opis
|
||||
| ctrl | Klawisz kbd:[Ctrl]
|
||||
| alt | Klawisz kbd:[Alt]
|
||||
| ctrl-alt | Klawisze kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Klawisz kbd:[Ctrl]
|
||||
| shift | Klawisz kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Modyfikator `shift` można sporadycznie użyć w WeeChat ponieważ terminale
|
||||
zazwyczaj używają tego modyfikatora do przechwytywania ewentów myszy.
|
||||
|
||||
Modyfikatory można ze sobą łączyć, na przykład:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
Lista klawiszy/rolek:
|
||||
|
||||
[width="100%",cols="1m,4",options="header"]
|
||||
|===
|
||||
| Klawisz/rolka | Opis
|
||||
| button1 | Lewy klawisz myszy
|
||||
| button2 | Prawy klawisz myszy
|
||||
| button3 | Środkowy klawisz myszy (często naciśnięcie rolki)
|
||||
| button4 ... button9 | Dodatkowe klawisze
|
||||
| wheelup | Rolka (w górę)
|
||||
| wheeldown | Rolka (w dół)
|
||||
| Klawisz/rolka | Opis
|
||||
| button1 | Lewy klawisz myszy
|
||||
| button2 | Prawy klawisz myszy
|
||||
| button3 | Środkowy klawisz myszy (często naciśnięcie rolki)
|
||||
| button4 ... button11 | Dodatkowe klawisze
|
||||
| wheelup | Rolka (w górę)
|
||||
| wheeldown | Rolka (w dół)
|
||||
|===
|
||||
|
||||
Lista gestów (tylko dla klawiszy, nie rolki):
|
||||
@@ -2745,7 +2763,7 @@ Przykłady zdarzeń:
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -4545,8 +4563,13 @@ protokołów:
|
||||
|
||||
* _irc_: pośrednik IRC: używany do dzielenia połączeń z serwerami IRC z jednym
|
||||
lub wieloma klientami IRC
|
||||
* _api_: HTTP REST API, używane przez WeeChat i zdalne interfejsy do wyświetlania
|
||||
i interakcji z WeeChat
|
||||
* _weechat_: protokół używany przez zdalne interfejsy do wyświetlania i interakcji
|
||||
z WeeChat, zobacz https://weechat.org/about/interfaces/[tą stronę ^↗^^].
|
||||
z WeeChat.
|
||||
|
||||
Listę dostępnych zdalnych interfejsów dla protokołów _api_ i _weechat_ można znaleźć na
|
||||
https://weechat.org/about/interfaces/[tej stronie ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== Hasło
|
||||
@@ -4558,13 +4581,14 @@ Zaleca się ustawenia hasła dla pośrednika za pomocą poniższych komend:
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
Hasło to używane jest przez protokoły _irc_ i _weechat_.
|
||||
To hasło jest używane przez wszystkie protokoły.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
TOTP (Time-based One-Time Password) może zostać użyte jako drugi stopień uwierzytelnienia
|
||||
dla protokołu _weechat_, poza normalnym hasłem.
|
||||
|
||||
TOTP (Time-based One-Time Password) może być użyte jako drugi składnik uwierzytelniania
|
||||
dla protokołów _api_ i _weechat_, poza samym hasłem.
|
||||
|
||||
Jest to opcjomalne ale podnosi to poziom bezpieczeństwa.
|
||||
This is optional and increases the security level.
|
||||
@@ -4658,6 +4682,41 @@ za pomocą tych komend:
|
||||
/set irc.server.relay.password "{sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
[[relay_api_protocol]]
|
||||
=== Protokół API
|
||||
|
||||
Wtyczka Relay może wysyłać dane do zdalnego WeeChat lub interfejsu za pomocą
|
||||
protokołu HTTP REST API.
|
||||
|
||||
Możesz przeglądać i testować API online:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
Możesz się połączyć przez WeeChat lub zdalnym interfejsem, sprawdź
|
||||
https://weechat.org/about/interfaces/[tą stronę ^↗^^].
|
||||
|
||||
Na przykład:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Możesz teraz połączyć się na porcie 9000 używając WeeChat lub zdalnym interfejsem
|
||||
używając hasła
|
||||
Now you can connect on port 9000 with a WeeChat or a remote interface using
|
||||
password "moje_hasło".
|
||||
|
||||
Łączenie się z pośrednikiem _api_ z WeeChat:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
Zdalny WeeChat musi używać tej samej wersji API co lokalny WeeChat, zaleca się
|
||||
używanie dokładnie tych samych wersji WeeChat zarówno lokalnie jak i na zdalnej
|
||||
maszynie.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== Protokół WeeChat
|
||||
|
||||
@@ -4698,7 +4757,9 @@ websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
Port (9000 w przykładzie) to port zdefiniowany we wtyczce relay.
|
||||
Adres URL musi się zawsze kończyć "/weechat" (dla protokołów _irc_ i _weechat_).
|
||||
|
||||
URI musi się kończyć "/weechat" dla protokołów _irc_ i _weechat_ oraz "/api"
|
||||
dla protokołu _api_.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== Sockety UNIXowe
|
||||
@@ -4741,7 +4802,7 @@ Sekcje w pliku _relay.conf_:
|
||||
| network | /set relay.network.* | Opcje sieci.
|
||||
| irc | /set relay.irc.* | Opcje specyficzne dla protokołu irc (pośrednik irc).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Porty używane do przekazywania (protokoły irc i weechat) (opcje w tej sekcji mogą być dodawane/usuwane).
|
||||
/set relay.port.* | Porty używane do przekazywania (opcje w tej sekcji mogą być dodawane/usuwane).
|
||||
|===
|
||||
|
||||
Opcje:
|
||||
@@ -5161,7 +5222,9 @@ Dopasowanie grup może być także użyte:
|
||||
|
||||
* `+${re:0}+` do `+${re:99}+`: `+${re:0}+` to pełne dopasowanie, `+${re:1}+` do
|
||||
`+${re:99}+` to złapane grupy
|
||||
* `+${re:+}+`: ostatnie dopasowanie (z najwyższym numerem)
|
||||
* `pass:[${re:+}]`: ostatnie dopasowanie (z najwyższym numerem)
|
||||
* `+${re:#}+`: index of last group captured
|
||||
* `+${re:repl_index}+`: index of replacement being done (starts to 1)
|
||||
* `+${hide:c,${re:N}}+`: dopasuje "N" ze wszystkimi znakami zastąpionymi przez "c"
|
||||
(przykład: `+${hide:*,${re:2}}+` to grupa #2 ze wszystkimi znakami zastąpionymi przez
|
||||
`+*+`).
|
||||
@@ -5310,7 +5373,7 @@ są dodawane do tablicy hashy:
|
||||
| server | ciąg | Nazwa serwera (przykład: "libera").
|
||||
| tags | ciąg | Tagi w wiadomości (rzadko używane).
|
||||
| message_without_tags | ciąg | Wiadomość bez tagów.
|
||||
| nick | ciąg | Nick.
|
||||
| nick | ciąg | Nick. ^(1)^
|
||||
| host | ciąg | Nazwa hosta.
|
||||
| command | ciąg | Komendy IRC (na przykład: "PRIVMSG", "NOTICE", ...).
|
||||
| channel | ciąg | Kanał IRC.
|
||||
@@ -5322,6 +5385,10 @@ są dodawane do tablicy hashy:
|
||||
| pos_text | ciąg | Indeks _text_ w wiadomości ("-1" jeśli _text_ nie został znaleziony).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Nick to nadawca wiadomości. +
|
||||
Twój nick na serwerze to `${irc_server.nick}`.
|
||||
|
||||
Kiedy dane są wskaźnikiem, zmienna `+tg_signal_data+` może zostać użyta do
|
||||
odczytania pola w hdata (w tym przypadku jest to wskaźnik na bufor):
|
||||
|
||||
|
||||
+390
-350
@@ -115,96 +115,96 @@ WeeChat „језгро” се налази у следећим директо
|
||||
|
||||
[width="100%", cols="2m,3", options="header"]
|
||||
|===
|
||||
| Путања/фајл | Опис
|
||||
| core/ | Функције језгра: тачка улаза, интерне структуре.
|
||||
| wee-arraylist.c | Листе низова.
|
||||
| wee-backtrace.c | Испис трага након краха.
|
||||
| wee-calc.c | Израчунавање резултата израза.
|
||||
| wee-command.c | WeeChat команде језгра.
|
||||
| wee-completion.c | Подразумевана довршавања.
|
||||
| wee-config-file.c | Управљање конфигурационим фајловима.
|
||||
| wee-config.c | Конфигурационе опције за WeeChat језгро (фајл weechat.conf).
|
||||
| wee-crypto.c | Криптографске функције.
|
||||
| wee-debug.c | Неке дибаг функције.
|
||||
| wee-dir.c | Функције директоријума/фајла.
|
||||
| wee-doc.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 | Функције обезбеђених података.
|
||||
| wee-secure-buffer.c | Бафер обезбеђених података.
|
||||
| wee-secure-config.c | Опције обезбеђених података (фајл sec.conf).
|
||||
| wee-string.c | Функције над стринговима.
|
||||
| wee-sys.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".
|
||||
| wee-hook-url.c | Кука "url".
|
||||
| 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 | Линије у баферуLines in buffers.
|
||||
| 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/ | Функције језгра: тачка улаза, интерне структуре.
|
||||
| core-arraylist.c | Листе низова.
|
||||
| core-backtrace.c | Испис трага након краха.
|
||||
| core-calc.c | Израчунавање резултата израза.
|
||||
| core-command.c | WeeChat команде језгра.
|
||||
| core-completion.c | Подразумевана довршавања.
|
||||
| core-config-file.c | Управљање конфигурационим фајловима.
|
||||
| core-config.c | Конфигурационе опције за WeeChat језгро (фајл weechat.conf).
|
||||
| core-crypto.c | Криптографске функције.
|
||||
| core-debug.c | Неке дибаг функције.
|
||||
| core-dir.c | Функције директоријума/фајла.
|
||||
| core-doc.c | Изградња фајлова за документацију.
|
||||
| core-eval.c | Израчунавање израза са референцама на интерне променљиве.
|
||||
| core-hashtable.c | Хеш табеле.
|
||||
| core-hdata.c | Hdata (директни приступ подацима употребом хеш табела).
|
||||
| core-hook.c | Куке.
|
||||
| core-infolist.c | Инфолисте (листе са подацима објеката).
|
||||
| core-input.c | Унос команди/текста.
|
||||
| core-list.c | Сортиране листе.
|
||||
| core-log.c | Упис у WeeChat лог фајл (weechat.log).
|
||||
| core-network.c | Мрежне функције (повезивање са серверима/проксијима).
|
||||
| core-proxy.c | Управљање проксијима.
|
||||
| core-secure.c | Функције обезбеђених података.
|
||||
| core-secure-buffer.c | Бафер обезбеђених података.
|
||||
| core-secure-config.c | Опције обезбеђених података (фајл sec.conf).
|
||||
| core-string.c | Функције над стринговима.
|
||||
| core-sys.c | Системске функције.
|
||||
| core-upgrade-file.c | Интерни систем ажурирања.
|
||||
| core-upgrade.c | Ажурирање за WeeChat језгро (бафери, линије, историја, ...).
|
||||
| core-url.c | URL трансфер (помоћу libcurl).
|
||||
| core-utf8.c | UTF-8 функције.
|
||||
| core-util.c | Неке друге функције.
|
||||
| core-version.c | Функције за WeeChat верзију.
|
||||
| weechat.c | Основне функције: опције командне линије, покретање.
|
||||
| hook/ | Функције кука.
|
||||
| hook-command-run.c | Кука "command_run".
|
||||
| hook-command.c | Кука "command".
|
||||
| hook-completion.c | Кука "completion".
|
||||
| hook-config.c | Кука "config".
|
||||
| hook-connect.c | Кука "connect".
|
||||
| hook-fd.c | Кука "fd".
|
||||
| hook-focus.c | Кука "focus".
|
||||
| hook-hdata.c | Кука "hdata".
|
||||
| hook-hsignal.c | Кука "hsignal".
|
||||
| hook-info-hashtable.c | Кука "info_hashtable".
|
||||
| hook-info.c | Кука "info".
|
||||
| hook-infolist.c | Кука "infolist".
|
||||
| hook-line.c | Кука "line".
|
||||
| hook-modifier.c | Кука "modifier".
|
||||
| hook-print.c | Кука "print".
|
||||
| hook-process.c | Кука "process".
|
||||
| hook-signal.c | Кука "signal".
|
||||
| hook-timer.c | Кука "timer".
|
||||
| hook-url.c | Кука "url".
|
||||
| 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]]
|
||||
@@ -212,180 +212,189 @@ WeeChat „језгро” се налази у следећим директо
|
||||
|
||||
[width="100%", cols="2m,3", options="header"]
|
||||
|===
|
||||
| Путања/фајл | Опис
|
||||
| plugins/ | Корен додатака.
|
||||
| plugin.c | Управљање додацима (учитавање/уклањање динамичких C библиотека).
|
||||
| plugin-api.c | Додатне функције за API додатака (омотач око WeeChat функција језгра).
|
||||
| plugin-api-info.c | Додатне info/infolist фунцкије за API додатака.
|
||||
| plugin-config.c | Опције конфигурације додатака (фајл plugins.conf).
|
||||
| plugin-script.c | Опште функције које користе скрипт додаци.
|
||||
| plugin-script-api.c | Скрипт API функције: омотачи око неких функција API додатака.
|
||||
| plugin-script-config.c | Опције конфигурације скрипт додатака (фајлови python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | Заглавље које треба да се дистрибуира уз WeeChat додатке, како би могли да се компајлирају.
|
||||
| alias/ | Alias додатак.
|
||||
| alias.c | Главне алијас функције.
|
||||
| alias-command.c | Алијас команде.
|
||||
| alias-completion.c | Алијас довршавање.
|
||||
| alias-config.c | Алијас опције конфигурације (фајл alias.conf).
|
||||
| alias-info.c | Алијас info/infolists/hdata.
|
||||
| spell/ | Додатак за проверу правописа.
|
||||
| spell.c | Главне функције провере правописа.
|
||||
| spell-bar-item.c | Провера правописа ставке траке.
|
||||
| spell-command.c | Провера правописа команде.
|
||||
| spell-completion.c | Провера правописа довршавања.
|
||||
| spell-config.c | Провера правописа опције конфиг (фајл spell.conf).
|
||||
| spell-info.c | Провера правописа info/infolists/hdata.
|
||||
| spell-speller.c | Управљање библиотекама за проверу правописа.
|
||||
| buflist/ | Buflist додатак.
|
||||
| buflist.c | Главне buflist функције.
|
||||
| buflist-bar-item.c | Buflist ставке траке.
|
||||
| buflist-command.c | Buflist команде.
|
||||
| buflist-completion.c | Buflist довршавања.
|
||||
| buflist-config.c | Buflist опције кофиг (фајл buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist акције мишем.
|
||||
| charset/ | Charset додатак.
|
||||
| charset.c | Charset функције.
|
||||
| exec/ | Exec додатак.
|
||||
| exec.c | Флавне exec функције.
|
||||
| exec-buffer.c | Exec бафер.
|
||||
| exec-command.c | Exec команде.
|
||||
| exec-completion.c | Exec довршавања.
|
||||
| exec-config.c | Exec опције конфиг (фајл exec.conf).
|
||||
| fifo/ | Fifo додатак.
|
||||
| fifo.c | Главне fifo функције.
|
||||
| fifo-command.c | Fifo команде.
|
||||
| fifo-config.c | Fifo опције конфиг (фајл fifo.conf).
|
||||
| fifo-info.c | Fifo info/infolists/hdata.
|
||||
| fset/ | Fset додатак.
|
||||
| fset.c | Главне fset функције.
|
||||
| fset-bar-item.c | Fset ставке траке.
|
||||
| fset-buffer.c | Fset бафер.
|
||||
| fset-command.c | Fset команде.
|
||||
| fset-completion.c | Fset довршавања.
|
||||
| fset-config.c | Fset опције конфиг (фајл fset.conf).
|
||||
| fset-info.c | Fset info/infolists/hdata.
|
||||
| fset-mouse.c | Fset акције мишем.
|
||||
| fset-option.c | Fset управљање опцијама.
|
||||
| guile/ | Guile (scheme) додатак.
|
||||
| weechat-guile.c | Главне guile функције (учитавањ/уклањање скрипти, извршавање guile кода).
|
||||
| weechat-guile-api.c | API функције guile скриптовања.
|
||||
| irc/ | IRC (Internet Relay Chat) додатак.
|
||||
| irc.c | Основне IRC функције.
|
||||
| irc-bar-item.c | IRC ставке траке.
|
||||
| irc-batch.c | IRC пакетни догађаји.
|
||||
| irc-buffer.c | IRC бафери.
|
||||
| irc-channel.c | IRC канали.
|
||||
| irc-color.c | IRC боје.
|
||||
| irc-command.c | IRC команде.
|
||||
| irc-completion.c | IRC довршавања.
|
||||
| irc-config.c | IRC опције конфиг (фајл irc.conf).
|
||||
| irc-ctcp.c | IRC CTCP.
|
||||
| irc-debug.c | IRC дибаг функције.
|
||||
| irc-ignore.c | IRC Ignore.
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Унос команди/текста.
|
||||
| irc-join.c | Функције за листе канала којима се приступа.
|
||||
| irc-list.c | Бафер за одговор на /list команду.
|
||||
| irc-message.c | Функције за манипулисање IRC порукама.
|
||||
| irc-mode.c | Функције у вези режима канала/надимка.
|
||||
| irc-modelist.c | Листе режима IRC канала (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Циљни бафер за IRC поруке.
|
||||
| irc-nick.c | IRC надимци.
|
||||
| irc-notify.c | IRC листе за обавештавање.
|
||||
| irc-protocol.c | IRC протокол (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | IRC сирови бафер.
|
||||
| irc-redirect.c | Преусмеравање излаза IRC команде.
|
||||
| irc-sasl.c | SASL аутентификација са IRC сервером.
|
||||
| irc-server.c | У/И комуникација са IRC сервером.
|
||||
| irc-tag.c | Функције за манипулацију ознакама IRC порука.
|
||||
| irc-typing.c | Статус куцања.
|
||||
| irc-upgrade.c | Чување/обнављање IRC података када се ажурира програм WeeChat.
|
||||
| javascript/ | JavaScript додатак.
|
||||
| weechat-js.cpp | Главне JavaScript функције (учитавање/уклањање скрипти, извршавање JavaScript кода).
|
||||
| weechat-js-api.cpp | API функције JavaScript скриптовања.
|
||||
| weechat-js-v8.cpp | JavaScript v8 функције.
|
||||
| logger/ | Logger додатак.
|
||||
| logger.c | Главне logger функције.
|
||||
| logger-backlog.c | Logger backlog функције.
|
||||
| logger-buffer.c | Logger управљање листом бафера.
|
||||
| logger-command.c | Logger команде.
|
||||
| logger-config.c | Logger опције конфиг (фајл logger.conf).
|
||||
| logger-info.c | Logger info/infolists/hdata.
|
||||
| logger-tail.c | Функције за враћање последњих линија фајла.
|
||||
| lua/ | Lua додатак.
|
||||
| weechat-lua.c | Главне lua функције (учитавање/уклањање скрипти, извршавање lua кода).
|
||||
| weechat-lua-api.c | API функције Lua скриптовања.
|
||||
| perl/ | Perl додатак.
|
||||
| weechat-perl.c | Главне perl функције (учитавање/уклањање скрипти, извршавање perl кода).
|
||||
| weechat-perl-api.c | API функције Perl скриптовања.
|
||||
| php/ | PHP додатак.
|
||||
| weechat-php.c | Главне PHP функције (учитавање/уклањање скрипти, извршавање PHP кода).
|
||||
| weechat-php-api.c | API функције PHP скриптовања.
|
||||
| python/ | Python додатак.
|
||||
| weechat-python.c | Главне python функције (учитавање/уклањање скрипти,извршавање python кода).
|
||||
| weechat-python-api.c | API функције Python скриптовања.
|
||||
| relay/ | Релеј додатак (IRC прокси и релеј за удаљене интерфејсе).
|
||||
| relay.c | Главне релеј функције.
|
||||
| relay-auth.c | Аутентификација клијената.
|
||||
| relay-buffer.c | Релеј бафер.
|
||||
| relay-client.c | Клијенти релеја.
|
||||
| relay-command.c | Релеј команде.
|
||||
| relay-completion.c | Релеј довршавања.
|
||||
| relay-config.c | Релеј опције конфиг (фајл relay.conf).
|
||||
| relay-info.c | Релеј info/infolists/hdata.
|
||||
| relay-network.c | Мрежне функције за релеј.
|
||||
| relay-raw.c | Релеј сирови бафер.
|
||||
| relay-server.c | Релеј сервер.
|
||||
| relay-upgrade.c | Save/restore of relay data when upgrading WeeChat.
|
||||
| relay-websocket.c | WebSocket сервер функције (RFC 6455).
|
||||
| irc/ | IRC прокси.
|
||||
| relay-irc.c | Главне IRC прокси функције.
|
||||
| weechat/ | Релеј за удаљене интерфејсе.
|
||||
| relay-weechat.c | Релеј за удаљене интерфејсе (главне функције).
|
||||
| relay-weechat-msg.c | Слање бинарних порука клијентима.
|
||||
| relay-weechat-nicklist.c | Функције листе надимака.
|
||||
| relay-weechat-protocol.c | Читање команди од клијената.
|
||||
| ruby/ | Ruby додатак.
|
||||
| weechat-ruby.c | Главне ruby функције (учитавање/уклањање скрипти, извршавање ruby кода).
|
||||
| weechat-ruby-api.c | API функције Ruby скриптовања.
|
||||
| script/ | Управљач скриптама.
|
||||
| script.c | Главне функције за управљача скриптама.
|
||||
| script-action.c | Акције над скриптама (учитавање/уклањање, инсталација/деинсталација, ...).
|
||||
| script-buffer.c | Бафер за управљача скриптама.
|
||||
| script-command.c | Команде за управљача скриптама.
|
||||
| script-completion.c | Довршавања за управљача скриптама.
|
||||
| script-config.c | Опције конфигурације за управљача скриптама (фајл script.conf).
|
||||
| script-info.c | Управљач скриптама info/infolists/hdata.
|
||||
| script-mouse.c | Скрипт акције мишем.
|
||||
| script-repo.c | Преузимање и читање фајла репозиторијума.
|
||||
| tcl/ | Tcl додатак.
|
||||
| weechat-tcl.c | Главне tcl функције (учитавање/уклањање скрипти, извршавање tcl кода).
|
||||
| weechat-tcl-api.c | API функције Tcl скриптовања.
|
||||
| trigger/ | Окидач додатак.
|
||||
| trigger.c | Главне функције окидача.
|
||||
| trigger-buffer.c | Окидач бафер.
|
||||
| trigger-callback.c | Окидач функције повратног позива.
|
||||
| trigger-command.c | Окидач команде.
|
||||
| trigger-completion.c | Окидач довршавања.
|
||||
| trigger-config.c | Окидач опције конфиг (фајл trigger.conf).
|
||||
| typing/ | Typing додатак.
|
||||
| typing.c | Главне typing функције.
|
||||
| typing-bar-item.c | Typing ставке траке.
|
||||
| typing-config.c | Typing конфигурационе опције (фајл typing.conf).
|
||||
| typing-status.c | Статус куцања порука на баферима.
|
||||
| xfer/ | Xfer додатак (IRC DCC фајл/разговор).
|
||||
| xfer.c | Главне xfer функције.
|
||||
| xfer-buffer.c | Xfer бафер.
|
||||
| xfer-chat.c | DCC разговор.
|
||||
| xfer-command.c | Xfer команде.
|
||||
| xfer-completion.c | Xfer довршавања.
|
||||
| xfer-config.c | Xfer опције конфиг (фајлxfer.conf).
|
||||
| xfer-dcc.c | DCC пренос фајла.
|
||||
| xfer-file.c | Фајл функције за xfer.
|
||||
| xfer-info.c | Xfer info/infolists/hdata.
|
||||
| xfer-network.c | Мрежне функције за xfer.
|
||||
| xfer-upgrade.c | Чување/обнављање xfer података када се програм WeeChat ажурира.
|
||||
| Путања/фајл | Опис
|
||||
| plugins/ | Корен додатака.
|
||||
| plugin.c | Управљање додацима (учитавање/уклањање динамичких C библиотека).
|
||||
| plugin-api.c | Додатне функције за API додатака (омотач око WeeChat функција језгра).
|
||||
| plugin-api-info.c | Додатне info/infolist функције за API додатака.
|
||||
| plugin-config.c | Опције конфигурације додатака (фајл plugins.conf).
|
||||
| plugin-script.c | Опште функције које користе скрипт додаци.
|
||||
| plugin-script-api.c | Скрипт API функције: омотачи око неких функција API додатака.
|
||||
| plugin-script-config.c | Опције конфигурације скрипт додатака (фајлови python.conf, perl.conf, ...).
|
||||
| weechat-plugin.h | Заглавље које треба да се дистрибуира уз WeeChat додатке, како би могли да се компајлирају.
|
||||
| alias/ | Alias додатак.
|
||||
| alias.c | Главне алијас функције.
|
||||
| alias-command.c | Алијас команде.
|
||||
| alias-completion.c | Алијас довршавање.
|
||||
| alias-config.c | Алијас опције конфигурације (фајл alias.conf).
|
||||
| alias-info.c | Алијас info/infolists/hdata.
|
||||
| spell/ | Додатак за проверу правописа.
|
||||
| spell.c | Главне функције провере правописа.
|
||||
| spell-bar-item.c | Провера правописа ставке траке.
|
||||
| spell-command.c | Провера правописа команде.
|
||||
| spell-completion.c | Провера правописа довршавања.
|
||||
| spell-config.c | Провера правописа опције конфиг (фајл spell.conf).
|
||||
| spell-info.c | Провера правописа info/infolists/hdata.
|
||||
| spell-speller.c | Управљање библиотекама за проверу правописа.
|
||||
| buflist/ | Buflist додатак.
|
||||
| buflist.c | Главне buflist функције.
|
||||
| buflist-bar-item.c | Buflist ставке траке.
|
||||
| buflist-command.c | Buflist команде.
|
||||
| buflist-completion.c | Buflist довршавања.
|
||||
| buflist-config.c | Buflist опције конфиг (фајл buflist.conf).
|
||||
| buflist-info.c | Buflist info/infolists/hdata.
|
||||
| buflist-mouse.c | Buflist акције мишем.
|
||||
| charset/ | Charset додатак.
|
||||
| charset.c | Charset функције.
|
||||
| exec/ | Exec додатак.
|
||||
| exec.c | Главне exec функције.
|
||||
| exec-buffer.c | Exec бафер.
|
||||
| exec-command.c | Exec команде.
|
||||
| exec-completion.c | Exec довршавања.
|
||||
| exec-config.c | Exec опције конфиг (фајл exec.conf).
|
||||
| fifo/ | Fifo додатак.
|
||||
| fifo.c | Главне fifo функције.
|
||||
| fifo-command.c | Fifo команде.
|
||||
| fifo-config.c | Fifo опције конфиг (фајл fifo.conf).
|
||||
| fifo-info.c | Fifo info/infolists/hdata.
|
||||
| fset/ | Fset додатак.
|
||||
| fset.c | Главне fset функције.
|
||||
| fset-bar-item.c | Fset ставке траке.
|
||||
| fset-buffer.c | Fset бафер.
|
||||
| fset-command.c | Fset команде.
|
||||
| fset-completion.c | Fset довршавања.
|
||||
| fset-config.c | Fset опције конфиг (фајл fset.conf).
|
||||
| fset-info.c | Fset info/infolists/hdata.
|
||||
| fset-mouse.c | Fset акције мишем.
|
||||
| fset-option.c | Fset управљање опцијама.
|
||||
| guile/ | Guile (scheme) додатак.
|
||||
| weechat-guile.c | Главне guile функције (учитавање/уклањање скрипти, извршавање guile кода).
|
||||
| weechat-guile-api.c | API функције guile скриптовања.
|
||||
| irc/ | IRC (Internet Relay Chat) додатак.
|
||||
| irc.c | Основне IRC функције.
|
||||
| irc-bar-item.c | IRC ставке траке.
|
||||
| irc-batch.c | IRC пакетни догађаји.
|
||||
| irc-buffer.c | IRC бафери.
|
||||
| irc-channel.c | IRC канали.
|
||||
| irc-color.c | IRC боје.
|
||||
| irc-command.c | IRC команде.
|
||||
| irc-completion.c | IRC довршавања.
|
||||
| irc-config.c | IRC опције конфиг (фајл irc.conf).
|
||||
| irc-ctcp.c | IRC CTCP.
|
||||
| irc-debug.c | IRC дибаг функције.
|
||||
| irc-ignore.c | IRC Ignore.
|
||||
| irc-info.c | IRC info/infolists/hdata.
|
||||
| irc-input.c | Унос команди/текста.
|
||||
| irc-join.c | Функције за листе канала којима се приступа.
|
||||
| irc-list.c | Бафер за одговор на /list команду.
|
||||
| irc-message.c | Функције за манипулисање IRC порукама.
|
||||
| irc-mode.c | Функције у вези режима канала/надимка.
|
||||
| irc-modelist.c | Листе режима IRC канала (+b, +e, +I, ...).
|
||||
| irc-msgbuffer.c | Циљни бафер за IRC поруке.
|
||||
| irc-nick.c | IRC надимци.
|
||||
| irc-notify.c | IRC листе за обавештавање.
|
||||
| irc-protocol.c | IRC протокол (RFCs 1459/2810/2811/2812/2813/7194).
|
||||
| irc-raw.c | IRC сирови бафер.
|
||||
| irc-redirect.c | Преусмеравање излаза IRC команде.
|
||||
| irc-sasl.c | SASL аутентификација са IRC сервером.
|
||||
| irc-server.c | У/И комуникација са IRC сервером.
|
||||
| irc-tag.c | Функције за манипулацију ознакама IRC порука.
|
||||
| irc-typing.c | Статус куцања.
|
||||
| irc-upgrade.c | Чување/обнављање IRC података када се ажурира програм WeeChat.
|
||||
| javascript/ | JavaScript додатак.
|
||||
| weechat-js.cpp | Главне JavaScript функције (учитавање/уклањање скрипти, извршавање JavaScript кода).
|
||||
| weechat-js-api.cpp | API функције JavaScript скриптовања.
|
||||
| weechat-js-v8.cpp | JavaScript v8 функције.
|
||||
| logger/ | Logger додатак.
|
||||
| logger.c | Главне logger функције.
|
||||
| logger-backlog.c | Logger backlog функције.
|
||||
| logger-buffer.c | Logger управљање листом бафера.
|
||||
| logger-command.c | Logger команде.
|
||||
| logger-config.c | Logger опције конфиг (фајл logger.conf).
|
||||
| logger-info.c | Logger info/infolists/hdata.
|
||||
| logger-tail.c | Функције за враћање последњих линија фајла.
|
||||
| lua/ | Lua додатак.
|
||||
| weechat-lua.c | Главне lua функције (учитавање/уклањање скрипти, извршавање lua кода).
|
||||
| weechat-lua-api.c | API функције Lua скриптовања.
|
||||
| perl/ | Perl додатак.
|
||||
| weechat-perl.c | Главне perl функције (учитавање/уклањање скрипти, извршавање perl кода).
|
||||
| weechat-perl-api.c | API функције Perl скриптовања.
|
||||
| php/ | PHP додатак.
|
||||
| weechat-php.c | Главне PHP функције (учитавање/уклањање скрипти, извршавање PHP кода).
|
||||
| weechat-php-api.c | API функције PHP скриптовања.
|
||||
| python/ | Python додатак.
|
||||
| weechat-python.c | Главне python функције (учитавање/уклањање скрипти,извршавање python кода).
|
||||
| weechat-python-api.c | API функције Python скриптовања.
|
||||
| relay/ | Релеј додатак (IRC прокси и релеј за удаљене интерфејсе).
|
||||
| relay.c | Главне релеј функције.
|
||||
| relay-auth.c | Аутентификација клијената.
|
||||
| relay-buffer.c | Релеј бафер.
|
||||
| relay-client.c | Клијенти релеја.
|
||||
| relay-command.c | Релеј команде.
|
||||
| relay-completion.c | Релеј довршавања.
|
||||
| relay-config.c | Релеј опције конфиг (фајл relay.conf).
|
||||
| relay-http.c | HTTP функције.
|
||||
| relay-info.c | Релеј info/infolists/hdata.
|
||||
| relay-network.c | Мрежне функције за релеј.
|
||||
| relay-raw.c | Релеј сирови бафер.
|
||||
| relay-remote.c | Релеј удаљених.
|
||||
| relay-server.c | Релеј сервер.
|
||||
| relay-upgrade.c | Чување/обнављање података релеја када се ажурира WeeChat.
|
||||
| relay-websocket.c | WebSocket сервер функције (RFC 6455).
|
||||
| api/ | Релеј за удаљене интерфејсе (користећи HTTP REST API).
|
||||
| relay-api.c | Главне API функције за HTTP REST API.
|
||||
| relay-api-msg.c | Слање JSON порука клијентима.
|
||||
| relay-api-protocol.c | HTTP REST API протокол.
|
||||
| remote/ | Функције прослеђивања удаљених, специфичне за API.
|
||||
| relay-remote-event.c | Обрада догађаја који се приме од релеја удаљених.
|
||||
| relay-remote-network.c | Мрежне функције за релеј удаљених.
|
||||
| irc/ | IRC прокси.
|
||||
| relay-irc.c | Главне IRC прокси функције.
|
||||
| weechat/ | Релеј за удаљене интерфејсе (користећи „weechat” бинарни протокол).
|
||||
| relay-weechat.c | Релеј за удаљене интерфејсе (главне функције).
|
||||
| relay-weechat-msg.c | Слање бинарних порука клијентима.
|
||||
| relay-weechat-nicklist.c | Функције листе надимака.
|
||||
| relay-weechat-protocol.c | Читање команди од клијената.
|
||||
| ruby/ | Ruby додатак.
|
||||
| weechat-ruby.c | Главне ruby функције (учитавање/уклањање скрипти, извршавање ruby кода).
|
||||
| weechat-ruby-api.c | API функције Ruby скриптовања.
|
||||
| script/ | Управљач скриптама.
|
||||
| script.c | Главне функције за управљача скриптама.
|
||||
| script-action.c | Акције над скриптама (учитавање/уклањање, инсталација/деинсталација, ...).
|
||||
| script-buffer.c | Бафер за управљача скриптама.
|
||||
| script-command.c | Команде за управљача скриптама.
|
||||
| script-completion.c | Довршавања за управљача скриптама.
|
||||
| script-config.c | Опције конфигурације за управљача скриптама (фајл script.conf).
|
||||
| script-info.c | Управљач скриптама info/infolists/hdata.
|
||||
| script-mouse.c | Скрипт акције мишем.
|
||||
| script-repo.c | Преузимање и читање фајла репозиторијума.
|
||||
| tcl/ | Tcl додатак.
|
||||
| weechat-tcl.c | Главне tcl функције (учитавање/уклањање скрипти, извршавање tcl кода).
|
||||
| weechat-tcl-api.c | API функције Tcl скриптовања.
|
||||
| trigger/ | Окидач додатак.
|
||||
| trigger.c | Главне функције окидача.
|
||||
| trigger-buffer.c | Окидач бафер.
|
||||
| trigger-callback.c | Окидач функције повратног позива.
|
||||
| trigger-command.c | Окидач команде.
|
||||
| trigger-completion.c | Окидач довршавања.
|
||||
| trigger-config.c | Окидач опције конфиг (фајл trigger.conf).
|
||||
| typing/ | Typing додатак.
|
||||
| typing.c | Главне typing функције.
|
||||
| typing-bar-item.c | Typing ставке траке.
|
||||
| typing-config.c | Typing конфигурационе опције (фајл typing.conf).
|
||||
| typing-status.c | Статус куцања порука на баферима.
|
||||
| xfer/ | Xfer додатак (IRC DCC фајл/разговор).
|
||||
| xfer.c | Главне xfer функције.
|
||||
| xfer-buffer.c | Xfer бафер.
|
||||
| xfer-chat.c | DCC разговор.
|
||||
| xfer-command.c | Xfer команде.
|
||||
| xfer-completion.c | Xfer довршавања.
|
||||
| xfer-config.c | Xfer опције конфиг (фајлxfer.conf).
|
||||
| xfer-dcc.c | DCC пренос фајла.
|
||||
| xfer-file.c | Фајл функције за xfer.
|
||||
| xfer-info.c | Xfer info/infolists/hdata.
|
||||
| xfer-network.c | Мрежне функције за xfer.
|
||||
| xfer-upgrade.c | Чување/обнављање xfer података када се програм WeeChat ажурира.
|
||||
|===
|
||||
|
||||
[[sources_tests]]
|
||||
@@ -393,89 +402,120 @@ WeeChat „језгро” се налази у следећим директо
|
||||
|
||||
[width="100%", cols="2m,3", options="header"]
|
||||
|===
|
||||
| Путања/фајл | Опис
|
||||
| tests/ | Корен тестова.
|
||||
| tests.cpp | Програм који се користи за извршавање свих тестова.
|
||||
| tests-record.cpp | Бележење и претрага у приказаним порукама.
|
||||
| scripts/ | Корен тестова за API скриптовања.
|
||||
| test-scripts.cpp | Програм који се користи за извршавање тестова API скриптовања.
|
||||
| python/ | Python скрипте које генеришу и покрећу тестове API скриптовања.
|
||||
| testapigen.py | Python скрипта која генерише скрипте на свим језицима за тестирање API скриптовања.
|
||||
| testapi.py | Python скрипта са тестовима API скриптовања, користи је скрипта testapigen.py.
|
||||
| unparse.py | Конверзија Python кода у остале језике, користи је скрипта testapigen.py.
|
||||
| unit/ | Корен unit тестова.
|
||||
| test-plugins.cpp | Тестови: plugins.
|
||||
| test-plugin-api-info.cpp | Тестови: инфо функције API додатака.
|
||||
| test-plugin-config.cpp | Тестови: функције конфигурације додатка.
|
||||
| core/ | Корен unit тестова језгра.
|
||||
| test-core-arraylist.cpp | Тестови: arraylists.
|
||||
| test-core-calc.cpp | Тестови: калкулација израза.
|
||||
| test-core-command.cpp | Тестови: команде.
|
||||
| test-core-config-file.cpp | Тестови: конфигурациони фајлови.
|
||||
| test-core-crypto.cpp | Тестови: криптографске функције.
|
||||
| test-core-dir.cpp | Тестови: функције директоријума/фајла.
|
||||
| test-core-eval.cpp | Тестови: израчунавање израза.
|
||||
| test-core-hashtble.cpp | Тестови: hashtables.
|
||||
| test-core-hdata.cpp | Тестови: hdata.
|
||||
| test-core-hook.cpp | Тестови: куке.
|
||||
| test-core-infolist.cpp | Тестови: infolists.
|
||||
| test-core-list.cpp | Тестови: листе.
|
||||
| test-core-network.cpp | Тестови: мрежне функције.
|
||||
| test-core-secure.cpp | Тестови: обезбеђени подаци.
|
||||
| test-core-signal.cpp | Тестови: сигнали.
|
||||
| test-core-string.cpp | Тестови: стрингови.
|
||||
| test-core-url.cpp | Тестови: URL адресе.
|
||||
| test-core-utf8.cpp | Тестови: UTF-8.
|
||||
| test-core-util.cpp | Тестови: помоћне функције.
|
||||
| test-core-sys.cpp | Тестови: системске функције.
|
||||
| hook/ | Корен unit тестова за куке.
|
||||
| test-hook-command.cpp | Тестови: куке „command”.
|
||||
| gui/ | Корен unit тестова интерфејса.
|
||||
| test-gui-bar-window.cpp | Тестови: функције прозора траке.
|
||||
| test-gui-buffer.cpp | Тестови: бафер функције.
|
||||
| test-gui-chat.cpp | Тестови: чет функције.
|
||||
| test-gui-color.cpp | Тестови: боје.
|
||||
| test-gui-filter.cpp | Тестови: филтери.
|
||||
| test-gui-input.cpp | Тестови: улазне функкције.
|
||||
| test-gui-key.cpp | Тестови: тастери.
|
||||
| test-gui-line.cpp | Тестови: линије.
|
||||
| test-gui-nick.cpp | Тестови: надимци.
|
||||
| plugins/ | Корен unit тестова додатака.
|
||||
| irc/ | Корен unit тестова IRC додатка.
|
||||
| test-irc-batch.cpp | Тестови: IRC пакетни догађаји.
|
||||
| test-irc-buffer.cpp | Тестови: IRC бафери.
|
||||
| test-irc-channel.cpp | Тестови: IRC канали.
|
||||
| test-irc-color.cpp | Тестови: IRC боје.
|
||||
| test-irc-config.cpp | Тестови: IRC конфигурација.
|
||||
| test-irc-ctcp.cpp | Тестови: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Тестови: IRC игнорисања.
|
||||
| test-irc-info.cpp | Тестови: IRC информације.
|
||||
| test-irc-join.cpp | Тестови: IRC функције приступања.
|
||||
| test-irc-list.cpp | Тестови: IRC бафер за одговор на /list команду.
|
||||
| test-irc-message.cpp | Тестови: IRC поруке.
|
||||
| test-irc-mode.cpp | Тестови: IRC режими.
|
||||
| test-irc-nick.cpp | Тестови: IRC надимци.
|
||||
| test-irc-protocol.cpp | Тестови: IRC протокол.
|
||||
| test-irc-sasl.cpp | Тестови: SASL аутентификација са IRC протоколом.
|
||||
| test-irc-server.cpp | Тестови: IRC сервер.
|
||||
| test-irc-tag.cpp | Тестови: IRC ознаке порука.
|
||||
| logger/ | Корен unit тестива за logger додатак.
|
||||
| test-logger.cpp | Тестови: logger.
|
||||
| test-logger-backlog.cpp | Тестови: logger заостатак.
|
||||
| test-logger-tail.cpp | Тестови: logger tail фунцкије.
|
||||
| trigger/ | Корен unit тестова за окидач додатак.
|
||||
| test-trigger.cpp | Тестови: окидачи.
|
||||
| test-trigger-config.cpp | Тестови: конфигурација окидача.
|
||||
| typing/ | Корен unit тестова за typing додатак.
|
||||
| test-typing.cpp | Тестови: typing.
|
||||
| test-typing-status.cpp | Тестови: typing статус.
|
||||
| relay/ | Корен unit тестова за Релеј додатак.
|
||||
| test-relay-auth.cpp | Тестови: аутентификација клијената.
|
||||
| irc/ | Корен unit тестова за Релеј „irc” протокол.
|
||||
| test-relay-irc.cpp | Тестови: РЕлеј „irc” протокол.
|
||||
| xfer/ | Корен unit тестова за Xfer додатак.
|
||||
| test-xfer-file.cpp | Тестови: фајл функције.
|
||||
| test-xfer-network.cpp | Тестови: мрежне функције.
|
||||
| Путања/фајл | Опис
|
||||
| tests/ | Корен тестова.
|
||||
| tests.cpp | Програм који се користи за извршавање свих тестова.
|
||||
| tests-record.cpp | Бележење и претрага у приказаним порукама.
|
||||
| scripts/ | Корен тестова за API скриптовања.
|
||||
| test-scripts.cpp | Програм који се користи за извршавање тестова API скриптовања.
|
||||
| python/ | Python скрипте које генеришу и покрећу тестове API скриптовања.
|
||||
| testapigen.py | Python скрипта која генерише скрипте на свим језицима за тестирање API скриптовања.
|
||||
| testapi.py | Python скрипта са тестовима API скриптовања, користи је скрипта testapigen.py.
|
||||
| unparse.py | Конверзија Python кода у остале језике, користи је скрипта testapigen.py.
|
||||
| unit/ | Корен unit тестова.
|
||||
| test-plugins.cpp | Тестови: plugins.
|
||||
| test-plugin-api-info.cpp | Тестови: инфо функције API додатака.
|
||||
| test-plugin-config.cpp | Тестови: функције конфигурације додатка.
|
||||
| core/ | Корен unit тестова језгра.
|
||||
| test-core-arraylist.cpp | Тестови: arraylists.
|
||||
| test-core-calc.cpp | Тестови: калкулација израза.
|
||||
| test-core-command.cpp | Тестови: команде.
|
||||
| test-core-config-file.cpp | Тестови: конфигурациони фајлови.
|
||||
| test-core-crypto.cpp | Тестови: криптографске функције.
|
||||
| test-core-dir.cpp | Тестови: функције директоријума/фајла.
|
||||
| test-core-eval.cpp | Тестови: израчунавање израза.
|
||||
| test-core-hashtble.cpp | Тестови: hashtables.
|
||||
| test-core-hdata.cpp | Тестови: hdata.
|
||||
| test-core-hook.cpp | Тестови: куке.
|
||||
| test-core-infolist.cpp | Тестови: infolists.
|
||||
| test-core-list.cpp | Тестови: листе.
|
||||
| test-core-network.cpp | Тестови: мрежне функције.
|
||||
| test-core-secure.cpp | Тестови: обезбеђени подаци.
|
||||
| test-core-signal.cpp | Тестови: сигнали.
|
||||
| test-core-string.cpp | Тестови: стрингови.
|
||||
| test-core-url.cpp | Тестови: URL адресе.
|
||||
| test-core-utf8.cpp | Тестови: UTF-8.
|
||||
| test-core-util.cpp | Тестови: помоћне функције.
|
||||
| test-core-sys.cpp | Тестови: системске функције.
|
||||
| hook/ | Корен unit тестова за куке.
|
||||
| test-hook-command.cpp | Тестови: куке „command”.
|
||||
| test-hook-command-run.cpp | Тестови: куке „command_run”.
|
||||
| test-hook-completion.cpp | Тестови: куке „completion”.
|
||||
| test-hook-config.cpp | Тестови: куке „config”.
|
||||
| test-hook-connect.cpp | Тестови: куке „connect”.
|
||||
| test-hook-fd.cpp | Тестови: куке „fd”.
|
||||
| test-hook-focus.cpp | Тестови: куке „focus”.
|
||||
| test-hook-hdata.cpp | Тестови: куке „hdata”.
|
||||
| test-hook-hsignal.cpp | Тестови: куке „hsignal”.
|
||||
| test-hook-info-hashtable.cpp | Тестови: куке „info_hashtable”.
|
||||
| test-hook-info.cpp | Тестови: куке „info”.
|
||||
| test-hook-infolist.cpp | Тестови: куке „infolist”.
|
||||
| test-hook-line.cpp | Тестови: куке „line”.
|
||||
| test-hook-modifier.cpp | Тестови: куке „modifier”.
|
||||
| test-hook-print.cpp | Тестови: куке „print”.
|
||||
| test-hook-process.cpp | Тестови: куке „process”.
|
||||
| test-hook-signal.cpp | Тестови: куке „signal”.
|
||||
| test-hook-timer.cpp | Тестови: куке „timer”.
|
||||
| test-hook-url.cpp | Тестови: куке „url”.
|
||||
| gui/ | Корен unit тестова интерфејса.
|
||||
| test-gui-bar-window.cpp | Тестови: функције прозора траке.
|
||||
| test-gui-buffer.cpp | Тестови: бафер функције.
|
||||
| test-gui-chat.cpp | Тестови: чет функције.
|
||||
| test-gui-color.cpp | Тестови: боје.
|
||||
| test-gui-filter.cpp | Тестови: филтери.
|
||||
| test-gui-hotlist.cpp | Тестови: функције врућих листи.
|
||||
| test-gui-input.cpp | Тестови: улазне функције.
|
||||
| test-gui-key.cpp | Тестови: тастери.
|
||||
| test-gui-line.cpp | Тестови: линије.
|
||||
| test-gui-nick.cpp | Тестови: надимци.
|
||||
| test-gui-nicklist.cpp | Тестови: функције листе надимака.
|
||||
| curses/ | Корен unit тестова за Curses интерфејс.
|
||||
| test-gui-curses-mouse.cpp | Тестови: миш (Curses интерфејс).
|
||||
| plugins/ | Корен unit тестова додатака.
|
||||
| irc/ | Корен unit тестова IRC додатка.
|
||||
| test-irc-batch.cpp | Тестови: IRC пакетни догађаји.
|
||||
| test-irc-buffer.cpp | Тестови: IRC бафери.
|
||||
| test-irc-channel.cpp | Тестови: IRC канали.
|
||||
| test-irc-color.cpp | Тестови: IRC боје.
|
||||
// TRANSLATION MISSING
|
||||
| test-irc-command.cpp | Tests: IRC commands.
|
||||
| test-irc-config.cpp | Тестови: IRC конфигурација.
|
||||
| test-irc-ctcp.cpp | Тестови: IRC CTCP.
|
||||
| test-irc-ignore.cpp | Тестови: IRC игнорисања.
|
||||
| test-irc-info.cpp | Тестови: IRC информације.
|
||||
| test-irc-join.cpp | Тестови: IRC функције приступања.
|
||||
| test-irc-list.cpp | Тестови: IRC бафер за одговор на /list команду.
|
||||
| test-irc-message.cpp | Тестови: IRC поруке.
|
||||
| test-irc-mode.cpp | Тестови: IRC режими.
|
||||
| test-irc-nick.cpp | Тестови: IRC надимци.
|
||||
| test-irc-protocol.cpp | Тестови: IRC протокол.
|
||||
| test-irc-sasl.cpp | Тестови: SASL аутентификација са IRC протоколом.
|
||||
| test-irc-server.cpp | Тестови: IRC сервер.
|
||||
| test-irc-tag.cpp | Тестови: IRC ознаке порука.
|
||||
| logger/ | Корен unit тестова за logger додатак.
|
||||
| test-logger.cpp | Тестови: logger.
|
||||
| test-logger-backlog.cpp | Тестови: logger заостатак.
|
||||
| test-logger-tail.cpp | Тестови: logger tail функције.
|
||||
| trigger/ | Корен unit тестова за окидач додатак.
|
||||
| test-trigger.cpp | Тестови: окидачи.
|
||||
| test-trigger-config.cpp | Тестови: конфигурација окидача.
|
||||
| typing/ | Корен unit тестова за typing додатак.
|
||||
| test-typing.cpp | Тестови: typing.
|
||||
| test-typing-status.cpp | Тестови: typing статус.
|
||||
| relay/ | Корен unit тестова за Релеј додатак.
|
||||
| test-relay-auth.cpp | Тестови: аутентификација клијената.
|
||||
| test-relay-http.cpp | Тестови: HTTP функције за Релеј додатак.
|
||||
| test-relay-remote.cpp | Тестови: удаљене функције за Релеј додатак.
|
||||
| test-relay-websocket.cpp | Тестови: websocket функције за Релеј додатак.
|
||||
| api/ | Корен unit тестова за Релеј „api” протокол.
|
||||
| test-relay-api.cpp | Тестови: Релеј „api” протокол: опште функције.
|
||||
| test-relay-api-msg.cpp | Тестови: Релеј „api” протокол: поруке.
|
||||
| test-relay-api-protocol.cpp | Тестови: Релеј „api” протокол: протокол.
|
||||
| irc/ | Корен unit тестова за Релеј „irc” протокол.
|
||||
| test-relay-irc.cpp | Тестови: Релеј „irc” протокол.
|
||||
| xfer/ | Корен unit тестова за Xfer додатак.
|
||||
| test-xfer-file.cpp | Тестови: фајл функције.
|
||||
| test-xfer-network.cpp | Тестови: мрежне функције.
|
||||
|===
|
||||
|
||||
[[documentation_translations]]
|
||||
@@ -557,7 +597,7 @@ WeeChat „језгро” се налази у следећим директо
|
||||
|
||||
Када пишете C кôд, *морате* да се придржавате неких основних правила:
|
||||
|
||||
* Користите 4 размака за увлачење редова. Не употребљавајте табове, они су зло.
|
||||
* За увлачење користите 4 размака (без табулатора).
|
||||
* Покушајте да не прекорачите 80 карактера по линији, осим ако је то неопходно за читљивост.
|
||||
* Користите коментаре `+/* коментар */+` (а не коментаре у C99 стилу као што је `+// коментар+`).
|
||||
* Испред сваке функције додајте коментар који објашњава шта она ради (увек користите вишелинијски коментар, чак и ако је опис кратак).
|
||||
@@ -760,7 +800,7 @@ new_hook_fd = malloc (sizeof (*new_hook_fd));
|
||||
[width="100%", cols="2m,3", options="header"]
|
||||
|===
|
||||
| Директоријум | Фајлови
|
||||
| src/core/ | weechat.c, wee-backtrace.c, wee-command.c, ...
|
||||
| src/core/ | weechat.c, core-backtrace.c, core-command.c, ...
|
||||
| src/gui/ | gui-bar.c, gui-bar-item.c, gui-bar-window.c, ...
|
||||
| src/gui/curses/ | gui-curses-bar.c, gui-curses-bar-window.c, gui-curses-chat.c, ...
|
||||
| src/plugins/ | plugin.c, plugin-api.c, plugin-api-info.c, plugin-config.c, plugin-script.c, ...
|
||||
@@ -768,7 +808,7 @@ new_hook_fd = malloc (sizeof (*new_hook_fd));
|
||||
| src/plugins/python/ | weechat-python.c, weechat-python-api.c, ...
|
||||
|===
|
||||
|
||||
Заглавља C фајлова имају сито име као и фајл, на пример _wee-command.h_ за фајл _wee-command.c_.
|
||||
Заглавља C фајлова имају сито име као и фајл, на пример _core-command.h_ за фајл _core-command.c_.
|
||||
|
||||
[[naming_convention_structures]]
|
||||
==== Структуре
|
||||
|
||||
+554
-130
File diff suppressed because it is too large
Load Diff
@@ -656,6 +656,7 @@ inl:
|
||||
nicklist_visible_count: 0
|
||||
title: 'WeeChat 2.9-dev (C) 2003-2020 - https://weechat.org/'
|
||||
input: 1
|
||||
input_get_any_user_data: 0
|
||||
input_get_unknown_commands: 0
|
||||
input_get_empty: 0
|
||||
input_multiline: 0
|
||||
|
||||
@@ -510,317 +510,14 @@ weechat_hook_timer(1000, 0, 1, $timer_cb, 'test');
|
||||
|
||||
Листа функција у API скриптовања:
|
||||
|
||||
[width="100%", cols="1,5", options="header"]
|
||||
|===
|
||||
| Категорија | Функције
|
||||
|
||||
| опште
|
||||
| register
|
||||
|
||||
| додаци
|
||||
| plugin_get_name
|
||||
|
||||
| стрингови
|
||||
| charset_set +
|
||||
iconv_to_internal +
|
||||
iconv_from_internal +
|
||||
gettext +
|
||||
ngettext +
|
||||
strlen_screen +
|
||||
string_match +
|
||||
string_match_list +
|
||||
string_has_highlight +
|
||||
string_has_highlight_regex +
|
||||
string_mask_to_regex +
|
||||
string_format_size +
|
||||
string_parse_size +
|
||||
string_color_code_size +
|
||||
string_remove_color +
|
||||
string_is_command_char +
|
||||
string_input_for_buffer +
|
||||
string_eval_expression +
|
||||
string_eval_path_home
|
||||
|
||||
| директоријуми
|
||||
| mkdir_home +
|
||||
mkdir +
|
||||
mkdir_parents
|
||||
|
||||
| сортиране листе
|
||||
| list_new +
|
||||
list_add +
|
||||
list_search +
|
||||
list_search_pos +
|
||||
list_casesearch +
|
||||
list_casesearch_pos +
|
||||
list_get +
|
||||
list_set +
|
||||
list_next +
|
||||
list_prev +
|
||||
list_string +
|
||||
list_size +
|
||||
list_remove +
|
||||
list_remove_all +
|
||||
list_free
|
||||
|
||||
| кофнигурациони фајлови
|
||||
| config_new +
|
||||
config_new_section +
|
||||
config_search_section +
|
||||
config_new_option +
|
||||
config_search_option +
|
||||
config_string_to_boolean +
|
||||
config_option_reset +
|
||||
config_option_set +
|
||||
config_option_set_null +
|
||||
config_option_unset +
|
||||
config_option_rename +
|
||||
config_option_is_null +
|
||||
config_option_default_is_null +
|
||||
config_boolean +
|
||||
config_boolean_default +
|
||||
config_integer +
|
||||
config_integer_default +
|
||||
config_string +
|
||||
config_string_default +
|
||||
config_color +
|
||||
config_color_default +
|
||||
config_write_option +
|
||||
config_write_line +
|
||||
config_write +
|
||||
config_read +
|
||||
config_reload +
|
||||
config_option_free +
|
||||
config_section_free_options +
|
||||
config_section_free +
|
||||
config_free +
|
||||
config_get +
|
||||
config_get_plugin +
|
||||
config_is_set_plugin +
|
||||
config_set_plugin +
|
||||
config_set_desc_plugin +
|
||||
config_unset_plugin
|
||||
|
||||
| тастерске пречице
|
||||
| key_bind +
|
||||
key_unbind
|
||||
|
||||
| приказ
|
||||
| prefix +
|
||||
color +
|
||||
print (за python: prnt) +
|
||||
print_date_tags (за python: prnt_date_tags) +
|
||||
print_datetime_tags (за python: prnt_datetime_tags) +
|
||||
print_y (за python: prnt_y) +
|
||||
print_y_date_tags (за python: prnt_y_date_tags) +
|
||||
print_y_datetime_tags (за python: prnt_y_datetime_tags) +
|
||||
log_print
|
||||
|
||||
| куке
|
||||
| hook_command +
|
||||
hook_command_run +
|
||||
hook_timer +
|
||||
hook_fd +
|
||||
hook_process +
|
||||
hook_process_hashtable +
|
||||
hook_connect +
|
||||
hook_line +
|
||||
hook_print +
|
||||
hook_signal +
|
||||
hook_signal_send +
|
||||
hook_hsignal +
|
||||
hook_hsignal_send +
|
||||
hook_config +
|
||||
hook_completion +
|
||||
hook_modifier +
|
||||
hook_modifier_exec +
|
||||
hook_info +
|
||||
hook_info_hashtable +
|
||||
hook_infolist +
|
||||
hook_focus +
|
||||
hook_set +
|
||||
unhook +
|
||||
unhook_all
|
||||
|
||||
| бафери
|
||||
| buffer_new +
|
||||
buffer_new_props +
|
||||
current_buffer +
|
||||
buffer_search +
|
||||
buffer_search_main +
|
||||
buffer_clear +
|
||||
buffer_close +
|
||||
buffer_merge +
|
||||
buffer_unmerge +
|
||||
buffer_get_integer +
|
||||
buffer_get_string +
|
||||
buffer_get_pointer +
|
||||
buffer_set +
|
||||
buffer_string_replace_local_var +
|
||||
buffer_match_list
|
||||
|
||||
| прозори
|
||||
| current_window +
|
||||
window_search_with_buffer +
|
||||
window_get_integer +
|
||||
window_get_string +
|
||||
window_get_pointer +
|
||||
window_set_title
|
||||
|
||||
| листа надимака
|
||||
| nicklist_add_group +
|
||||
nicklist_search_group +
|
||||
nicklist_add_nick +
|
||||
nicklist_search_nick +
|
||||
nicklist_remove_group +
|
||||
nicklist_remove_nick +
|
||||
nicklist_remove_all +
|
||||
nicklist_group_get_integer +
|
||||
nicklist_group_get_string +
|
||||
nicklist_group_get_pointer +
|
||||
nicklist_group_set +
|
||||
nicklist_nick_get_integer +
|
||||
nicklist_nick_get_string +
|
||||
nicklist_nick_get_pointer +
|
||||
nicklist_nick_set
|
||||
|
||||
| траке
|
||||
| bar_item_search +
|
||||
bar_item_new +
|
||||
bar_item_update +
|
||||
bar_item_remove +
|
||||
bar_search +
|
||||
bar_new +
|
||||
bar_set +
|
||||
bar_update +
|
||||
bar_remove
|
||||
|
||||
| команде
|
||||
| command +
|
||||
command_options
|
||||
|
||||
| довршавање
|
||||
| completion_new +
|
||||
completion_search +
|
||||
completion_get_string +
|
||||
completion_list_add +
|
||||
completion_free
|
||||
|
||||
| infos
|
||||
| info_get +
|
||||
info_get_hashtable
|
||||
|
||||
| infolists
|
||||
| infolist_new +
|
||||
infolist_new_item +
|
||||
infolist_new_var_integer +
|
||||
infolist_new_var_string +
|
||||
infolist_new_var_pointer +
|
||||
infolist_new_var_time +
|
||||
infolist_get +
|
||||
infolist_next +
|
||||
infolist_prev +
|
||||
infolist_reset_item_cursor +
|
||||
infolist_search_var +
|
||||
infolist_fields +
|
||||
infolist_integer +
|
||||
infolist_string +
|
||||
infolist_pointer +
|
||||
infolist_time +
|
||||
infolist_free
|
||||
|
||||
| hdata
|
||||
| hdata_get +
|
||||
hdata_get_var_offset +
|
||||
hdata_get_var_type_string +
|
||||
hdata_get_var_array_size +
|
||||
hdata_get_var_array_size_string +
|
||||
hdata_get_var_hdata +
|
||||
hdata_get_list +
|
||||
hdata_check_pointer +
|
||||
hdata_move +
|
||||
hdata_search +
|
||||
hdata_char +
|
||||
hdata_integer +
|
||||
hdata_long +
|
||||
hdata_string +
|
||||
hdata_pointer +
|
||||
hdata_time +
|
||||
hdata_hashtable +
|
||||
hdata_compare +
|
||||
hdata_update +
|
||||
hdata_get_string
|
||||
|
||||
| ажурирање
|
||||
| upgrade_new +
|
||||
upgrade_write_object +
|
||||
upgrade_read +
|
||||
upgrade_close
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_functions.sr.adoc[tag=functions]
|
||||
|
||||
[[script_api_constants]]
|
||||
=== Константе
|
||||
|
||||
Листа константи у API скриптовања:
|
||||
|
||||
[width="100%", cols="1,5", options="header"]
|
||||
|===
|
||||
| Категорија | Константе
|
||||
|
||||
| повратни кодови
|
||||
| `WEECHAT_RC_OK` (цео број) +
|
||||
`WEECHAT_RC_OK_EAT` (цео број) +
|
||||
`WEECHAT_RC_ERROR` (цео број)
|
||||
|
||||
| конфигурациони фајлови
|
||||
| `WEECHAT_CONFIG_READ_OK` (цео број) +
|
||||
`WEECHAT_CONFIG_READ_MEMORY_ERROR` (цео број) +
|
||||
`WEECHAT_CONFIG_READ_FILE_NOT_FOUND` (цео број) +
|
||||
`WEECHAT_CONFIG_WRITE_OK` (цео број) +
|
||||
`WEECHAT_CONFIG_WRITE_ERROR` (цео број) +
|
||||
`WEECHAT_CONFIG_WRITE_MEMORY_ERROR` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_CHANGED` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_ERROR` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_RESET` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED` (цео број) +
|
||||
`WEECHAT_CONFIG_OPTION_UNSET_ERROR` (цео број)
|
||||
|
||||
| сортиране листе
|
||||
| `WEECHAT_LIST_POS_SORT` (стринг) +
|
||||
`WEECHAT_LIST_POS_BEGINNING` (стринг) +
|
||||
`WEECHAT_LIST_POS_END` (стринг)
|
||||
|
||||
| врућа листа
|
||||
| `WEECHAT_HOTLIST_LOW` (стринг) +
|
||||
`WEECHAT_HOTLIST_MESSAGE` (стринг) +
|
||||
`WEECHAT_HOTLIST_PRIVATE` (стринг) +
|
||||
`WEECHAT_HOTLIST_HIGHLIGHT` (стринг)
|
||||
|
||||
| кука process
|
||||
| `WEECHAT_HOOK_PROCESS_RUNNING` (цео број) +
|
||||
`WEECHAT_HOOK_PROCESS_ERROR` (цео број)
|
||||
|
||||
| кука connect
|
||||
| `WEECHAT_HOOK_CONNECT_OK` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_PROXY_ERROR` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_MEMORY_ERROR` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_TIMEOUT` (цео број) +
|
||||
`WEECHAT_HOOK_CONNECT_SOCKET_ERROR` (цео број)
|
||||
|
||||
| кука signal
|
||||
| `WEECHAT_HOOK_SIGNAL_STRING` (стринг) +
|
||||
`WEECHAT_HOOK_SIGNAL_INT` (стринг) +
|
||||
`WEECHAT_HOOK_SIGNAL_POINTER` (стринг)
|
||||
|===
|
||||
include::{autogendir}/autogen_scripting_constants.sr.adoc[tag=constants]
|
||||
|
||||
[[common_tasks]]
|
||||
== Уобичајени задаци
|
||||
|
||||
+116
-40
@@ -34,7 +34,8 @@ WeeChat (Wee Enhanced Environment for Chat) је бесплатни чет кл
|
||||
https://datatracker.ietf.org/doc/html/rfc2812[2812 ^↗^^],
|
||||
https://datatracker.ietf.org/doc/html/rfc2813[2813 ^↗^^] и
|
||||
https://datatracker.ietf.org/doc/html/rfc7194[7194 ^↗^^],
|
||||
* IRC прокси и релеј за удаљене интерфејсе
|
||||
// TRANSLATION MISSING
|
||||
* IRC proxy and relay for WeeChat and remote interfaces
|
||||
* подржавање различитих платформи (GNU/Linux, *BSD, macOS, Windows и остале)
|
||||
* 100% GPL, слободан софтвер
|
||||
|
||||
@@ -126,14 +127,16 @@ WeeChat мора да се изгради са CMake.
|
||||
Relay додатак: подршка за TLS везе.
|
||||
|
||||
| zlib1g-dev |
|
||||
// TRANSLATION MISSING
|
||||
| Logger додатак: компресија ротирајућих лог фајлова (gzip). +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://zlib.net/[zlib ^↗^^] (weechat протокол). +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://zlib.net/[zlib ^↗^^]
|
||||
(api and weechat protocols). +
|
||||
Script додатак: читање индекс фајла репозиторијума (gzip).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Име долази из Debian GNU/Linux Bookworm дистрибуције, верзија и
|
||||
име могу да буду другачији у осталим дитрибуцијама. +
|
||||
име могу да буду другачији у осталим дистрибуцијама. +
|
||||
^(2)^ GnuTLS ≥ 3.0.21 је неопходан за IRC SASL аутентификацију механизмом ECDSA-NIST256P-CHALLENGE.
|
||||
|
||||
Следећа табела приказује листу пакета који нису обавезни за компајлирање програма WeeChat:
|
||||
@@ -151,9 +154,14 @@ WeeChat мора да се изгради са CMake.
|
||||
| ca-certificates |
|
||||
| Сертификати за TLS везе.
|
||||
|
||||
| libcjson-dev |
|
||||
| Relay додатак: протокол „api” (HTTP REST API).
|
||||
|
||||
| libzstd-dev | ≥ 0.8.1
|
||||
// TRANSLATION MISSING
|
||||
| Logger додатак: компресија ротирајућих лог фајлова (zstandard). +
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^] (weechat протокол).
|
||||
Relay додатак: компресија порука (WeeChat -> клијент) са https://facebook.github.io/zstd/[Zstandard ^↗^^]
|
||||
(api and weechat protocols).
|
||||
|
||||
| libaspell-dev / libenchant-dev |
|
||||
| Spell додатак.
|
||||
@@ -268,6 +276,9 @@ $ make install
|
||||
| ENABLE_CHARSET | `ON`, `OFF` | ON
|
||||
| Компајлира <<charset,Charset додатак>>.
|
||||
|
||||
| ENABLE_CJSON | `ON`, `OFF` | ON
|
||||
| Подршка за JSON са https://github.com/DaveGamble/cJSON[cJSON ^↗^^] библиотеком.
|
||||
|
||||
| ENABLE_MAN | `ON`, `OFF` | OFF
|
||||
| Изграђује man страницу.
|
||||
|
||||
@@ -502,11 +513,11 @@ Copying output to /tmp/crash.txt.
|
||||
at /some_path/src/core/weechat.c:351
|
||||
#3 <signal handler called>
|
||||
#4 0x000000000044cb24 in hook_process_timer_cb (arg_hook_process=0x254eb90,
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/wee-hook.c:1364
|
||||
remaining_calls=<value optimized out>) at /some_path/src/core/core-hook.c:1364
|
||||
hook_process = 0x254eb90
|
||||
status = <value optimized out>
|
||||
#5 0x000000000044cc7d in hook_timer_exec ()
|
||||
at /some_path/src/core/wee-hook.c:1025
|
||||
at /some_path/src/core/core-hook.c:1025
|
||||
tv_time = {tv_sec = 1272693881, tv_usec = 212665}
|
||||
ptr_hook = 0x2811f40
|
||||
next_hook = 0x0
|
||||
@@ -726,7 +737,7 @@ WeeChat подразумевано користи XDG директоријуме
|
||||
=== Команда upgrade
|
||||
|
||||
Програм WeeChat у месту може да поново покрене нови бинарни фајл, употребом команде <<command_weechat_upgrade,/upgrade>>: садржаји бафера и не-TLS везе се задржавају. +
|
||||
Током процеса ажурирња, TLS конекције се губе и аутоматски се обнављају
|
||||
Током процеса ажурирања, TLS конекције се губе и аутоматски се обнављају
|
||||
након ажурирања (са GnuTLS тренутно није могуће поновно учитавање TLS сесија).
|
||||
|
||||
Команда такође може да се употреби и када морате поново да покренете машину, на пример, да бисте ажурирали кернел или да преместите свој WeeChat на другу машину:
|
||||
@@ -1191,7 +1202,7 @@ _прозор_ је површина екрана која приказује б
|
||||
│12:52 -- Канал је креиран у Уто Јан 27 06:30:17 2009 │
|
||||
│12:54 <peter> hey! │
|
||||
│12:55 <@joe> peter: hook_process: https://weechat.org/files/doc/weechat/devel/weechat_│
|
||||
│plugin_api.en.html#_weechat_hook_process │
|
||||
│plugin_api.en.html#_weechat_hook_process │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────┘
|
||||
....
|
||||
|
||||
@@ -1680,7 +1691,7 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
|===
|
||||
| Тастер | Опис | Команда
|
||||
| kbd:[Ctrl+x] | Пребацивање типа претраге: стринг (подраз.), регуларни израз. | `+/input search_switch_regex+`
|
||||
| kbd:[Alt+c] | Пребацивање разликовања величине слова у претраци. | `+/input search_switch_case+`
|
||||
| kbd:[Alt+c] | Пребацивање разликовања величине слова у претрази. | `+/input search_switch_case+`
|
||||
| kbd:[Tab] | Пребацивање претраге по: локалној историји бафера (подразумевано), глобалној историји. | `+/input search_switch_where+`
|
||||
| kbd:[Ctrl+r] +
|
||||
kbd:[↑] | Претрага по претходним (старијим) ставкама историје. | `+/input search_previous+`
|
||||
@@ -1759,10 +1770,10 @@ WeeChat нуди доста подразумеваних тастерских п
|
||||
| kbd:[▼] | - | чет: /list бафер | Помера за пет линија наниже у /list баферу. | `+/list -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: /list бафер | Бира линију у /list баферу. | `+/window ${_window_number};/list -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: /list бафер | Приступа IRC каналу на изабраној линији. | `+hsignal:irc_list_mouse+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script down 5+`
|
||||
| kbd:[■ □ □] | - | чет: script бафер | Бира линију у script баферу. | `+/script go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: script бафер | Инсталира/уклања скрипту. | `+/script go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[▲] | - | чет: script бафер | Помера за пет линија навише у script баферу. | `+/script -up 5+`
|
||||
| kbd:[▼] | - | чет: script бафер | Помера за пет линија наниже у script баферу. | `+/script -down 5+`
|
||||
| kbd:[■ □ □] | - | чет: script бафер | Бира линију у script баферу. | `+/script -go ${_chat_line_y}+`
|
||||
| kbd:[□ □ ■] | - | чет: script бафер | Инсталира/уклања скрипту. | `+/script -go ${_chat_line_y};/script installremove -q ${script_name_with_extension}+`
|
||||
| kbd:[■ □ □] | горе / лево | листа бафера | Помера бафер на нижи број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | доле / десно | листа бафера | Помера бафер на виши број. | Signal `+buflist_mouse+`.
|
||||
| kbd:[■ □ □] | - | листа бафера | Пребацивање на бафер (претходно посећени багер ако је бафер текући). | Signal `+buflist_mouse+`.
|
||||
@@ -1880,8 +1891,8 @@ kbd:[▼]: точкић доле
|
||||
[width="100%", cols="^.^3,^.^2,.^8,.^5", options="header"]
|
||||
|===
|
||||
| Тастер | Акција ^(1)^ | Опис | Команда
|
||||
| kbd:[↑] | | Помера једну линију навише. | `+/script up+`
|
||||
| kbd:[↓] | | Помера једну линију наниже. | `+/script down+`
|
||||
| kbd:[↑] | | Помера једну линију навише. | `+/script -up+`
|
||||
| kbd:[↓] | | Помера једну линију наниже. | `+/script -down+`
|
||||
| kbd:[PgUp] | | Помера једну страну навише. | `+/window page_up+`
|
||||
| kbd:[PgDn] | | Помера једну страну наниже. | `+/window page_down+`
|
||||
| kbd:[Alt+i] | `i` | Инсталира скрипту. | `+/script install+`
|
||||
@@ -2259,7 +2270,7 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=charset_options]
|
||||
|
||||
Програм WeeChat подразумевано истиче поруке од осталих корисника које садрже у себи ваш надимак, тако да истицање зависи од бафера (ваш надимак не мора да буде исти у свим баферима).
|
||||
|
||||
Остале речи моожете да додате опцијом <<option_weechat.look.highlight,weechat.look.highlight>>, на пример ако желите да се истиче ваш надимак и „реч1”, „реч2”, као и све речи које почињу са „test”:
|
||||
Остале речи можете да додате опцијом <<option_weechat.look.highlight,weechat.look.highlight>>, на пример ако желите да се истиче ваш надимак и „реч1”, „реч2”, као и све речи које почињу са „test”:
|
||||
|
||||
----
|
||||
/set weechat.look.highlight "реч1,реч2,test*"
|
||||
@@ -2530,27 +2541,37 @@ link:weechat_faq.sr.html#mouse[WeeChat ЧПП / Миш ^↗^^].
|
||||
|
||||
Име догађаја се састоји од модификатора (није обавезан), имена тастера/точкића и гестикулације (није обавезна). Различити елементи се раздвајају са `+-+`.
|
||||
|
||||
Листа модификатора:
|
||||
Листа модификатора (по редоследу имена догађаја):
|
||||
|
||||
[width="100%", cols="1m,4", options="header"]
|
||||
|===
|
||||
| Модификатор | Опис
|
||||
| ctrl | Тастер kbd:[Ctrl]
|
||||
| alt | Тастер kbd:[Alt]
|
||||
| ctrl-alt | Тастери kbd:[Ctrl] + kbd:[Alt]
|
||||
| ctrl | Тастер kbd:[Ctrl]
|
||||
| shift | Тастер kbd:[Shift] ^(1)^
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ Модификатор `shift` може ретко да се користи у програму WeeChat јер га многи терминали
|
||||
користе за директно хватање догађаја миша.
|
||||
|
||||
Неколико модификатора може да се комбинује, на пример:
|
||||
|
||||
* `alt-ctrl`
|
||||
* `ctrl-shift`
|
||||
* `alt-ctrl-shift`
|
||||
|
||||
Листа тастера/точкића:
|
||||
|
||||
[width="100%", cols="1m,4", options="header"]
|
||||
|===
|
||||
| Тастер/точкић | Опис
|
||||
| button1 | Клик левим тастером
|
||||
| button2 | Клик десним тастером
|
||||
| button3 | Клик средњим тастером (често је то клик точкићем)
|
||||
| button4 ... button9 | Клик на додатне тастере
|
||||
| wheelup | Точкић (навише)
|
||||
| wheeldown | Точкић (наниже)
|
||||
| Тастер/точкић | Опис
|
||||
| button1 | Клик левим тастером
|
||||
| button2 | Клик десним тастером
|
||||
| button3 | Клик средњим тастером (често је то клик точкићем)
|
||||
| button4 ... button11 | Клик на додатне тастере
|
||||
| wheelup | Точкић (навише)
|
||||
| wheeldown | Точкић (наниже)
|
||||
|===
|
||||
|
||||
Листа гестикулација (само за тастере, не за точкић):
|
||||
@@ -2586,7 +2607,7 @@ link:weechat_faq.sr.html#mouse[WeeChat ЧПП / Миш ^↗^^].
|
||||
* `button1-event-drag`
|
||||
* `alt-button2-gesture-down-long`
|
||||
* `wheelup`
|
||||
* `ctrl-alt-wheeldown`
|
||||
* `alt-ctrl-wheeldown`
|
||||
* ...
|
||||
|
||||
[TIP]
|
||||
@@ -3587,10 +3608,10 @@ WeeChat парсира ову ознаку у чува је у поруци, а
|
||||
|
||||
Спецификација: https://ircv3.net/specs/extensions/batch[batch ^↗^^]
|
||||
|
||||
Ова могућност дозвољава да сервер шаље докађаје у пакету (тј. да групише неколико
|
||||
Ова могућност дозвољава да сервер шаље догађаје у пакету (тј. да групише неколико
|
||||
порука које су у вези).
|
||||
|
||||
WeeChat за сада само само чува поруке примљене у пакету и обарђује их као и обично касније,
|
||||
WeeChat за сада само само чува поруке примљене у пакету и обрађује их као и обично касније,
|
||||
када се заврши пакет.
|
||||
|
||||
[[irc_ircv3_cap_notify]]
|
||||
@@ -3651,7 +3672,7 @@ CAP alice LS * :draft/multiline=max-bytes=4096,max-lines=24
|
||||
|
||||
Вишелинијске могу да буду само стандардне поруке, као и оне које шаље команда
|
||||
<<command_irc_notice,/notice>>. +
|
||||
Ова могућност не утиче на ACTION CTCP поруке које се шаљу комадном <<command_irc_me,/me>>.
|
||||
Ова могућност не утиче на ACTION CTCP поруке које се шаљу комадом <<command_irc_me,/me>>.
|
||||
То значи да се вишелинијске акције шаљу као више акција.
|
||||
|
||||
[WARNING]
|
||||
@@ -3885,7 +3906,7 @@ WeeChat приказује све додатне информације које
|
||||
/query пера
|
||||
----
|
||||
|
||||
Ако желите да затворите приватни бафер, урадите то следћем командом у приватном баферу:
|
||||
Ако желите да затворите приватни бафер, урадите то следећом командом у приватном баферу:
|
||||
|
||||
----
|
||||
/close
|
||||
@@ -4288,8 +4309,16 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=typing_options]
|
||||
Релеј додатак се користи за релеј података преко мреже, употребом различитих протокола:
|
||||
|
||||
* _irc_: IRC прокси: користи се за дељење веза са IRC серверима са једним или више других клијената
|
||||
* _weechat_: протокол који користе удаљени интерфејси да прикажу и омогуће интеракцију са програмом
|
||||
WeeChat, погледајте https://weechat.org/about/interfaces/[ову страницу ^↗^^].
|
||||
// TRANSLATION MISSING
|
||||
* _api_: HTTP REST API, used by WeeChat and remote interfaces to display and
|
||||
interact with WeeChat
|
||||
// TRANSLATION MISSING
|
||||
* _weechat_: protocol used by remote interfaces to display and interact with
|
||||
WeeChat.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
For _api_ and _weechat_ protocols, see the list of remote interfaces on
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
[[relay_password]]
|
||||
=== Лозинка
|
||||
@@ -4301,12 +4330,15 @@ include::{autogendir}/autogen_user_options.sr.adoc[tag=typing_options]
|
||||
/set relay.network.password "${sec.data.relay}"
|
||||
----
|
||||
|
||||
Ова лозинка се користи и за _irc_ и за _weechat_ протокол.
|
||||
// TRANSLATION MISSING
|
||||
This password is used with all protocols.
|
||||
|
||||
[[relay_totp]]
|
||||
=== TOTP
|
||||
|
||||
TOTP (Time-based One-Time Password) може уз лозинку да се користи као секундарни фактор аутентификације за _weechat_ протокол.
|
||||
// TRANSLATION MISSING
|
||||
TOTP (Time-based One-Time Password) can be used as secondary authentication
|
||||
factor for _api_ and _weechat_ protocols, in addition to the password.
|
||||
|
||||
Ово није обавезно, мада повећава ниво безбедности.
|
||||
|
||||
@@ -4386,6 +4418,40 @@ PASS сервер:лозинка
|
||||
/set irc.server.relay.password "${sec.data.relay_libera}"
|
||||
----
|
||||
|
||||
// TRANSLATION MISSING
|
||||
[[relay_api_protocol]]
|
||||
=== API protocol
|
||||
|
||||
The Relay plugin can send data to a remote WeeChat or interface using an
|
||||
HTTP REST API protocol.
|
||||
|
||||
You can browse and test the API online:
|
||||
https://weechat.org/api/[WeeChat Relay API ^↗^^].
|
||||
|
||||
You can connect with WeeChat or a remote interface, see
|
||||
https://weechat.org/about/interfaces/[this page ^↗^^].
|
||||
|
||||
For example:
|
||||
|
||||
----
|
||||
/relay add api 9000
|
||||
----
|
||||
|
||||
Now you can connect on port 9000 with a WeeChat or a remote interface using
|
||||
password "mypassword".
|
||||
|
||||
To connect to an _api_ relay with WeeChat:
|
||||
|
||||
----
|
||||
/remote add weechat http://localhost:9000 -password=mypassword
|
||||
/remote connect weechat
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
The remote WeeChat must expose the same API version as the local WeeChat, so
|
||||
it's highly recommended to use exactly the same WeeChat version on remote
|
||||
and local client.
|
||||
|
||||
[[relay_weechat_protocol]]
|
||||
=== WeeChat протокол
|
||||
|
||||
@@ -4420,7 +4486,11 @@ https://weechat.org/about/interfaces/[ову страницу ^↗^^].
|
||||
websocket = new WebSocket("ws://server.com:9000/weechat");
|
||||
----
|
||||
|
||||
Порт (9000 у примеру) је порт који је дефинисан у Релеј додатку. URI увек мора да се завршава са „/weechat” (и за _irc_ и за _weechat_ протокол).
|
||||
Порт (9000 у примеру) је порт који је дефинисан у Релеј додатку.
|
||||
|
||||
// TRANSLATION MISSING
|
||||
The URI must end with "/weechat" for _irc_ and _weechat_ protocols and "/api"
|
||||
for _api_ protocol.
|
||||
|
||||
[[relay_unix_socket]]
|
||||
=== UNIX доменски сокети
|
||||
@@ -4459,7 +4529,7 @@ include::{autogendir}/autogen_user_commands.sr.adoc[tag=relay_commands]
|
||||
| network | /set relay.network.* | Мрежне опције.
|
||||
| irc | /set relay.irc.* | Опције специфичне за irc протокол (irc прокси).
|
||||
| port | <<command_relay_relay,/relay add>> +
|
||||
/set relay.port.* | Портови који се користе за релеј (irc и weechat протоколи) (у одељку је могуће додавање/уклањање опција).
|
||||
/set relay.port.* | Портови који се користе за релеј (у одељку је могуће додавање/уклањање опција).
|
||||
|===
|
||||
|
||||
Опције:
|
||||
@@ -4528,7 +4598,7 @@ $ echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_1
|
||||
$ echo 'irc.libera.#weechat *hello!' >/run/user/1000/weechat/weechat_fifo_12345
|
||||
----
|
||||
|
||||
* Слање вишелинијске поруке на IRC канал #test, у случају да је могуност „draft/multiline”
|
||||
* Слање вишелинијске поруке на IRC канал #test, у случају да је могућност „draft/multiline”
|
||||
укључена на ergo серверу:
|
||||
|
||||
----
|
||||
@@ -4849,7 +4919,9 @@ s/regex1/replace1/var1 y/abcdef/ABDDEF/var2
|
||||
|
||||
* `+${re:0}+` до `+${re:99}+`: `+${re:0}+` је комплетно подударање, `+${re:1}+` до
|
||||
`+${re:99}+` су ухваћене групе
|
||||
* `+${re:+}+`: последње подударање (под највећим бројем)
|
||||
* `pass:[${re:+}]`: последње подударање (под највећим бројем)
|
||||
* `+${re:#}+`: индекс последње ухваћене групе
|
||||
* `+${re:repl_index}+`: индекс замене која се врши (почиње од 1)
|
||||
* `+${hide:c,${re:N}}+`: подударање „N” са свим карактерима замењеним са „c”
|
||||
(пример: `+${hide:*,${re:2}}+` је група #2 у којој су сви карактери замењени са
|
||||
`+*+`).
|
||||
@@ -4990,7 +5062,7 @@ y/${chars:a-z}${chars:A-Z}/${chars:b-z}a${chars:B-Z}A/
|
||||
| server | стринг | Име сервера (пример: „libera”).
|
||||
| tags | стринг | Ознаке у поруци (ретко се користе).
|
||||
| message_without_tags | стринг | Порука без ознака.
|
||||
| nick | стринг | Надимак.
|
||||
| nick | стринг | Надимак. ^(1)^
|
||||
| host | стринг | Име хоста.
|
||||
| command | стринг | IRC команда (пример: „PRIVMSG”, „NOTICE”, ...).
|
||||
| channel | стринг | IRC канал.
|
||||
@@ -5002,6 +5074,10 @@ y/${chars:a-z}${chars:A-Z}/${chars:b-z}a${chars:B-Z}A/
|
||||
| pos_text | стринг | Индекс _text_ у поруци („-1” ако се _text_ не пронађе).
|
||||
|===
|
||||
|
||||
[NOTE]
|
||||
^(1)^ nick је пошиљалац поруке. +
|
||||
Ваш надимак на серверу је `${irc_server.nick}`.
|
||||
|
||||
Када су подаци показивач, за читање hdata особине може да се употреби променљива `+tg_signal_data+` на следећи начин (у овом примеру је то показивач на бафер):
|
||||
|
||||
----
|
||||
|
||||
+1070
-138
File diff suppressed because it is too large
Load Diff
+118
-104
@@ -1,110 +1,110 @@
|
||||
SET(WEECHAT_SOURCES
|
||||
./src/core/hook/wee-hook-command.c
|
||||
./src/core/hook/wee-hook-command.h
|
||||
./src/core/hook/wee-hook-command-run.c
|
||||
./src/core/hook/wee-hook-command-run.h
|
||||
./src/core/hook/wee-hook-completion.c
|
||||
./src/core/hook/wee-hook-completion.h
|
||||
./src/core/hook/wee-hook-config.c
|
||||
./src/core/hook/wee-hook-config.h
|
||||
./src/core/hook/wee-hook-connect.c
|
||||
./src/core/hook/wee-hook-connect.h
|
||||
./src/core/hook/wee-hook-fd.c
|
||||
./src/core/hook/wee-hook-fd.h
|
||||
./src/core/hook/wee-hook-focus.c
|
||||
./src/core/hook/wee-hook-focus.h
|
||||
./src/core/hook/wee-hook-hdata.c
|
||||
./src/core/hook/wee-hook-hdata.h
|
||||
./src/core/hook/wee-hook-hsignal.c
|
||||
./src/core/hook/wee-hook-hsignal.h
|
||||
./src/core/hook/wee-hook-info.c
|
||||
./src/core/hook/wee-hook-info.h
|
||||
./src/core/hook/wee-hook-info-hashtable.c
|
||||
./src/core/hook/wee-hook-info-hashtable.h
|
||||
./src/core/hook/wee-hook-infolist.c
|
||||
./src/core/hook/wee-hook-infolist.h
|
||||
./src/core/hook/wee-hook-line.c
|
||||
./src/core/hook/wee-hook-line.h
|
||||
./src/core/hook/wee-hook-modifier.c
|
||||
./src/core/hook/wee-hook-modifier.h
|
||||
./src/core/hook/wee-hook-print.c
|
||||
./src/core/hook/wee-hook-print.h
|
||||
./src/core/hook/wee-hook-process.c
|
||||
./src/core/hook/wee-hook-process.h
|
||||
./src/core/hook/wee-hook-signal.c
|
||||
./src/core/hook/wee-hook-signal.h
|
||||
./src/core/hook/wee-hook-timer.c
|
||||
./src/core/hook/wee-hook-timer.h
|
||||
./src/core/hook/wee-hook-url.c
|
||||
./src/core/hook/wee-hook-url.h
|
||||
./src/core/wee-arraylist.c
|
||||
./src/core/wee-arraylist.h
|
||||
./src/core/wee-backtrace.c
|
||||
./src/core/wee-backtrace.h
|
||||
./src/core/wee-calc.c
|
||||
./src/core/wee-calc.h
|
||||
./src/core/hook/hook-command.c
|
||||
./src/core/hook/hook-command.h
|
||||
./src/core/hook/hook-command-run.c
|
||||
./src/core/hook/hook-command-run.h
|
||||
./src/core/hook/hook-completion.c
|
||||
./src/core/hook/hook-completion.h
|
||||
./src/core/hook/hook-config.c
|
||||
./src/core/hook/hook-config.h
|
||||
./src/core/hook/hook-connect.c
|
||||
./src/core/hook/hook-connect.h
|
||||
./src/core/hook/hook-fd.c
|
||||
./src/core/hook/hook-fd.h
|
||||
./src/core/hook/hook-focus.c
|
||||
./src/core/hook/hook-focus.h
|
||||
./src/core/hook/hook-hdata.c
|
||||
./src/core/hook/hook-hdata.h
|
||||
./src/core/hook/hook-hsignal.c
|
||||
./src/core/hook/hook-hsignal.h
|
||||
./src/core/hook/hook-info.c
|
||||
./src/core/hook/hook-info.h
|
||||
./src/core/hook/hook-info-hashtable.c
|
||||
./src/core/hook/hook-info-hashtable.h
|
||||
./src/core/hook/hook-infolist.c
|
||||
./src/core/hook/hook-infolist.h
|
||||
./src/core/hook/hook-line.c
|
||||
./src/core/hook/hook-line.h
|
||||
./src/core/hook/hook-modifier.c
|
||||
./src/core/hook/hook-modifier.h
|
||||
./src/core/hook/hook-print.c
|
||||
./src/core/hook/hook-print.h
|
||||
./src/core/hook/hook-process.c
|
||||
./src/core/hook/hook-process.h
|
||||
./src/core/hook/hook-signal.c
|
||||
./src/core/hook/hook-signal.h
|
||||
./src/core/hook/hook-timer.c
|
||||
./src/core/hook/hook-timer.h
|
||||
./src/core/hook/hook-url.c
|
||||
./src/core/hook/hook-url.h
|
||||
./src/core/core-arraylist.c
|
||||
./src/core/core-arraylist.h
|
||||
./src/core/core-backtrace.c
|
||||
./src/core/core-backtrace.h
|
||||
./src/core/core-calc.c
|
||||
./src/core/core-calc.h
|
||||
./src/core/weechat.c
|
||||
./src/core/weechat.h
|
||||
./src/core/wee-command.c
|
||||
./src/core/wee-command.h
|
||||
./src/core/wee-completion.c
|
||||
./src/core/wee-completion.h
|
||||
./src/core/wee-config.c
|
||||
./src/core/wee-config-file.c
|
||||
./src/core/wee-config-file.h
|
||||
./src/core/wee-config.h
|
||||
./src/core/wee-crypto.c
|
||||
./src/core/wee-crypto.h
|
||||
./src/core/wee-debug.c
|
||||
./src/core/wee-debug.h
|
||||
./src/core/wee-dir.c
|
||||
./src/core/wee-dir.h
|
||||
./src/core/wee-doc.c
|
||||
./src/core/wee-doc.h
|
||||
./src/core/wee-eval.c
|
||||
./src/core/wee-eval.h
|
||||
./src/core/wee-hashtable.c
|
||||
./src/core/wee-hashtable.h
|
||||
./src/core/wee-hdata.c
|
||||
./src/core/wee-hdata.h
|
||||
./src/core/wee-hook.c
|
||||
./src/core/wee-hook.h
|
||||
./src/core/wee-infolist.c
|
||||
./src/core/wee-infolist.h
|
||||
./src/core/wee-input.c
|
||||
./src/core/wee-input.h
|
||||
./src/core/wee-list.c
|
||||
./src/core/wee-list.h
|
||||
./src/core/wee-log.c
|
||||
./src/core/wee-log.h
|
||||
./src/core/wee-network.c
|
||||
./src/core/wee-network.h
|
||||
./src/core/wee-proxy.c
|
||||
./src/core/wee-proxy.h
|
||||
./src/core/wee-secure-buffer.c
|
||||
./src/core/wee-secure-buffer.h
|
||||
./src/core/wee-secure.c
|
||||
./src/core/wee-secure-config.c
|
||||
./src/core/wee-secure-config.h
|
||||
./src/core/wee-secure.h
|
||||
./src/core/wee-signal.c
|
||||
./src/core/wee-signal.h
|
||||
./src/core/wee-string.c
|
||||
./src/core/wee-string.h
|
||||
./src/core/wee-sys.c
|
||||
./src/core/wee-sys.h
|
||||
./src/core/wee-upgrade.c
|
||||
./src/core/wee-upgrade-file.c
|
||||
./src/core/wee-upgrade-file.h
|
||||
./src/core/wee-upgrade.h
|
||||
./src/core/wee-url.c
|
||||
./src/core/wee-url.h
|
||||
./src/core/wee-utf8.c
|
||||
./src/core/wee-utf8.h
|
||||
./src/core/wee-util.c
|
||||
./src/core/wee-util.h
|
||||
./src/core/wee-version.c
|
||||
./src/core/wee-version.h
|
||||
./src/core/core-command.c
|
||||
./src/core/core-command.h
|
||||
./src/core/core-completion.c
|
||||
./src/core/core-completion.h
|
||||
./src/core/core-config.c
|
||||
./src/core/core-config-file.c
|
||||
./src/core/core-config-file.h
|
||||
./src/core/core-config.h
|
||||
./src/core/core-crypto.c
|
||||
./src/core/core-crypto.h
|
||||
./src/core/core-debug.c
|
||||
./src/core/core-debug.h
|
||||
./src/core/core-dir.c
|
||||
./src/core/core-dir.h
|
||||
./src/core/core-doc.c
|
||||
./src/core/core-doc.h
|
||||
./src/core/core-eval.c
|
||||
./src/core/core-eval.h
|
||||
./src/core/core-hashtable.c
|
||||
./src/core/core-hashtable.h
|
||||
./src/core/core-hdata.c
|
||||
./src/core/core-hdata.h
|
||||
./src/core/core-hook.c
|
||||
./src/core/core-hook.h
|
||||
./src/core/core-infolist.c
|
||||
./src/core/core-infolist.h
|
||||
./src/core/core-input.c
|
||||
./src/core/core-input.h
|
||||
./src/core/core-list.c
|
||||
./src/core/core-list.h
|
||||
./src/core/core-log.c
|
||||
./src/core/core-log.h
|
||||
./src/core/core-network.c
|
||||
./src/core/core-network.h
|
||||
./src/core/core-proxy.c
|
||||
./src/core/core-proxy.h
|
||||
./src/core/core-secure-buffer.c
|
||||
./src/core/core-secure-buffer.h
|
||||
./src/core/core-secure.c
|
||||
./src/core/core-secure-config.c
|
||||
./src/core/core-secure-config.h
|
||||
./src/core/core-secure.h
|
||||
./src/core/core-signal.c
|
||||
./src/core/core-signal.h
|
||||
./src/core/core-string.c
|
||||
./src/core/core-string.h
|
||||
./src/core/core-sys.c
|
||||
./src/core/core-sys.h
|
||||
./src/core/core-upgrade.c
|
||||
./src/core/core-upgrade-file.c
|
||||
./src/core/core-upgrade-file.h
|
||||
./src/core/core-upgrade.h
|
||||
./src/core/core-url.c
|
||||
./src/core/core-url.h
|
||||
./src/core/core-utf8.c
|
||||
./src/core/core-utf8.h
|
||||
./src/core/core-util.c
|
||||
./src/core/core-util.h
|
||||
./src/core/core-version.c
|
||||
./src/core/core-version.h
|
||||
./src/gui/curses/gui-curses-bar-window.c
|
||||
./src/gui/curses/gui-curses-bar-window.h
|
||||
./src/gui/curses/gui-curses-chat.c
|
||||
@@ -344,6 +344,16 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/python/weechat-python-api.h
|
||||
./src/plugins/python/weechat-python.c
|
||||
./src/plugins/python/weechat-python.h
|
||||
./src/plugins/relay/api/relay-api.c
|
||||
./src/plugins/relay/api/relay-api.h
|
||||
./src/plugins/relay/api/relay-api-msg.c
|
||||
./src/plugins/relay/api/relay-api-msg.h
|
||||
./src/plugins/relay/api/relay-api-protocol.c
|
||||
./src/plugins/relay/api/relay-api-protocol.h
|
||||
./src/plugins/relay/api/remote/relay-remote-event.c
|
||||
./src/plugins/relay/api/remote/relay-remote-event.h
|
||||
./src/plugins/relay/api/remote/relay-remote-network.c
|
||||
./src/plugins/relay/api/remote/relay-remote-network.h
|
||||
./src/plugins/relay/irc/relay-irc.c
|
||||
./src/plugins/relay/irc/relay-irc.h
|
||||
./src/plugins/relay/relay-auth.c
|
||||
@@ -360,12 +370,16 @@ SET(WEECHAT_SOURCES
|
||||
./src/plugins/relay/relay-config.c
|
||||
./src/plugins/relay/relay-config.h
|
||||
./src/plugins/relay/relay.h
|
||||
./src/plugins/relay/relay-http.c
|
||||
./src/plugins/relay/relay-http.h
|
||||
./src/plugins/relay/relay-info.c
|
||||
./src/plugins/relay/relay-info.h
|
||||
./src/plugins/relay/relay-network.c
|
||||
./src/plugins/relay/relay-network.h
|
||||
./src/plugins/relay/relay-raw.c
|
||||
./src/plugins/relay/relay-raw.h
|
||||
./src/plugins/relay/relay-remote.c
|
||||
./src/plugins/relay/relay-remote.h
|
||||
./src/plugins/relay/relay-server.c
|
||||
./src/plugins/relay/relay-server.h
|
||||
./src/plugins/relay/relay-upgrade.c
|
||||
|
||||
+918
-119
File diff suppressed because it is too large
Load Diff
+57
-53
@@ -21,58 +21,58 @@
|
||||
|
||||
set(LIB_CORE_SRC
|
||||
weechat.c weechat.h
|
||||
wee-arraylist.c wee-arraylist.h
|
||||
wee-backtrace.c wee-backtrace.h
|
||||
wee-calc.c wee-calc.h
|
||||
wee-command.c wee-command.h
|
||||
wee-completion.c wee-completion.h
|
||||
wee-config.c wee-config.h
|
||||
wee-config-file.c wee-config-file.h
|
||||
wee-crypto.c wee-crypto.h
|
||||
wee-debug.c wee-debug.h
|
||||
wee-dir.c wee-dir.h
|
||||
wee-doc.c wee-doc.h
|
||||
wee-eval.c wee-eval.h
|
||||
wee-hashtable.c wee-hashtable.h
|
||||
wee-hdata.c wee-hdata.h
|
||||
wee-hook.c wee-hook.h
|
||||
wee-infolist.c wee-infolist.h
|
||||
wee-input.c wee-input.h
|
||||
wee-list.c wee-list.h
|
||||
wee-log.c wee-log.h
|
||||
wee-network.c wee-network.h
|
||||
wee-proxy.c wee-proxy.h
|
||||
wee-secure.c wee-secure.h
|
||||
wee-secure-buffer.c wee-secure-buffer.h
|
||||
wee-secure-config.c wee-secure-config.h
|
||||
wee-signal.c wee-signal.h
|
||||
wee-string.c wee-string.h
|
||||
wee-sys.c wee-sys.h
|
||||
wee-upgrade.c wee-upgrade.h
|
||||
wee-upgrade-file.c wee-upgrade-file.h
|
||||
wee-url.c wee-url.h
|
||||
wee-utf8.c wee-utf8.h
|
||||
wee-util.c wee-util.h
|
||||
wee-version.c wee-version.h
|
||||
hook/wee-hook-command-run.c hook/wee-hook-command-run.h
|
||||
hook/wee-hook-command.c hook/wee-hook-command.h
|
||||
hook/wee-hook-completion.c hook/wee-hook-completion.h
|
||||
hook/wee-hook-config.c hook/wee-hook-config.h
|
||||
hook/wee-hook-connect.c hook/wee-hook-connect.h
|
||||
hook/wee-hook-fd.c hook/wee-hook-fd.h
|
||||
hook/wee-hook-focus.c hook/wee-hook-focus.h
|
||||
hook/wee-hook-hdata.c hook/wee-hook-hdata.h
|
||||
hook/wee-hook-hsignal.c hook/wee-hook-hsignal.h
|
||||
hook/wee-hook-info-hashtable.c hook/wee-hook-info-hashtable.h
|
||||
hook/wee-hook-info.c hook/wee-hook-info.h
|
||||
hook/wee-hook-infolist.c hook/wee-hook-infolist.h
|
||||
hook/wee-hook-line.c hook/wee-hook-line.h
|
||||
hook/wee-hook-modifier.c hook/wee-hook-modifier.h
|
||||
hook/wee-hook-print.c hook/wee-hook-print.h
|
||||
hook/wee-hook-process.c hook/wee-hook-process.h
|
||||
hook/wee-hook-signal.c hook/wee-hook-signal.h
|
||||
hook/wee-hook-timer.c hook/wee-hook-timer.h
|
||||
hook/wee-hook-url.c hook/wee-hook-url.h
|
||||
core-arraylist.c core-arraylist.h
|
||||
core-backtrace.c core-backtrace.h
|
||||
core-calc.c core-calc.h
|
||||
core-command.c core-command.h
|
||||
core-completion.c core-completion.h
|
||||
core-config.c core-config.h
|
||||
core-config-file.c core-config-file.h
|
||||
core-crypto.c core-crypto.h
|
||||
core-debug.c core-debug.h
|
||||
core-dir.c core-dir.h
|
||||
core-doc.c core-doc.h
|
||||
core-eval.c core-eval.h
|
||||
core-hashtable.c core-hashtable.h
|
||||
core-hdata.c core-hdata.h
|
||||
core-hook.c core-hook.h
|
||||
core-infolist.c core-infolist.h
|
||||
core-input.c core-input.h
|
||||
core-list.c core-list.h
|
||||
core-log.c core-log.h
|
||||
core-network.c core-network.h
|
||||
core-proxy.c core-proxy.h
|
||||
core-secure.c core-secure.h
|
||||
core-secure-buffer.c core-secure-buffer.h
|
||||
core-secure-config.c core-secure-config.h
|
||||
core-signal.c core-signal.h
|
||||
core-string.c core-string.h
|
||||
core-sys.c core-sys.h
|
||||
core-upgrade.c core-upgrade.h
|
||||
core-upgrade-file.c core-upgrade-file.h
|
||||
core-url.c core-url.h
|
||||
core-utf8.c core-utf8.h
|
||||
core-util.c core-util.h
|
||||
core-version.c core-version.h
|
||||
hook/hook-command-run.c hook/hook-command-run.h
|
||||
hook/hook-command.c hook/hook-command.h
|
||||
hook/hook-completion.c hook/hook-completion.h
|
||||
hook/hook-config.c hook/hook-config.h
|
||||
hook/hook-connect.c hook/hook-connect.h
|
||||
hook/hook-fd.c hook/hook-fd.h
|
||||
hook/hook-focus.c hook/hook-focus.h
|
||||
hook/hook-hdata.c hook/hook-hdata.h
|
||||
hook/hook-hsignal.c hook/hook-hsignal.h
|
||||
hook/hook-info-hashtable.c hook/hook-info-hashtable.h
|
||||
hook/hook-info.c hook/hook-info.h
|
||||
hook/hook-infolist.c hook/hook-infolist.h
|
||||
hook/hook-line.c hook/hook-line.h
|
||||
hook/hook-modifier.c hook/hook-modifier.h
|
||||
hook/hook-print.c hook/hook-print.h
|
||||
hook/hook-process.c hook/hook-process.h
|
||||
hook/hook-signal.c hook/hook-signal.h
|
||||
hook/hook-timer.c hook/hook-timer.h
|
||||
hook/hook-url.c hook/hook-url.h
|
||||
)
|
||||
|
||||
# Check for flock support
|
||||
@@ -92,7 +92,11 @@ include_directories(${GNUTLS_INCLUDE_PATH})
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
|
||||
if(ENABLE_ZSTD)
|
||||
include_directories(${ZSTD_INCLUDE_DIRS})
|
||||
include_directories(${LIBZSTD_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(ENABLE_CJSON)
|
||||
include_directories(${LIBCJSON_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-arraylist.c - array lists management
|
||||
* core-arraylist.c - array lists management
|
||||
*
|
||||
* Copyright (C) 2014-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -687,10 +687,7 @@ arraylist_free (struct t_arraylist *arraylist)
|
||||
arraylist->data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (arraylist->data)
|
||||
free (arraylist->data);
|
||||
|
||||
free (arraylist->data);
|
||||
free (arraylist);
|
||||
}
|
||||
|
||||
@@ -703,25 +700,24 @@ arraylist_print_log (struct t_arraylist *arraylist, const char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
log_printf ("[arraylist %s (addr:0x%lx)]", name, arraylist);
|
||||
log_printf ("[arraylist %s (addr:%p)]", name, arraylist);
|
||||
log_printf (" size . . . . . . . . . : %d", arraylist->size);
|
||||
log_printf (" size_alloc . . . . . . : %d", arraylist->size_alloc);
|
||||
log_printf (" size_alloc_min . . . . : %d", arraylist->size_alloc_min);
|
||||
log_printf (" sorted . . . . . . . . : %d", arraylist->sorted);
|
||||
log_printf (" allow_duplicates . . . : %d", arraylist->allow_duplicates);
|
||||
log_printf (" data . . . . . . . . . : 0x%lx", arraylist->data);
|
||||
log_printf (" data . . . . . . . . . : %p", arraylist->data);
|
||||
if (arraylist->data)
|
||||
{
|
||||
for (i = 0; i < arraylist->size_alloc; i++)
|
||||
{
|
||||
log_printf (" data[%08d] . . . : 0x%lx",
|
||||
i, arraylist->data[i]);
|
||||
log_printf (" data[%08d] . . . : %p", i, arraylist->data[i]);
|
||||
}
|
||||
}
|
||||
log_printf (" callback_cmp . . . . . : 0x%lx", arraylist->callback_cmp);
|
||||
log_printf (" callback_cmp_data. . . : 0x%lx",
|
||||
log_printf (" callback_cmp . . . . . : %p", arraylist->callback_cmp);
|
||||
log_printf (" callback_cmp_data. . . : %p",
|
||||
arraylist->callback_cmp_data);
|
||||
log_printf (" callback_free. . . . . : 0x%lx", arraylist->callback_free);
|
||||
log_printf (" callback_free_data . . : 0x%lx",
|
||||
log_printf (" callback_free. . . . . : %p", arraylist->callback_free);
|
||||
log_printf (" callback_free_data . . : %p",
|
||||
arraylist->callback_free_data);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-backtrace.c - backtrace after a segfault
|
||||
* core-backtrace.c - backtrace after a segfault
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -39,10 +39,10 @@
|
||||
#endif
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-backtrace.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-version.h"
|
||||
#include "core-backtrace.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "core-version.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-calc.c - calculate result of an expression
|
||||
* core-calc.c - calculate result of an expression
|
||||
*
|
||||
* Copyright (C) 2019-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <locale.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-string.h"
|
||||
|
||||
enum t_calc_symbol
|
||||
{
|
||||
@@ -475,10 +475,8 @@ calc_expression (const char *expr)
|
||||
calc_format_result (value, str_result, sizeof (str_result));
|
||||
|
||||
end:
|
||||
if (list_values)
|
||||
arraylist_free (list_values);
|
||||
if (list_ops)
|
||||
arraylist_free (list_ops);
|
||||
arraylist_free (list_values);
|
||||
arraylist_free (list_ops);
|
||||
|
||||
return strdup (str_result);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-command.c - WeeChat core commands
|
||||
* core-command.c - WeeChat core commands
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -40,34 +40,37 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-command.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-debug.h"
|
||||
#include "wee-dir.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-input.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-network.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-secure-buffer.h"
|
||||
#include "wee-secure-config.h"
|
||||
#include "wee-signal.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-sys.h"
|
||||
#include "wee-upgrade.h"
|
||||
#include "wee-url.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "wee-util.h"
|
||||
#include "wee-version.h"
|
||||
#include "core-command.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-config.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-debug.h"
|
||||
#include "core-dir.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-input.h"
|
||||
#include "core-list.h"
|
||||
#include "core-log.h"
|
||||
#include "core-network.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-secure.h"
|
||||
#include "core-secure-buffer.h"
|
||||
#include "core-secure-config.h"
|
||||
#include "core-signal.h"
|
||||
#include "core-string.h"
|
||||
#include "core-sys.h"
|
||||
#include "core-upgrade.h"
|
||||
#include "core-url.h"
|
||||
#include "core-utf8.h"
|
||||
#include "core-util.h"
|
||||
#include "core-version.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-item.h"
|
||||
#include "../gui/gui-bar-item-custom.h"
|
||||
@@ -128,7 +131,13 @@ COMMAND_CALLBACK(allbuf)
|
||||
{
|
||||
ptr_buffer = (struct t_gui_buffer *)arraylist_get (all_buffers, i);
|
||||
if (gui_buffer_valid (ptr_buffer))
|
||||
(void) input_data (ptr_buffer, argv_eol[1], NULL, 0);
|
||||
{
|
||||
(void) input_data (ptr_buffer,
|
||||
argv_eol[1],
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
}
|
||||
|
||||
arraylist_free (all_buffers);
|
||||
@@ -441,8 +450,7 @@ COMMAND_CALLBACK(bar)
|
||||
name = strdup (ptr_bar->name);
|
||||
gui_bar_free (ptr_bar);
|
||||
gui_chat_printf (NULL, _("Bar \"%s\" deleted"), name);
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
gui_bar_create_default_input ();
|
||||
}
|
||||
ptr_bar = ptr_next_bar;
|
||||
@@ -703,7 +711,7 @@ COMMAND_CALLBACK(buffer)
|
||||
argv[arg_name]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
ptr_buffer = gui_buffer_search_by_name (PLUGIN_CORE, argv[arg_name]);
|
||||
ptr_buffer = gui_buffer_search (PLUGIN_CORE, argv[arg_name]);
|
||||
if (!ptr_buffer)
|
||||
{
|
||||
ptr_buffer = gui_buffer_new_user (
|
||||
@@ -1293,8 +1301,7 @@ COMMAND_CALLBACK(buffer)
|
||||
gui_buffer_local_var_add (buffer,
|
||||
argv[2],
|
||||
(value) ? value : argv_eol[3]);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -1323,8 +1330,7 @@ COMMAND_CALLBACK(buffer)
|
||||
{
|
||||
value = string_remove_quotes (argv_eol[3], "'\"");
|
||||
gui_buffer_set (buffer, argv[2], (value) ? value : argv_eol[3]);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -1350,8 +1356,7 @@ COMMAND_CALLBACK(buffer)
|
||||
rc = config_weechat_buffer_set (buffer,
|
||||
argv[2],
|
||||
(value) ? value : argv_eol[3]);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
}
|
||||
if (!rc)
|
||||
{
|
||||
@@ -1392,7 +1397,7 @@ COMMAND_CALLBACK(buffer)
|
||||
if (gui_buffer_property_in_list (gui_buffer_properties_get_pointer,
|
||||
argv[2]))
|
||||
{
|
||||
gui_chat_printf (NULL, "%s%s%s: (ptr) %s = 0x%lx",
|
||||
gui_chat_printf (NULL, "%s%s%s: (ptr) %s = %p",
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
buffer->full_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
@@ -1639,7 +1644,11 @@ COMMAND_CALLBACK(color)
|
||||
if (string_strcmp (argv[1], "-o") == 0)
|
||||
{
|
||||
gui_color_info_term_colors (str_color, sizeof (str_color));
|
||||
(void) input_data (buffer, str_color, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
str_color,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -1811,8 +1820,8 @@ COMMAND_CALLBACK(color)
|
||||
|
||||
COMMAND_CALLBACK(command)
|
||||
{
|
||||
int length, index_args, any_plugin;
|
||||
char *command;
|
||||
int i, length, index_args, any_plugin;
|
||||
char *command, **commands;
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -1827,6 +1836,24 @@ COMMAND_CALLBACK(command)
|
||||
any_plugin = 0;
|
||||
ptr_plugin = NULL;
|
||||
|
||||
if (string_strcmp (argv[1], "-s") == 0)
|
||||
{
|
||||
commands = string_split_command (argv_eol[2], ';');
|
||||
if (commands)
|
||||
{
|
||||
for (i = 0; commands[i]; i++)
|
||||
{
|
||||
(void) input_data (buffer,
|
||||
commands[i],
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
string_free_split_command (commands);
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if ((argc >= 5) && (string_strcmp (argv[1], "-buffer") == 0))
|
||||
{
|
||||
ptr_buffer = gui_buffer_search_by_full_name (argv[2]);
|
||||
@@ -2036,8 +2063,7 @@ COMMAND_CALLBACK(debug)
|
||||
gui_chat_printf (NULL,
|
||||
_("Debug enabled for callbacks (threshold: %s)"),
|
||||
(str_threshold) ? str_threshold : "?");
|
||||
if (str_threshold)
|
||||
free (str_threshold);
|
||||
free (str_threshold);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2204,7 +2230,11 @@ COMMAND_CALLBACK(debug)
|
||||
{
|
||||
COMMAND_MIN_ARGS(3, "time");
|
||||
gettimeofday (&time_start, NULL);
|
||||
(void) input_data (buffer, argv_eol[2], NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
argv_eol[2],
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
gettimeofday (&time_end, NULL);
|
||||
debug_display_time_elapsed (&time_start, &time_end, argv_eol[2], 1);
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -2266,8 +2296,7 @@ command_eval_print_debug (const char *debug)
|
||||
|
||||
gui_chat_printf (NULL, "%s", (string) ? string : debug);
|
||||
|
||||
if (string)
|
||||
free (string);
|
||||
free (string);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2401,7 +2430,11 @@ COMMAND_CALLBACK(eval)
|
||||
options);
|
||||
if (result)
|
||||
{
|
||||
(void) input_data (buffer, result, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
result,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
free (result);
|
||||
}
|
||||
else
|
||||
@@ -2424,7 +2457,11 @@ COMMAND_CALLBACK(eval)
|
||||
result = eval_expression (ptr_args, pointers, NULL, options);
|
||||
if (result)
|
||||
{
|
||||
(void) input_data (buffer, result, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
result,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
free (result);
|
||||
}
|
||||
else
|
||||
@@ -2448,10 +2485,8 @@ COMMAND_CALLBACK(eval)
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
}
|
||||
|
||||
if (pointers)
|
||||
hashtable_free (pointers);
|
||||
if (options)
|
||||
hashtable_free (options);
|
||||
hashtable_free (pointers);
|
||||
hashtable_free (options);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -2805,8 +2840,7 @@ COMMAND_CALLBACK(filter)
|
||||
NULL, 0, GUI_FILTER_TAG_NO_FILTER,
|
||||
_("Filter \"%s\" deleted"),
|
||||
name);
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
}
|
||||
ptr_filter = ptr_next_filter;
|
||||
}
|
||||
@@ -3107,8 +3141,7 @@ COMMAND_CALLBACK(help)
|
||||
(string) ? string : ptr_string);
|
||||
first_line_displayed = 1;
|
||||
}
|
||||
if (string)
|
||||
free (string);
|
||||
free (string);
|
||||
|
||||
if (pos_double_pipe)
|
||||
{
|
||||
@@ -3621,7 +3654,13 @@ COMMAND_CALLBACK(input)
|
||||
gui_input_insert (buffer, argv_eol[2]);
|
||||
}
|
||||
else if (string_strcmp (argv[1], "send") == 0)
|
||||
(void) input_data (buffer, argv_eol[2], NULL, 0);
|
||||
{
|
||||
(void) input_data (buffer,
|
||||
argv_eol[2],
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else if (string_strcmp (argv[1], "undo") == 0)
|
||||
gui_input_undo (buffer);
|
||||
else if (string_strcmp (argv[1], "redo") == 0)
|
||||
@@ -3662,10 +3701,22 @@ COMMAND_CALLBACK(input)
|
||||
gui_hotlist_restore_all_buffers ();
|
||||
/* since WeeChat 3.8: "/buffer set unread" */
|
||||
else if (string_strcmp (argv[1], "set_unread_current_buffer") == 0)
|
||||
(void) input_data (buffer, "/buffer set unread", NULL, 0);
|
||||
{
|
||||
(void) input_data (buffer,
|
||||
"/buffer set unread",
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
/* since WeeChat 3.8: "/allbuf /buffer set unread" */
|
||||
else if (string_strcmp (argv[1], "set_unread") == 0)
|
||||
(void) input_data (buffer, "/allbuf /buffer set unread", NULL, 0);
|
||||
{
|
||||
(void) input_data (buffer,
|
||||
"/allbuf /buffer set unread",
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
/* since WeeChat 3.8: "/buffer switch" */
|
||||
else if (string_strcmp (argv[1], "switch_active_buffer") == 0)
|
||||
gui_buffer_switch_active_buffer (buffer);
|
||||
@@ -3738,8 +3789,7 @@ COMMAND_CALLBACK(item)
|
||||
sargv = string_split_shell (argv_eol[2], &sargc);
|
||||
if (!sargv || (sargc < 3))
|
||||
{
|
||||
if (sargv)
|
||||
string_free_split (sargv);
|
||||
string_free_split (sargv);
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
|
||||
@@ -3863,8 +3913,7 @@ COMMAND_CALLBACK(item)
|
||||
gui_chat_printf (NULL,
|
||||
_("Custom bar item \"%s\" deleted"),
|
||||
name);
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
}
|
||||
ptr_bar_item_custom = ptr_next_bar_item_custom;
|
||||
}
|
||||
@@ -4188,8 +4237,7 @@ COMMAND_CALLBACK(key)
|
||||
argv[2],
|
||||
(value) ? value : argv_eol[3],
|
||||
1); /* check_key */
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
gui_key_verbose = 0;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -4236,8 +4284,7 @@ COMMAND_CALLBACK(key)
|
||||
argv[3],
|
||||
(value) ? value : argv_eol[4],
|
||||
1); /* check_key */
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
gui_key_verbose = 0;
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -4397,8 +4444,7 @@ COMMAND_CALLBACK(key)
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
key_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS));
|
||||
if (key_name)
|
||||
free (key_name);
|
||||
free (key_name);
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -4621,8 +4667,7 @@ COMMAND_CALLBACK(layout)
|
||||
_("Layout \"%s\" deleted (current layout: %s)"),
|
||||
name,
|
||||
(gui_layout_current) ? gui_layout_current->name : "-");
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5002,7 +5047,11 @@ command_plugin_list_input (struct t_gui_buffer *buffer,
|
||||
|
||||
if (send_to_buffer)
|
||||
{
|
||||
(void) input_data (buffer, *buf, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
*buf,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5096,10 +5145,8 @@ COMMAND_CALLBACK(plugin)
|
||||
}
|
||||
full_name = dir_search_full_lib_name (argv[2], "plugins");
|
||||
plugin_load (full_name, 1, plugin_argc, plugin_argv);
|
||||
if (full_name)
|
||||
free (full_name);
|
||||
if (plugin_argv)
|
||||
string_free_split (plugin_argv);
|
||||
free (full_name);
|
||||
string_free_split (plugin_argv);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -5124,8 +5171,7 @@ COMMAND_CALLBACK(plugin)
|
||||
{
|
||||
plugin_reload_name (argv[2], plugin_argc, plugin_argv);
|
||||
}
|
||||
if (plugin_argv)
|
||||
string_free_split (plugin_argv);
|
||||
string_free_split (plugin_argv);
|
||||
}
|
||||
else
|
||||
plugin_reload_name (argv[2], 0, NULL);
|
||||
@@ -5334,8 +5380,7 @@ COMMAND_CALLBACK(print)
|
||||
argv[arg_new_buffer_name]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
ptr_buffer = gui_buffer_search_by_name (PLUGIN_CORE,
|
||||
argv[arg_new_buffer_name]);
|
||||
ptr_buffer = gui_buffer_search (PLUGIN_CORE, argv[arg_new_buffer_name]);
|
||||
if (!ptr_buffer)
|
||||
{
|
||||
ptr_buffer = gui_buffer_new_user (
|
||||
@@ -5523,8 +5568,7 @@ COMMAND_CALLBACK(proxy)
|
||||
name = strdup (ptr_proxy->name);
|
||||
proxy_free (ptr_proxy);
|
||||
gui_chat_printf (NULL, _("Proxy \"%s\" deleted"), name);
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
}
|
||||
ptr_proxy = ptr_next_proxy;
|
||||
}
|
||||
@@ -5759,7 +5803,8 @@ command_repeat_exec (struct t_command_repeat *command_repeat)
|
||||
(void) input_data (ptr_buffer,
|
||||
cmd_eval,
|
||||
command_repeat->commands_allowed,
|
||||
0); /* split_newline */
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
free (cmd_eval);
|
||||
}
|
||||
|
||||
@@ -5776,8 +5821,7 @@ command_repeat_exec (struct t_command_repeat *command_repeat)
|
||||
/* it was the last execution, free up memory */
|
||||
free (command_repeat->buffer_name);
|
||||
free (command_repeat->command);
|
||||
if (command_repeat->commands_allowed)
|
||||
free (command_repeat->commands_allowed);
|
||||
free (command_repeat->commands_allowed);
|
||||
free (command_repeat);
|
||||
}
|
||||
}
|
||||
@@ -6133,8 +6177,7 @@ COMMAND_CALLBACK(secure)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("Encrypted data has been successfully decrypted"));
|
||||
if (secure_passphrase)
|
||||
free (secure_passphrase);
|
||||
free (secure_passphrase);
|
||||
secure_passphrase = strdup (argv_eol[2]);
|
||||
}
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -6350,12 +6393,9 @@ command_set_display_option (struct t_config_option *option,
|
||||
(default_value) ? GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS) : "",
|
||||
(default_value) ? ")" : "");
|
||||
|
||||
if (value)
|
||||
free (value);
|
||||
if (inherited_value)
|
||||
free (inherited_value);
|
||||
if (default_value)
|
||||
free (default_value);
|
||||
free (value);
|
||||
free (inherited_value);
|
||||
free (default_value);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6622,8 +6662,7 @@ COMMAND_CALLBACK(set)
|
||||
strerror (errno));
|
||||
}
|
||||
}
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -6684,8 +6723,7 @@ COMMAND_CALLBACK(set)
|
||||
value = (string_strcmp (argv_eol[2], WEECHAT_CONFIG_OPTION_NULL) == 0) ?
|
||||
NULL : string_remove_quotes (argv_eol[2], "'\"");
|
||||
rc = config_file_option_set_with_string (argv[1], value);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
switch (rc)
|
||||
{
|
||||
case WEECHAT_CONFIG_OPTION_SET_ERROR:
|
||||
@@ -6705,10 +6743,12 @@ COMMAND_CALLBACK(set)
|
||||
&ptr_option, NULL);
|
||||
if (ptr_option)
|
||||
{
|
||||
command_set_display_option (ptr_option,
|
||||
(ptr_option_before) ?
|
||||
_("Option changed: ") :
|
||||
_("Option created: "));
|
||||
command_set_display_option (
|
||||
ptr_option,
|
||||
(ptr_option_before) ?
|
||||
((rc == WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE) ?
|
||||
_("Option unchanged: ") : _("Option changed: ")) :
|
||||
_("Option created: "));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -6750,6 +6790,28 @@ COMMAND_CALLBACK(sys)
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (string_strcmp (argv[1], "malloc_trim") == 0)
|
||||
{
|
||||
#ifdef HAVE_MALLOC_TRIM
|
||||
error = NULL;
|
||||
value = 0;
|
||||
if (argc > 2)
|
||||
{
|
||||
value = strtol (argv[2], &error, 10);
|
||||
if (!error || error[0] || (value < 0))
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
malloc_trim ((size_t)value);
|
||||
#else
|
||||
gui_chat_printf (NULL,
|
||||
_("%sFunction \"%s\" is not available on "
|
||||
"this system"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"malloc_trim");
|
||||
#endif
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (string_strcmp (argv[1], "waitpid") == 0)
|
||||
{
|
||||
COMMAND_MIN_ARGS(3, "waitpid");
|
||||
@@ -6759,8 +6821,8 @@ COMMAND_CALLBACK(sys)
|
||||
COMMAND_ERROR;
|
||||
sys_waitpid ((int)value);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
}
|
||||
COMMAND_ERROR;
|
||||
}
|
||||
|
||||
@@ -6816,8 +6878,7 @@ COMMAND_CALLBACK(toggle)
|
||||
COMMAND_ERROR;
|
||||
if (string_strcmp (argv[2], WEECHAT_CONFIG_OPTION_NULL) == 0)
|
||||
{
|
||||
if (sargv[0])
|
||||
free (sargv[0]);
|
||||
free (sargv[0]);
|
||||
sargv[0] = NULL;
|
||||
}
|
||||
}
|
||||
@@ -7038,7 +7099,11 @@ command_upgrade_display (struct t_gui_buffer *buffer,
|
||||
}
|
||||
}
|
||||
|
||||
(void) input_data (buffer, string, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7205,8 +7270,7 @@ COMMAND_CALLBACK(upgrade)
|
||||
_("%sUnable to save WeeChat session "
|
||||
"(files *.upgrade)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
if (ptr_binary)
|
||||
free (ptr_binary);
|
||||
free (ptr_binary);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -7287,7 +7351,11 @@ COMMAND_CALLBACK(uptime)
|
||||
minutes,
|
||||
seconds,
|
||||
str_first_start);
|
||||
(void) input_data (buffer, string, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else if ((argc >= 2) && (string_strcmp (argv[1], "-ol") == 0))
|
||||
{
|
||||
@@ -7300,7 +7368,11 @@ COMMAND_CALLBACK(uptime)
|
||||
minutes,
|
||||
seconds,
|
||||
util_get_time_string (&weechat_first_start_time));
|
||||
(void) input_data (buffer, string, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7351,7 +7423,11 @@ command_version_display (struct t_gui_buffer *buffer,
|
||||
_("compiled on"),
|
||||
version_get_compilation_date (),
|
||||
version_get_compilation_time ());
|
||||
(void) input_data (buffer, string, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -7361,7 +7437,11 @@ command_version_display (struct t_gui_buffer *buffer,
|
||||
"compiled on",
|
||||
version_get_compilation_date (),
|
||||
version_get_compilation_time ());
|
||||
(void) input_data (buffer, string, NULL, 0);
|
||||
(void) input_data (buffer,
|
||||
string,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -8014,7 +8094,9 @@ command_init ()
|
||||
"jump_current_to_previous_buffer\""),
|
||||
N_("raw[-]: jump to first buffer number"),
|
||||
N_("raw[+]: jump to last buffer number"),
|
||||
N_("name: jump to buffer by (partial) name"),
|
||||
N_("name: jump to buffer by (partial) name; if the name starts with "
|
||||
"\"(?i)\", the search is case insensitive (for example \"(?i)upper\" "
|
||||
"will find buffer \"irc.libera.#UPPERCASE\")"),
|
||||
"",
|
||||
N_("Examples:"),
|
||||
AI(" /buffer move 5"),
|
||||
@@ -8101,16 +8183,20 @@ command_init ()
|
||||
NULL, "50000|command",
|
||||
N_("launch explicit WeeChat or plugin command"),
|
||||
/* TRANSLATORS: only text between angle brackets (eg: "<name>") must be translated */
|
||||
N_("[-buffer <name>] <plugin> <command>"),
|
||||
N_("[-buffer <name>] <plugin> <command>"
|
||||
" || -s <command>[;<command>...]"),
|
||||
CMD_ARGS_DESC(
|
||||
N_("raw[-buffer]: execute the command on this buffer"),
|
||||
N_("plugin: execute the command from this plugin; \"core\" for a "
|
||||
"WeeChat command, \"*\" for automatic plugin (it depends on the "
|
||||
"buffer where the command is executed)"),
|
||||
N_("command: command to execute (a \"/\" is automatically added if not "
|
||||
"found at beginning of command)")),
|
||||
"found at beginning of command)"),
|
||||
N_("raw[-s]: execute one or multiple commands separated by semicolons "
|
||||
"(the semicolon can be escaped with \"\\;\")")),
|
||||
"-buffer %(buffers_plugins_names) "
|
||||
"%(plugins_names)|" PLUGIN_CORE " %(plugins_commands:/)"
|
||||
" || -s"
|
||||
" || %(plugins_names)|" PLUGIN_CORE " %(plugins_commands:/)",
|
||||
&command_command, NULL, NULL);
|
||||
hook_command (
|
||||
@@ -8247,10 +8333,8 @@ command_init ()
|
||||
N_("raw[-c]: evaluate as condition: use operators and parentheses, "
|
||||
"return a boolean value (\"0\" or \"1\")"),
|
||||
N_("expression: expression to evaluate, variables with format ${variable} "
|
||||
"are replaced "
|
||||
"(see function \"string_eval_expression\" in \"Plugin API reference\")"),
|
||||
N_("operator: a logical or comparison operator "
|
||||
"(see function \"string_eval_expression\" in \"Plugin API reference\")"),
|
||||
"are replaced (see below)"),
|
||||
N_("operator: a logical or comparison operator (see below)"),
|
||||
"",
|
||||
N_("An expression is considered as \"true\" if it is not NULL, not "
|
||||
"empty, and different from \"0\"."),
|
||||
@@ -8261,6 +8345,111 @@ command_init ()
|
||||
N_("To force a string comparison, you can add double quotes around "
|
||||
"each expression, for example: 50 > 100 == 0 and \"50\" > \"100\" == 1"),
|
||||
"",
|
||||
N_("Some variables are replaced in expression, using the format "
|
||||
"${variable}, which can be, by order of priority:"),
|
||||
N_(" - ${raw_hl:string}: the string itself without evaluation but "
|
||||
"with syntax highlighting"),
|
||||
N_(" - ${raw:string}: the string itself without evaluation"),
|
||||
N_(" - ${hl:string}: the string with syntax highlighting"),
|
||||
N_(" - ${name}: the user-defined variable"),
|
||||
N_(" - ${weechat_config_dir}: WeeChat config directory"),
|
||||
N_(" - ${weechat_data_dir}: WeeChat data directory"),
|
||||
N_(" - ${weechat_state_dir}: WeeChat state directory"),
|
||||
N_(" - ${weechat_cache_dir}: WeeChat cache directory"),
|
||||
N_(" - ${weechat_runtime_dir}: WeeChat runtime directory"),
|
||||
N_(" - ${eval:string}: the evaluated string"),
|
||||
N_(" - ${eval_cond:string}: the evaluated condition"),
|
||||
N_(" - ${esc:string} or ${\\string}: the string with escaped chars"),
|
||||
N_(" - ${chars:range}: the string with a range of chars, "
|
||||
"\"range\" is one of: \"digit\", \"xdigit\", \"lower\", "
|
||||
"\"upper\", \"alpha\", \"alnum\" or \"c1-c2\" (\"c1\" and \"c2\" "
|
||||
"are code points with c1 ≤ c2)"),
|
||||
N_(" - ${lower:string}: the string converted to lower case"),
|
||||
N_(" - ${upper:string}: the string converted to upper case"),
|
||||
N_(" - ${hide:char,string}: the string with hidden chars"),
|
||||
N_(" - ${cut:max,suffix,string}: the string with max chars (excluding the suffix)"),
|
||||
N_(" - ${cut:+max,suffix,string}: the string with max chars (including the suffix)"),
|
||||
N_(" - ${cutscr:max,suffix,string}: the string with max chars displayed on screen "
|
||||
"(excluding the suffix)"),
|
||||
N_(" - ${cutscr:+max,suffix,string}: the string with max chars displayed on screen "
|
||||
"(including the suffix)"),
|
||||
N_(" - ${rev:string}: the reversed string"),
|
||||
N_(" - ${revscr:string}: the reversed string for display (color codes are not reversed)"),
|
||||
N_(" - ${repeat:count,string}: the repeated string"),
|
||||
N_(" - ${length:string}: the length of the string (number of UTF-8 chars)"),
|
||||
N_(" - ${lengthscr:string}: the length of the string on screen "
|
||||
"(sum of the width of each UTF-8 char displayed on screen, colors codes are ignored)"),
|
||||
N_(" - ${split:N,separators,flags,string}: Nth item of the split string "
|
||||
"(N is an integer ≥ 1 or ≤ -1, if negative, counts from the last item)"),
|
||||
N_(" - ${split:random,separators,flags,string}: random item of the split string"),
|
||||
N_(" - ${split:count,separators,flags,string}: number of items of the split string"),
|
||||
N_(" - ${split_shell:N,string}: Nth item of the split shell arguments "
|
||||
"(N is an integer ≥ 1 or ≤ -1, if negative, counts from the last item)"),
|
||||
N_(" - ${split_shell:random,string}: random item of the split shell arguments"),
|
||||
N_(" - ${split_shell:count,string}: number of items of the split shell arguments"),
|
||||
N_(" - ${color:name}: the color (see \"Plugin API reference\", function \"color\")"),
|
||||
N_(" - ${modifier:name,data,string}: the modifier"),
|
||||
N_(" - ${info:name,arguments}: the info (arguments are optional)"),
|
||||
N_(" - ${base_encode:base,string}: the string encoded to base: 16, 32, 64 or 64url"),
|
||||
N_(" - ${base_decode:base,string}: the string decoded from base: 16, 32, 64 or 64url"),
|
||||
N_(" - ${date} or ${date:format}: current date/time"),
|
||||
N_(" - ${env:NAME}: the environment variable"),
|
||||
N_(" - ${if:condition?value_if_true:value_if_false}: the result of ternary operator"),
|
||||
N_(" - ${calc:expression}: the result of the expression with parentheses and operators "
|
||||
"(+, -, *, /, //, %, **)"),
|
||||
N_(" - ${random:min,max}: a random integer number between \"min\" and \"max\" (inclusive)"),
|
||||
N_(" - ${translate:string}: the translated string"),
|
||||
N_(" - ${define:name,value}: declaration of a user variable (return an empty string)"),
|
||||
N_(" - ${sec.data.xxx}: the value of the secured data \"xxx\""),
|
||||
N_(" - ${file.section.option}: the value of the config option"),
|
||||
N_(" - ${name}: the local variable in buffer"),
|
||||
N_(" - the hdata name/variable (the value is automatically converted "
|
||||
"to string), by default \"window\" and \"buffer\" point to current "
|
||||
"window/buffer."),
|
||||
"",
|
||||
N_("Format for hdata can be one of following:"),
|
||||
N_(" - ${hdata.var1.var2...}: start with a hdata (pointer must be known), "
|
||||
"and ask variables one after one (other hdata can be followed)"),
|
||||
N_(" - ${hdata[list].var1.var2...}: start with a hdata using a "
|
||||
"list/pointer/pointer name, for example:"),
|
||||
N_(" - ${buffer[gui_buffers].full_name}: full name of first buffer "
|
||||
"in linked list of buffers"),
|
||||
N_(" - ${plugin[weechat_plugins].name}: name of first plugin in "
|
||||
"linked list of plugins"),
|
||||
N_(" - ${hdata[pointer].var1.var2...}: start with a hdata using a "
|
||||
"pointer, for example:"),
|
||||
N_(" - ${buffer[0x1234abcd].full_name}: full name of the buffer "
|
||||
"with this pointer (can be used in triggers)"),
|
||||
N_(" - ${buffer[my_pointer].full_name}: full name of the buffer "
|
||||
"with this pointer name (can be used in triggers)"),
|
||||
N_(" - ${hdata[pointer].var1.method()}: when var1 is a hashtable, "
|
||||
"methods can be called: \"keys()\", \"values()\", \"keys_sorted()\", "
|
||||
"\"keys_values()\" and \"keys_values_sorted()\""),
|
||||
N_("For name of hdata and variables, please look at \"Plugin API "
|
||||
"reference\", function \"weechat_hdata_get\"."),
|
||||
"",
|
||||
N_("Logical operators (by order of priority):"),
|
||||
N_(" && boolean \"and\""),
|
||||
N_(" || boolean \"or\""),
|
||||
"",
|
||||
N_("Comparison operators (by order of priority):"),
|
||||
N_(" =~ is matching POSIX extended regex"),
|
||||
N_(" !~ is NOT matching POSIX extended regex"),
|
||||
N_(" ==* is matching mask, case sensitive (wildcard \"*\" is allowed)"),
|
||||
N_(" !!* is NOT matching mask, case sensitive (wildcard \"*\" is allowed)"),
|
||||
N_(" =* is matching mask, case insensitive (wildcard \"*\" is allowed)"),
|
||||
N_(" !* is NOT matching mask, case insensitive (wildcard \"*\" is allowed)"),
|
||||
N_(" ==- is included, case sensitive"),
|
||||
N_(" !!- is NOT included, case sensitive"),
|
||||
N_(" =- is included, case insensitive"),
|
||||
N_(" !- is NOT included, case insensitive"),
|
||||
N_(" == equal"),
|
||||
N_(" != not equal"),
|
||||
N_(" <= less or equal"),
|
||||
N_(" < less"),
|
||||
N_(" >= greater or equal"),
|
||||
N_(" > greater"),
|
||||
"",
|
||||
N_("Examples (simple strings):"),
|
||||
AI(" /eval -n ${raw:${info:version}} ==> ${info:version}"),
|
||||
AI(" /eval -n ${eval_cond:${window.win_width}>100} ==> 1"),
|
||||
@@ -9128,6 +9317,7 @@ command_init ()
|
||||
NULL, "sys",
|
||||
N_("system actions"),
|
||||
N_("get rlimit|rusage"
|
||||
" || malloc_trim [<size>]"
|
||||
" || suspend"
|
||||
" || waitpid <number>"),
|
||||
CMD_ARGS_DESC(
|
||||
@@ -9135,12 +9325,18 @@ command_init ()
|
||||
N_("raw[rlimit]: display resource limits "
|
||||
"(see /help weechat.startup.sys_rlimit and \"man getrlimit\")"),
|
||||
N_("raw[rusage]: display resource usage (see \"man getrusage\")"),
|
||||
N_("raw[malloc_trim]: call function malloc_trim to release free "
|
||||
"memory from the heap"),
|
||||
N_("size: amount of free space to leave untrimmed at the top of "
|
||||
"the heap (default is 0: only the minimum amount of memory is "
|
||||
"maintained at the top of the heap)"),
|
||||
N_("raw[suspend]: suspend WeeChat and go back to the shell, by sending "
|
||||
"signal SIGTSTP to the WeeChat process") ,
|
||||
N_("raw[waitpid]: acknowledge the end of children processes "
|
||||
"(to prevent \"zombie\" processes)"),
|
||||
N_("number: number of processes to clean")),
|
||||
"get rlimit|rusage"
|
||||
" || malloc_trim"
|
||||
" || suspend"
|
||||
" || waitpid 1|10|100|1000",
|
||||
&command_sys, NULL, NULL);
|
||||
@@ -9450,7 +9646,10 @@ command_exec_list (const char *command_list)
|
||||
if (command_eval)
|
||||
{
|
||||
(void) input_data (gui_buffer_search_main (),
|
||||
command_eval, NULL, 0);
|
||||
command_eval,
|
||||
NULL,
|
||||
0, /* split_newline */
|
||||
0); /* user_data */
|
||||
free (command_eval);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-completion.c - completion for WeeChat commands
|
||||
* core-completion.c - completion for WeeChat commands
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -34,16 +34,16 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-dir.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-config.h"
|
||||
#include "core-dir.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-list.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-secure.h"
|
||||
#include "core-string.h"
|
||||
#include "../gui/gui-completion.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-item.h"
|
||||
@@ -889,17 +889,11 @@ completion_list_add_filename_cb (const void *pointer, void *data,
|
||||
closedir (dp);
|
||||
|
||||
end:
|
||||
if (real_prefix)
|
||||
free (real_prefix);
|
||||
if (prefix)
|
||||
free (prefix);
|
||||
if (path_dir)
|
||||
free (path_dir);
|
||||
if (path_base)
|
||||
free (path_base);
|
||||
if (dir_name)
|
||||
free (dir_name);
|
||||
|
||||
free (real_prefix);
|
||||
free (prefix);
|
||||
free (path_dir);
|
||||
free (path_base);
|
||||
free (dir_name);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -1323,8 +1317,7 @@ completion_list_add_plugins_installed_cb (const void *pointer, void *data,
|
||||
hashtable_set (options, "directory", "data");
|
||||
plugin_path = string_eval_path_home (CONFIG_STRING(config_plugin_path),
|
||||
NULL, NULL, options);
|
||||
if (options)
|
||||
hashtable_free (options);
|
||||
hashtable_free (options);
|
||||
if (plugin_path)
|
||||
{
|
||||
dir_exec_on_files (plugin_path, 1, 0,
|
||||
@@ -1649,11 +1642,8 @@ completion_list_add_config_option_values_cb (const void *pointer, void *data,
|
||||
}
|
||||
}
|
||||
|
||||
if (file)
|
||||
free (file);
|
||||
if (section)
|
||||
free (section);
|
||||
|
||||
free (file);
|
||||
free (section);
|
||||
free (option_full_name);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
@@ -2109,12 +2099,24 @@ completion_list_add_eval_variables_cb (const void *pointer, void *data,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char *eval_variables[] = {
|
||||
"${\\xxx}",
|
||||
"${base_decode:base,xxx}",
|
||||
"${base_encode:base,xxx}",
|
||||
"${calc:xxx}",
|
||||
"${chars:range}",
|
||||
"${color:xxx}",
|
||||
"${\\string}",
|
||||
"${base_decode:16,string}",
|
||||
"${base_decode:32,string}",
|
||||
"${base_decode:64,string}",
|
||||
"${base_decode:64url,string}",
|
||||
"${base_encode:16,string}",
|
||||
"${base_encode:32,string}",
|
||||
"${base_encode:64,string}",
|
||||
"${base_encode:64url,string}",
|
||||
"${calc:expression}",
|
||||
"${chars:alpha}",
|
||||
"${chars:alnum}",
|
||||
"${chars:c1-c2}",
|
||||
"${chars:digit}",
|
||||
"${chars:lower}",
|
||||
"${chars:upper}",
|
||||
"${chars:xdigit}",
|
||||
"${color:name}",
|
||||
"${cut:+max,suffix,string}",
|
||||
"${cut:max,suffix,string}",
|
||||
"${cutscr:+max,suffix,string}",
|
||||
@@ -2122,42 +2124,45 @@ completion_list_add_eval_variables_cb (const void *pointer, void *data,
|
||||
"${date:format}",
|
||||
"${date}",
|
||||
"${define:name,value}",
|
||||
"${env:XXX}",
|
||||
"${esc:xxx}",
|
||||
"${eval:xxx}",
|
||||
"${eval_cond:xxx}",
|
||||
"${env:NAME}",
|
||||
"${esc:string}",
|
||||
"${eval:string}",
|
||||
"${eval_cond:string}",
|
||||
"${file.section.option}",
|
||||
"${hdata.var1.var2}",
|
||||
"${hdata[list].var1.var2}",
|
||||
"${hdata[ptr].var1.var2}",
|
||||
"${hdata[ptr_name].var1.var2}",
|
||||
"${hide:char,string}",
|
||||
"${hl:string}",
|
||||
"${if:condition?value_if_true:value_if_false}",
|
||||
"${info:name,arguments}",
|
||||
"${length:xxx}",
|
||||
"${lengthscr:xxx}",
|
||||
"${lower:xxx}",
|
||||
"${modifier:name,data,xxx}",
|
||||
"${length:string}",
|
||||
"${lengthscr:string}",
|
||||
"${lower:string}",
|
||||
"${modifier:name,data,string}",
|
||||
"${random:min,max}",
|
||||
"${raw:xxx}",
|
||||
"${raw:string}",
|
||||
"${raw_hl:string}",
|
||||
"${re:+}",
|
||||
"${re:N}",
|
||||
"${repeat:count,string}",
|
||||
"${rev:xxx}",
|
||||
"${revscr:xxx}",
|
||||
"${rev:string}",
|
||||
"${revscr:string}",
|
||||
"${sec.data.xxx}",
|
||||
"${split:count,separators,flags,xxx}",
|
||||
"${split:number,separators,flags,xxx}",
|
||||
"${split:random,separators,flags,xxx}",
|
||||
"${split_shell:count,xxx}",
|
||||
"${split_shell:number,xxx}",
|
||||
"${split_shell:random,xxx}",
|
||||
"${translate:xxx}",
|
||||
"${upper:xxx}",
|
||||
"${split:count,separators,flags,string}",
|
||||
"${split:N,separators,flags,string}",
|
||||
"${split:random,separators,flags,string}",
|
||||
"${split_shell:count,string}",
|
||||
"${split_shell:N,string}",
|
||||
"${split_shell:random,string}",
|
||||
"${translate:string}",
|
||||
"${upper:string}",
|
||||
"${weechat_cache_dir}",
|
||||
"${weechat_config_dir}",
|
||||
"${weechat_data_dir}",
|
||||
"${weechat_runtime_dir}",
|
||||
"${weechat_state_dir}",
|
||||
"${window}",
|
||||
"${window.buffer}",
|
||||
"${window.buffer.xxx}",
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-config-file.c - configuration files/sections/options management
|
||||
* core-config-file.c - configuration files/sections/options management
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -34,17 +34,17 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-dir.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-version.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-config.h"
|
||||
#include "core-dir.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "core-version.h"
|
||||
#include "../gui/gui-color.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../plugins/plugin.h"
|
||||
@@ -986,10 +986,8 @@ error:
|
||||
}
|
||||
|
||||
end:
|
||||
if (option_name)
|
||||
free (option_name);
|
||||
if (parent_name)
|
||||
free (parent_name);
|
||||
free (option_name);
|
||||
free (parent_name);
|
||||
return new_option;
|
||||
}
|
||||
|
||||
@@ -1170,10 +1168,8 @@ config_file_search_with_string (const char *option_name,
|
||||
}
|
||||
}
|
||||
|
||||
if (file_name)
|
||||
free (file_name);
|
||||
if (section_name)
|
||||
free (section_name);
|
||||
free (file_name);
|
||||
free (section_name);
|
||||
|
||||
if (config_file)
|
||||
*config_file = ptr_config;
|
||||
@@ -1183,6 +1179,28 @@ config_file_search_with_string (const char *option_name,
|
||||
*option = ptr_option;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets pointer to parent option, NULL if the option has no parent.
|
||||
*/
|
||||
|
||||
struct t_config_option *
|
||||
config_file_get_parent_option (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (!option || !option->parent_name)
|
||||
return NULL;
|
||||
|
||||
config_file_search_with_string (
|
||||
option->parent_name,
|
||||
NULL, /* config_file */
|
||||
NULL, /* section */
|
||||
&ptr_parent_option,
|
||||
NULL); /* pos_option_name */
|
||||
|
||||
return ptr_parent_option;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a string with boolean value is valid.
|
||||
*
|
||||
@@ -1817,8 +1835,7 @@ config_file_option_toggle (struct t_config_option *option,
|
||||
rc = config_file_option_set (option, ptr_new_value, run_callback);
|
||||
|
||||
end:
|
||||
if (current_value)
|
||||
free (current_value);
|
||||
free (current_value);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -2298,8 +2315,7 @@ config_file_option_rename (struct t_config_option *option,
|
||||
}
|
||||
|
||||
/* rename option */
|
||||
if (option->name)
|
||||
free (option->name);
|
||||
free (option->name);
|
||||
option->name = str_new_name;
|
||||
|
||||
/* re-insert option in section */
|
||||
@@ -2332,10 +2348,8 @@ config_file_option_rename (struct t_config_option *option,
|
||||
}
|
||||
}
|
||||
|
||||
if (full_old_name)
|
||||
free (full_old_name);
|
||||
if (full_new_name)
|
||||
free (full_new_name);
|
||||
free (full_old_name);
|
||||
free (full_new_name);
|
||||
|
||||
config_file_hook_config_exec (option);
|
||||
}
|
||||
@@ -2664,12 +2678,10 @@ config_file_option_set_with_string (const char *option_name, const char *value)
|
||||
int
|
||||
config_file_option_boolean (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->value
|
||||
&& (option->type == CONFIG_OPTION_TYPE_BOOLEAN))
|
||||
{
|
||||
return CONFIG_BOOLEAN(option);
|
||||
}
|
||||
return 0;
|
||||
if (!option || !option->value || (option->type != CONFIG_OPTION_TYPE_BOOLEAN))
|
||||
return 0;
|
||||
|
||||
return CONFIG_BOOLEAN(option);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2681,12 +2693,38 @@ config_file_option_boolean (struct t_config_option *option)
|
||||
int
|
||||
config_file_option_boolean_default (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->default_value
|
||||
&& (option->type == CONFIG_OPTION_TYPE_BOOLEAN))
|
||||
if (!option || !option->default_value || (option->type != CONFIG_OPTION_TYPE_BOOLEAN))
|
||||
return 0;
|
||||
|
||||
return CONFIG_BOOLEAN_DEFAULT(option);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns inherited boolean value of an option: value of option if not NULL,
|
||||
* or value of the parent option (if option inherits from another option).
|
||||
*
|
||||
* If the parent option is not found, returns the default value of the option.
|
||||
* If the parent value is NULL, returns the default value of the parent option.
|
||||
*/
|
||||
|
||||
int
|
||||
config_file_option_boolean_inherited (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (option && option->value)
|
||||
{
|
||||
return CONFIG_BOOLEAN_DEFAULT(option);
|
||||
return config_file_option_boolean (option);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_parent_option = config_file_get_parent_option (option);
|
||||
if (!ptr_parent_option)
|
||||
return config_file_option_boolean_default (option);
|
||||
if (!ptr_parent_option->value)
|
||||
return config_file_option_boolean_default (ptr_parent_option);
|
||||
return config_file_option_boolean (ptr_parent_option);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2696,26 +2734,26 @@ config_file_option_boolean_default (struct t_config_option *option)
|
||||
int
|
||||
config_file_option_integer (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->value)
|
||||
if (!option || !option->value)
|
||||
return 0;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -2727,30 +2765,58 @@ config_file_option_integer (struct t_config_option *option)
|
||||
int
|
||||
config_file_option_integer_default (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->default_value)
|
||||
if (!option || !option->default_value)
|
||||
return 0;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM_DEFAULT(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM_DEFAULT(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns inherited integer value of an option: value of option if not NULL,
|
||||
* or value of the parent option (if option inherits from another option).
|
||||
*
|
||||
* If the parent option is not found, returns the default value of the option.
|
||||
* If the parent value is NULL, returns the default value of the parent option.
|
||||
*/
|
||||
|
||||
int
|
||||
config_file_option_integer_inherited (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (option && option->value)
|
||||
{
|
||||
return config_file_option_integer (option);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_parent_option = config_file_get_parent_option (option);
|
||||
if (!ptr_parent_option)
|
||||
return config_file_option_integer_default (option);
|
||||
if (!ptr_parent_option->value)
|
||||
return config_file_option_integer_default (ptr_parent_option);
|
||||
return config_file_option_integer (ptr_parent_option);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns string value of an option.
|
||||
*/
|
||||
@@ -2758,26 +2824,26 @@ config_file_option_integer_default (struct t_config_option *option)
|
||||
const char *
|
||||
config_file_option_string (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->value)
|
||||
if (!option || !option->value)
|
||||
return NULL;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option))
|
||||
return config_boolean_true[0];
|
||||
else
|
||||
return config_boolean_false[0];
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return NULL;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return CONFIG_STRING(option);
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return gui_color_get_name (CONFIG_COLOR(option));
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return option->string_values[CONFIG_ENUM(option)];
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
return NULL;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option))
|
||||
return config_boolean_true[0];
|
||||
else
|
||||
return config_boolean_false[0];
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return NULL;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return CONFIG_STRING(option);
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return gui_color_get_name (CONFIG_COLOR(option));
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return option->string_values[CONFIG_ENUM(option)];
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -2789,30 +2855,58 @@ config_file_option_string (struct t_config_option *option)
|
||||
const char *
|
||||
config_file_option_string_default (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->default_value)
|
||||
if (!option || !option->default_value)
|
||||
return NULL;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option))
|
||||
return config_boolean_true[0];
|
||||
else
|
||||
return config_boolean_false[0];
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return NULL;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return CONFIG_STRING_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return gui_color_get_name (CONFIG_COLOR_DEFAULT(option));
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return option->string_values[CONFIG_ENUM_DEFAULT(option)];
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
return NULL;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option))
|
||||
return config_boolean_true[0];
|
||||
else
|
||||
return config_boolean_false[0];
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return NULL;
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return CONFIG_STRING_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return gui_color_get_name (CONFIG_COLOR_DEFAULT(option));
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return option->string_values[CONFIG_ENUM_DEFAULT(option)];
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns inherited string value of an option: value of option if not NULL,
|
||||
* or value of the parent option (if option inherits from another option).
|
||||
*
|
||||
* If the parent option is not found, returns the default value of the option.
|
||||
* If the parent value is NULL, returns the default value of the parent option.
|
||||
*/
|
||||
|
||||
const char *
|
||||
config_file_option_string_inherited (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (option && option->value)
|
||||
{
|
||||
return config_file_option_string (option);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_parent_option = config_file_get_parent_option (option);
|
||||
if (!ptr_parent_option)
|
||||
return config_file_option_string_default (option);
|
||||
if (!ptr_parent_option->value)
|
||||
return config_file_option_string_default (ptr_parent_option);
|
||||
return config_file_option_string (ptr_parent_option);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns color value of an option.
|
||||
*/
|
||||
@@ -2820,12 +2914,10 @@ config_file_option_string_default (struct t_config_option *option)
|
||||
const char *
|
||||
config_file_option_color (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->value
|
||||
&& (option->type == CONFIG_OPTION_TYPE_COLOR))
|
||||
{
|
||||
return gui_color_get_name (CONFIG_COLOR(option));
|
||||
}
|
||||
return NULL;
|
||||
if (!option || !option->value || (option->type != CONFIG_OPTION_TYPE_COLOR))
|
||||
return NULL;
|
||||
|
||||
return gui_color_get_name (CONFIG_COLOR(option));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2835,12 +2927,36 @@ config_file_option_color (struct t_config_option *option)
|
||||
const char *
|
||||
config_file_option_color_default (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->default_value
|
||||
&& (option->type == CONFIG_OPTION_TYPE_COLOR))
|
||||
if (!option || !option->default_value || (option->type != CONFIG_OPTION_TYPE_COLOR))
|
||||
return NULL;
|
||||
|
||||
return gui_color_get_name (CONFIG_COLOR_DEFAULT(option));
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns inherited color value of an option: value of option if not NULL,
|
||||
* or value of the parent option (if option inherits from another option).
|
||||
*
|
||||
* If the parent option is not found, returns the default value of the option.
|
||||
* If the parent value is NULL, returns the default value of the parent option.
|
||||
*/
|
||||
|
||||
const char *
|
||||
config_file_option_color_inherited (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (option && option->value)
|
||||
return config_file_option_color (option);
|
||||
else
|
||||
{
|
||||
return gui_color_get_name (CONFIG_COLOR_DEFAULT(option));
|
||||
ptr_parent_option = config_file_get_parent_option (option);
|
||||
if (!ptr_parent_option)
|
||||
return config_file_option_color_default (option);
|
||||
if (!ptr_parent_option->value)
|
||||
return config_file_option_color_default (ptr_parent_option);
|
||||
return config_file_option_color (ptr_parent_option);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2850,26 +2966,26 @@ config_file_option_color_default (struct t_config_option *option)
|
||||
int
|
||||
config_file_option_enum (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->value)
|
||||
if (!option || !option->value)
|
||||
return 0;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -2881,30 +2997,58 @@ config_file_option_enum (struct t_config_option *option)
|
||||
int
|
||||
config_file_option_enum_default (struct t_config_option *option)
|
||||
{
|
||||
if (option && option->default_value)
|
||||
if (!option || !option->default_value)
|
||||
return 0;
|
||||
|
||||
switch (option->type)
|
||||
{
|
||||
switch (option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
if (CONFIG_BOOLEAN_DEFAULT(option) == CONFIG_BOOLEAN_TRUE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM_DEFAULT(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
case CONFIG_OPTION_TYPE_INTEGER:
|
||||
return CONFIG_INTEGER_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_STRING:
|
||||
return 0;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
return CONFIG_COLOR_DEFAULT(option);
|
||||
case CONFIG_OPTION_TYPE_ENUM:
|
||||
return CONFIG_ENUM_DEFAULT(option);
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns inherited enum value of an option: value of option if not NULL,
|
||||
* or value of the parent option (if option inherits from another option).
|
||||
*
|
||||
* If the parent option is not found, returns the default value of the option.
|
||||
* If the parent value is NULL, returns the default value of the parent option.
|
||||
*/
|
||||
|
||||
int
|
||||
config_file_option_enum_inherited (struct t_config_option *option)
|
||||
{
|
||||
struct t_config_option *ptr_parent_option;
|
||||
|
||||
if (option && option->value)
|
||||
{
|
||||
return config_file_option_enum (option);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_parent_option = config_file_get_parent_option (option);
|
||||
if (!ptr_parent_option)
|
||||
return config_file_option_enum_default (option);
|
||||
if (!ptr_parent_option->value)
|
||||
return config_file_option_enum_default (ptr_parent_option);
|
||||
return config_file_option_enum (ptr_parent_option);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a char to add before the name of option to escape it.
|
||||
*
|
||||
@@ -3049,7 +3193,8 @@ config_file_write_internal (struct t_config_file *config_file,
|
||||
int default_options)
|
||||
{
|
||||
int filename_length, rc;
|
||||
char *filename, *filename2, resolved_path[PATH_MAX];
|
||||
long file_perms;
|
||||
char *filename, *filename2, resolved_path[PATH_MAX], *error;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
|
||||
@@ -3195,7 +3340,20 @@ config_file_write_internal (struct t_config_file *config_file,
|
||||
config_file->file = NULL;
|
||||
|
||||
/* update file mode */
|
||||
chmod (filename2, 0600);
|
||||
error = NULL;
|
||||
file_perms = strtol (CONFIG_STRING(config_look_config_permissions), &error, 8);
|
||||
if (!error || error[0])
|
||||
file_perms = 0600;
|
||||
if (chmod (filename2, file_perms) < 0)
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sWARNING: failed to set permissions on configuration file "
|
||||
"\"%s\" (%s)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
filename2,
|
||||
strerror (errno));
|
||||
}
|
||||
|
||||
/* rename temp file to target file */
|
||||
rc = rename (filename2, filename);
|
||||
@@ -3424,8 +3582,7 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
ptr_section = hashtable_get (hashtable, "section");
|
||||
if (ptr_section && ptr_section[0])
|
||||
{
|
||||
if (*ret_section)
|
||||
free (*ret_section);
|
||||
free (*ret_section);
|
||||
*ret_section = strdup (ptr_section);
|
||||
}
|
||||
}
|
||||
@@ -3439,8 +3596,7 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
ptr_option = hashtable_get (hashtable, "option");
|
||||
if (ptr_option)
|
||||
{
|
||||
if (*ret_option)
|
||||
free (*ret_option);
|
||||
free (*ret_option);
|
||||
*ret_option = strdup (ptr_option);
|
||||
}
|
||||
}
|
||||
@@ -3450,8 +3606,7 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
ptr_value = hashtable_get (hashtable, "value");
|
||||
if (!value_null && hashtable_has_key (hashtable, "value_null"))
|
||||
ptr_value = NULL;
|
||||
if (*ret_value)
|
||||
free (*ret_value);
|
||||
free (*ret_value);
|
||||
*ret_value = (ptr_value) ? strdup (ptr_value) : NULL;
|
||||
}
|
||||
}
|
||||
@@ -3671,10 +3826,8 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
filename, line_number,
|
||||
line);
|
||||
config_file_backup (filename);
|
||||
if (option)
|
||||
free (option);
|
||||
if (value)
|
||||
free (value);
|
||||
free (option);
|
||||
free (value);
|
||||
goto end_file;
|
||||
}
|
||||
else
|
||||
@@ -3692,10 +3845,8 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
config_file->version_read,
|
||||
config_file->version);
|
||||
config_file_backup (filename);
|
||||
if (option)
|
||||
free (option);
|
||||
if (value)
|
||||
free (value);
|
||||
free (option);
|
||||
free (value);
|
||||
goto end_file;
|
||||
}
|
||||
}
|
||||
@@ -3784,10 +3935,8 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
}
|
||||
|
||||
end_line:
|
||||
if (option)
|
||||
free (option);
|
||||
if (value)
|
||||
free (value);
|
||||
free (option);
|
||||
free (value);
|
||||
}
|
||||
|
||||
end_file:
|
||||
@@ -3876,24 +4025,15 @@ config_file_reload (struct t_config_file *config_file)
|
||||
void
|
||||
config_file_option_free_data (struct t_config_option *option)
|
||||
{
|
||||
if (option->name)
|
||||
free (option->name);
|
||||
if (option->parent_name)
|
||||
free (option->parent_name);
|
||||
if (option->description)
|
||||
free (option->description);
|
||||
if (option->string_values)
|
||||
string_free_split (option->string_values);
|
||||
if (option->default_value)
|
||||
free (option->default_value);
|
||||
if (option->value)
|
||||
free (option->value);
|
||||
if (option->callback_check_value_data)
|
||||
free (option->callback_check_value_data);
|
||||
if (option->callback_change_data)
|
||||
free (option->callback_change_data);
|
||||
if (option->callback_delete_data)
|
||||
free (option->callback_delete_data);
|
||||
free (option->name);
|
||||
free (option->parent_name);
|
||||
free (option->description);
|
||||
string_free_split (option->string_values);
|
||||
free (option->default_value);
|
||||
free (option->value);
|
||||
free (option->callback_check_value_data);
|
||||
free (option->callback_change_data);
|
||||
free (option->callback_delete_data);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3977,18 +4117,12 @@ config_file_section_free (struct t_config_section *section)
|
||||
|
||||
/* free data */
|
||||
config_file_section_free_options (section);
|
||||
if (section->name)
|
||||
free (section->name);
|
||||
if (section->callback_read_data)
|
||||
free (section->callback_read_data);
|
||||
if (section->callback_write_data)
|
||||
free (section->callback_write_data);
|
||||
if (section->callback_write_default_data)
|
||||
free (section->callback_write_default_data);
|
||||
if (section->callback_create_option_data)
|
||||
free (section->callback_create_option_data);
|
||||
if (section->callback_delete_option_data)
|
||||
free (section->callback_delete_option_data);
|
||||
free (section->name);
|
||||
free (section->callback_read_data);
|
||||
free (section->callback_write_data);
|
||||
free (section->callback_write_default_data);
|
||||
free (section->callback_create_option_data);
|
||||
free (section->callback_delete_option_data);
|
||||
|
||||
/* remove section from list */
|
||||
if (ptr_config->last_section == section)
|
||||
@@ -4026,10 +4160,8 @@ config_file_free (struct t_config_file *config_file)
|
||||
{
|
||||
config_file_section_free (config_file->sections);
|
||||
}
|
||||
if (config_file->name)
|
||||
free (config_file->name);
|
||||
if (config_file->filename)
|
||||
free (config_file->filename);
|
||||
free (config_file->name);
|
||||
free (config_file->filename);
|
||||
|
||||
/* remove configuration file from list */
|
||||
if (last_config_file == config_file)
|
||||
@@ -4046,10 +4178,8 @@ config_file_free (struct t_config_file *config_file)
|
||||
(config_file->next_config)->prev_config = config_file->prev_config;
|
||||
|
||||
/* free data */
|
||||
if (config_file->callback_update_data)
|
||||
free (config_file->callback_update_data);
|
||||
if (config_file->callback_reload_data)
|
||||
free (config_file->callback_reload_data);
|
||||
free (config_file->callback_update_data);
|
||||
free (config_file->callback_reload_data);
|
||||
|
||||
free (config_file);
|
||||
|
||||
@@ -4277,12 +4407,10 @@ config_file_add_option_to_infolist (struct t_infolist *infolist,
|
||||
(const char **)option->string_values, "|", 0, -1);
|
||||
if (!infolist_new_var_string (ptr_item, "string_values", string_values))
|
||||
{
|
||||
if (string_values)
|
||||
free (string_values);
|
||||
free (string_values);
|
||||
goto error;
|
||||
}
|
||||
if (string_values)
|
||||
free (string_values);
|
||||
free (string_values);
|
||||
if (!infolist_new_var_integer (ptr_item, "min", option->min))
|
||||
goto error;
|
||||
if (!infolist_new_var_integer (ptr_item, "max", option->max))
|
||||
@@ -4420,63 +4548,63 @@ config_file_print_log ()
|
||||
ptr_config_file = ptr_config_file->next_config)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf ("[config (addr:0x%lx)]", ptr_config_file);
|
||||
log_printf (" plugin . . . . . . . . : 0x%lx ('%s')",
|
||||
log_printf ("[config (addr:%p)]", ptr_config_file);
|
||||
log_printf (" plugin . . . . . . . . : %p ('%s')",
|
||||
ptr_config_file->plugin,
|
||||
plugin_get_name (ptr_config_file->plugin));
|
||||
log_printf (" priority . . . . . . . : %d", ptr_config_file->priority);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_config_file->name);
|
||||
log_printf (" filename . . . . . . . : '%s'", ptr_config_file->filename);
|
||||
log_printf (" file . . . . . . . . . : 0x%lx", ptr_config_file->file);
|
||||
log_printf (" callback_reload. . . . : 0x%lx", ptr_config_file->callback_reload);
|
||||
log_printf (" callback_reload_pointer: 0x%lx", ptr_config_file->callback_reload_pointer);
|
||||
log_printf (" callback_reload_data . : 0x%lx", ptr_config_file->callback_reload_data);
|
||||
log_printf (" sections . . . . . . . : 0x%lx", ptr_config_file->sections);
|
||||
log_printf (" last_section . . . . . : 0x%lx", ptr_config_file->last_section);
|
||||
log_printf (" prev_config. . . . . . : 0x%lx", ptr_config_file->prev_config);
|
||||
log_printf (" next_config. . . . . . : 0x%lx", ptr_config_file->next_config);
|
||||
log_printf (" priority . . . . . . . : %d", ptr_config_file->priority);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_config_file->name);
|
||||
log_printf (" filename . . . . . . . : '%s'", ptr_config_file->filename);
|
||||
log_printf (" file . . . . . . . . . : %p", ptr_config_file->file);
|
||||
log_printf (" callback_reload. . . . : %p", ptr_config_file->callback_reload);
|
||||
log_printf (" callback_reload_pointer: %p", ptr_config_file->callback_reload_pointer);
|
||||
log_printf (" callback_reload_data . : %p", ptr_config_file->callback_reload_data);
|
||||
log_printf (" sections . . . . . . . : %p", ptr_config_file->sections);
|
||||
log_printf (" last_section . . . . . : %p", ptr_config_file->last_section);
|
||||
log_printf (" prev_config. . . . . . : %p", ptr_config_file->prev_config);
|
||||
log_printf (" next_config. . . . . . : %p", ptr_config_file->next_config);
|
||||
|
||||
for (ptr_section = ptr_config_file->sections; ptr_section;
|
||||
ptr_section = ptr_section->next_section)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf (" [section (addr:0x%lx)]", ptr_section);
|
||||
log_printf (" config_file . . . . . . . . . : 0x%lx", ptr_section->config_file);
|
||||
log_printf (" name. . . . . . . . . . . . . : '%s'", ptr_section->name);
|
||||
log_printf (" callback_read . . . . . . . . : 0x%lx", ptr_section->callback_read);
|
||||
log_printf (" callback_read_pointer . . . . : 0x%lx", ptr_section->callback_read_pointer);
|
||||
log_printf (" callback_read_data. . . . . . : 0x%lx", ptr_section->callback_read_data);
|
||||
log_printf (" callback_write. . . . . . . . : 0x%lx", ptr_section->callback_write);
|
||||
log_printf (" callback_write_pointer. . . . : 0x%lx", ptr_section->callback_write_pointer);
|
||||
log_printf (" callback_write_data . . . . . : 0x%lx", ptr_section->callback_write_data);
|
||||
log_printf (" callback_write_default. . . . : 0x%lx", ptr_section->callback_write_default);
|
||||
log_printf (" callback_write_default_pointer: 0x%lx", ptr_section->callback_write_default_pointer);
|
||||
log_printf (" callback_write_default_data . : 0x%lx", ptr_section->callback_write_default_data);
|
||||
log_printf (" callback_create_option. . . . : 0x%lx", ptr_section->callback_create_option);
|
||||
log_printf (" callback_create_option_pointer: 0x%lx", ptr_section->callback_create_option_pointer);
|
||||
log_printf (" callback_create_option_data . : 0x%lx", ptr_section->callback_create_option_data);
|
||||
log_printf (" callback_delete_option. . . . : 0x%lx", ptr_section->callback_delete_option);
|
||||
log_printf (" callback_delete_option_pointer: 0x%lx", ptr_section->callback_delete_option_pointer);
|
||||
log_printf (" callback_delete_option_data . : 0x%lx", ptr_section->callback_delete_option_data);
|
||||
log_printf (" options . . . . . . . . . . . : 0x%lx", ptr_section->options);
|
||||
log_printf (" last_option . . . . . . . . . : 0x%lx", ptr_section->last_option);
|
||||
log_printf (" prev_section. . . . . . . . . : 0x%lx", ptr_section->prev_section);
|
||||
log_printf (" next_section. . . . . . . . . : 0x%lx", ptr_section->next_section);
|
||||
log_printf (" [section (addr:%p)]", ptr_section);
|
||||
log_printf (" config_file . . . . . . . . . : %p", ptr_section->config_file);
|
||||
log_printf (" name. . . . . . . . . . . . . : '%s'", ptr_section->name);
|
||||
log_printf (" callback_read . . . . . . . . : %p", ptr_section->callback_read);
|
||||
log_printf (" callback_read_pointer . . . . : %p", ptr_section->callback_read_pointer);
|
||||
log_printf (" callback_read_data. . . . . . : %p", ptr_section->callback_read_data);
|
||||
log_printf (" callback_write. . . . . . . . : %p", ptr_section->callback_write);
|
||||
log_printf (" callback_write_pointer. . . . : %p", ptr_section->callback_write_pointer);
|
||||
log_printf (" callback_write_data . . . . . : %p", ptr_section->callback_write_data);
|
||||
log_printf (" callback_write_default. . . . : %p", ptr_section->callback_write_default);
|
||||
log_printf (" callback_write_default_pointer: %p", ptr_section->callback_write_default_pointer);
|
||||
log_printf (" callback_write_default_data . : %p", ptr_section->callback_write_default_data);
|
||||
log_printf (" callback_create_option. . . . : %p", ptr_section->callback_create_option);
|
||||
log_printf (" callback_create_option_pointer: %p", ptr_section->callback_create_option_pointer);
|
||||
log_printf (" callback_create_option_data . : %p", ptr_section->callback_create_option_data);
|
||||
log_printf (" callback_delete_option. . . . : %p", ptr_section->callback_delete_option);
|
||||
log_printf (" callback_delete_option_pointer: %p", ptr_section->callback_delete_option_pointer);
|
||||
log_printf (" callback_delete_option_data . : %p", ptr_section->callback_delete_option_data);
|
||||
log_printf (" options . . . . . . . . . . . : %p", ptr_section->options);
|
||||
log_printf (" last_option . . . . . . . . . : %p", ptr_section->last_option);
|
||||
log_printf (" prev_section. . . . . . . . . : %p", ptr_section->prev_section);
|
||||
log_printf (" next_section. . . . . . . . . : %p", ptr_section->next_section);
|
||||
|
||||
for (ptr_option = ptr_section->options; ptr_option;
|
||||
ptr_option = ptr_option->next_option)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf (" [option (addr:0x%lx)]", ptr_option);
|
||||
log_printf (" config_file. . . . . . . . . : 0x%lx", ptr_option->config_file);
|
||||
log_printf (" section. . . . . . . . . . . : 0x%lx", ptr_option->section);
|
||||
log_printf (" name . . . . . . . . . . . . : '%s'", ptr_option->name);
|
||||
log_printf (" parent_name. . . . . . . . . : '%s'", ptr_option->parent_name);
|
||||
log_printf (" type . . . . . . . . . . . . : %d", ptr_option->type);
|
||||
log_printf (" description. . . . . . . . . : '%s'", ptr_option->description);
|
||||
log_printf (" string_values. . . . . . . . : 0x%lx", ptr_option->string_values);
|
||||
log_printf (" min. . . . . . . . . . . . . : %d", ptr_option->min);
|
||||
log_printf (" max. . . . . . . . . . . . . : %d", ptr_option->max);
|
||||
log_printf (" [option (addr:%p)]", ptr_option);
|
||||
log_printf (" config_file. . . . . . . . . : %p", ptr_option->config_file);
|
||||
log_printf (" section. . . . . . . . . . . : %p", ptr_option->section);
|
||||
log_printf (" name . . . . . . . . . . . . : '%s'", ptr_option->name);
|
||||
log_printf (" parent_name. . . . . . . . . : '%s'", ptr_option->parent_name);
|
||||
log_printf (" type . . . . . . . . . . . . : %d", ptr_option->type);
|
||||
log_printf (" description. . . . . . . . . : '%s'", ptr_option->description);
|
||||
log_printf (" string_values. . . . . . . . : %p", ptr_option->string_values);
|
||||
log_printf (" min. . . . . . . . . . . . . : %d", ptr_option->min);
|
||||
log_printf (" max. . . . . . . . . . . . . : %d", ptr_option->max);
|
||||
switch (ptr_option->type)
|
||||
{
|
||||
case CONFIG_OPTION_TYPE_BOOLEAN:
|
||||
@@ -4538,19 +4666,19 @@ config_file_print_log ()
|
||||
case CONFIG_NUM_OPTION_TYPES:
|
||||
break;
|
||||
}
|
||||
log_printf (" null_value_allowed . . . . . : %d", ptr_option->null_value_allowed);
|
||||
log_printf (" callback_check_value . . . . : 0x%lx", ptr_option->callback_check_value);
|
||||
log_printf (" callback_check_value_pointer : 0x%lx", ptr_option->callback_check_value_pointer);
|
||||
log_printf (" callback_check_value_data. . : 0x%lx", ptr_option->callback_check_value_data);
|
||||
log_printf (" callback_change. . . . . . . : 0x%lx", ptr_option->callback_change);
|
||||
log_printf (" callback_change_pointer. . . : 0x%lx", ptr_option->callback_change_pointer);
|
||||
log_printf (" callback_change_data . . . . : 0x%lx", ptr_option->callback_change_data);
|
||||
log_printf (" callback_delete. . . . . . . : 0x%lx", ptr_option->callback_delete);
|
||||
log_printf (" callback_delete_pointer. . . : 0x%lx", ptr_option->callback_delete_pointer);
|
||||
log_printf (" callback_delete_data . . . . : 0x%lx", ptr_option->callback_delete_data);
|
||||
log_printf (" loaded . . . . . . . . . . . : %d", ptr_option->loaded);
|
||||
log_printf (" prev_option. . . . . . . . . : 0x%lx", ptr_option->prev_option);
|
||||
log_printf (" next_option. . . . . . . . . : 0x%lx", ptr_option->next_option);
|
||||
log_printf (" null_value_allowed . . . . . : %d", ptr_option->null_value_allowed);
|
||||
log_printf (" callback_check_value . . . . : %p", ptr_option->callback_check_value);
|
||||
log_printf (" callback_check_value_pointer : %p", ptr_option->callback_check_value_pointer);
|
||||
log_printf (" callback_check_value_data. . : %p", ptr_option->callback_check_value_data);
|
||||
log_printf (" callback_change. . . . . . . : %p", ptr_option->callback_change);
|
||||
log_printf (" callback_change_pointer. . . : %p", ptr_option->callback_change_pointer);
|
||||
log_printf (" callback_change_data . . . . : %p", ptr_option->callback_change_data);
|
||||
log_printf (" callback_delete. . . . . . . : %p", ptr_option->callback_delete);
|
||||
log_printf (" callback_delete_pointer. . . : %p", ptr_option->callback_delete_pointer);
|
||||
log_printf (" callback_delete_data . . . . : %p", ptr_option->callback_delete_data);
|
||||
log_printf (" loaded . . . . . . . . . . . : %d", ptr_option->loaded);
|
||||
log_printf (" prev_option. . . . . . . . . : %p", ptr_option->prev_option);
|
||||
log_printf (" next_option. . . . . . . . . : %p", ptr_option->next_option);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,14 +314,19 @@ extern int config_file_option_default_is_null (struct t_config_option *option);
|
||||
extern int config_file_option_has_changed (struct t_config_option *option);
|
||||
extern int config_file_option_set_with_string (const char *option_name, const char *value);
|
||||
extern int config_file_option_boolean (struct t_config_option *option);
|
||||
extern int config_file_option_boolean_inherited (struct t_config_option *option);
|
||||
extern int config_file_option_boolean_default (struct t_config_option *option);
|
||||
extern int config_file_option_integer (struct t_config_option *option);
|
||||
extern int config_file_option_integer_inherited (struct t_config_option *option);
|
||||
extern int config_file_option_integer_default (struct t_config_option *option);
|
||||
extern const char *config_file_option_string (struct t_config_option *option);
|
||||
extern const char *config_file_option_string_inherited (struct t_config_option *option);
|
||||
extern const char *config_file_option_string_default (struct t_config_option *option);
|
||||
extern const char *config_file_option_color (struct t_config_option *option);
|
||||
extern const char *config_file_option_color_inherited (struct t_config_option *option);
|
||||
extern const char *config_file_option_color_default (struct t_config_option *option);
|
||||
extern int config_file_option_enum (struct t_config_option *option);
|
||||
extern int config_file_option_enum_inherited (struct t_config_option *option);
|
||||
extern int config_file_option_enum_default (struct t_config_option *option);
|
||||
extern int config_file_write_option (struct t_config_file *config_file,
|
||||
struct t_config_option *option);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-config.c - WeeChat configuration options (file weechat.conf)
|
||||
* core-config.c - WeeChat configuration options (file weechat.conf)
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -36,19 +36,19 @@
|
||||
#include <regex.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-network.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-sys.h"
|
||||
#include "wee-version.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-config.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-log.h"
|
||||
#include "core-network.h"
|
||||
#include "core-utf8.h"
|
||||
#include "core-list.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-string.h"
|
||||
#include "core-sys.h"
|
||||
#include "core-version.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-item.h"
|
||||
#include "../gui/gui-bar-item-custom.h"
|
||||
@@ -133,6 +133,7 @@ struct t_config_option *config_look_color_pairs_auto_reset = NULL;
|
||||
struct t_config_option *config_look_color_real_white = NULL;
|
||||
struct t_config_option *config_look_command_chars = NULL;
|
||||
struct t_config_option *config_look_command_incomplete = NULL;
|
||||
struct t_config_option *config_look_config_permissions = NULL;
|
||||
struct t_config_option *config_look_confirm_quit = NULL;
|
||||
struct t_config_option *config_look_confirm_upgrade = NULL;
|
||||
struct t_config_option *config_look_day_change = NULL;
|
||||
@@ -142,6 +143,7 @@ struct t_config_option *config_look_eat_newline_glitch = NULL;
|
||||
struct t_config_option *config_look_emphasized_attributes = NULL;
|
||||
struct t_config_option *config_look_highlight = NULL;
|
||||
struct t_config_option *config_look_highlight_disable_regex = NULL;
|
||||
struct t_config_option *config_look_highlight_prefix = NULL;
|
||||
struct t_config_option *config_look_highlight_regex = NULL;
|
||||
struct t_config_option *config_look_highlight_tags = NULL;
|
||||
struct t_config_option *config_look_hotlist_add_conditions = NULL;
|
||||
@@ -175,7 +177,6 @@ struct t_config_option *config_look_jump_smart_back_to_buffer = NULL;
|
||||
struct t_config_option *config_look_key_bind_safe = NULL;
|
||||
struct t_config_option *config_look_key_grab_delay = NULL;
|
||||
struct t_config_option *config_look_mouse = NULL;
|
||||
struct t_config_option *config_look_mouse_timer_delay = NULL;
|
||||
struct t_config_option *config_look_nick_color_force = NULL;
|
||||
struct t_config_option *config_look_nick_color_hash = NULL;
|
||||
struct t_config_option *config_look_nick_color_hash_salt = NULL;
|
||||
@@ -285,6 +286,7 @@ struct t_config_option *config_color_status_data_msg = NULL;
|
||||
struct t_config_option *config_color_status_data_other = NULL;
|
||||
struct t_config_option *config_color_status_data_private = NULL;
|
||||
struct t_config_option *config_color_status_filter = NULL;
|
||||
struct t_config_option *config_color_status_modes = NULL;
|
||||
struct t_config_option *config_color_status_more = NULL;
|
||||
struct t_config_option *config_color_status_mouse = NULL;
|
||||
struct t_config_option *config_color_status_name = NULL;
|
||||
@@ -297,6 +299,7 @@ struct t_config_option *config_color_status_time = NULL;
|
||||
/* config, completion section */
|
||||
|
||||
struct t_config_option *config_completion_base_word_until_cursor = NULL;
|
||||
struct t_config_option *config_completion_case_sensitive = NULL;
|
||||
struct t_config_option *config_completion_command_inline = NULL;
|
||||
struct t_config_option *config_completion_default_template = NULL;
|
||||
struct t_config_option *config_completion_nick_add_space = NULL;
|
||||
@@ -370,6 +373,8 @@ int config_num_eval_syntax_colors = 0;
|
||||
char *config_item_time_evaluated = NULL;
|
||||
char *config_buffer_time_same_evaluated = NULL;
|
||||
struct t_hashtable *config_hashtable_completion_partial_templates = NULL;
|
||||
char **config_hotlist_sort_fields = NULL;
|
||||
int config_num_hotlist_sort_fields = 0;
|
||||
|
||||
|
||||
/*
|
||||
@@ -389,6 +394,35 @@ config_change_sys_rlimit (const void *pointer, void *data,
|
||||
sys_setrlimit ();
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks option "weechat.look.config_permissions".
|
||||
*/
|
||||
|
||||
int
|
||||
config_check_config_permissions (const void *pointer, void *data,
|
||||
struct t_config_option *option,
|
||||
const char *value)
|
||||
{
|
||||
const char *ptr_perm;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (!value || (strlen (value) != 3) || (value[0] != '6'))
|
||||
return 0;
|
||||
|
||||
ptr_perm = value;
|
||||
while (ptr_perm && ptr_perm[0])
|
||||
{
|
||||
if (!strchr ("0246", ptr_perm[0]))
|
||||
return 0;
|
||||
ptr_perm++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for changes on options "weechat.look.save_{config|layout}_on_exit".
|
||||
*/
|
||||
@@ -532,18 +566,14 @@ config_set_word_chars (const char *str_word_chars,
|
||||
item = string_strndup (ptr_item, pos - ptr_item);
|
||||
item2 = string_convert_escaped_chars (item);
|
||||
(*word_chars)[i].char1 = utf8_char_int (item2);
|
||||
if (item)
|
||||
free (item);
|
||||
if (item2)
|
||||
free (item2);
|
||||
free (item);
|
||||
free (item2);
|
||||
/* char2 */
|
||||
item = strdup (pos + 1);
|
||||
item2 = string_convert_escaped_chars (item);
|
||||
(*word_chars)[i].char2 = utf8_char_int (item2);
|
||||
if (item)
|
||||
free (item);
|
||||
if (item2)
|
||||
free (item2);
|
||||
free (item);
|
||||
free (item2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -554,8 +584,7 @@ config_set_word_chars (const char *str_word_chars,
|
||||
item = string_convert_escaped_chars (ptr_item);
|
||||
(*word_chars)[i].char1 = utf8_char_int (item);
|
||||
(*word_chars)[i].char2 = (*word_chars)[i].char1;
|
||||
if (item)
|
||||
free (item);
|
||||
free (item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -720,8 +749,7 @@ config_change_buffer_time_same (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (config_buffer_time_same_evaluated)
|
||||
free (config_buffer_time_same_evaluated);
|
||||
free (config_buffer_time_same_evaluated);
|
||||
config_buffer_time_same_evaluated = eval_expression (
|
||||
CONFIG_STRING(config_look_buffer_time_same), NULL, NULL, NULL);
|
||||
|
||||
@@ -1086,6 +1114,23 @@ config_change_hotlist_sort (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (config_hotlist_sort_fields)
|
||||
{
|
||||
string_free_split (config_hotlist_sort_fields);
|
||||
config_hotlist_sort_fields = NULL;
|
||||
}
|
||||
config_num_hotlist_sort_fields = 0;
|
||||
|
||||
config_hotlist_sort_fields = string_split (
|
||||
CONFIG_STRING(config_look_hotlist_sort),
|
||||
",",
|
||||
NULL,
|
||||
WEECHAT_STRING_SPLIT_STRIP_LEFT
|
||||
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
|
||||
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
|
||||
0,
|
||||
&config_num_hotlist_sort_fields);
|
||||
|
||||
gui_hotlist_resort ();
|
||||
}
|
||||
|
||||
@@ -1119,8 +1164,7 @@ config_change_item_time_format (const void *pointer, void *data,
|
||||
(void) data;
|
||||
(void) option;
|
||||
|
||||
if (config_item_time_evaluated)
|
||||
free (config_item_time_evaluated);
|
||||
free (config_item_time_evaluated);
|
||||
config_item_time_evaluated = eval_expression (
|
||||
CONFIG_STRING(config_look_item_time_format), NULL, NULL, NULL);
|
||||
|
||||
@@ -1564,6 +1608,8 @@ config_weechat_init_after_read ()
|
||||
config_set_nick_colors ();
|
||||
config_change_look_nick_color_force (NULL, NULL, NULL);
|
||||
config_set_eval_syntax_colors ();
|
||||
|
||||
config_change_hotlist_sort (NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1576,7 +1622,7 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
int version_read,
|
||||
struct t_hashtable *data_read)
|
||||
{
|
||||
const char *ptr_section, *ptr_option, *ptr_value;
|
||||
const char *ptr_config, *ptr_section, *ptr_option, *ptr_value;
|
||||
char *new_commands[][2] = {
|
||||
/* old command, new command */
|
||||
{ "/input jump_smart", "/buffer jump smart" },
|
||||
@@ -1596,6 +1642,16 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
{ "/input zoom_merged_buffer", "/buffer zoom" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
char *new_hotlist_sort[][2] = {
|
||||
/* old hotlist sort (enum), new sort with fields */
|
||||
{ "group_time_asc", "-priority,time,time_usec" },
|
||||
{ "group_time_desc", "-priority,-time,-time_usec" },
|
||||
{ "group_number_asc", "-priority,buffer.number" },
|
||||
{ "group_number_desc", "-priority,-buffer.number" },
|
||||
{ "number_asc", "buffer.number" },
|
||||
{ "number_desc" "-buffer.number" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
char *new_option;
|
||||
int changes, i;
|
||||
|
||||
@@ -1613,9 +1669,10 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
if (version_read < 2)
|
||||
{
|
||||
/*
|
||||
* changes in v2:
|
||||
* changes in v2 (WeeChat 4.0.0):
|
||||
* - new format for keys (eg: meta2-1;3D -> meta-left)
|
||||
* - keys removed: "meta2-200~" and "meta2-201~"
|
||||
* - arguments changed in /input command
|
||||
*/
|
||||
ptr_section = hashtable_get (data_read, "section");
|
||||
ptr_option = hashtable_get (data_read, "option");
|
||||
@@ -1713,6 +1770,42 @@ config_weechat_update_cb (const void *pointer, void *data,
|
||||
}
|
||||
}
|
||||
|
||||
if (version_read < 3)
|
||||
{
|
||||
/*
|
||||
* changes in v3 (WeeChat 4.3.0):
|
||||
* - new format for option "weechat.look.hotlist_sort"
|
||||
*/
|
||||
ptr_config = hashtable_get (data_read, "config");
|
||||
ptr_section = hashtable_get (data_read, "section");
|
||||
ptr_option = hashtable_get (data_read, "option");
|
||||
ptr_value = hashtable_get (data_read, "value");
|
||||
if (ptr_config
|
||||
&& ptr_section
|
||||
&& ptr_option
|
||||
&& (strcmp (ptr_section, "look") == 0)
|
||||
&& (strcmp (ptr_option, "hotlist_sort") == 0))
|
||||
{
|
||||
for (i = 0; new_hotlist_sort[i][0]; i++)
|
||||
{
|
||||
if (ptr_value && (strcmp (ptr_value, new_hotlist_sort[i][0]) == 0))
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("Value of option \"%s.%s.%s\" has been converted: \"%s\" => \"%s\""),
|
||||
ptr_config,
|
||||
ptr_section,
|
||||
ptr_option,
|
||||
new_hotlist_sort[i][0],
|
||||
new_hotlist_sort[i][1]);
|
||||
hashtable_set (data_read, "value", new_hotlist_sort[i][1]);
|
||||
changes++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (changes) ? data_read : NULL;
|
||||
}
|
||||
|
||||
@@ -2868,10 +2961,8 @@ config_weechat_filter_read_cb (const void *pointer, void *data,
|
||||
gui_filter_new ((string_strcasecmp (argv[0], "on") == 0) ? 1 : 0,
|
||||
option_name, argv[1], argv[2], argv_eol[3]);
|
||||
}
|
||||
if (argv)
|
||||
string_free_split (argv);
|
||||
if (argv_eol)
|
||||
string_free_split (argv_eol);
|
||||
string_free_split (argv);
|
||||
string_free_split (argv_eol);
|
||||
}
|
||||
|
||||
return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
|
||||
@@ -3254,11 +3345,18 @@ config_weechat_init_options ()
|
||||
"strftime for date/time specifiers, extra specifiers are "
|
||||
"supported, see function util_strftimeval in Plugin API reference) "
|
||||
"(note: content is evaluated, so you can use colors with format "
|
||||
"\"${color:xxx}\", see /help eval); "
|
||||
"\"${color:xxx}\", see /help eval); variable \"${highlight}\" "
|
||||
"can be used in a condition to have a format specific to lines "
|
||||
"with highlight (see also option weechat.look.highlight_prefix); "
|
||||
"for example time using grayscale: "
|
||||
"\"${color:252}%H${color:243}%M${color:237}%S\", "
|
||||
"the same with milliseconds: "
|
||||
"\"${color:252}%H${color:243}%M${color:237}%S.%.3\""),
|
||||
"\"${color:252}%H${color:243}%M${color:237}%S.%.3\", "
|
||||
"red background in case of highlight: "
|
||||
"\"${if:${highlight}?${color:,red}}%H:%M:%S\", "
|
||||
"red background in case of highlight with grayscale: "
|
||||
"${if:${highlight}?${color:yellow,124}%H${color:187}%M${color:181}%S.%.3:"
|
||||
"${color:252}%H${color:243}%M${color:237}%S.%.3}"),
|
||||
NULL, 0, 0, "%H:%M:%S", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_buffer_time_format, NULL, NULL,
|
||||
@@ -3394,6 +3492,21 @@ config_weechat_init_options ()
|
||||
"example /he for /help"),
|
||||
NULL, 0, 0, "off", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_config_permissions = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"config_permissions", "string",
|
||||
N_("permissions for configuration files (*.conf), as octal value "
|
||||
"(see man chmod); it must be a number with 3 digits, each digit "
|
||||
"can be 0 (no permissions), 2 (write only), 4 (read only) or "
|
||||
"6 (read and write); the first digit must be 6 so that the user "
|
||||
"can read and write the file; by default configuration files "
|
||||
"can be read and written by the user only, for security "
|
||||
"reasons; for example 660 = \"rw-rw-r--\" = file readable and "
|
||||
"writable by the user and members of the group"),
|
||||
NULL, 0, 0, "600", NULL, 0,
|
||||
&config_check_config_permissions, NULL, NULL,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_confirm_quit = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"confirm_quit", "boolean",
|
||||
@@ -3494,6 +3607,15 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL,
|
||||
&config_change_highlight_disable_regex, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_highlight_prefix = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"highlight_prefix", "boolean",
|
||||
N_("use a specific color for prefix of line in case of highlight "
|
||||
"(see also option weechat.look.buffer_time_format)"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_buffers, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_highlight_regex = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"highlight_regex", "string",
|
||||
@@ -3627,15 +3749,18 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL);
|
||||
config_look_hotlist_sort = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"hotlist_sort", "enum",
|
||||
N_("sort of hotlist: group_time_*: group by notify level "
|
||||
"(highlights first) then sort by time, group_number_*: group "
|
||||
"by notify level (highlights first) then sort by number, "
|
||||
"number_*: sort by number; asc = ascending sort, desc = "
|
||||
"descending sort"),
|
||||
"group_time_asc|group_time_desc|group_number_asc|"
|
||||
"group_number_desc|number_asc|number_desc",
|
||||
0, 0, "group_time_asc", NULL, 0,
|
||||
"hotlist_sort", "string",
|
||||
N_("comma-separated list of fields to sort hotlist; each field is "
|
||||
"a hdata variable of hotlist (\"var\") or a hdata variable of "
|
||||
"buffer (\"buffer.var\"); "
|
||||
"char \"-\" can be used before field to reverse order, "
|
||||
"char \"~\" can be used to do a case insensitive comparison; "
|
||||
"examples: "
|
||||
"\"-priority,buffer.number\" for sort on hotlist priority then by "
|
||||
"buffer number, "
|
||||
"\"-~buffer.full_name\" for case insensitive and reverse "
|
||||
"sort on buffer full name"),
|
||||
NULL, 0, 0, "-priority,time,time_usec", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_hotlist_sort, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
@@ -3788,13 +3913,6 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL,
|
||||
&config_change_mouse, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_look_mouse_timer_delay = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"mouse_timer_delay", "integer",
|
||||
N_("delay (in milliseconds) to grab a mouse event: WeeChat will "
|
||||
"wait this delay before processing event"),
|
||||
NULL, 1, 10000, "100", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_look_nick_color_force = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_look,
|
||||
"nick_color_force", "string",
|
||||
@@ -4809,6 +4927,14 @@ config_weechat_init_options ()
|
||||
NULL, NULL, NULL,
|
||||
&config_change_color, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_color_status_modes = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_color,
|
||||
"status_modes", "color",
|
||||
N_("text color for buffer modes in status bar"),
|
||||
NULL, -1, 0, "default", NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
&config_change_color, NULL, NULL,
|
||||
NULL, NULL, NULL);
|
||||
config_color_status_more = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_color,
|
||||
"status_more", "color",
|
||||
@@ -4895,6 +5021,12 @@ config_weechat_init_options ()
|
||||
"otherwise the base word ends at first space after cursor"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_completion_case_sensitive = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_completion,
|
||||
"case_sensitive", "boolean",
|
||||
N_("if enabled, the completion is case sensitive by default"),
|
||||
NULL, 0, 0, "on", NULL, 0,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
config_completion_command_inline = config_file_new_option (
|
||||
weechat_config_file, weechat_config_section_completion,
|
||||
"command_inline", "boolean",
|
||||
@@ -5473,4 +5605,11 @@ config_weechat_free ()
|
||||
hashtable_free (config_hashtable_completion_partial_templates);
|
||||
config_hashtable_completion_partial_templates = NULL;
|
||||
}
|
||||
|
||||
if (config_hotlist_sort_fields)
|
||||
{
|
||||
string_free_split (config_hotlist_sort_fields);
|
||||
config_hotlist_sort_fields = NULL;
|
||||
config_num_hotlist_sort_fields = 0;
|
||||
}
|
||||
}
|
||||
@@ -24,14 +24,14 @@
|
||||
#include <regex.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include "wee-config-file.h"
|
||||
#include "core-config-file.h"
|
||||
|
||||
struct t_gui_buffer;
|
||||
|
||||
#define WEECHAT_CONFIG_NAME "weechat"
|
||||
#define WEECHAT_CONFIG_PRIO_NAME "110000|weechat"
|
||||
|
||||
#define WEECHAT_CONFIG_VERSION 2
|
||||
#define WEECHAT_CONFIG_VERSION 3
|
||||
|
||||
#define TAB_MAX_WIDTH 64
|
||||
|
||||
@@ -190,6 +190,7 @@ extern struct t_config_option *config_look_color_pairs_auto_reset;
|
||||
extern struct t_config_option *config_look_color_real_white;
|
||||
extern struct t_config_option *config_look_command_chars;
|
||||
extern struct t_config_option *config_look_command_incomplete;
|
||||
extern struct t_config_option *config_look_config_permissions;
|
||||
extern struct t_config_option *config_look_confirm_quit;
|
||||
extern struct t_config_option *config_look_confirm_upgrade;
|
||||
extern struct t_config_option *config_look_day_change;
|
||||
@@ -199,6 +200,7 @@ extern struct t_config_option *config_look_eat_newline_glitch;
|
||||
extern struct t_config_option *config_look_emphasized_attributes;
|
||||
extern struct t_config_option *config_look_highlight;
|
||||
extern struct t_config_option *config_look_highlight_disable_regex;
|
||||
extern struct t_config_option *config_look_highlight_prefix;
|
||||
extern struct t_config_option *config_look_highlight_regex;
|
||||
extern struct t_config_option *config_look_highlight_tags;
|
||||
extern struct t_config_option *config_look_hotlist_add_conditions;
|
||||
@@ -232,7 +234,6 @@ extern struct t_config_option *config_look_jump_smart_back_to_buffer;
|
||||
extern struct t_config_option *config_look_key_bind_safe;
|
||||
extern struct t_config_option *config_look_key_grab_delay;
|
||||
extern struct t_config_option *config_look_mouse;
|
||||
extern struct t_config_option *config_look_mouse_timer_delay;
|
||||
extern struct t_config_option *config_look_nick_color_force;
|
||||
extern struct t_config_option *config_look_nick_color_hash;
|
||||
extern struct t_config_option *config_look_nick_color_hash_salt;
|
||||
@@ -337,6 +338,7 @@ extern struct t_config_option *config_color_status_data_msg;
|
||||
extern struct t_config_option *config_color_status_data_other;
|
||||
extern struct t_config_option *config_color_status_data_private;
|
||||
extern struct t_config_option *config_color_status_filter;
|
||||
extern struct t_config_option *config_color_status_modes;
|
||||
extern struct t_config_option *config_color_status_more;
|
||||
extern struct t_config_option *config_color_status_mouse;
|
||||
extern struct t_config_option *config_color_status_name;
|
||||
@@ -346,6 +348,7 @@ extern struct t_config_option *config_color_status_number;
|
||||
extern struct t_config_option *config_color_status_time;
|
||||
|
||||
extern struct t_config_option *config_completion_base_word_until_cursor;
|
||||
extern struct t_config_option *config_completion_case_sensitive;
|
||||
extern struct t_config_option *config_completion_command_inline;
|
||||
extern struct t_config_option *config_completion_default_template;
|
||||
extern struct t_config_option *config_completion_nick_add_space;
|
||||
@@ -405,6 +408,8 @@ extern char **config_eval_syntax_colors;
|
||||
extern int config_num_eval_syntax_colors;
|
||||
extern char *config_buffer_time_same_evaluated;
|
||||
extern struct t_hashtable *config_hashtable_completion_partial_templates;
|
||||
extern char **config_hotlist_sort_fields;
|
||||
extern int config_num_hotlist_sort_fields;
|
||||
|
||||
extern void config_set_nick_colors ();
|
||||
extern struct t_config_option *config_weechat_debug_get (const char *plugin_name);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-crypto.c - cryptographic functions
|
||||
* core-crypto.c - cryptographic functions
|
||||
*
|
||||
* Copyright (C) 2018-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -32,10 +32,10 @@
|
||||
#include <gcrypt.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-crypto.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-string.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
char *weecrypto_hash_algo_string[] = {
|
||||
@@ -285,7 +285,6 @@ weecrypto_hash_file (const char *filename, int hash_algo,
|
||||
void *hash, int *hash_size)
|
||||
{
|
||||
gcry_md_hd_t *hd_md;
|
||||
struct stat st;
|
||||
FILE *file;
|
||||
size_t num_read;
|
||||
int rc, hd_md_opened, algo_size;
|
||||
@@ -306,9 +305,6 @@ weecrypto_hash_file (const char *filename, int hash_algo,
|
||||
if (!filename || !filename[0] || !hash)
|
||||
goto hash_end;
|
||||
|
||||
if (stat (filename, &st) == -1)
|
||||
goto hash_end;
|
||||
|
||||
file = fopen (filename, "r");
|
||||
if (!file)
|
||||
goto hash_end;
|
||||
@@ -614,10 +610,8 @@ weecrypto_totp_generate (const char *secret_base32, time_t totp_time,
|
||||
return result;
|
||||
|
||||
error:
|
||||
if (secret)
|
||||
free (secret);
|
||||
if (result)
|
||||
free (result);
|
||||
free (secret);
|
||||
free (result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -680,7 +674,6 @@ weecrypto_totp_validate (const char *secret_base32, time_t totp_time,
|
||||
return otp_ok;
|
||||
|
||||
error:
|
||||
if (secret)
|
||||
free (secret);
|
||||
free (secret);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-debug.c - debug functions
|
||||
* core-debug.c - debug functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -36,22 +36,25 @@
|
||||
#ifdef HAVE_ZSTD
|
||||
#include <zstd.h>
|
||||
#endif
|
||||
#ifdef HAVE_CJSON
|
||||
#include <cjson/cJSON.h>
|
||||
#endif
|
||||
|
||||
#include <gnutls/gnutls.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-backtrace.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "wee-util.h"
|
||||
#include "core-backtrace.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-list.h"
|
||||
#include "core-log.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-string.h"
|
||||
#include "core-utf8.h"
|
||||
#include "core-util.h"
|
||||
#include "../gui/gui-bar.h"
|
||||
#include "../gui/gui-bar-item.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
@@ -169,7 +172,7 @@ debug_sigsegv_cb ()
|
||||
string_fprintf (stderr,
|
||||
"*** Full crash dump was saved to %s/weechat.log file."
|
||||
"\n",
|
||||
weechat_data_dir);
|
||||
weechat_state_dir);
|
||||
}
|
||||
string_fprintf (
|
||||
stderr,
|
||||
@@ -208,17 +211,26 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent)
|
||||
/* leaf */
|
||||
snprintf (format,
|
||||
sizeof (format),
|
||||
"%%-%dsleaf: 0x%%lx, parent:0x%%lx, child1=0x%%lx, "
|
||||
"child2=0x%%lx, win=0x%%lx (%%d,%%d %%dx%%d"
|
||||
" %%d%%%%x%%d%%%%)",
|
||||
"%%-%dsleaf: "
|
||||
"%%p, "
|
||||
"parent:%%p, "
|
||||
"child1=%%p, "
|
||||
"child2=%%p, "
|
||||
"win=%%p "
|
||||
"(%%d,%%d %%dx%%d %%d%%%%x%%d%%%%)",
|
||||
indent * 2);
|
||||
gui_chat_printf (NULL,
|
||||
format,
|
||||
" ", tree, tree->parent_node,
|
||||
tree->child1, tree->child2,
|
||||
" ",
|
||||
tree,
|
||||
tree->parent_node,
|
||||
tree->child1,
|
||||
tree->child2,
|
||||
tree->window,
|
||||
tree->window->win_x, tree->window->win_y,
|
||||
tree->window->win_width, tree->window->win_height,
|
||||
tree->window->win_x,
|
||||
tree->window->win_y,
|
||||
tree->window->win_width,
|
||||
tree->window->win_height,
|
||||
tree->window->win_width_pct,
|
||||
tree->window->win_height_pct);
|
||||
}
|
||||
@@ -227,14 +239,23 @@ debug_windows_tree_display (struct t_gui_window_tree *tree, int indent)
|
||||
/* node */
|
||||
snprintf (format,
|
||||
sizeof (format),
|
||||
"%%-%dsnode: 0x%%lx, parent:0x%%lx, pct:%%d, "
|
||||
"horizontal:%%d, child1=0x%%lx, child2=0x%%lx",
|
||||
"%%-%dsnode: "
|
||||
"0x%%lx, "
|
||||
"parent:%%p, "
|
||||
"pct:%%d, "
|
||||
"horizontal:%%d, "
|
||||
"child1=%%p, "
|
||||
"child2=%%p",
|
||||
indent * 2);
|
||||
gui_chat_printf (NULL,
|
||||
format,
|
||||
" ", tree, tree->parent_node, tree->split_pct,
|
||||
" ",
|
||||
tree,
|
||||
tree->parent_node,
|
||||
tree->split_pct,
|
||||
tree->split_horizontal,
|
||||
tree->child1, tree->child2);
|
||||
tree->child1,
|
||||
tree->child2);
|
||||
}
|
||||
|
||||
if (tree->child1)
|
||||
@@ -343,7 +364,7 @@ debug_hdata_hash_list_map_cb (void *data,
|
||||
(void) hashtable;
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
" list: %s -> 0x%lx",
|
||||
" list: %s -> %p",
|
||||
(char *)key,
|
||||
*((void **)value));
|
||||
}
|
||||
@@ -369,8 +390,9 @@ debug_hdata_map_cb (void *data,
|
||||
ptr_hdata = (struct t_hdata *)value;
|
||||
|
||||
gui_chat_printf (NULL,
|
||||
" hdata 0x%lx: \"%s\", %d vars, %d lists:",
|
||||
ptr_hdata, (const char *)key,
|
||||
" hdata %p: \"%s\", %d vars, %d lists:",
|
||||
ptr_hdata,
|
||||
(const char *)key,
|
||||
ptr_hdata->hash_var->items_count,
|
||||
ptr_hdata->hash_list->items_count);
|
||||
|
||||
@@ -608,12 +630,14 @@ debug_infolists ()
|
||||
case INFOLIST_TIME:
|
||||
size_data += sizeof (time_t);
|
||||
break;
|
||||
case INFOLIST_NUM_TYPES:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gui_chat_printf (NULL,
|
||||
"%4d: infolist 0x%lx: %d items, %d vars - "
|
||||
"%4d: infolist %p: %d items, %d vars - "
|
||||
"structs: %d, data: %d (total: %d bytes)",
|
||||
i + 1, ptr_infolist, count_items, count_vars,
|
||||
size_structs, size_data, size_structs + size_data);
|
||||
@@ -702,6 +726,16 @@ debug_libs_cb (const void *pointer, void *data,
|
||||
gui_chat_printf (NULL, " zstd: %s", _("not available"));
|
||||
#endif /* HAVE_ZSTD */
|
||||
|
||||
/* display cJSON version */
|
||||
#ifdef HAVE_CJSON
|
||||
gui_chat_printf (NULL, " cJSON: %d.%d.%d",
|
||||
CJSON_VERSION_MAJOR,
|
||||
CJSON_VERSION_MINOR,
|
||||
CJSON_VERSION_PATCH);
|
||||
#else
|
||||
gui_chat_printf (NULL, " cJSON: %s", _("not available"));
|
||||
#endif /* HAVE_CJSON */
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
@@ -731,6 +765,7 @@ debug_directories ()
|
||||
gui_chat_printf (NULL, " home:");
|
||||
gui_chat_printf (NULL, " config: %s%s", weechat_config_dir, str_temp);
|
||||
gui_chat_printf (NULL, " data: %s%s", weechat_data_dir, str_temp);
|
||||
gui_chat_printf (NULL, " state: %s%s", weechat_state_dir, str_temp);
|
||||
gui_chat_printf (NULL, " cache: %s%s", weechat_cache_dir, str_temp);
|
||||
gui_chat_printf (NULL, " runtime: %s%s", weechat_runtime_dir, str_temp);
|
||||
gui_chat_printf (NULL, " lib: %s", WEECHAT_LIBDIR);
|
||||
@@ -773,8 +808,7 @@ debug_display_time_elapsed (struct timeval *time1, struct timeval *time2,
|
||||
(str_diff) ? str_diff : "?");
|
||||
}
|
||||
|
||||
if (str_diff)
|
||||
free (str_diff);
|
||||
free (str_diff);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-dir.c - directory/file functions
|
||||
* core-dir.c - directory/file functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -50,8 +50,8 @@
|
||||
#endif
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-config.h"
|
||||
#include "core-string.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -108,7 +108,7 @@ dir_get_temp_dir ()
|
||||
int
|
||||
dir_mkdir_home (const char *directory, int mode)
|
||||
{
|
||||
char *dir, *dir1, *dir2, *dir3, *dir4;
|
||||
char *dir, *dir1, *dir2, *dir3, *dir4, *dir5;
|
||||
int rc, dir_length;
|
||||
|
||||
rc = 0;
|
||||
@@ -117,6 +117,7 @@ dir_mkdir_home (const char *directory, int mode)
|
||||
dir2 = NULL;
|
||||
dir3 = NULL;
|
||||
dir4 = NULL;
|
||||
dir5 = NULL;
|
||||
|
||||
if (!directory)
|
||||
goto end;
|
||||
@@ -143,16 +144,20 @@ dir_mkdir_home (const char *directory, int mode)
|
||||
if (!dir2)
|
||||
goto end;
|
||||
|
||||
dir3 = string_replace (dir2, "${weechat_cache_dir}", weechat_cache_dir);
|
||||
dir3 = string_replace (dir2, "${weechat_state_dir}", weechat_state_dir);
|
||||
if (!dir3)
|
||||
goto end;
|
||||
|
||||
dir4 = string_replace (dir3, "${weechat_runtime_dir}", weechat_runtime_dir);
|
||||
dir4 = string_replace (dir3, "${weechat_cache_dir}", weechat_cache_dir);
|
||||
if (!dir4)
|
||||
goto end;
|
||||
|
||||
dir5 = string_replace (dir4, "${weechat_runtime_dir}", weechat_runtime_dir);
|
||||
if (!dir5)
|
||||
goto end;
|
||||
|
||||
/* build directory, adding WeeChat home */
|
||||
if (mkdir (dir4, mode) < 0)
|
||||
if (mkdir (dir5, mode) < 0)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
goto end;
|
||||
@@ -161,16 +166,12 @@ dir_mkdir_home (const char *directory, int mode)
|
||||
rc = 1;
|
||||
|
||||
end:
|
||||
if (dir)
|
||||
free (dir);
|
||||
if (dir1)
|
||||
free (dir1);
|
||||
if (dir2)
|
||||
free (dir2);
|
||||
if (dir3)
|
||||
free (dir3);
|
||||
if (dir4)
|
||||
free (dir4);
|
||||
free (dir);
|
||||
free (dir1);
|
||||
free (dir2);
|
||||
free (dir3);
|
||||
free (dir4);
|
||||
free (dir5);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -331,21 +332,37 @@ dir_set_home_path (char *path)
|
||||
{
|
||||
weechat_config_dir = string_expand_home (paths[0]);
|
||||
weechat_data_dir = string_expand_home (paths[0]);
|
||||
weechat_state_dir = string_expand_home (paths[0]);
|
||||
weechat_cache_dir = string_expand_home (paths[0]);
|
||||
weechat_runtime_dir = string_expand_home (paths[0]);
|
||||
}
|
||||
else if (num_paths == 4)
|
||||
{
|
||||
/* compatibility with versions between 3.2 and 4.2.x */
|
||||
weechat_config_dir = string_expand_home (paths[0]);
|
||||
weechat_data_dir = string_expand_home (paths[1]);
|
||||
/* state dir = data dir by default */
|
||||
weechat_state_dir = string_expand_home (paths[1]);
|
||||
weechat_cache_dir = string_expand_home (paths[2]);
|
||||
weechat_runtime_dir = string_expand_home (paths[3]);
|
||||
}
|
||||
else if (num_paths == 5)
|
||||
{
|
||||
weechat_config_dir = string_expand_home (paths[0]);
|
||||
weechat_data_dir = string_expand_home (paths[1]);
|
||||
weechat_state_dir = string_expand_home (paths[2]);
|
||||
weechat_cache_dir = string_expand_home (paths[3]);
|
||||
weechat_runtime_dir = string_expand_home (paths[4]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* value of 4 is not mentioned in the message because it's kept only
|
||||
* for compatibility with old releases, it should not be used any more
|
||||
*/
|
||||
string_fprintf (stderr,
|
||||
_("Error: wrong number of paths for home directories "
|
||||
"(expected: 1 or 4, received: %d)\n"),
|
||||
"(expected: 1 or 5, received: %d)\n"),
|
||||
num_paths);
|
||||
goto end;
|
||||
}
|
||||
@@ -353,8 +370,7 @@ dir_set_home_path (char *path)
|
||||
rc = 1;
|
||||
|
||||
end:
|
||||
if (paths)
|
||||
string_free_split (paths);
|
||||
string_free_split (paths);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -402,6 +418,7 @@ dir_create_home_temp_dir ()
|
||||
|
||||
weechat_config_dir = strdup (ptr_weechat_home);
|
||||
weechat_data_dir = strdup (ptr_weechat_home);
|
||||
weechat_state_dir = strdup (ptr_weechat_home);
|
||||
weechat_cache_dir = strdup (ptr_weechat_home);
|
||||
weechat_runtime_dir = strdup (ptr_weechat_home);
|
||||
|
||||
@@ -414,10 +431,8 @@ memory_error:
|
||||
string_fprintf (stderr, _("Error: not enough memory\n"));
|
||||
|
||||
end:
|
||||
if (temp_dir)
|
||||
free (temp_dir);
|
||||
if (temp_home_template)
|
||||
free (temp_home_template);
|
||||
free (temp_dir);
|
||||
free (temp_home_template);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -430,14 +445,16 @@ end:
|
||||
*/
|
||||
|
||||
int
|
||||
dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
char **runtime_dir)
|
||||
dir_find_xdg_dirs (char **config_dir, char **data_dir, char **state_dir,
|
||||
char **cache_dir, char **runtime_dir)
|
||||
{
|
||||
char *ptr_home, path[PATH_MAX];
|
||||
char *xdg_config_home, *xdg_data_home, *xdg_cache_home, *xdg_runtime_dir;
|
||||
char *xdg_config_home, *xdg_data_home, *xdg_state_home, *xdg_cache_home;
|
||||
char *xdg_runtime_dir;
|
||||
|
||||
*config_dir = NULL;
|
||||
*data_dir = NULL;
|
||||
*state_dir = NULL;
|
||||
*cache_dir = NULL;
|
||||
*runtime_dir = NULL;
|
||||
|
||||
@@ -447,6 +464,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
|
||||
xdg_config_home = getenv ("XDG_CONFIG_HOME");
|
||||
xdg_data_home = getenv ("XDG_DATA_HOME");
|
||||
xdg_state_home = getenv ("XDG_STATE_HOME");
|
||||
xdg_cache_home = getenv ("XDG_CACHE_HOME");
|
||||
xdg_runtime_dir = getenv ("XDG_RUNTIME_DIR");
|
||||
|
||||
@@ -485,6 +503,24 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
|
||||
if (!*data_dir)
|
||||
goto error_memory;
|
||||
|
||||
/* set state dir: $XDG_STATE_HOME/weechat or $HOME/.local/state/weechat */
|
||||
if (xdg_state_home && xdg_state_home[0])
|
||||
{
|
||||
snprintf (path, sizeof (path),
|
||||
"%s%s%s",
|
||||
xdg_state_home, DIR_SEPARATOR, "weechat");
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (path, sizeof (path),
|
||||
"%s%s%s%s%s%s%s",
|
||||
ptr_home, DIR_SEPARATOR, ".local", DIR_SEPARATOR, "state",
|
||||
DIR_SEPARATOR, "weechat");
|
||||
}
|
||||
*state_dir = strdup (path);
|
||||
if (!*state_dir)
|
||||
goto error_memory;
|
||||
|
||||
/* set cache dir: $XDG_CACHE_HOME/weechat or $HOME/.cache/weechat */
|
||||
if (xdg_cache_home && xdg_cache_home[0])
|
||||
{
|
||||
@@ -539,6 +575,11 @@ error:
|
||||
free (*data_dir);
|
||||
*data_dir = NULL;
|
||||
}
|
||||
if (*state_dir)
|
||||
{
|
||||
free (*state_dir);
|
||||
*state_dir = NULL;
|
||||
}
|
||||
if (*cache_dir)
|
||||
{
|
||||
free (*cache_dir);
|
||||
@@ -565,7 +606,7 @@ int
|
||||
dir_find_home_dirs ()
|
||||
{
|
||||
char *ptr_home, *ptr_weechat_home, *config_weechat_home;
|
||||
char *config_dir, *data_dir, *cache_dir, *runtime_dir;
|
||||
char *config_dir, *data_dir, *state_dir, *cache_dir, *runtime_dir;
|
||||
char path[PATH_MAX];
|
||||
|
||||
/* temporary WeeChat home */
|
||||
@@ -586,7 +627,8 @@ dir_find_home_dirs ()
|
||||
if (config_weechat_home[0])
|
||||
return dir_set_home_path (config_weechat_home);
|
||||
|
||||
if (!dir_find_xdg_dirs (&config_dir, &data_dir, &cache_dir, &runtime_dir))
|
||||
if (!dir_find_xdg_dirs (&config_dir, &data_dir, &state_dir, &cache_dir,
|
||||
&runtime_dir))
|
||||
return 0;
|
||||
|
||||
/* check if {weechat_config_dir}/weechat.conf exists */
|
||||
@@ -611,10 +653,12 @@ dir_find_home_dirs ()
|
||||
ptr_home, DIR_SEPARATOR, ".weechat");
|
||||
weechat_config_dir = strdup (path);
|
||||
weechat_data_dir = strdup (path);
|
||||
weechat_state_dir = strdup (path);
|
||||
weechat_cache_dir = strdup (path);
|
||||
weechat_runtime_dir = strdup (path);
|
||||
free (config_dir);
|
||||
free (data_dir);
|
||||
free (state_dir);
|
||||
free (cache_dir);
|
||||
free (runtime_dir);
|
||||
return 1;
|
||||
@@ -624,11 +668,35 @@ dir_find_home_dirs ()
|
||||
use_xdg:
|
||||
weechat_config_dir = config_dir;
|
||||
weechat_data_dir = data_dir;
|
||||
weechat_state_dir = state_dir;
|
||||
weechat_cache_dir = cache_dir;
|
||||
weechat_runtime_dir = runtime_dir;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes trailing separators in path, which is modified in place
|
||||
* (each trailing separator is replaced by NUL char).
|
||||
*
|
||||
* Example on Linux: "/home/xxx/" => "/home/xxx".
|
||||
*/
|
||||
|
||||
void
|
||||
dir_remove_trailing_separators (char *path)
|
||||
{
|
||||
int length;
|
||||
|
||||
if (!path || !path[0])
|
||||
return;
|
||||
|
||||
length = strlen (path);
|
||||
while ((length > 1) && (path[length - 1] == DIR_SEPARATOR_CHAR))
|
||||
{
|
||||
path[length - 1] = '\0';
|
||||
length--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Creates a home directory.
|
||||
*
|
||||
@@ -681,9 +749,17 @@ dir_create_home_dirs ()
|
||||
if (!dir_find_home_dirs ())
|
||||
goto error;
|
||||
|
||||
dir_remove_trailing_separators (weechat_config_dir);
|
||||
dir_remove_trailing_separators (weechat_data_dir);
|
||||
dir_remove_trailing_separators (weechat_state_dir);
|
||||
dir_remove_trailing_separators (weechat_cache_dir);
|
||||
dir_remove_trailing_separators (weechat_runtime_dir);
|
||||
|
||||
rc = dir_create_home_dir (weechat_config_dir);
|
||||
if (rc && (strcmp (weechat_config_dir, weechat_data_dir) != 0))
|
||||
rc = dir_create_home_dir (weechat_data_dir);
|
||||
if (rc && (strcmp (weechat_config_dir, weechat_state_dir) != 0))
|
||||
rc = dir_create_home_dir (weechat_state_dir);
|
||||
if (rc && (strcmp (weechat_config_dir, weechat_cache_dir) != 0))
|
||||
rc = dir_create_home_dir (weechat_cache_dir);
|
||||
if (rc && (strcmp (weechat_config_dir, weechat_runtime_dir) != 0))
|
||||
@@ -705,6 +781,8 @@ dir_remove_home_dirs ()
|
||||
dir_rmtree (weechat_config_dir);
|
||||
if (strcmp (weechat_config_dir, weechat_data_dir) != 0)
|
||||
dir_rmtree (weechat_data_dir);
|
||||
if (strcmp (weechat_config_dir, weechat_state_dir) != 0)
|
||||
dir_rmtree (weechat_state_dir);
|
||||
if (strcmp (weechat_config_dir, weechat_cache_dir) != 0)
|
||||
dir_rmtree (weechat_cache_dir);
|
||||
if (strcmp (weechat_config_dir, weechat_runtime_dir) != 0)
|
||||
@@ -713,11 +791,12 @@ dir_remove_home_dirs ()
|
||||
|
||||
/*
|
||||
* Returns a string with home directories separated by colons, in this order:
|
||||
* config_dir, data_dir, cache_dir, runtime_dir.
|
||||
* config_dir, data_dir, state_dir, cache_dir, runtime_dir.
|
||||
*
|
||||
* Example of value returned:
|
||||
* /home/user/.config/weechat:/home/user/.local/share/weechat:
|
||||
* /home/user/.cache/weechat:/run/user/1000/weechat
|
||||
* /home/user/.local/state/weechat:/home/user/.cache/weechat:
|
||||
* /run/user/1000/weechat
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
@@ -725,13 +804,14 @@ dir_remove_home_dirs ()
|
||||
char *
|
||||
dir_get_string_home_dirs ()
|
||||
{
|
||||
char *dirs[5];
|
||||
char *dirs[6];
|
||||
|
||||
dirs[0] = weechat_config_dir;
|
||||
dirs[1] = weechat_data_dir;
|
||||
dirs[2] = weechat_cache_dir;
|
||||
dirs[3] = weechat_runtime_dir;
|
||||
dirs[4] = NULL;
|
||||
dirs[2] = weechat_state_dir;
|
||||
dirs[3] = weechat_cache_dir;
|
||||
dirs[4] = weechat_runtime_dir;
|
||||
dirs[5] = NULL;
|
||||
|
||||
return string_rebuild_split_string ((const char **)dirs, ":", 0, -1);
|
||||
}
|
||||
@@ -957,8 +1037,7 @@ dir_file_get_content (const char *filename)
|
||||
return buffer;
|
||||
|
||||
error:
|
||||
if (buffer)
|
||||
free (buffer);
|
||||
free (buffer);
|
||||
if (f)
|
||||
fclose (f);
|
||||
return NULL;
|
||||
@@ -1011,8 +1090,7 @@ dir_file_copy (const char *from, const char *to)
|
||||
rc = 1;
|
||||
|
||||
end:
|
||||
if (buffer)
|
||||
free (buffer);
|
||||
free (buffer);
|
||||
if (src)
|
||||
fclose (src);
|
||||
if (dst)
|
||||
@@ -1052,9 +1130,6 @@ dir_file_compress_gzip (const char *from, const char *to,
|
||||
if (!from || !to || (compression_level < 1) || (compression_level > 9))
|
||||
goto end;
|
||||
|
||||
if (access (to, F_OK) == 0)
|
||||
goto end;
|
||||
|
||||
buffer_in = malloc (buffer_size);
|
||||
if (!buffer_in)
|
||||
goto end;
|
||||
@@ -1065,7 +1140,7 @@ dir_file_compress_gzip (const char *from, const char *to,
|
||||
source = fopen (from, "rb");
|
||||
if (!source)
|
||||
goto end;
|
||||
dest = fopen (to, "wb");
|
||||
dest = fopen (to, "wbx");
|
||||
if (!dest)
|
||||
goto end;
|
||||
|
||||
@@ -1120,15 +1195,12 @@ error:
|
||||
unlink (to);
|
||||
|
||||
end:
|
||||
if (buffer_in)
|
||||
free (buffer_in);
|
||||
if (buffer_out)
|
||||
free (buffer_out);
|
||||
free (buffer_in);
|
||||
free (buffer_out);
|
||||
if (source)
|
||||
fclose (source);
|
||||
if (dest)
|
||||
fclose (dest);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1173,9 +1245,6 @@ dir_file_compress_zstd (const char *from, const char *to,
|
||||
if (!from || !to || (compression_level < 1) || (compression_level > 19))
|
||||
goto end;
|
||||
|
||||
if (access (to, F_OK) == 0)
|
||||
goto end;
|
||||
|
||||
buffer_in_size = ZSTD_CStreamInSize ();
|
||||
buffer_in = malloc (buffer_in_size);
|
||||
if (!buffer_in)
|
||||
@@ -1188,7 +1257,7 @@ dir_file_compress_zstd (const char *from, const char *to,
|
||||
source = fopen (from, "rb");
|
||||
if (!source)
|
||||
goto end;
|
||||
dest = fopen (to, "wb");
|
||||
dest = fopen (to, "wbx");
|
||||
if (!dest)
|
||||
goto end;
|
||||
|
||||
@@ -1301,10 +1370,8 @@ end:
|
||||
ZSTD_freeCStream (cstream);
|
||||
#endif
|
||||
|
||||
if (buffer_in)
|
||||
free (buffer_in);
|
||||
if (buffer_out)
|
||||
free (buffer_out);
|
||||
free (buffer_in);
|
||||
free (buffer_out);
|
||||
if (source)
|
||||
fclose (source);
|
||||
if (dest)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-doc.c - documentation generator
|
||||
* core-doc.c - documentation generator
|
||||
*
|
||||
* Copyright (C) 2023-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,24 +27,23 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <gcrypt.h>
|
||||
#include <regex.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-arraylist.h"
|
||||
#include "wee-command.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-dir.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-url.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "core-arraylist.h"
|
||||
#include "core-command.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-crypto.h"
|
||||
#include "core-dir.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-string.h"
|
||||
#include "core-url.h"
|
||||
#include "core-utf8.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
#define ESCAPE_TABLE(msg) (doc_gen_escape_table (msg))
|
||||
@@ -67,12 +66,8 @@ char *
|
||||
doc_gen_escape_table (const char *message)
|
||||
{
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
if (string_escaped[index_string_escaped])
|
||||
free (string_escaped[index_string_escaped]);
|
||||
|
||||
free (string_escaped[index_string_escaped]);
|
||||
string_escaped[index_string_escaped] = string_replace (message, "|", "\\|");
|
||||
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
@@ -89,15 +84,10 @@ doc_gen_escape_anchor_link (const char *message)
|
||||
return NULL;
|
||||
|
||||
index_string_escaped = (index_string_escaped + 1) % 32;
|
||||
|
||||
if (string_escaped[index_string_escaped])
|
||||
free (string_escaped[index_string_escaped]);
|
||||
|
||||
free (string_escaped[index_string_escaped]);
|
||||
string_escaped[index_string_escaped] = string_replace_regex (
|
||||
message, ®ex, "-", '$', NULL, NULL);
|
||||
|
||||
regfree (®ex);
|
||||
|
||||
return string_escaped[index_string_escaped];
|
||||
}
|
||||
|
||||
@@ -191,26 +181,14 @@ doc_gen_close_file (const char *path, const char *doc, const char *name,
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if a command must be documented or not.
|
||||
*
|
||||
* All commands whose name == plugin name are documented, and all commands for
|
||||
* these plugins are documented as well:
|
||||
* - weechat (core)
|
||||
* - irc
|
||||
* - xfer
|
||||
* Checks if a command must be documented or not: all commands are documented
|
||||
* except the default aliases (that create commands).
|
||||
*/
|
||||
|
||||
int
|
||||
doc_gen_check_command (const char *plugin, const char *command)
|
||||
{
|
||||
/* command name is the same as plugin: to document! */
|
||||
if (strcmp (plugin, command) == 0)
|
||||
return 1;
|
||||
|
||||
/* document other options only for weechat, irc, xfer */
|
||||
return ((strcmp (plugin, "weechat") == 0)
|
||||
|| (strcmp (plugin, "irc") == 0)
|
||||
|| (strcmp (plugin, "xfer") == 0)) ?
|
||||
return ((strcmp (plugin, "alias") != 0) || (strcmp (plugin, command) == 0)) ?
|
||||
1 : 0;
|
||||
}
|
||||
|
||||
@@ -579,8 +557,7 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
if (ptr_option->type == CONFIG_OPTION_TYPE_STRING)
|
||||
{
|
||||
tmp = string_replace (default_value, "\"", "\\\"");
|
||||
if (default_value)
|
||||
free (default_value);
|
||||
free (default_value);
|
||||
default_value = tmp;
|
||||
}
|
||||
string_fprintf (
|
||||
@@ -590,12 +567,9 @@ doc_gen_user_options (const char *path, const char *lang)
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "",
|
||||
default_value,
|
||||
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "");
|
||||
if (desc_escaped)
|
||||
free (desc_escaped);
|
||||
if (values)
|
||||
free (values);
|
||||
if (default_value)
|
||||
free (default_value);
|
||||
free (desc_escaped);
|
||||
free (values);
|
||||
free (default_value);
|
||||
}
|
||||
|
||||
if (old_config)
|
||||
@@ -1398,8 +1372,7 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
"| %s | %s |",
|
||||
ESCAPE_TABLE(name),
|
||||
ESCAPE_TABLE(url_type_string[url_options[i].type]));
|
||||
if (name)
|
||||
free (name);
|
||||
free (name);
|
||||
if (url_options[i].constants)
|
||||
{
|
||||
for (j = 0; url_options[i].constants[j].name; j++)
|
||||
@@ -1408,8 +1381,7 @@ doc_gen_api_url_options (const char *path, const char *lang)
|
||||
string_fprintf (file, ",");
|
||||
constant = string_tolower (url_options[i].constants[j].name);
|
||||
string_fprintf (file, " %s", constant);
|
||||
if (constant)
|
||||
free (constant);
|
||||
free (constant);
|
||||
}
|
||||
}
|
||||
string_fprintf (file, "\n");
|
||||
@@ -1594,6 +1566,101 @@ doc_gen_api_config_priority (const char *path, const char *lang)
|
||||
return doc_gen_close_file (path, "api", "config_priority", lang, file);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generates files with scripting API functions.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK, target file updated
|
||||
* 0: OK, target file unchanged
|
||||
* -1: error
|
||||
*/
|
||||
|
||||
int
|
||||
doc_gen_scripting_functions (const char *path, const char *lang)
|
||||
{
|
||||
FILE *file;
|
||||
struct t_infolist *ptr_infolist;
|
||||
|
||||
file = doc_gen_open_file (path, "scripting", "functions", lang);
|
||||
if (!file)
|
||||
return -1;
|
||||
|
||||
string_fprintf (file, "// tag::functions[]\n");
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "python_function", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
{
|
||||
string_fprintf (file, "* %s\n", infolist_string (ptr_infolist, "name"));
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
string_fprintf (file, "// end::functions[]\n");
|
||||
|
||||
return doc_gen_close_file (path, "scripting", "functions", lang, file);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generates files with scripting API constants.
|
||||
*
|
||||
* Returns:
|
||||
* 1: OK, target file updated
|
||||
* 0: OK, target file unchanged
|
||||
* -1: error
|
||||
*/
|
||||
|
||||
int
|
||||
doc_gen_scripting_constants (const char *path, const char *lang)
|
||||
{
|
||||
FILE *file;
|
||||
struct t_infolist *ptr_infolist;
|
||||
const char *ptr_type;
|
||||
|
||||
file = doc_gen_open_file (path, "scripting", "constants", lang);
|
||||
if (!file)
|
||||
return -1;
|
||||
|
||||
string_fprintf (
|
||||
file,
|
||||
"// tag::constants[]\n"
|
||||
"[width=\"60%\",cols=\"8,1,3m\",options=\"header\"]\n"
|
||||
"|===\n"
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE_TABLE(_("Constant")),
|
||||
ESCAPE_TABLE(_("Type")),
|
||||
ESCAPE_TABLE(_("Value")));
|
||||
|
||||
ptr_infolist = hook_infolist_get (NULL, "python_constant", NULL, NULL);
|
||||
while (infolist_next (ptr_infolist))
|
||||
{
|
||||
ptr_type = infolist_string (ptr_infolist, "type");
|
||||
if (!ptr_type)
|
||||
continue;
|
||||
if (strcmp (ptr_type, "integer") == 0)
|
||||
{
|
||||
string_fprintf (file,
|
||||
"| %s | %s | %d\n",
|
||||
ESCAPE_TABLE(infolist_string (ptr_infolist, "name")),
|
||||
ESCAPE_TABLE(_("integer")),
|
||||
infolist_integer (ptr_infolist, "value_integer"));
|
||||
}
|
||||
else if (strcmp (ptr_type, "string") == 0)
|
||||
{
|
||||
string_fprintf (file,
|
||||
"| %s | %s | %s\n",
|
||||
ESCAPE_TABLE(infolist_string (ptr_infolist, "name")),
|
||||
ESCAPE_TABLE(_("string")),
|
||||
ESCAPE_TABLE(infolist_string (ptr_infolist, "value_string")));
|
||||
}
|
||||
}
|
||||
infolist_free (ptr_infolist);
|
||||
|
||||
string_fprintf (file,
|
||||
"|===\n"
|
||||
"// end::constants[]\n");
|
||||
|
||||
return doc_gen_close_file (path, "scripting", "constants", lang, file);
|
||||
}
|
||||
|
||||
/*
|
||||
* Generates WeeChat files used to build documentation.
|
||||
*
|
||||
@@ -1629,9 +1696,14 @@ doc_generate (const char *path)
|
||||
doc_gen_api_url_options,
|
||||
doc_gen_api_plugins_priority,
|
||||
doc_gen_api_config_priority,
|
||||
doc_gen_scripting_functions,
|
||||
doc_gen_scripting_constants,
|
||||
NULL,
|
||||
};
|
||||
char lang[3], *localedir;
|
||||
char lang[3];
|
||||
#ifdef ENABLE_NLS
|
||||
char *localedir;
|
||||
#endif
|
||||
|
||||
rc_doc_gen = 0;
|
||||
num_files = 0;
|
||||
@@ -1702,8 +1774,7 @@ doc_generate (const char *path)
|
||||
end:
|
||||
for (i = 0; i < 32; i++)
|
||||
{
|
||||
if (string_escaped[i])
|
||||
free (string_escaped[i]);
|
||||
free (string_escaped[i]);
|
||||
}
|
||||
return rc_doc_gen;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-eval.c - evaluate expressions with references to internal vars
|
||||
* core-eval.c - evaluate expressions with references to internal vars
|
||||
*
|
||||
* Copyright (C) 2012-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -28,17 +28,19 @@
|
||||
#include <stdarg.h>
|
||||
#include <regex.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-calc.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-calc.h"
|
||||
#include "core-config.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-secure.h"
|
||||
#include "core-string.h"
|
||||
#include "core-utf8.h"
|
||||
#include "core-util.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-color.h"
|
||||
@@ -278,8 +280,7 @@ eval_string_eval_cond (const char *text, struct t_eval_context *eval_context)
|
||||
|
||||
tmp = eval_expression_condition (text, eval_context);
|
||||
rc = eval_is_true (tmp);
|
||||
if (tmp)
|
||||
free (tmp);
|
||||
free (tmp);
|
||||
return strdup ((rc) ? EVAL_STR_TRUE : EVAL_STR_FALSE);
|
||||
}
|
||||
|
||||
@@ -575,8 +576,7 @@ eval_string_split (const char *text)
|
||||
flags |= WEECHAT_STRING_SPLIT_KEEP_EOL;
|
||||
else if (strncmp (list_flags[i], "strip_items=", 12) == 0)
|
||||
{
|
||||
if (strip_items)
|
||||
free (strip_items);
|
||||
free (strip_items);
|
||||
strip_items = strdup (list_flags[i] + 12);
|
||||
}
|
||||
else if (strncmp (list_flags[i], "max_items=", 10) == 0)
|
||||
@@ -623,18 +623,12 @@ eval_string_split (const char *text)
|
||||
value = strdup (items[number]);
|
||||
|
||||
end:
|
||||
if (str_number)
|
||||
free (str_number);
|
||||
if (separators)
|
||||
free (separators);
|
||||
if (str_flags)
|
||||
free (str_flags);
|
||||
if (list_flags)
|
||||
string_free_split (list_flags);
|
||||
if (strip_items)
|
||||
free (strip_items);
|
||||
if (items)
|
||||
string_free_split (items);
|
||||
free (str_number);
|
||||
free (separators);
|
||||
free (str_flags);
|
||||
string_free_split (list_flags);
|
||||
free (strip_items);
|
||||
string_free_split (items);
|
||||
return (value) ? value : strdup ("");
|
||||
}
|
||||
|
||||
@@ -729,10 +723,8 @@ eval_string_split_shell (const char *text)
|
||||
value = strdup (items[number]);
|
||||
|
||||
end:
|
||||
if (str_number)
|
||||
free (str_number);
|
||||
if (items)
|
||||
string_free_split (items);
|
||||
free (str_number);
|
||||
string_free_split (items);
|
||||
return (value) ? value : strdup ("");
|
||||
}
|
||||
|
||||
@@ -836,10 +828,8 @@ eval_string_modifier (const char *text)
|
||||
ptr_string - 1 - ptr_arguments);
|
||||
value = hook_modifier_exec (NULL, modifier_name, modifier_data,
|
||||
ptr_string);
|
||||
if (modifier_name)
|
||||
free (modifier_name);
|
||||
if (modifier_data)
|
||||
free (modifier_data);
|
||||
free (modifier_name);
|
||||
free (modifier_data);
|
||||
|
||||
return (value) ? value : strdup ("");
|
||||
}
|
||||
@@ -888,8 +878,7 @@ char *
|
||||
eval_string_base_encode (const char *text)
|
||||
{
|
||||
const char *ptr_string;
|
||||
char *value, *base, *error, *result;
|
||||
long number;
|
||||
char *value, *base, *result;
|
||||
int length;
|
||||
|
||||
base = NULL;
|
||||
@@ -903,18 +892,13 @@ eval_string_base_encode (const char *text)
|
||||
if (!base)
|
||||
goto end;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (base, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
|
||||
ptr_string++;
|
||||
length = strlen (ptr_string);
|
||||
result = malloc ((length * 4) + 1);
|
||||
if (!result)
|
||||
goto end;
|
||||
|
||||
if (string_base_encode (number, ptr_string, length, result) < 0)
|
||||
if (string_base_encode (base, ptr_string, length, result) < 0)
|
||||
{
|
||||
free (result);
|
||||
result = NULL;
|
||||
@@ -922,10 +906,8 @@ eval_string_base_encode (const char *text)
|
||||
|
||||
end:
|
||||
value = strdup ((result) ? result : "");
|
||||
if (base)
|
||||
free (base);
|
||||
if (result)
|
||||
free (result);
|
||||
free (base);
|
||||
free (result);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -939,8 +921,7 @@ char *
|
||||
eval_string_base_decode (const char *text)
|
||||
{
|
||||
const char *ptr_string;
|
||||
char *value, *base, *error, *result;
|
||||
long number;
|
||||
char *value, *base, *result;
|
||||
|
||||
base = NULL;
|
||||
result = NULL;
|
||||
@@ -953,17 +934,12 @@ eval_string_base_decode (const char *text)
|
||||
if (!base)
|
||||
goto end;
|
||||
|
||||
error = NULL;
|
||||
number = strtol (base, &error, 10);
|
||||
if (!error || error[0])
|
||||
goto end;
|
||||
|
||||
ptr_string++;
|
||||
result = malloc (strlen (ptr_string) + 1);
|
||||
if (!result)
|
||||
goto end;
|
||||
|
||||
if (string_base_decode (number, ptr_string, result) < 0)
|
||||
if (string_base_decode (base, ptr_string, result) < 0)
|
||||
{
|
||||
free (result);
|
||||
result = NULL;
|
||||
@@ -971,10 +947,8 @@ eval_string_base_decode (const char *text)
|
||||
|
||||
end:
|
||||
value = strdup ((result) ? result : "");
|
||||
if (base)
|
||||
free (base);
|
||||
if (result)
|
||||
free (result);
|
||||
free (base);
|
||||
free (result);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -988,19 +962,13 @@ char *
|
||||
eval_string_date (const char *text)
|
||||
{
|
||||
char str_value[512];
|
||||
time_t date;
|
||||
struct tm *date_tmp;
|
||||
struct timeval tv_now;
|
||||
int rc;
|
||||
|
||||
date = time (NULL);
|
||||
date_tmp = localtime (&date);
|
||||
if (!date_tmp)
|
||||
return strdup ("");
|
||||
|
||||
rc = (int) strftime (str_value, sizeof (str_value),
|
||||
(text[0] == ':') ? text + 1 : "%F %T",
|
||||
date_tmp);
|
||||
|
||||
gettimeofday (&tv_now, NULL);
|
||||
rc = util_strftimeval (str_value, sizeof (str_value),
|
||||
(text[0] == ':') ? text + 1 : "%F %T",
|
||||
&tv_now);
|
||||
return strdup ((rc > 0) ? str_value : "");
|
||||
}
|
||||
|
||||
@@ -1029,8 +997,7 @@ eval_string_if (const char *text, struct t_eval_context *eval_context)
|
||||
return strdup ("");
|
||||
tmp = eval_expression_condition (condition, eval_context);
|
||||
rc = eval_is_true (tmp);
|
||||
if (tmp)
|
||||
free (tmp);
|
||||
free (tmp);
|
||||
if (rc)
|
||||
{
|
||||
/*
|
||||
@@ -1182,7 +1149,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
int type, debug_id;
|
||||
struct t_hashtable *hashtable;
|
||||
|
||||
EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", 0x%lx, \"%s\")",
|
||||
EVAL_DEBUG_MSG(1, "eval_hdata_get_value(\"%s\", %p, \"%s\")",
|
||||
(hdata) ? hdata->name : "(null)",
|
||||
pointer,
|
||||
path);
|
||||
@@ -1200,8 +1167,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
/* no path? just return current pointer as string */
|
||||
if (!path || !path[0])
|
||||
{
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)pointer);
|
||||
snprintf (str_value, sizeof (str_value), "%p", pointer);
|
||||
value = strdup (str_value);
|
||||
goto end;
|
||||
}
|
||||
@@ -1246,6 +1212,11 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
"%ld", hdata_long (hdata, pointer, var_name));
|
||||
value = strdup (str_value);
|
||||
break;
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"%lld", hdata_longlong (hdata, pointer, var_name));
|
||||
value = strdup (str_value);
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
case WEECHAT_HDATA_SHARED_STRING:
|
||||
ptr_value = hdata_string (hdata, pointer, var_name);
|
||||
@@ -1253,8 +1224,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
break;
|
||||
case WEECHAT_HDATA_POINTER:
|
||||
pointer = hdata_pointer (hdata, pointer, var_name);
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)pointer);
|
||||
snprintf (str_value, sizeof (str_value), "%p", pointer);
|
||||
value = strdup (str_value);
|
||||
break;
|
||||
case WEECHAT_HDATA_TIME:
|
||||
@@ -1282,8 +1252,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
property = string_strndup (pos + 1,
|
||||
pos_open_paren - pos - 1);
|
||||
ptr_value = hashtable_get_string (hashtable, property);
|
||||
if (property)
|
||||
free (property);
|
||||
free (property);
|
||||
value = (ptr_value) ? strdup (ptr_value) : NULL;
|
||||
break;
|
||||
}
|
||||
@@ -1304,7 +1273,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
case HASHTABLE_POINTER:
|
||||
case HASHTABLE_BUFFER:
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)ptr_value);
|
||||
"%p", ptr_value);
|
||||
value = strdup (str_value);
|
||||
break;
|
||||
case HASHTABLE_TIME:
|
||||
@@ -1319,8 +1288,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)pointer);
|
||||
snprintf (str_value, sizeof (str_value), "%p", pointer);
|
||||
value = strdup (str_value);
|
||||
}
|
||||
break;
|
||||
@@ -1337,8 +1305,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
goto end;
|
||||
|
||||
hdata = hook_hdata_get (NULL, hdata_name);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
value = eval_hdata_get_value (hdata,
|
||||
pointer,
|
||||
pos + 1,
|
||||
@@ -1346,8 +1313,7 @@ eval_hdata_get_value (struct t_hdata *hdata, void *pointer, const char *path,
|
||||
}
|
||||
|
||||
end:
|
||||
if (var_name)
|
||||
free (var_name);
|
||||
free (var_name);
|
||||
|
||||
EVAL_DEBUG_RESULT(1, value);
|
||||
|
||||
@@ -1456,10 +1422,8 @@ eval_string_hdata (const char *text, struct t_eval_context *eval_context)
|
||||
value = eval_hdata_get_value (hdata, pointer, pos_vars, eval_context);
|
||||
|
||||
end:
|
||||
if (hdata_name)
|
||||
free (hdata_name);
|
||||
if (pointer_name)
|
||||
free (pointer_name);
|
||||
free (hdata_name);
|
||||
free (pointer_name);
|
||||
|
||||
return (value) ? value : strdup ("");
|
||||
}
|
||||
@@ -1562,8 +1526,7 @@ eval_syntax_highlight (const char *text, struct t_eval_context *eval_context)
|
||||
|
||||
value = eval_replace_vars (text, eval_context);
|
||||
value2 = eval_syntax_highlight_colorize (value);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
|
||||
eval_context->syntax_highlight--;
|
||||
|
||||
@@ -1572,54 +1535,64 @@ eval_syntax_highlight (const char *text, struct t_eval_context *eval_context)
|
||||
|
||||
/*
|
||||
* Replaces variables, which can be, by order of priority:
|
||||
* - the string itself without evaluation but with syntax highlighting
|
||||
* (format: raw_hl:xxx)
|
||||
* - the string itself without evaluation (format: raw:xxx)
|
||||
* - a string with syntax highlighting (format: hl:xxx)
|
||||
* - a variable from hashtable "user_vars" or "extra_vars"
|
||||
* - a WeeChat home directory, one of: "weechat_config_dir",
|
||||
* "weechat_data_dir", "weechat_cache_dir", "weechat_runtime_dir"
|
||||
* - an evaluated string (format: eval:xxx)
|
||||
* - a condition to evaluate (format: eval_cond:xxx)
|
||||
* - a string with escaped chars (format: esc:xxx or \xxx)
|
||||
* - a string with a range of chars (format: chars:range)
|
||||
* - a string converted to lower case (format: lower:xxx)
|
||||
* - a string converted to upper case (format: upper:xxx)
|
||||
* - a string with chars to hide (format: hide:char,string)
|
||||
* - a string with max chars (format: cut:max,suffix,string or
|
||||
* cut:+max,suffix,string) or max chars on screen
|
||||
* (format: cutscr:max,suffix,string or cutscr:+max,suffix,string)
|
||||
* - a reversed string (format: rev:xxx) or reversed string for screen,
|
||||
* color codes are not reversed (format: revscr:xxx)
|
||||
* - a repeated string (format: repeat:count,string)
|
||||
* - length of a string (format: length:xxx) or length of a string on screen
|
||||
* (format: lengthscr:xxx); color codes are ignored
|
||||
* - split string (format: split:number,separators,flags,xxx
|
||||
* or split:count,separators,flags,xxx
|
||||
* or split:random,separators,flags,xxx)
|
||||
* - split shell arguments (format: split_shell:number,xxx or
|
||||
* split_shell:count,xxx or split_shell:random,xxx)
|
||||
* - a regex group captured (format: re:N (0.99) or re:+)
|
||||
* - a color (format: color:xxx)
|
||||
* - a modifier (format: modifier:name,data,xxx)
|
||||
* - an info (format: info:name,arguments)
|
||||
* - a base 16/32/64 encoded/decoded string (format: base_encode:base,xxx
|
||||
* or base_decode:base,xxx)
|
||||
* - current date/time (format: date or date:format)
|
||||
* - an environment variable (format: env:XXX)
|
||||
* - a ternary operator (format: if:condition?value_if_true:value_if_false)
|
||||
* - calculate result of an expression (format: calc:xxx)
|
||||
* - a random integer number in the range from "min" to "max"
|
||||
* (format: random:min,max)
|
||||
* - a translated string (format: translate:xxx)
|
||||
* - define a new variable (format: define:name,value)
|
||||
* - an option (format: file.section.option)
|
||||
* - a buffer local variable
|
||||
* - a pointer name from hashtable "pointers"
|
||||
* - a hdata variable (format: hdata.var1.var2 or hdata[list].var1.var2
|
||||
* or hdata[ptr].var1.var2 or hdata[ptr_name].var1.var2)
|
||||
* - ${raw_hl:string}: the string itself without evaluation but with syntax highlighting
|
||||
* - ${raw:string}: the string itself without evaluation
|
||||
* - ${hl:string}: the string with syntax highlighting
|
||||
* - ${name}: the variable from hashtable "user_vars" or "extra_vars"
|
||||
* - ${weechat_config_dir}: WeeChat config directory
|
||||
* - ${weechat_data_dir}: WeeChat data directory
|
||||
* - ${weechat_state_dir}: WeeChat state directory
|
||||
* - ${weechat_cache_dir}: WeeChat cache directory
|
||||
* - ${weechat_runtmie_dir}: WeeChat runtime directory
|
||||
* - ${eval:string}: the evaluated string
|
||||
* - ${eval_cond:string}: the evaluated condition
|
||||
* - ${esc:string} or ${\\string}: the string with escaped chars
|
||||
* - ${chars:range}: the string with a range of chars, "range" is one of:
|
||||
* "digit", "xdigit", "lower", "upper", "alpha", "alnum" or "c1-c2"
|
||||
* ("c1" and "c2" are code points with c1 ≤ c2)
|
||||
* - ${lower:string}: the string converted to lower case
|
||||
* - ${upper:string}: the string converted to upper case
|
||||
* - ${hide:char,string}: the string with hidden chars
|
||||
* - ${cut:max,suffix,string}: the string with max chars (excluding the suffix)
|
||||
* - ${cut:+max,suffix,string}: the string with max chars (including the suffix)
|
||||
* - ${cutscr:max,suffix,string}: the string with max chars displayed on screen
|
||||
* (excluding the suffix)
|
||||
* - ${cutscr:+max,suffix,string}: the string with max chars displayed on screen
|
||||
* (including the suffix)
|
||||
* - ${rev:string}: the reversed string
|
||||
* - ${revscr:string}: the reversed string for display (color codes are not reversed)
|
||||
* - ${repeat:count,string}: the repeated string
|
||||
* - ${length:string}: the length of the string (number of UTF-8 chars)
|
||||
* - ${lengthscr:string}: the length of the string on screen (sum of the width
|
||||
* of each UTF-8 char displayed on screen, colors codes are ignored)
|
||||
* - ${split:n,separators,flags,string}: split of the string
|
||||
* (n can be an integer ≥ 1, an integer ≤ -1, "count" or "random")
|
||||
* - ${split_shell:n,string}: split of shell arguments
|
||||
* (n can be an integer ≥ 1, an integer ≤ -1, "count" or "random")
|
||||
* - ${re:N} or ${re:+}: a regex group captured (0 ≤ N ≤ 99)
|
||||
* - ${color:name}: the color
|
||||
* - ${modifier:name,data,string}: the modifier
|
||||
* - ${info:name,arguments}: the info (arguments are optional)
|
||||
* - ${base_encode:base,string}: the string encoded to base: 16, 32, 64 or 64url
|
||||
* - ${base_decode:base,string}: the string decoded from base: 16, 32, 64 or 64url
|
||||
* - ${date} or ${date:format}: current date/time
|
||||
* - ${env:NAME}: the environment variable
|
||||
* - ${if:condition?value_if_true:value_if_false}: the result of ternary operator
|
||||
* - ${calc:expression}: the result of the expression with parentheses and operators
|
||||
* (+, -, *, /, //, %, **)
|
||||
* - ${random:min,max}: a random integer number between "min" and "max" (inclusive)
|
||||
* - ${translate:string}: the translated string
|
||||
* - ${define:name,value}: declaration of a user variable (return an empty string)
|
||||
* - ${sec.data.xxx}: the value of the secured data "xxx"
|
||||
* - ${file.section.option}: the value of the config option
|
||||
* - ${name}: the local variable in buffer
|
||||
* - ${name}: the pointer name from hashtable "pointers"
|
||||
* - ${hdata.var1.var2}: hdata with name
|
||||
* - ${hdata[list].var1.var2}: hdata with list
|
||||
* - ${hdata[ptr].var1.var2}: hdata with pointer
|
||||
* - ${hdata[ptr_name].var1.var2}: hdata with name of pointer
|
||||
*
|
||||
* See /help in WeeChat for examples.
|
||||
* See `/help eval` in WeeChat for examples.
|
||||
*
|
||||
* Note: result must be freed after use.
|
||||
*/
|
||||
@@ -1707,6 +1680,11 @@ eval_replace_vars_cb (void *data,
|
||||
value = strdup (weechat_data_dir);
|
||||
goto end;
|
||||
}
|
||||
if (strcmp (text, "weechat_state_dir") == 0)
|
||||
{
|
||||
value = strdup (weechat_state_dir);
|
||||
goto end;
|
||||
}
|
||||
if (strcmp (text, "weechat_cache_dir") == 0)
|
||||
{
|
||||
value = strdup (weechat_cache_dir);
|
||||
@@ -2272,8 +2250,7 @@ eval_expression_condition (const char *expr,
|
||||
tmp_value = eval_expression_condition (sub_expr, eval_context);
|
||||
free (sub_expr);
|
||||
rc = eval_is_true (tmp_value);
|
||||
if (tmp_value)
|
||||
free (tmp_value);
|
||||
free (tmp_value);
|
||||
/*
|
||||
* if rc == 0 with "&&" or rc == 1 with "||", no need to
|
||||
* evaluate second sub-expression, just return the rc
|
||||
@@ -2291,8 +2268,7 @@ eval_expression_condition (const char *expr,
|
||||
}
|
||||
tmp_value = eval_expression_condition (pos, eval_context);
|
||||
rc = eval_is_true (tmp_value);
|
||||
if (tmp_value)
|
||||
free (tmp_value);
|
||||
free (tmp_value);
|
||||
value = strdup ((rc) ? EVAL_STR_TRUE : EVAL_STR_FALSE);
|
||||
goto end;
|
||||
}
|
||||
@@ -2346,10 +2322,8 @@ eval_expression_condition (const char *expr,
|
||||
}
|
||||
free (sub_expr);
|
||||
value = eval_compare (tmp_value, comp, tmp_value2, eval_context);
|
||||
if (tmp_value)
|
||||
free (tmp_value);
|
||||
if (tmp_value2)
|
||||
free (tmp_value2);
|
||||
free (tmp_value);
|
||||
free (tmp_value2);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@@ -2396,8 +2370,7 @@ eval_expression_condition (const char *expr,
|
||||
tmp_value2 = malloc (length);
|
||||
if (!tmp_value2)
|
||||
{
|
||||
if (tmp_value)
|
||||
free (tmp_value);
|
||||
free (tmp_value);
|
||||
goto end;
|
||||
}
|
||||
tmp_value2[0] = '\0';
|
||||
@@ -2407,8 +2380,7 @@ eval_expression_condition (const char *expr,
|
||||
strcat (tmp_value2, pos + 1);
|
||||
free (expr2);
|
||||
expr2 = tmp_value2;
|
||||
if (tmp_value)
|
||||
free (tmp_value);
|
||||
free (tmp_value);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2418,8 +2390,7 @@ eval_expression_condition (const char *expr,
|
||||
value = eval_replace_vars (expr2, eval_context);
|
||||
|
||||
end:
|
||||
if (expr2)
|
||||
free (expr2);
|
||||
free (expr2);
|
||||
|
||||
EVAL_DEBUG_RESULT(1, value);
|
||||
|
||||
@@ -2461,7 +2432,7 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace,
|
||||
|
||||
result = NULL;
|
||||
|
||||
EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", 0x%lx, \"%s\")",
|
||||
EVAL_DEBUG_MSG(1, "eval_replace_regex(\"%s\", %p, \"%s\")",
|
||||
string, regex, replace);
|
||||
|
||||
if (!string || !regex || !replace)
|
||||
@@ -2548,8 +2519,7 @@ eval_replace_regex (const char *string, regex_t *regex, const char *replace,
|
||||
free (result);
|
||||
result = result2;
|
||||
|
||||
if (str_replace)
|
||||
free (str_replace);
|
||||
free (str_replace);
|
||||
|
||||
if (end)
|
||||
break;
|
||||
@@ -2776,8 +2746,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
/* evaluate as condition (return a boolean: "0" or "1") */
|
||||
value = eval_expression_condition (expr, eval_context);
|
||||
rc = eval_is_true (value);
|
||||
if (value)
|
||||
free (value);
|
||||
free (value);
|
||||
value = strdup ((rc) ? EVAL_STR_TRUE : EVAL_STR_FALSE);
|
||||
}
|
||||
else
|
||||
@@ -2806,8 +2775,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
if (ptr_buffer_added)
|
||||
hashtable_remove (pointers, "buffer");
|
||||
}
|
||||
if (user_vars)
|
||||
hashtable_free (user_vars);
|
||||
hashtable_free (user_vars);
|
||||
if (regex && regex_allocated)
|
||||
{
|
||||
regfree (regex);
|
||||
@@ -2819,8 +2787,7 @@ eval_expression (const char *expr, struct t_hashtable *pointers,
|
||||
/* set debug in options hashtable */
|
||||
if (options && eval_context->debug_output)
|
||||
hashtable_set (options, "debug_output", *(eval_context->debug_output));
|
||||
if (eval_context->debug_output)
|
||||
string_dyn_free (eval_context->debug_output, 1);
|
||||
string_dyn_free (eval_context->debug_output, 1);
|
||||
|
||||
return value;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-hashtable.c - implementation of hashtable
|
||||
* core-hashtable.c - implementation of hashtable
|
||||
*
|
||||
* Copyright (C) 2010-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -29,12 +29,12 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-list.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "core-utf8.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -321,8 +321,7 @@ hashtable_free_key (struct t_hashtable *hashtable,
|
||||
case HASHTABLE_STRING:
|
||||
case HASHTABLE_BUFFER:
|
||||
case HASHTABLE_TIME:
|
||||
if (item->key)
|
||||
free (item->key);
|
||||
free (item->key);
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
break;
|
||||
@@ -354,8 +353,7 @@ hashtable_free_value (struct t_hashtable *hashtable,
|
||||
case HASHTABLE_STRING:
|
||||
case HASHTABLE_BUFFER:
|
||||
case HASHTABLE_TIME:
|
||||
if (item->value)
|
||||
free (item->value);
|
||||
free (item->value);
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
break;
|
||||
@@ -561,8 +559,7 @@ hashtable_to_string (enum t_hashtable_type type, const void *value)
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
case HASHTABLE_BUFFER:
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)value);
|
||||
snprintf (str_value, sizeof (str_value), "%p", value);
|
||||
return str_value;
|
||||
break;
|
||||
case HASHTABLE_TIME:
|
||||
@@ -639,10 +636,8 @@ hashtable_map_string (struct t_hashtable *hashtable,
|
||||
key,
|
||||
value);
|
||||
|
||||
if (key)
|
||||
free (key);
|
||||
if (value)
|
||||
free (value);
|
||||
free (key);
|
||||
free (value);
|
||||
|
||||
ptr_item = ptr_next_created_item;
|
||||
}
|
||||
@@ -1286,8 +1281,7 @@ hashtable_free (struct t_hashtable *hashtable)
|
||||
|
||||
hashtable_remove_all (hashtable);
|
||||
free (hashtable->htable);
|
||||
if (hashtable->keys_values)
|
||||
free (hashtable->keys_values);
|
||||
free (hashtable->keys_values);
|
||||
free (hashtable);
|
||||
}
|
||||
|
||||
@@ -1302,31 +1296,31 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name)
|
||||
int i;
|
||||
|
||||
log_printf ("");
|
||||
log_printf ("[hashtable %s (addr:0x%lx)]", name, hashtable);
|
||||
log_printf (" size . . . . . . . . . : %d", hashtable->size);
|
||||
log_printf (" htable . . . . . . . . : 0x%lx", hashtable->htable);
|
||||
log_printf (" items_count. . . . . . : %d", hashtable->items_count);
|
||||
log_printf (" oldest_item. . . . . . : 0x%lx", hashtable->oldest_item);
|
||||
log_printf (" newest_item. . . . . . : 0x%lx", hashtable->newest_item);
|
||||
log_printf ("[hashtable %s (addr:%p)]", name, hashtable);
|
||||
log_printf (" size . . . . . . . . . : %d", hashtable->size);
|
||||
log_printf (" htable . . . . . . . . : %p", hashtable->htable);
|
||||
log_printf (" items_count. . . . . . : %d", hashtable->items_count);
|
||||
log_printf (" oldest_item. . . . . . : %p", hashtable->oldest_item);
|
||||
log_printf (" newest_item. . . . . . : %p", hashtable->newest_item);
|
||||
log_printf (" type_keys. . . . . . . : %d (%s)",
|
||||
hashtable->type_keys,
|
||||
hashtable_type_string[hashtable->type_keys]);
|
||||
log_printf (" type_values. . . . . . : %d (%s)",
|
||||
hashtable->type_values,
|
||||
hashtable_type_string[hashtable->type_values]);
|
||||
log_printf (" callback_hash_key. . . : 0x%lx", hashtable->callback_hash_key);
|
||||
log_printf (" callback_keycmp. . . . : 0x%lx", hashtable->callback_keycmp);
|
||||
log_printf (" callback_free_key. . . : 0x%lx", hashtable->callback_free_key);
|
||||
log_printf (" callback_free_value. . : 0x%lx", hashtable->callback_free_value);
|
||||
log_printf (" keys_values. . . . . . : '%s'", hashtable->keys_values);
|
||||
log_printf (" callback_hash_key. . . : %p", hashtable->callback_hash_key);
|
||||
log_printf (" callback_keycmp. . . . : %p", hashtable->callback_keycmp);
|
||||
log_printf (" callback_free_key. . . : %p", hashtable->callback_free_key);
|
||||
log_printf (" callback_free_value. . : %p", hashtable->callback_free_value);
|
||||
log_printf (" keys_values. . . . . . : '%s'", hashtable->keys_values);
|
||||
|
||||
for (i = 0; i < hashtable->size; i++)
|
||||
{
|
||||
log_printf (" htable[%06d] . . . . : 0x%lx", i, hashtable->htable[i]);
|
||||
log_printf (" htable[%06d] . . . . : %p", i, hashtable->htable[i]);
|
||||
for (ptr_item = hashtable->htable[i]; ptr_item;
|
||||
ptr_item = ptr_item->next_item)
|
||||
{
|
||||
log_printf (" [item 0x%lx]", hashtable->htable);
|
||||
log_printf (" [item %p]", hashtable->htable);
|
||||
switch (hashtable->type_keys)
|
||||
{
|
||||
case HASHTABLE_INTEGER:
|
||||
@@ -1336,10 +1330,10 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name)
|
||||
log_printf (" key (string) . . . : '%s'", (char *)ptr_item->key);
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
log_printf (" key (pointer). . . : 0x%lx", ptr_item->key);
|
||||
log_printf (" key (pointer). . . : %p", ptr_item->key);
|
||||
break;
|
||||
case HASHTABLE_BUFFER:
|
||||
log_printf (" key (buffer) . . . : 0x%lx", ptr_item->key);
|
||||
log_printf (" key (buffer) . . . : %p", ptr_item->key);
|
||||
break;
|
||||
case HASHTABLE_TIME:
|
||||
log_printf (" key (time) . . . . : %lld", (long long)(*((time_t *)ptr_item->key)));
|
||||
@@ -1357,10 +1351,10 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name)
|
||||
log_printf (" value (string) . . : '%s'", (char *)ptr_item->value);
|
||||
break;
|
||||
case HASHTABLE_POINTER:
|
||||
log_printf (" value (pointer). . : 0x%lx", ptr_item->value);
|
||||
log_printf (" value (pointer). . : %p", ptr_item->value);
|
||||
break;
|
||||
case HASHTABLE_BUFFER:
|
||||
log_printf (" value (buffer) . . : 0x%lx", ptr_item->value);
|
||||
log_printf (" value (buffer) . . : %p", ptr_item->value);
|
||||
break;
|
||||
case HASHTABLE_TIME:
|
||||
log_printf (" value (time) . . . : %lld", (long long)(*((time_t *)ptr_item->value)));
|
||||
@@ -1368,11 +1362,11 @@ hashtable_print_log (struct t_hashtable *hashtable, const char *name)
|
||||
case HASHTABLE_NUM_TYPES:
|
||||
break;
|
||||
}
|
||||
log_printf (" value_size . . . . : %d", ptr_item->value_size);
|
||||
log_printf (" prev_item. . . . . : 0x%lx", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . : 0x%lx", ptr_item->next_item);
|
||||
log_printf (" prev_created_item. : 0x%lx", ptr_item->prev_created_item);
|
||||
log_printf (" next_created_item. : 0x%lx", ptr_item->next_created_item);
|
||||
log_printf (" value_size . . . . : %d", ptr_item->value_size);
|
||||
log_printf (" prev_item. . . . . : %p", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . : %p", ptr_item->next_item);
|
||||
log_printf (" prev_created_item. : %p", ptr_item->prev_created_item);
|
||||
log_printf (" next_created_item. : %p", ptr_item->next_created_item);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,7 @@ struct t_infolist_item;
|
||||
#define HASHTABLE_SET_POINTER(__name, __pointer) \
|
||||
if (__pointer) \
|
||||
{ \
|
||||
snprintf (str_value, sizeof (str_value), \
|
||||
"0x%lx", (unsigned long)__pointer); \
|
||||
snprintf (str_value, sizeof (str_value), "%p", __pointer); \
|
||||
hashtable_set (hashtable, __name, str_value); \
|
||||
} \
|
||||
else \
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-hdata.c - direct access to WeeChat data using hashtables
|
||||
* core-hdata.c - direct access to WeeChat data using hashtables
|
||||
*
|
||||
* Copyright (C) 2011-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,19 +27,19 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
struct t_hashtable *weechat_hdata = NULL;
|
||||
|
||||
char *hdata_type_string[9] =
|
||||
{ "other", "char", "integer", "long", "string", "pointer", "time",
|
||||
char *hdata_type_string[WEECHAT_NUM_HDATA_TYPES] =
|
||||
{ "other", "char", "integer", "long", "longlong", "string", "pointer", "time",
|
||||
"hashtable", "shared_string" };
|
||||
|
||||
|
||||
@@ -59,10 +59,8 @@ hdata_free_var_cb (struct t_hashtable *hashtable, const void *key, void *value)
|
||||
var = (struct t_hdata_var *)value;
|
||||
if (var)
|
||||
{
|
||||
if (var->array_size)
|
||||
free (var->array_size);
|
||||
if (var->hdata_name)
|
||||
free (var->hdata_name);
|
||||
free (var->array_size);
|
||||
free (var->hdata_name);
|
||||
free (var);
|
||||
}
|
||||
}
|
||||
@@ -331,6 +329,8 @@ hdata_get_var_array_size (struct t_hdata *hdata, void *pointer,
|
||||
return *((int *)(pointer + offset));
|
||||
case WEECHAT_HDATA_LONG:
|
||||
return (int)(*((long *)(pointer + offset)));
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
return (int)(*((long long *)(pointer + offset)));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -640,8 +640,7 @@ hdata_search (struct t_hdata *hdata,
|
||||
/* evaluate expression */
|
||||
result = eval_expression (search, pointers2, extra_vars, options2);
|
||||
rc = eval_is_true (result);
|
||||
if (result)
|
||||
free (result);
|
||||
free (result);
|
||||
if (rc)
|
||||
{
|
||||
ret_pointer = pointer;
|
||||
@@ -799,7 +798,41 @@ hdata_long (struct t_hdata *hdata, void *pointer, const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0L;
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets "long long" value of a variable in hdata.
|
||||
*/
|
||||
|
||||
long long
|
||||
hdata_longlong (struct t_hdata *hdata, void *pointer, const char *name)
|
||||
{
|
||||
int index;
|
||||
const char *ptr_name;
|
||||
struct t_hdata_var *var;
|
||||
|
||||
if (!hdata || !pointer || !name)
|
||||
return 0;
|
||||
|
||||
hdata_get_index_and_name (name, &index, &ptr_name);
|
||||
var = hashtable_get (hdata->hash_var, ptr_name);
|
||||
if (var && (var->offset >= 0))
|
||||
{
|
||||
if (var->array_size && (index >= 0))
|
||||
{
|
||||
if (var->array_pointer)
|
||||
return (*((long long **)(pointer + var->offset)))[index];
|
||||
else
|
||||
return ((long long *)(pointer + var->offset))[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
return *((long long *)(pointer + var->offset));
|
||||
}
|
||||
}
|
||||
|
||||
return 0LL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -904,7 +937,7 @@ hdata_time (struct t_hdata *hdata, void *pointer, const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return (time_t)0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -958,6 +991,7 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
{
|
||||
int rc, type, type1, type2, int_value1, int_value2;
|
||||
long long_value1, long_value2;
|
||||
long long longlong_value1, longlong_value2;
|
||||
char *var_name, *property, char_value1, char_value2;
|
||||
const char *ptr_var_name, *pos, *pos_open_paren, *hdata_name;
|
||||
const char *str_value1, *str_value2;
|
||||
@@ -1013,6 +1047,12 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
rc = (long_value1 < long_value2) ?
|
||||
-1 : ((long_value1 > long_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
longlong_value1 = hdata_longlong (hdata, pointer1, var_name);
|
||||
longlong_value2 = hdata_longlong (hdata, pointer2, var_name);
|
||||
rc = (longlong_value1 < longlong_value2) ?
|
||||
-1 : ((longlong_value1 > longlong_value2) ? 1 : 0);
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
case WEECHAT_HDATA_SHARED_STRING:
|
||||
str_value1 = hdata_string (hdata, pointer1, var_name);
|
||||
@@ -1070,8 +1110,7 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
pos_open_paren - pos - 1);
|
||||
ptr_value1 = (void *)hashtable_get_string (hashtable1, property);
|
||||
ptr_value2 = (void *)hashtable_get_string (hashtable2, property);
|
||||
if (property)
|
||||
free (property);
|
||||
free (property);
|
||||
type1 = HASHTABLE_STRING;
|
||||
type2 = HASHTABLE_STRING;
|
||||
}
|
||||
@@ -1157,8 +1196,7 @@ hdata_compare (struct t_hdata *hdata, void *pointer1, void *pointer2,
|
||||
}
|
||||
|
||||
end:
|
||||
if (var_name)
|
||||
free (var_name);
|
||||
free (var_name);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -1181,6 +1219,7 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name,
|
||||
struct t_hdata_var *var;
|
||||
char **ptr_string, *error;
|
||||
long number;
|
||||
long long number_longlong;
|
||||
unsigned long ptr;
|
||||
int rc;
|
||||
|
||||
@@ -1220,17 +1259,24 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name,
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case WEECHAT_HDATA_LONGLONG:
|
||||
error = NULL;
|
||||
number_longlong = strtoll (value, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
*((long long *)(pointer + var->offset)) = number_longlong;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
case WEECHAT_HDATA_STRING:
|
||||
ptr_string = (char **)(pointer + var->offset);
|
||||
if (*ptr_string)
|
||||
free (*ptr_string);
|
||||
free (*ptr_string);
|
||||
*ptr_string = (value) ? strdup (value) : NULL;
|
||||
return 1;
|
||||
break;
|
||||
case WEECHAT_HDATA_SHARED_STRING:
|
||||
ptr_string = (char **)(pointer + var->offset);
|
||||
if (*ptr_string)
|
||||
string_shared_free (*ptr_string);
|
||||
string_shared_free (*ptr_string);
|
||||
*ptr_string = (value) ? (char *)string_shared_get (value) : NULL;
|
||||
return 1;
|
||||
break;
|
||||
@@ -1357,16 +1403,11 @@ hdata_free (struct t_hdata *hdata)
|
||||
if (!hdata)
|
||||
return;
|
||||
|
||||
if (hdata->hash_var)
|
||||
hashtable_free (hdata->hash_var);
|
||||
if (hdata->var_prev)
|
||||
free (hdata->var_prev);
|
||||
if (hdata->var_next)
|
||||
free (hdata->var_next);
|
||||
if (hdata->hash_list)
|
||||
hashtable_free (hdata->hash_list);
|
||||
if (hdata->name)
|
||||
free (hdata->name);
|
||||
hashtable_free (hdata->hash_var);
|
||||
free (hdata->var_prev);
|
||||
free (hdata->var_next);
|
||||
hashtable_free (hdata->hash_list);
|
||||
free (hdata->name);
|
||||
|
||||
free (hdata);
|
||||
}
|
||||
@@ -1426,9 +1467,9 @@ hdata_print_log_var_map_cb (void *data, struct t_hashtable *hashtable,
|
||||
|
||||
log_printf ("");
|
||||
log_printf (" [hdata var '%s']", (const char *)key);
|
||||
log_printf (" offset . . . . . . . . : %d", var->offset);
|
||||
log_printf (" offset . . . . . . . . : %d", var->offset);
|
||||
log_printf (" type . . . . . . . . . : %d ('%s')", var->type, hdata_type_string[(int)var->type]);
|
||||
log_printf (" update_allowed . . . . : %d", (int)var->update_allowed);
|
||||
log_printf (" update_allowed . . . . : %d", (int)var->update_allowed);
|
||||
log_printf (" array_size . . . . . . : '%s'", var->array_size);
|
||||
log_printf (" hdata_name . . . . . . : '%s'", var->hdata_name);
|
||||
}
|
||||
@@ -1451,22 +1492,22 @@ hdata_print_log_map_cb (void *data, struct t_hashtable *hashtable,
|
||||
ptr_hdata = (struct t_hdata *)value;
|
||||
|
||||
log_printf ("");
|
||||
log_printf ("[hdata (addr:0x%lx)]", ptr_hdata);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_hdata->name);
|
||||
log_printf (" plugin . . . . . . . . : 0x%lx", ptr_hdata->plugin);
|
||||
log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev);
|
||||
log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next);
|
||||
log_printf (" hash_var . . . . . . . : 0x%lx (hashtable: '%s')",
|
||||
log_printf ("[hdata (addr:%p)]", ptr_hdata);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_hdata->name);
|
||||
log_printf (" plugin . . . . . . . . : %p", ptr_hdata->plugin);
|
||||
log_printf (" var_prev . . . . . . . : '%s'", ptr_hdata->var_prev);
|
||||
log_printf (" var_next . . . . . . . : '%s'", ptr_hdata->var_next);
|
||||
log_printf (" hash_var . . . . . . . : %p (hashtable: '%s')",
|
||||
ptr_hdata->hash_var,
|
||||
hashtable_get_string (ptr_hdata->hash_var, "keys_values"));
|
||||
log_printf (" hash_list. . . . . . . : 0x%lx (hashtable: '%s')",
|
||||
log_printf (" hash_list. . . . . . . : %p (hashtable: '%s')",
|
||||
ptr_hdata->hash_list,
|
||||
hashtable_get_string (ptr_hdata->hash_list, "keys_values"));
|
||||
log_printf (" create_allowed . . . . : %d", (int)ptr_hdata->create_allowed);
|
||||
log_printf (" delete_allowed . . . . : %d", (int)ptr_hdata->delete_allowed);
|
||||
log_printf (" callback_update. . . . : 0x%lx", ptr_hdata->callback_update);
|
||||
log_printf (" callback_update_data . : 0x%lx", ptr_hdata->callback_update_data);
|
||||
log_printf (" update_pending . . . . : %d", (int)ptr_hdata->update_pending);
|
||||
log_printf (" create_allowed . . . . : %d", (int)ptr_hdata->create_allowed);
|
||||
log_printf (" delete_allowed . . . . : %d", (int)ptr_hdata->delete_allowed);
|
||||
log_printf (" callback_update. . . . : %p", ptr_hdata->callback_update);
|
||||
log_printf (" callback_update_data . : %p", ptr_hdata->callback_update_data);
|
||||
log_printf (" update_pending . . . . : %d", (int)ptr_hdata->update_pending);
|
||||
hashtable_map (ptr_hdata->hash_var, &hdata_print_log_var_map_cb, NULL);
|
||||
}
|
||||
|
||||
@@ -22,11 +22,19 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#define HDATA_VAR(__struct, __name, __type, __update_allowed, \
|
||||
/* create a hdata variable (name is the same as the struct field */
|
||||
#define HDATA_VAR(__struct, __field, __type, __update_allowed, \
|
||||
__array_size, __hdata_name) \
|
||||
hdata_new_var (hdata, #__name, offsetof (__struct, __name), \
|
||||
hdata_new_var (hdata, #__field, offsetof (__struct, __field), \
|
||||
WEECHAT_HDATA_##__type, __update_allowed, \
|
||||
__array_size, __hdata_name)
|
||||
/* create a hdata variable with a custom name */
|
||||
#define HDATA_VAR_NAME(__struct, __field, __name, __type, \
|
||||
__update_allowed, __array_size, __hdata_name) \
|
||||
hdata_new_var (hdata, __name, offsetof (__struct, __field), \
|
||||
WEECHAT_HDATA_##__type, __update_allowed, \
|
||||
__array_size, __hdata_name)
|
||||
/* create a hdata list */
|
||||
#define HDATA_LIST(__name, __flags) \
|
||||
hdata_new_list (hdata, #__name, &(__name), __flags);
|
||||
|
||||
@@ -122,6 +130,8 @@ extern int hdata_integer (struct t_hdata *hdata, void *pointer,
|
||||
const char *name);
|
||||
extern long hdata_long (struct t_hdata *hdata, void *pointer,
|
||||
const char *name);
|
||||
extern long long hdata_longlong (struct t_hdata *hdata, void *pointer,
|
||||
const char *name);
|
||||
extern const char *hdata_string (struct t_hdata *hdata, void *pointer,
|
||||
const char *name);
|
||||
extern void *hdata_pointer (struct t_hdata *hdata, void *pointer,
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-hook.c - WeeChat hooks management
|
||||
* core-hook.c - WeeChat hooks management
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -32,14 +32,14 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-debug.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-signal.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-util.h"
|
||||
#include "core-debug.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-log.h"
|
||||
#include "core-signal.h"
|
||||
#include "core-string.h"
|
||||
#include "core-util.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
@@ -532,8 +532,7 @@ hook_callback_end (struct t_hook *hook, struct t_hook_exec_cb *hook_exec_cb)
|
||||
plugin_get_name (hook->plugin),
|
||||
(hook->subplugin) ? hook->subplugin : "-",
|
||||
str_diff);
|
||||
if (str_diff)
|
||||
free (str_diff);
|
||||
free (str_diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -571,8 +570,7 @@ hook_set (struct t_hook *hook, const char *property, const char *value)
|
||||
|
||||
if (strcmp (property, "subplugin") == 0)
|
||||
{
|
||||
if (hook->subplugin)
|
||||
free (hook->subplugin);
|
||||
free (hook->subplugin);
|
||||
hook->subplugin = strdup (value);
|
||||
}
|
||||
else if (strcmp (property, "stdin") == 0)
|
||||
@@ -907,8 +905,7 @@ hook_add_to_infolist (struct t_infolist *infolist, struct t_hook *pointer,
|
||||
hook_add_to_infolist_type (infolist, i, pos_arguments);
|
||||
}
|
||||
|
||||
if (type)
|
||||
free (type);
|
||||
free (type);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -929,24 +926,24 @@ hook_print_log ()
|
||||
ptr_hook = ptr_hook->next_hook)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf ("[hook (addr:0x%lx)]", ptr_hook);
|
||||
log_printf (" plugin. . . . . . . . . : 0x%lx ('%s')",
|
||||
log_printf ("[hook (addr:%p)]", ptr_hook);
|
||||
log_printf (" plugin. . . . . . . . . : %p ('%s')",
|
||||
ptr_hook->plugin, plugin_get_name (ptr_hook->plugin));
|
||||
log_printf (" subplugin . . . . . . . : '%s'", ptr_hook->subplugin);
|
||||
log_printf (" subplugin . . . . . . . : '%s'", ptr_hook->subplugin);
|
||||
log_printf (" type. . . . . . . . . . : %d (%s)",
|
||||
ptr_hook->type, hook_type_string[ptr_hook->type]);
|
||||
log_printf (" deleted . . . . . . . . : %d", ptr_hook->deleted);
|
||||
log_printf (" running . . . . . . . . : %d", ptr_hook->running);
|
||||
log_printf (" priority. . . . . . . . : %d", ptr_hook->priority);
|
||||
log_printf (" callback_pointer. . . . : 0x%lx", ptr_hook->callback_pointer);
|
||||
log_printf (" callback_data . . . . . : 0x%lx", ptr_hook->callback_data);
|
||||
log_printf (" deleted . . . . . . . . : %d", ptr_hook->deleted);
|
||||
log_printf (" running . . . . . . . . : %d", ptr_hook->running);
|
||||
log_printf (" priority. . . . . . . . : %d", ptr_hook->priority);
|
||||
log_printf (" callback_pointer. . . . : %p", ptr_hook->callback_pointer);
|
||||
log_printf (" callback_data . . . . . : %p", ptr_hook->callback_data);
|
||||
if (ptr_hook->deleted)
|
||||
continue;
|
||||
|
||||
(hook_callback_print_log[ptr_hook->type]) (ptr_hook);
|
||||
|
||||
log_printf (" prev_hook . . . . . . . : 0x%lx", ptr_hook->prev_hook);
|
||||
log_printf (" next_hook . . . . . . . : 0x%lx", ptr_hook->next_hook);
|
||||
log_printf (" prev_hook . . . . . . . : %p", ptr_hook->prev_hook);
|
||||
log_printf (" next_hook . . . . . . . : %p", ptr_hook->next_hook);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,25 +22,25 @@
|
||||
|
||||
struct t_hook;
|
||||
|
||||
#include "hook/wee-hook-command-run.h"
|
||||
#include "hook/wee-hook-command.h"
|
||||
#include "hook/wee-hook-completion.h"
|
||||
#include "hook/wee-hook-config.h"
|
||||
#include "hook/wee-hook-connect.h"
|
||||
#include "hook/wee-hook-fd.h"
|
||||
#include "hook/wee-hook-focus.h"
|
||||
#include "hook/wee-hook-hdata.h"
|
||||
#include "hook/wee-hook-hsignal.h"
|
||||
#include "hook/wee-hook-info-hashtable.h"
|
||||
#include "hook/wee-hook-info.h"
|
||||
#include "hook/wee-hook-infolist.h"
|
||||
#include "hook/wee-hook-line.h"
|
||||
#include "hook/wee-hook-modifier.h"
|
||||
#include "hook/wee-hook-print.h"
|
||||
#include "hook/wee-hook-process.h"
|
||||
#include "hook/wee-hook-signal.h"
|
||||
#include "hook/wee-hook-timer.h"
|
||||
#include "hook/wee-hook-url.h"
|
||||
#include "hook/hook-command-run.h"
|
||||
#include "hook/hook-command.h"
|
||||
#include "hook/hook-completion.h"
|
||||
#include "hook/hook-config.h"
|
||||
#include "hook/hook-connect.h"
|
||||
#include "hook/hook-fd.h"
|
||||
#include "hook/hook-focus.h"
|
||||
#include "hook/hook-hdata.h"
|
||||
#include "hook/hook-hsignal.h"
|
||||
#include "hook/hook-info-hashtable.h"
|
||||
#include "hook/hook-info.h"
|
||||
#include "hook/hook-infolist.h"
|
||||
#include "hook/hook-line.h"
|
||||
#include "hook/hook-modifier.h"
|
||||
#include "hook/hook-print.h"
|
||||
#include "hook/hook-process.h"
|
||||
#include "hook/hook-signal.h"
|
||||
#include "hook/hook-timer.h"
|
||||
#include "hook/hook-url.h"
|
||||
|
||||
struct t_gui_bar;
|
||||
struct t_gui_buffer;
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-infolist.c - info lists management
|
||||
* core-infolist.c - info lists management
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,14 +27,18 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "core-infolist.h"
|
||||
|
||||
|
||||
struct t_infolist *weechat_infolists = NULL;
|
||||
struct t_infolist *last_weechat_infolist = NULL;
|
||||
|
||||
char *infolist_type_char_string[INFOLIST_NUM_TYPES] = {
|
||||
"i", "s", "p", "b", "t",
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Creates a new infolist.
|
||||
@@ -391,7 +395,7 @@ const char *
|
||||
infolist_fields (struct t_infolist *infolist)
|
||||
{
|
||||
struct t_infolist_var *ptr_var;
|
||||
int length;
|
||||
char **fields;
|
||||
|
||||
if (!infolist || !infolist->ptr_item)
|
||||
return NULL;
|
||||
@@ -400,44 +404,20 @@ infolist_fields (struct t_infolist *infolist)
|
||||
if (infolist->ptr_item->fields)
|
||||
return infolist->ptr_item->fields;
|
||||
|
||||
length = 0;
|
||||
for (ptr_var = infolist->ptr_item->vars;
|
||||
ptr_var; ptr_var = ptr_var->next_var)
|
||||
{
|
||||
length += strlen (ptr_var->name) + 3;
|
||||
}
|
||||
|
||||
infolist->ptr_item->fields = malloc (length + 1);
|
||||
if (!infolist->ptr_item->fields)
|
||||
fields = string_dyn_alloc (256);
|
||||
if (!fields)
|
||||
return NULL;
|
||||
|
||||
infolist->ptr_item->fields[0] = '\0';
|
||||
for (ptr_var = infolist->ptr_item->vars; ptr_var;
|
||||
ptr_var = ptr_var->next_var)
|
||||
for (ptr_var = infolist->ptr_item->vars; ptr_var; ptr_var = ptr_var->next_var)
|
||||
{
|
||||
switch (ptr_var->type)
|
||||
{
|
||||
case INFOLIST_INTEGER:
|
||||
strcat (infolist->ptr_item->fields, "i:");
|
||||
break;
|
||||
case INFOLIST_STRING:
|
||||
strcat (infolist->ptr_item->fields, "s:");
|
||||
break;
|
||||
case INFOLIST_POINTER:
|
||||
strcat (infolist->ptr_item->fields, "p:");
|
||||
break;
|
||||
case INFOLIST_BUFFER:
|
||||
strcat (infolist->ptr_item->fields, "b:");
|
||||
break;
|
||||
case INFOLIST_TIME:
|
||||
strcat (infolist->ptr_item->fields, "t:");
|
||||
break;
|
||||
}
|
||||
strcat (infolist->ptr_item->fields, ptr_var->name);
|
||||
if (ptr_var->next_var)
|
||||
strcat (infolist->ptr_item->fields, ",");
|
||||
if (*fields[0])
|
||||
string_dyn_concat (fields, ",", -1);
|
||||
string_dyn_concat (fields, infolist_type_char_string[ptr_var->type], -1);
|
||||
string_dyn_concat (fields, ":", -1);
|
||||
string_dyn_concat (fields, ptr_var->name, -1);
|
||||
}
|
||||
|
||||
infolist->ptr_item->fields = string_dyn_free (fields, 0);
|
||||
return infolist->ptr_item->fields;
|
||||
}
|
||||
|
||||
@@ -615,8 +595,7 @@ infolist_var_free (struct t_infolist_item *item,
|
||||
(var->next_var)->prev_var = var->prev_var;
|
||||
|
||||
/* free data */
|
||||
if (var->name)
|
||||
free (var->name);
|
||||
free (var->name);
|
||||
if (((var->type == INFOLIST_INTEGER)
|
||||
|| (var->type == INFOLIST_STRING)
|
||||
|| (var->type == INFOLIST_BUFFER)
|
||||
@@ -663,8 +642,7 @@ infolist_item_free (struct t_infolist *infolist,
|
||||
{
|
||||
infolist_var_free (item, item->vars);
|
||||
}
|
||||
if (item->fields)
|
||||
free (item->fields);
|
||||
free (item->fields);
|
||||
|
||||
free (item);
|
||||
|
||||
@@ -742,52 +720,54 @@ infolist_print_log ()
|
||||
ptr_infolist = ptr_infolist->next_infolist)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf ("[infolist (addr:0x%lx)]", ptr_infolist);
|
||||
log_printf (" plugin . . . . . . . . : 0x%lx", ptr_infolist->plugin);
|
||||
log_printf (" items. . . . . . . . . : 0x%lx", ptr_infolist->items);
|
||||
log_printf (" last_item. . . . . . . : 0x%lx", ptr_infolist->last_item);
|
||||
log_printf (" ptr_item . . . . . . . : 0x%lx", ptr_infolist->ptr_item);
|
||||
log_printf (" prev_infolist. . . . . : 0x%lx", ptr_infolist->prev_infolist);
|
||||
log_printf (" next_infolist. . . . . : 0x%lx", ptr_infolist->next_infolist);
|
||||
log_printf ("[infolist (addr:%p)]", ptr_infolist);
|
||||
log_printf (" plugin . . . . . . . . : %p", ptr_infolist->plugin);
|
||||
log_printf (" items. . . . . . . . . : %p", ptr_infolist->items);
|
||||
log_printf (" last_item. . . . . . . : %p", ptr_infolist->last_item);
|
||||
log_printf (" ptr_item . . . . . . . : %p", ptr_infolist->ptr_item);
|
||||
log_printf (" prev_infolist. . . . . : %p", ptr_infolist->prev_infolist);
|
||||
log_printf (" next_infolist. . . . . : %p", ptr_infolist->next_infolist);
|
||||
|
||||
for (ptr_item = ptr_infolist->items; ptr_item;
|
||||
ptr_item = ptr_item->next_item)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf (" [item (addr:0x%lx)]", ptr_item);
|
||||
log_printf (" vars . . . . . . . . . : 0x%lx", ptr_item->vars);
|
||||
log_printf (" last_var . . . . . . . : 0x%lx", ptr_item->last_var);
|
||||
log_printf (" prev_item. . . . . . . : 0x%lx", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . . . : 0x%lx", ptr_item->next_item);
|
||||
log_printf (" [item (addr:%p)]", ptr_item);
|
||||
log_printf (" vars . . . . . . . . . : %p", ptr_item->vars);
|
||||
log_printf (" last_var . . . . . . . : %p", ptr_item->last_var);
|
||||
log_printf (" prev_item. . . . . . . : %p", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . . . : %p", ptr_item->next_item);
|
||||
|
||||
for (ptr_var = ptr_item->vars; ptr_var;
|
||||
ptr_var = ptr_var->next_var)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf (" [var (addr:0x%lx)]", ptr_var);
|
||||
log_printf (" [var (addr:%p)]", ptr_var);
|
||||
log_printf (" name . . . . . . . . : '%s'", ptr_var->name);
|
||||
log_printf (" type . . . . . . . . : %d", ptr_var->type);
|
||||
log_printf (" type . . . . . . . . : %d", ptr_var->type);
|
||||
switch (ptr_var->type)
|
||||
{
|
||||
case INFOLIST_INTEGER:
|
||||
log_printf (" value (integer). . . : %d", *((int *)ptr_var->value));
|
||||
log_printf (" value (integer). . . : %d", *((int *)ptr_var->value));
|
||||
break;
|
||||
case INFOLIST_STRING:
|
||||
log_printf (" value (string) . . . : '%s'", (char *)ptr_var->value);
|
||||
log_printf (" value (string) . . . : '%s'", (char *)ptr_var->value);
|
||||
break;
|
||||
case INFOLIST_POINTER:
|
||||
log_printf (" value (pointer). . . : 0x%lx", ptr_var->value);
|
||||
log_printf (" value (pointer). . . : %p", ptr_var->value);
|
||||
break;
|
||||
case INFOLIST_BUFFER:
|
||||
log_printf (" value (buffer) . . . : 0x%lx", ptr_var->value);
|
||||
log_printf (" size of buffer . . . : %d", ptr_var->size);
|
||||
log_printf (" value (buffer) . . . : %p", ptr_var->value);
|
||||
log_printf (" size of buffer . . . : %d", ptr_var->size);
|
||||
break;
|
||||
case INFOLIST_TIME:
|
||||
log_printf (" value (time) . . . . : %lld", (long long)(*((time_t *)ptr_var->value)));
|
||||
break;
|
||||
case INFOLIST_NUM_TYPES:
|
||||
break;
|
||||
}
|
||||
log_printf (" prev_var . . . . . . : 0x%lx", ptr_var->prev_var);
|
||||
log_printf (" next_var . . . . . . : 0x%lx", ptr_var->next_var);
|
||||
log_printf (" prev_var . . . . . . : %p", ptr_var->prev_var);
|
||||
log_printf (" next_var . . . . . . : %p", ptr_var->next_var);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,6 +33,8 @@ enum t_infolist_type
|
||||
INFOLIST_POINTER,
|
||||
INFOLIST_BUFFER,
|
||||
INFOLIST_TIME,
|
||||
/* number of infolist types */
|
||||
INFOLIST_NUM_TYPES,
|
||||
};
|
||||
|
||||
struct t_infolist_var
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-input.c - default input callback for buffers
|
||||
* core-input.c - default input callback for buffers
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,11 +27,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-input.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-utf8.h"
|
||||
#include "core-input.h"
|
||||
#include "core-config.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-string.h"
|
||||
#include "core-utf8.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-filter.h"
|
||||
@@ -221,13 +221,10 @@ input_exec_command (struct t_gui_buffer *buffer,
|
||||
}
|
||||
|
||||
end:
|
||||
if (command)
|
||||
free (command);
|
||||
if (command_name)
|
||||
free (command_name);
|
||||
free (command);
|
||||
free (command_name);
|
||||
|
||||
if (new_commands_allowed)
|
||||
string_free_split (new_commands_allowed);
|
||||
string_free_split (new_commands_allowed);
|
||||
input_commands_allowed = old_commands_allowed;
|
||||
|
||||
return rc;
|
||||
@@ -246,7 +243,7 @@ end:
|
||||
|
||||
int
|
||||
input_data (struct t_gui_buffer *buffer, const char *data,
|
||||
const char *commands_allowed, int split_newline)
|
||||
const char *commands_allowed, int split_newline, int user_data)
|
||||
{
|
||||
char *pos, *buf, str_buffer[128], *new_data, *buffer_full_name;
|
||||
const char *ptr_data, *ptr_data_for_buffer;
|
||||
@@ -268,8 +265,7 @@ input_data (struct t_gui_buffer *buffer, const char *data,
|
||||
}
|
||||
|
||||
/* execute modifier "input_text_for_buffer" */
|
||||
snprintf (str_buffer, sizeof (str_buffer),
|
||||
"0x%lx", (unsigned long)buffer);
|
||||
snprintf (str_buffer, sizeof (str_buffer), "%p", buffer);
|
||||
new_data = hook_modifier_exec (NULL,
|
||||
"input_text_for_buffer",
|
||||
str_buffer,
|
||||
@@ -332,8 +328,20 @@ input_data (struct t_gui_buffer *buffer, const char *data,
|
||||
else
|
||||
{
|
||||
/* input string is a command */
|
||||
rc = input_exec_command (buffer, 1, buffer->plugin, ptr_data,
|
||||
commands_allowed);
|
||||
if (user_data && buffer->input_get_any_user_data)
|
||||
{
|
||||
/*
|
||||
* if data is sent from user and buffer catches any user data:
|
||||
* send it to callback
|
||||
*/
|
||||
input_exec_data (buffer, ptr_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* execute command on buffer */
|
||||
rc = input_exec_command (buffer, 1, buffer->plugin, ptr_data,
|
||||
commands_allowed);
|
||||
}
|
||||
}
|
||||
|
||||
if (pos)
|
||||
@@ -348,10 +356,8 @@ input_data (struct t_gui_buffer *buffer, const char *data,
|
||||
}
|
||||
|
||||
end:
|
||||
if (buffer_full_name)
|
||||
free (buffer_full_name);
|
||||
if (new_data)
|
||||
free (new_data);
|
||||
free (buffer_full_name);
|
||||
free (new_data);
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -385,14 +391,14 @@ input_data_timer_cb (const void *pointer, void *data, int remaining_calls)
|
||||
ptr_buffer,
|
||||
timer_args[1],
|
||||
timer_args[2],
|
||||
(string_strcmp (timer_args[3], "1") == 0) ? 1 : 0);
|
||||
(string_strcmp (timer_args[3], "1") == 0) ? 1 : 0,
|
||||
0); /* user_data */
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (timer_args[i])
|
||||
free (timer_args[i]);
|
||||
free (timer_args[i]);
|
||||
}
|
||||
free (timer_args);
|
||||
|
||||
@@ -418,7 +424,7 @@ input_data_delayed (struct t_gui_buffer *buffer, const char *data,
|
||||
char **timer_args, *new_commands_allowed;
|
||||
|
||||
if (delay < 1)
|
||||
return input_data (buffer, data, commands_allowed, split_newline);
|
||||
return input_data (buffer, data, commands_allowed, split_newline, 0);
|
||||
|
||||
timer_args = malloc (4 * sizeof (*timer_args));
|
||||
if (!timer_args)
|
||||
@@ -31,7 +31,8 @@ extern int input_exec_command (struct t_gui_buffer *buffer,
|
||||
const char *string,
|
||||
const char *commands_allowed);
|
||||
extern int input_data (struct t_gui_buffer *buffer, const char *data,
|
||||
const char *commands_allowed, int split_newline);
|
||||
const char *commands_allowed, int split_newline,
|
||||
int user_data);
|
||||
extern int input_data_delayed (struct t_gui_buffer *buffer, const char *data,
|
||||
const char *commands_allowed, int split_newline,
|
||||
long delay);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-list.c - sorted lists
|
||||
* core-list.c - sorted lists
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -27,9 +27,9 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-list.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -301,8 +301,7 @@ weelist_set (struct t_weelist_item *item, const char *value)
|
||||
if (!item || !value)
|
||||
return;
|
||||
|
||||
if (item->data)
|
||||
free (item->data);
|
||||
free (item->data);
|
||||
item->data = strdup (value);
|
||||
}
|
||||
|
||||
@@ -402,8 +401,7 @@ weelist_remove (struct t_weelist *weelist, struct t_weelist_item *item)
|
||||
(item->next_item)->prev_item = item->prev_item;
|
||||
|
||||
/* free data */
|
||||
if (item->data)
|
||||
free (item->data);
|
||||
free (item->data);
|
||||
free (item);
|
||||
weelist->items = new_items;
|
||||
|
||||
@@ -450,20 +448,20 @@ weelist_print_log (struct t_weelist *weelist, const char *name)
|
||||
struct t_weelist_item *ptr_item;
|
||||
int i;
|
||||
|
||||
log_printf ("[weelist %s (addr:0x%lx)]", name, weelist);
|
||||
log_printf (" items. . . . . . . . . : 0x%lx", weelist->items);
|
||||
log_printf (" last_item. . . . . . . : 0x%lx", weelist->last_item);
|
||||
log_printf ("[weelist %s (addr:%p)]", name, weelist);
|
||||
log_printf (" items. . . . . . . . . : %p", weelist->items);
|
||||
log_printf (" last_item. . . . . . . : %p", weelist->last_item);
|
||||
log_printf (" size . . . . . . . . . : %d", weelist->size);
|
||||
|
||||
i = 0;
|
||||
for (ptr_item = weelist->items; ptr_item;
|
||||
ptr_item = ptr_item->next_item)
|
||||
{
|
||||
log_printf (" [item %d (addr:0x%lx)]", i, ptr_item);
|
||||
log_printf (" data . . . . . . . . : '%s'", ptr_item->data);
|
||||
log_printf (" user_data. . . . . . : 0x%lx", ptr_item->user_data);
|
||||
log_printf (" prev_item. . . . . . : 0x%lx", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . . : 0x%lx", ptr_item->next_item);
|
||||
log_printf (" [item %d (addr:%p)]", i, ptr_item);
|
||||
log_printf (" data . . . . . . . . : '%s'", ptr_item->data);
|
||||
log_printf (" user_data. . . . . . : %p", ptr_item->user_data);
|
||||
log_printf (" prev_item. . . . . . : %p", ptr_item->prev_item);
|
||||
log_printf (" next_item. . . . . . : %p", ptr_item->next_item);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-log.c - WeeChat log file (weechat.log)
|
||||
* core-log.c - WeeChat log file (weechat.log)
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2006 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -38,10 +38,10 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-debug.h"
|
||||
#include "wee-string.h"
|
||||
#include "wee-version.h"
|
||||
#include "core-log.h"
|
||||
#include "core-debug.h"
|
||||
#include "core-string.h"
|
||||
#include "core-version.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ log_open (const char *filename, const char *mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
filename_length = strlen (weechat_data_dir) + 64;
|
||||
filename_length = strlen (weechat_state_dir) + 64;
|
||||
weechat_log_filename = malloc (filename_length);
|
||||
snprintf (weechat_log_filename, filename_length,
|
||||
"%s/%s", weechat_data_dir, WEECHAT_LOG_NAME);
|
||||
"%s/%s", weechat_state_dir, WEECHAT_LOG_NAME);
|
||||
weechat_log_file = fopen (weechat_log_filename, mode);
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ log_crash_rename ()
|
||||
|
||||
log_close ();
|
||||
|
||||
length = strlen (weechat_data_dir) + 128;
|
||||
length = strlen (weechat_state_dir) + 128;
|
||||
new_name = malloc (length);
|
||||
if (new_name)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ log_crash_rename ()
|
||||
local_time = localtime (&time_now);
|
||||
snprintf (new_name, length,
|
||||
"%s/weechat_crash_%04d%02d%02d_%d.log",
|
||||
weechat_data_dir,
|
||||
weechat_state_dir,
|
||||
local_time->tm_year + 1900,
|
||||
local_time->tm_mon + 1,
|
||||
local_time->tm_mday,
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-network.c - network functions
|
||||
* core-network.c - network functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
* Copyright (C) 2005-2010 Emmanuel Bouthenot <kolter@openics.org>
|
||||
@@ -55,14 +55,14 @@
|
||||
#include <gnutls/gnutls.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-network.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-eval.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-network.h"
|
||||
#include "core-config.h"
|
||||
#include "core-eval.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-hook.h"
|
||||
#include "core-config.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-string.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
@@ -228,15 +228,12 @@ network_load_user_ca_files (int force_display)
|
||||
ca_path);
|
||||
}
|
||||
}
|
||||
if (ca_path)
|
||||
free (ca_path);
|
||||
free (ca_path);
|
||||
}
|
||||
|
||||
end:
|
||||
if (paths)
|
||||
string_free_split (paths);
|
||||
if (options)
|
||||
hashtable_free (options);
|
||||
string_free_split (paths);
|
||||
hashtable_free (options);
|
||||
|
||||
network_num_certs_user = num_loaded;
|
||||
|
||||
@@ -448,7 +445,7 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address,
|
||||
snprintf (authbuf, sizeof (authbuf), "%s:%s", username, password);
|
||||
free (username);
|
||||
free (password);
|
||||
if (string_base64_encode (authbuf, strlen (authbuf), authbuf_base64) < 0)
|
||||
if (string_base64_encode (0, authbuf, strlen (authbuf), authbuf_base64) < 0)
|
||||
return 0;
|
||||
length = snprintf (buffer, sizeof (buffer),
|
||||
"CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: "
|
||||
@@ -1416,10 +1413,8 @@ network_connect_child (struct t_hook *hook_connect)
|
||||
}
|
||||
|
||||
end:
|
||||
if (status_with_string)
|
||||
free (status_with_string);
|
||||
if (res_reorder)
|
||||
free (res_reorder);
|
||||
free (status_with_string);
|
||||
free (res_reorder);
|
||||
if (res_local)
|
||||
freeaddrinfo (res_local);
|
||||
if (res_remote)
|
||||
@@ -1734,8 +1729,7 @@ network_connect_child_read_cb (const void *pointer, void *data, int fd)
|
||||
gnutls_strerror (rc),
|
||||
cb_ip_address);
|
||||
unhook (hook_connect);
|
||||
if (cb_ip_address)
|
||||
free (cb_ip_address);
|
||||
free (cb_ip_address);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
fcntl (HOOK_CONNECT(hook_connect, sock), F_SETFL,
|
||||
@@ -1756,8 +1750,7 @@ network_connect_child_read_cb (const void *pointer, void *data, int fd)
|
||||
"Error in the certificate.",
|
||||
cb_ip_address);
|
||||
unhook (hook_connect);
|
||||
if (cb_ip_address)
|
||||
free (cb_ip_address);
|
||||
free (cb_ip_address);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
#endif /* LIBGNUTLS_VERSION_NUMBER < 0x02090a */
|
||||
@@ -1808,10 +1801,8 @@ network_connect_child_read_cb (const void *pointer, void *data, int fd)
|
||||
unhook (hook_connect);
|
||||
}
|
||||
|
||||
if (cb_error)
|
||||
free (cb_error);
|
||||
if (cb_ip_address)
|
||||
free (cb_ip_address);
|
||||
free (cb_error);
|
||||
free (cb_ip_address);
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-proxy.c - proxy functions
|
||||
* core-proxy.c - proxy functions
|
||||
*
|
||||
* Copyright (C) 2003-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -28,12 +28,12 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-proxy.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-hdata.h"
|
||||
#include "wee-infolist.h"
|
||||
#include "wee-log.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-proxy.h"
|
||||
#include "core-config.h"
|
||||
#include "core-hdata.h"
|
||||
#include "core-infolist.h"
|
||||
#include "core-log.h"
|
||||
#include "core-string.h"
|
||||
#include "../plugins/plugin.h"
|
||||
|
||||
|
||||
@@ -181,8 +181,7 @@ proxy_set_name (struct t_proxy *proxy, const char *name)
|
||||
snprintf (option_name, length, "%s.password", name);
|
||||
config_file_option_rename (proxy->options[PROXY_OPTION_PASSWORD], option_name);
|
||||
|
||||
if (proxy->name)
|
||||
free (proxy->name);
|
||||
free (proxy->name);
|
||||
proxy->name = strdup (name);
|
||||
|
||||
free (option_name);
|
||||
@@ -457,18 +456,12 @@ proxy_new (const char *name, const char *type, const char *ipv6,
|
||||
option_username, option_password);
|
||||
if (!new_proxy)
|
||||
{
|
||||
if (option_type)
|
||||
config_file_option_free (option_type, 0);
|
||||
if (option_ipv6)
|
||||
config_file_option_free (option_ipv6, 0);
|
||||
if (option_address)
|
||||
config_file_option_free (option_address, 0);
|
||||
if (option_port)
|
||||
config_file_option_free (option_port, 0);
|
||||
if (option_username)
|
||||
config_file_option_free (option_username, 0);
|
||||
if (option_password)
|
||||
config_file_option_free (option_password, 0);
|
||||
config_file_option_free (option_type, 0);
|
||||
config_file_option_free (option_ipv6, 0);
|
||||
config_file_option_free (option_address, 0);
|
||||
config_file_option_free (option_port, 0);
|
||||
config_file_option_free (option_username, 0);
|
||||
config_file_option_free (option_password, 0);
|
||||
}
|
||||
|
||||
return new_proxy;
|
||||
@@ -528,8 +521,7 @@ proxy_use_temp_proxies ()
|
||||
{
|
||||
next_temp_proxy = weechat_temp_proxies->next_proxy;
|
||||
|
||||
if (weechat_temp_proxies->name)
|
||||
free (weechat_temp_proxies->name);
|
||||
free (weechat_temp_proxies->name);
|
||||
free (weechat_temp_proxies);
|
||||
|
||||
weechat_temp_proxies = next_temp_proxy;
|
||||
@@ -560,8 +552,7 @@ proxy_free (struct t_proxy *proxy)
|
||||
last_weechat_proxy = proxy->prev_proxy;
|
||||
|
||||
/* free data */
|
||||
if (proxy->name)
|
||||
free (proxy->name);
|
||||
free (proxy->name);
|
||||
for (i = 0; i < PROXY_NUM_OPTIONS; i++)
|
||||
{
|
||||
config_file_option_free (proxy->options[i], 1);
|
||||
@@ -664,17 +655,17 @@ proxy_print_log ()
|
||||
ptr_proxy = ptr_proxy->next_proxy)
|
||||
{
|
||||
log_printf ("");
|
||||
log_printf ("[proxy (addr:0x%lx)]", ptr_proxy);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_proxy->name);
|
||||
log_printf ("[proxy (addr:%p)]", ptr_proxy);
|
||||
log_printf (" name . . . . . . . . . : '%s'", ptr_proxy->name);
|
||||
log_printf (" type . . . . . . . . . : %d (%s)",
|
||||
CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE]),
|
||||
proxy_type_string[CONFIG_ENUM(ptr_proxy->options[PROXY_OPTION_TYPE])]);
|
||||
log_printf (" ipv6 . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_IPV6]));
|
||||
log_printf (" address. . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_ADDRESS]));
|
||||
log_printf (" port . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_PORT]));
|
||||
log_printf (" username . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_USERNAME]));
|
||||
log_printf (" password . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_PASSWORD]));
|
||||
log_printf (" prev_proxy . . . . . . : 0x%lx", ptr_proxy->prev_proxy);
|
||||
log_printf (" next_proxy . . . . . . : 0x%lx", ptr_proxy->next_proxy);
|
||||
log_printf (" ipv6 . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_IPV6]));
|
||||
log_printf (" address. . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_ADDRESS]));
|
||||
log_printf (" port . . . . . . . . . : %d", CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_PORT]));
|
||||
log_printf (" username . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_USERNAME]));
|
||||
log_printf (" password . . . . . . . : '%s'", CONFIG_STRING(ptr_proxy->options[PROXY_OPTION_PASSWORD]));
|
||||
log_printf (" prev_proxy . . . . . . : %p", ptr_proxy->prev_proxy);
|
||||
log_printf (" next_proxy . . . . . . : %p", ptr_proxy->next_proxy);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-secure-buffer.c - secured data buffer
|
||||
* core-secure-buffer.c - secured data buffer
|
||||
*
|
||||
* Copyright (C) 2013-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -29,13 +29,13 @@
|
||||
#include <gcrypt.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-secure-buffer.h"
|
||||
#include "wee-secure-config.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-crypto.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-secure.h"
|
||||
#include "core-secure-buffer.h"
|
||||
#include "core-secure-config.h"
|
||||
#include "core-string.h"
|
||||
#include "../gui/gui-buffer.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-color.h"
|
||||
@@ -201,7 +201,7 @@ secure_buffer_assign ()
|
||||
{
|
||||
if (!secure_buffer)
|
||||
{
|
||||
secure_buffer = gui_buffer_search_by_name (NULL, SECURE_BUFFER_NAME);
|
||||
secure_buffer = gui_buffer_search (NULL, SECURE_BUFFER_NAME);
|
||||
if (secure_buffer)
|
||||
{
|
||||
secure_buffer->input_callback = &secure_buffer_input_cb;
|
||||
@@ -244,8 +244,7 @@ secure_buffer_open ()
|
||||
|
||||
secure_buffer_display_values = 0;
|
||||
|
||||
if (properties)
|
||||
hashtable_free (properties);
|
||||
hashtable_free (properties);
|
||||
}
|
||||
|
||||
if (!secure_buffer)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* wee-secure-config.c - secured data configuration options (file sec.conf)
|
||||
* core-secure-config.c - secured data configuration options (file sec.conf)
|
||||
*
|
||||
* Copyright (C) 2013-2024 Sébastien Helleu <flashcode@flashtux.org>
|
||||
*
|
||||
@@ -29,12 +29,12 @@
|
||||
#include <gcrypt.h>
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config-file.h"
|
||||
#include "wee-crypto.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-secure.h"
|
||||
#include "wee-secure-config.h"
|
||||
#include "wee-string.h"
|
||||
#include "core-config-file.h"
|
||||
#include "core-crypto.h"
|
||||
#include "core-hashtable.h"
|
||||
#include "core-secure.h"
|
||||
#include "core-secure-config.h"
|
||||
#include "core-string.h"
|
||||
#include "../gui/gui-chat.h"
|
||||
#include "../gui/gui-main.h"
|
||||
#include "../gui/gui-window.h"
|
||||
@@ -336,8 +336,7 @@ secure_config_data_read_cb (const void *pointer, void *data,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (decrypted)
|
||||
free (decrypted);
|
||||
free (decrypted);
|
||||
if (gui_init_ok)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
@@ -422,7 +421,7 @@ secure_config_data_write_map_cb (void *data,
|
||||
{
|
||||
/* encrypt password using passphrase */
|
||||
rc = secure_encrypt_data (
|
||||
value, strlen (value) + 1,
|
||||
(const char *)value, strlen ((const char *)value) + 1,
|
||||
hash_algo,
|
||||
cipher,
|
||||
secure_passphrase,
|
||||
@@ -457,7 +456,8 @@ secure_config_data_write_map_cb (void *data,
|
||||
else
|
||||
{
|
||||
/* store password as plain text */
|
||||
config_file_write_line (config_file, key, "\"%s\"", value);
|
||||
config_file_write_line (config_file, key,
|
||||
"\"%s\"", (const char *)value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ secure_config_data_write_map_encrypted_cb (void *data,
|
||||
config_file = (struct t_config_file *)data;
|
||||
|
||||
/* store data as-is (it is already encrypted) */
|
||||
config_file_write_line (config_file, key, "\"%s\"", value);
|
||||
config_file_write_line (config_file, key, "\"%s\"", (const char *)value);
|
||||
}
|
||||
|
||||
/*
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user