diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-04 21:41:34 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-04 21:41:34 +0100 |
commit | e3c63849720f968b6ef4087a137b693b0f7f1481 (patch) | |
tree | 0693ee54c773580c590a1679be98e36a3cbc4d99 | |
parent | f5a65c9b2ba45e20b2f7fe118961fd04c9b2466f (diff) | |
download | weechat-e3c63849720f968b6ef4087a137b693b0f7f1481.zip |
doc: use one line titles and less chars for delimited blocks/tables in asciidoc files
147 files changed, 11283 insertions, 13358 deletions
diff --git a/doc/de/autogen/plugin_api/completions.txt b/doc/de/autogen/plugin_api/completions.txt index fd41fd190..86844baba 100644 --- a/doc/de/autogen/plugin_api/completions.txt +++ b/doc/de/autogen/plugin_api/completions.txt @@ -1,5 +1,5 @@ [width="65%",cols="^1,^2,8",options="header"] -|======================================== +|=== | Erweiterung | Name | Beschreibung | alias | alias | Liste der Alias @@ -130,4 +130,4 @@ | xfer | nick | Nicks vom DCC Chat -|======================================== +|=== diff --git a/doc/de/autogen/plugin_api/infolists.txt b/doc/de/autogen/plugin_api/infolists.txt index 5637cf2ea..21349ad8b 100644 --- a/doc/de/autogen/plugin_api/infolists.txt +++ b/doc/de/autogen/plugin_api/infolists.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,5,5,5",options="header"] -|======================================== +|=== | Erweiterung | Name | Beschreibung | Pointer | Argumente | alias | alias | Liste der Alias | Alias Pointer (optional) | Alias Name (darf mit einem "*" als Platzhalter beginnen oder enden) (optional) @@ -70,4 +70,4 @@ | xfer | xfer | Transferliste | Transferpointer (optional) | - -|======================================== +|=== diff --git a/doc/de/autogen/plugin_api/infos.txt b/doc/de/autogen/plugin_api/infos.txt index 4e42fda47..b3d8492ad 100644 --- a/doc/de/autogen/plugin_api/infos.txt +++ b/doc/de/autogen/plugin_api/infos.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,6,6",options="header"] -|======================================== +|=== | Erweiterung | Name | Beschreibung | Argumente | aspell | aspell_dict | durch Kommata getrennte Liste von Wörterbüchern, die in diesem Buffer genutzt werden sollen | Buffer-Pointer ("0x12345678") oder der vollständige Buffername ("irc.freenode.#weechat") @@ -62,4 +62,4 @@ | weechat | weechat_upgrading | 1 falls WeeChat ein Upgrade durchführt (Befehl `/upgrade`) | - -|======================================== +|=== diff --git a/doc/de/autogen/plugin_api/infos_hashtable.txt b/doc/de/autogen/plugin_api/infos_hashtable.txt index a01b5a241..836bd8678 100644 --- a/doc/de/autogen/plugin_api/infos_hashtable.txt +++ b/doc/de/autogen/plugin_api/infos_hashtable.txt @@ -1,9 +1,9 @@ [width="100%",cols="^1,^2,6,6,6",options="header"] -|======================================== +|=== | Erweiterung | Name | Beschreibung | Hashtable (Eingabe) | Hashtable (Ausgabe) | irc | irc_message_parse | Parse eine IRC Nachricht | "message": IRC Nachricht, "server": Servername (optional) | "tags": Tags, "message_without_tags": Nachrichten ohne Tags, "nick": Nick, "host": Host, "command": Befehl, "channel": Channel, "arguments": Argumente (schließt Channel ein) | irc | irc_message_split | dient zum Aufteilen einer überlangen IRC Nachricht (in maximal 512 Bytes große Nachrichten) | "message": IRC Nachricht, "server": Servername (optional) | "msg1" ... "msgN": Nachrichten die versendet werden sollen (ohne abschließendes "\r\n"), "args1" ... "argsN": Argumente für Nachrichten, "count": Anzahl der Nachrichten -|======================================== +|=== diff --git a/doc/de/autogen/plugin_api/url_options.txt b/doc/de/autogen/plugin_api/url_options.txt index 4ca83e124..3693cfae9 100644 --- a/doc/de/autogen/plugin_api/url_options.txt +++ b/doc/de/autogen/plugin_api/url_options.txt @@ -1,5 +1,5 @@ [width="100%",cols="2,^1,7",options="header"] -|======================================== +|=== | Option | Type | Konstanten ^(1)^ | verbose | long | @@ -298,4 +298,4 @@ | new_directory_perms | long | -|======================================== +|=== diff --git a/doc/de/autogen/user/alias_commands.txt b/doc/de/autogen/user/alias_commands.txt index 732c72989..527e0903c 100644 --- a/doc/de/autogen/user/alias_commands.txt +++ b/doc/de/autogen/user/alias_commands.txt @@ -1,7 +1,7 @@ [[command_alias_alias]] [command]*`alias`* Einem Befehl wird ein Alias zugewiesen:: ----------------------------------------- +---- /alias [-completion <completion>] <alias> [<command> [;<command>...]] completion: optionale Vervollständigung für einen Alias-Befehl (Standardverhalten: Vervollständigung wird auf den Zielbefehl angewendet) @@ -30,5 +30,5 @@ Beispiele: /alias hallo /allchan -exclude=#weechat msg * Hallo Alias "/forcejoin" wird angelegt um den IRC Befehl "forcejoin" mit einer Vervollständigung von /sajoin auszuführen: /alias -completion %%sajoin forcejoin /quote forcejoin ----------------------------------------- +---- diff --git a/doc/de/autogen/user/aspell_commands.txt b/doc/de/autogen/user/aspell_commands.txt index 5e2eccf11..832c068af 100644 --- a/doc/de/autogen/user/aspell_commands.txt +++ b/doc/de/autogen/user/aspell_commands.txt @@ -1,7 +1,7 @@ [[command_aspell_aspell]] [command]*`aspell`* Konfiguration für Aspell-Erweiterung:: ----------------------------------------- +---- /aspell enable|disable|toggle listdict setdict <dict>[,<dict>...] @@ -23,5 +23,5 @@ Um Aspell auf alle Buffer anzuwenden sollte die Option "default_dict" genutzt un /aspell enable Die Standardtastaturbelegung zum Umschalten der Aspell Funktionalität lautet alt-s. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/charset_commands.txt b/doc/de/autogen/user/charset_commands.txt index 87286a715..9975be767 100644 --- a/doc/de/autogen/user/charset_commands.txt +++ b/doc/de/autogen/user/charset_commands.txt @@ -1,7 +1,7 @@ [[command_charset_charset]] [command]*`charset`* Ändert den Zeichensatz für aktuellen Buffer:: ----------------------------------------- +---- /charset decode|encode <charset> reset @@ -9,5 +9,5 @@ encode: ändere Zeichensatz zum kodieren charset: wähle neuen Zeichensatz für aktuellen Buffer reset: setze im aktuellen Buffer den Zeichensatz zurück ----------------------------------------- +---- diff --git a/doc/de/autogen/user/guile_commands.txt b/doc/de/autogen/user/guile_commands.txt index ef6d51239..d6c259d18 100644 --- a/doc/de/autogen/user/guile_commands.txt +++ b/doc/de/autogen/user/guile_commands.txt @@ -1,7 +1,7 @@ [[command_guile_guile]] [command]*`guile`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /guile list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt index 74f409bb1..270f014b7 100644 --- a/doc/de/autogen/user/irc_commands.txt +++ b/doc/de/autogen/user/irc_commands.txt @@ -1,16 +1,16 @@ [[command_irc_admin]] [command]*`admin`* Information über den Server-Administrator abfragen:: ----------------------------------------- +---- /admin [<target>] target: Server ----------------------------------------- +---- [[command_irc_allchan]] [command]*`allchan`* Führt einen Befehl aus der an alle Channels gesendet wird, die mit einem Server verbunden sind:: ----------------------------------------- +---- /allchan [-current] [-exclude=<channel>[,<channel>...]] <command> [<arguments>] -current: führt einen Befehl aus der an alle Channels des aktuellen Servers gesendet wird @@ -25,12 +25,12 @@ Beispiele: /allchan -exclude=#weechat msg * Hallo Welt Schicke 'Hallo Welt' an jeden Channel, ausgenommen an den #weechat Channel und Channels die mit #linux beginnen: /allchan -exclude=#weechat,#linux* msg * Hallo Welt ----------------------------------------- +---- [[command_irc_allserv]] [command]*`allserv`* führt einen Befehl aus, der zu allen verbundenen Server gesendet wird:: ----------------------------------------- +---- /allserv [-exclude=<server>[,<server>...]] <command> [<arguments>] -exclude: dient zum Ausschluss ausgewählter Server ('*' wird zu Beginn oder am Ende des Servernamens akzeptiert, um mehrere Server auszuschließen) @@ -44,24 +44,24 @@ Beispiele: /allserv away I'm away führt ein whois mit meinem nick auf allen Servern aus: /allserv whois $nick ----------------------------------------- +---- [[command_irc_ban]] [command]*`ban`* Nicknamen oder Hosts sperren/verbannen:: ----------------------------------------- +---- /ban [<channel>] [<nick> [<nick>...]] channel: Channel in dem der Bann ausgeführt werden soll nick: User oder Host für den der Bann gelten soll Ohne Angabe von Argumenten wird die Ban-Liste für den aktuellen Channel angezeigt. ----------------------------------------- +---- [[command_irc_connect]] [command]*`connect`* Mit IRC-Server(n) verbinden:: ----------------------------------------- +---- /connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-auto|-open [-nojoin] [-switch] @@ -85,33 +85,33 @@ Beispiele: /connect my.server.org/6697 -ssl -password=test /connect irc://nick@irc.oftc.net/#channel /connect -switch ----------------------------------------- +---- [[command_irc_ctcp]] [command]*`ctcp`* CTCP-Nachricht verschicken:: ----------------------------------------- +---- /ctcp <target> <type> [<arguments>] target: User oder Channel an welchen eine CTCP-Nachricht geschickt werden soll type: CTCP-Nachricht (z.B. "version", "ping", ..) arguments: Argumente für CTCP ----------------------------------------- +---- [[command_irc_cycle]] [command]*`cycle`* Einen Channel verlassen und wieder betreten:: ----------------------------------------- +---- /cycle [<channel>[,<channel>...]] [<message>] channel: Name des Channels message: Nachricht beim Verlassen des Channels (wird den anderen Usern im Channel angezeigt) ----------------------------------------- +---- [[command_irc_dcc]] [command]*`dcc`* Startet DCC Verbindung (Datentransfer oder einen Direktchat):: ----------------------------------------- +---- /dcc chat <nick> send <nick> <file> @@ -123,76 +123,76 @@ Beispiel: /dcc chat toto Sendet die Datei "/home/foo/bar.txt" an den User "toto" /dcc send toto /home/foo/bar.txt ----------------------------------------- +---- [[command_irc_dehalfop]] [command]*`dehalfop`* halb-Operator-Privilegien einem oder mehreren Nick(s) entziehen:: ----------------------------------------- +---- /dehalfop <nick> [<nick>...] nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: entzieht allen Nicks im Channel den half-operator-Status, ausgenommen sich selber ----------------------------------------- +---- [[command_irc_deop]] [command]*`deop`* Operator-Privilegien einem oder mehreren Nicknamen entziehen:: ----------------------------------------- +---- /deop <nick> [<nick>...] * -yes nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: entzieht allen Nicks im Channel den Operator-Status, ausgenommen sich selber ----------------------------------------- +---- [[command_irc_devoice]] [command]*`devoice`* Voice-Privilegien einem oder mehreren Nicknamen entziehen:: ----------------------------------------- +---- /devoice <nick> [<nick>...] * -yes nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: entzieht allen Nicks im Channel den voice-Status ----------------------------------------- +---- [[command_irc_die]] [command]*`die`* Server herunterfahren:: ----------------------------------------- +---- /die [<target>] target: Servername ----------------------------------------- +---- [[command_irc_disconnect]] [command]*`disconnect`* Verbindung zu einem oder mehreren IRC-Server(n) trennen:: ----------------------------------------- +---- /disconnect [<server>|-all|-pending [<reason>]] server: Name des Servers zu dem die Verbindung getrennt werden soll -all: Verbindung zu allen Servern trennen -pending: bricht eine automatische Wiederverbindung für Server ab, zu denen gerade eine Wiederverbindung aufgebaut werden soll reason: Begründung der Trennung ----------------------------------------- +---- [[command_irc_halfop]] [command]*`halfop`* halb-Operator Status an Nick(s) vergeben:: ----------------------------------------- +---- /halfop <nick> [<nick>...] * -yes nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: vergibt an alle Nicks im Channel den half-operator-Status ----------------------------------------- +---- [[command_irc_ignore]] [command]*`ignore`* Ignoriert Nicks/Hosts von Channels oder Servern:: ----------------------------------------- +---- /ignore list add [re:]<nick> [<server> [<channel>]] del <number>|-all @@ -215,40 +215,40 @@ Beispiele: /ignore add toto@domain.com freenode ignoriert den Host "toto*@*.domain.com" im Chat freenode/#weechat: /ignore add toto*@*.domain.com freenode #weechat ----------------------------------------- +---- [[command_irc_info]] [command]*`info`* Information über den Server abfragen:: ----------------------------------------- +---- /info [<target>] target: Servername ----------------------------------------- +---- [[command_irc_invite]] [command]*`invite`* Eine Person in einen Channel einladen:: ----------------------------------------- +---- /invite <nick> [<nick>...] [<channel>] nick: Nick welcher eingeladen werden soll channel: Channel für den die Einladung gelten soll ----------------------------------------- +---- [[command_irc_ison]] [command]*`ison`* Überprüft ob ein Nick gegenwärtig auf IRC angemeldet ist:: ----------------------------------------- +---- /ison <nick> [<nick>...] nick: Nickname ----------------------------------------- +---- [[command_irc_join]] [command]*`join`* einen Channel betreten:: ----------------------------------------- +---- /join [-noswitch] [-server <server>] [<channel1>[,<channel2>...]] [<key1>[,<key2>...]] -noswitch: es wird nicht zu dem angegebenen Channel gewechselt @@ -261,23 +261,23 @@ Beispiele: /join #geschützter_Channel,#weechat Zugriffsschlüssel /join -server freenode #weechat /join -noswitch #weechat ----------------------------------------- +---- [[command_irc_kick]] [command]*`kick`* Einen User aus einem Channel herauswerfen:: ----------------------------------------- +---- /kick [<channel>] <nick> [<reason>] channel: Channel in dem der Benutzers sich befindet nick: Nick der rausgeworfen werden soll reason: Begründung für den Rauswurf (Variablen die genutzt werden können: $nick, $channel und $server) ----------------------------------------- +---- [[command_irc_kickban]] [command]*`kickban`* wirft jemanden aus dem Channel und verbannt ihn:: ----------------------------------------- +---- /kickban [<channel>] <nick> [<reason>] channel: Channel in dem sich der User befindet @@ -289,32 +289,32 @@ Es ist möglich kick/ban mittels einer Maske durchzuführen. Der Nick wird aus d Beispiel: Sperre "*!*@host.com" und kicke dann "toto": /kickban toto!*@host.com ----------------------------------------- +---- [[command_irc_kill]] [command]*`kill`* Beende Client-Server Verbindung:: ----------------------------------------- +---- /kill <nick> <reason> nick: Nickname, der Person, die rausgeworfen werden soll reason: Begründung für den Rauswurf ----------------------------------------- +---- [[command_irc_links]] [command]*`links`* alle Servernamen auflisten die dem antwortenden Server bekannt sind:: ----------------------------------------- +---- /links [[<server>] <server_mask>] server: dieser Server soll die Anfrage beantworten server_mask: die aufzulistenden Server sollen diesem Muster entsprechen ----------------------------------------- +---- [[command_irc_list]] [command]*`list`* Channels mit ihrem Thema auflisten:: ----------------------------------------- +---- /list [<channel>[,<channel>...]] [<server>] [-re <regex>] channel: aufzulistender Channel @@ -328,37 +328,37 @@ Beispiele: /list #weechat listet alle Channels auf die mit "#weechat" beginnen (dies kann bei großen Netzwerken sehr lange dauern): /list -re #weechat.* ----------------------------------------- +---- [[command_irc_lusers]] [command]*`lusers`* Statistik über die Größe des IRC-Netzwerks abfragen:: ----------------------------------------- +---- /lusers [<mask> [<target>]] mask: ausschließlich Server, die diesem Muster entsprechen target: Server, der die Anfrage weiterleiten soll ----------------------------------------- +---- [[command_irc_map]] [command]*`map`* Zeigt das IRC Netzwerk, in Form einer Baumstruktur, an:: ----------------------------------------- ----------------------------------------- +---- +---- [[command_irc_me]] [command]*`me`* eine CTCP ACTION an den aktuellen Channel senden:: ----------------------------------------- +---- /me <message> message: zu sendende Nachricht ----------------------------------------- +---- [[command_irc_mode]] [command]*`mode`* Modus von einem Channel oder User ändern:: ----------------------------------------- +---- /mode [<channel>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<arguments>] <nick> [+|-]i|s|w|o @@ -390,62 +390,62 @@ Beispiele: /mode #weechat +t um sich auf dem Server unsichtbar machen: /mode nick +i ----------------------------------------- +---- [[command_irc_motd]] [command]*`motd`* Die "Mitteilung des Tages" abfragen:: ----------------------------------------- +---- /motd [<target>] target: Servername ----------------------------------------- +---- [[command_irc_msg]] [command]*`msg`* Nachricht an Nick/Channel verschicken:: ----------------------------------------- +---- /msg [-server <server>] <target>[,<target>...] <text> server: schicke an diesen Server (interner Servername) target: Nick oder Channel (darf eine Maske sein, '*' = aktueller Channel) text: zu sendender Text ----------------------------------------- +---- [[command_irc_names]] [command]*`names`* Nicknamen in Channels auflisten:: ----------------------------------------- +---- /names [<channel>[,<channel>...]] channel: Name des Channels ----------------------------------------- +---- [[command_irc_nick]] [command]*`nick`* derzeitigen Nicknamen ändern:: ----------------------------------------- +---- /nick [-all] <nick> -all: Nickname auf allen verbundenen Servern ändern nick: neuer Nickname ----------------------------------------- +---- [[command_irc_notice]] [command]*`notice`* Mitteilung (notice) an einen User verschicken:: ----------------------------------------- +---- /notice [-server <server>] <target> <text> server: an diesen Server senden (interner Name) target: Nickname oder Channel text: zu sendender Text ----------------------------------------- +---- [[command_irc_notify]] [command]*`notify`* fügt eine Benachrichtigung für An- oder Abwesenheit von Nicks auf Servern hinzu:: ----------------------------------------- +---- /notify add <nick> [<server> [-away]] del <nick>|-all [<server>] @@ -465,96 +465,96 @@ Beispiele: /notify add toto freenode Benachrichtigung falls "toto" den Befehl away am freenode Server nutzt: /notify add toto freenode -away ----------------------------------------- +---- [[command_irc_op]] [command]*`op`* Channel-Operator Status an Nicknamen vergeben:: ----------------------------------------- +---- /op <nick> [<nick>...] * -yes nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: vergibt an alle Nicks im Channel den Operator-Status ----------------------------------------- +---- [[command_irc_oper]] [command]*`oper`* Operator Privilegien anfordern:: ----------------------------------------- +---- /oper <user> <password> user: Username password: Passwort ----------------------------------------- +---- [[command_irc_part]] [command]*`part`* Einen Channel verlassen:: ----------------------------------------- +---- /part [<channel>[,<channel>...]] [<message>] channel: Name des Channels welcher verlassen werden soll message: Abschiedsnachricht (wird anderen Usern angezeigt) ----------------------------------------- +---- [[command_irc_ping]] [command]*`ping`* sendet einen Ping an den Server:: ----------------------------------------- +---- /ping <server1> [<server2>] server1: Server server2: Ping an diesen Server weiterleiten ----------------------------------------- +---- [[command_irc_pong]] [command]*`pong`* Auf Ping antworten:: ----------------------------------------- +---- /pong <daemon> [<daemon2>] Daemon: Daemon welcher auf die Ping-Nachricht geantwortet hat Daemon2: Nachricht an diesen Daemon weiterleiten ----------------------------------------- +---- [[command_irc_query]] [command]*`query`* Eine private Nachricht an einen Nick schicken:: ----------------------------------------- +---- /query [-server <server>] <nick>[,<nick>...] [<text>] server: an diesen Server senden (interner Name) nick: Nickname für privaten Chat text: Text der gesendet werden soll ----------------------------------------- +---- [[command_irc_quiet]] [command]*`quiet`* Nicks oder Hosts das Wort entziehen (User können im Channel erst schreiben, wenn sie "+v" oder höher besitzen):: ----------------------------------------- +---- /quiet [<channel>] [<nick> [<nick>...]] channel: Channel in dem jemanden das Wort entzogen werden soll nick: User oder Host dem das Wort entzogen werden soll Ohne Angabe von Argumenten wird, für den aktuellen Channel, eine Liste ausgegeben mit den User/Hosts denen das Wort entzogen worden ist. ----------------------------------------- +---- [[command_irc_quote]] [command]*`quote`* Daten direkt an Server senden (siehe RFC 2812):: ----------------------------------------- +---- /quote [-server <server>] <data> server: an diesen Server senden (interner Name wird genutzt) data: unbearbeitete (RAW) Daten die gesendet werden sollen ----------------------------------------- +---- [[command_irc_reconnect]] [command]*`reconnect`* Mit einem oder mehreren Server(n) erneut verbinden:: ----------------------------------------- +---- /reconnect <server> [<server>...] [-nojoin] [-switch] -all [-nojoin] [-switch] @@ -562,80 +562,80 @@ data: unbearbeitete (RAW) Daten die gesendet werden sollen -all: mit allen Servern neu verbinden -nojoin: Channels werden nicht betreten (auch falls autojoin für diesen Server aktiviert ist) -switch: wechselt zur nächsten Server-Adresse ----------------------------------------- +---- [[command_irc_rehash]] [command]*`rehash`* Den Server auffordern seine Konfigurationsdatei neu zu laden:: ----------------------------------------- +---- /rehash [<option>] option: zusätzliche Option, die von manchen Servern berücksichtigt wird ----------------------------------------- +---- [[command_irc_restart]] [command]*`restart`* Server dazu bringen sich selbst neu zu starten:: ----------------------------------------- +---- /restart [<target>] target: Servername ----------------------------------------- +---- [[command_irc_sajoin]] [command]*`sajoin`* zwingt einen User einen oder mehrere Channel zu betreten:: ----------------------------------------- +---- /sajoin <nick> <channel>[,<channel>...] nick: Nickname channel: Name des Channels ----------------------------------------- +---- [[command_irc_samode]] [command]*`samode`* Ändert den Modus des Channels ohne das Operator-Privilegien vorliegen:: ----------------------------------------- +---- /samode <channel> <mode> Channel: Name des Channel Mode: neuer Modus für Channel ----------------------------------------- +---- [[command_irc_sanick]] [command]*`sanick`* Zwingt einen User den Nick zu ändern:: ----------------------------------------- +---- /sanick <nick> <new_nick> nick: Nickname new_nick: neuer Nickname ----------------------------------------- +---- [[command_irc_sapart]] [command]*`sapart`* Zwingt einen User den oder die Channel(s) zu verlassen:: ----------------------------------------- +---- /sapart <nick> <channel>[,<channel>...] nick: Nickname channel: Name des Channels ----------------------------------------- +---- [[command_irc_saquit]] [command]*`saquit`* Zwingt einen User den Server mit Begründung zu verlassen:: ----------------------------------------- +---- /saquit <nick> <reason> nick: Nickname reason: Grund der Abmeldung ----------------------------------------- +---- [[command_irc_server]] [command]*`server`* Auflisten, Hinzufügen oder Entfernen von IRC-Servern:: ----------------------------------------- +---- /server list|listfull [<server>] add <server> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>] copy|rename <server> <new_name> @@ -668,179 +668,179 @@ Beispiele: /server rename oftc newoftc /server del freenode /server deloutq ----------------------------------------- +---- [[command_irc_service]] [command]*`service`* Einen neuen Service eintragen:: ----------------------------------------- +---- /service <nick> <reserved> <distribution> <type> <reserved> <info> distribution: Sichtbarkeit des Services type: für spätere Verwendung reserviert ----------------------------------------- +---- [[command_irc_servlist]] [command]*`servlist`* Auflistung von Services die momentan mit dem Netzwerk verbunden sind:: ----------------------------------------- +---- /servlist [<mask> [<type>]] mask: nur zutreffende Services auflisten type: nur Services von diesem Typ auflisten ----------------------------------------- +---- [[command_irc_squery]] [command]*`squery`* Nachricht an einen Service senden:: ----------------------------------------- +---- /squery <service> <text> service: Name des Service text: zu sendender Text ----------------------------------------- +---- [[command_irc_squit]] [command]*`squit`* Verbindung zum Server trennen:: ----------------------------------------- +---- /squit <server> <comment> server: Name des Servers comment: Trennungsgrund ----------------------------------------- +---- [[command_irc_stats]] [command]*`stats`* Serverstatistik abfragen:: ----------------------------------------- +---- /stats [<query> [<server>]] query: c/h/i/k/l/m/o/y/u (siehe RFC1459) server: Name des Servers ----------------------------------------- +---- [[command_irc_summon]] [command]*`summon`* Nutzer die auf dem IRC-Server arbeiten darum bitten auf den IRC-Server zu kommen:: ----------------------------------------- +---- /summon <user> [<target> [<channel>]] user: Benutzername target: Servername channel: Channelname ----------------------------------------- +---- [[command_irc_time]] [command]*`time`* Ortszeit des Servers abfragen:: ----------------------------------------- +---- /time [<target>] target: Zeit des angegebenen Servers abfragen ----------------------------------------- +---- [[command_irc_topic]] [command]*`topic`* Thema des Channels abfragen/setzen:: ----------------------------------------- +---- /topic [<channel>] [<topic>|-delete] channel: Name des Channels topic: Thema für den Channel -delete: entfernt das Thema des Channels ----------------------------------------- +---- [[command_irc_trace]] [command]*`trace`* Route zum angegebenen Server ermitteln:: ----------------------------------------- +---- /trace [<target>] target: Server ----------------------------------------- +---- [[command_irc_unban]] [command]*`unban`* Bann aufheben (Nicks oder Hosts):: ----------------------------------------- +---- /unban [<channel>] <nick> [<nick>...] channel: Channel in dem der Bann aufzuheben ist nick: User oder Host für den der Bann aufzuheben ist ----------------------------------------- +---- [[command_irc_userhost]] [command]*`userhost`* Zeigt Informationen zu Nicknamen an:: ----------------------------------------- +---- /userhost <nick> [<nick>...] nick: Nickname ----------------------------------------- +---- [[command_irc_users]] [command]*`users`* Auflistung der User die bei dem Server angemeldet sind:: ----------------------------------------- +---- /users [<target>] target: Server ----------------------------------------- +---- [[command_irc_version]] [command]*`version`* Versionsinformation des Nicknamen oder Servers ermitteln (des aktuellen oder angegebenen Nick/Server):: ----------------------------------------- +---- /version [<server>|<nick>] server: Servername nick: Nickname ----------------------------------------- +---- [[command_irc_voice]] [command]*`voice`* Voice an Nick(s) vergeben:: ----------------------------------------- +---- /voice <nick> [<nick>...] nick: Nick oder Maske (darf mit einem "*" als Platzhalter beginnen oder enden) *: vergibt an alle Nicks im Channel den voice-Status ----------------------------------------- +---- [[command_irc_wallchops]] [command]*`wallchops`* Nachricht an Channel-Operator verschicken:: ----------------------------------------- +---- /wallchops [<channel>] <text> channel: Name des Channel text: Text der versendet werden soll ----------------------------------------- +---- [[command_irc_wallops]] [command]*`wallops`* Nachricht an alle User schicken die den 'w'-Mode gesetzt haben:: ----------------------------------------- +---- /wallops <text> text: Text der gesendet werden soll ----------------------------------------- +---- [[command_irc_who]] [command]*`who`* sendet eine Anfrage die eine Anzahl von Informationen zurück gibt:: ----------------------------------------- +---- /who [<mask> [o]] mask: nur Information über betreffende Nicknamen abfragen o: nur Operatoren ausgeben, die dem Filter entsprechen ----------------------------------------- +---- [[command_irc_whois]] [command]*`whois`* Information über User abfragen:: ----------------------------------------- +---- /whois [<server>] [<nick>[,<nick>...]] server: Name des Servers (interner Servername) @@ -849,16 +849,16 @@ server: Name des Servers (interner Servername) Ohne Angabe von Argumenten, nutzt /whois folgende Nicks: - den eigenen Nick, falls es sich um einen Server/Channel Buffer handelt - den Nick des Gesprächspartners, falls es sich um einen privaten Buffer handelt. ----------------------------------------- +---- [[command_irc_whowas]] [command]*`whowas`* Informationen über einen nicht mehr angemeldeten Nicknamen abfragen:: ----------------------------------------- +---- /whowas <nick>[,<nick>...] [<count> [<target>]] nick: Nickname, welcher gesucht werden soll count: maximale Anzahl an Antworten (negative Zahl für eine vollständige Liste) target: Antwort soll auf diese Suchmaske zutreffen ----------------------------------------- +---- diff --git a/doc/de/autogen/user/logger_commands.txt b/doc/de/autogen/user/logger_commands.txt index cfce767c2..264cdef91 100644 --- a/doc/de/autogen/user/logger_commands.txt +++ b/doc/de/autogen/user/logger_commands.txt @@ -1,7 +1,7 @@ [[command_logger_logger]] [command]*`logger`* Konfiguration für "logger" Erweiterung (dient zum protokollieren der Buffer):: ----------------------------------------- +---- /logger list set <level> flush @@ -33,5 +33,5 @@ Beispiele: /set logger.level.core.weechat 0 Für jeden IRC-Server wird ein separates Verzeichnis erstellt und darin eine eigene Protokoll-Datei, für jeden Channel: /set logger.mask.irc "$server/$channel.weechatlog" ----------------------------------------- +---- diff --git a/doc/de/autogen/user/lua_commands.txt b/doc/de/autogen/user/lua_commands.txt index 0a9430a91..90f506d97 100644 --- a/doc/de/autogen/user/lua_commands.txt +++ b/doc/de/autogen/user/lua_commands.txt @@ -1,7 +1,7 @@ [[command_lua_lua]] [command]*`lua`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /lua list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/perl_commands.txt b/doc/de/autogen/user/perl_commands.txt index 7fbf5d544..351948225 100644 --- a/doc/de/autogen/user/perl_commands.txt +++ b/doc/de/autogen/user/perl_commands.txt @@ -1,7 +1,7 @@ [[command_perl_perl]] [command]*`perl`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /perl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/python_commands.txt b/doc/de/autogen/user/python_commands.txt index baff4042b..bbe779912 100644 --- a/doc/de/autogen/user/python_commands.txt +++ b/doc/de/autogen/user/python_commands.txt @@ -1,7 +1,7 @@ [[command_python_python]] [command]*`python`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /python list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/relay_commands.txt b/doc/de/autogen/user/relay_commands.txt index 11c44b9e7..a326b630b 100644 --- a/doc/de/autogen/user/relay_commands.txt +++ b/doc/de/autogen/user/relay_commands.txt @@ -1,7 +1,7 @@ [[command_relay_relay]] [command]*`relay`* Relay-Kontrolle:: ----------------------------------------- +---- /relay list|listfull|listrelay add [ipv4.][ipv6.][ssl.]<protocol.name> <port> del [ipv4.][ipv6.][ssl.]<protocol.name> @@ -42,5 +42,5 @@ Beispiele: /relay add ipv6.ssl.weechat 9001 WeeChat Protokoll, mit SSL, mit IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ----------------------------------------- +---- diff --git a/doc/de/autogen/user/rmodifier_commands.txt b/doc/de/autogen/user/rmodifier_commands.txt index aff934111..26785bf81 100644 --- a/doc/de/autogen/user/rmodifier_commands.txt +++ b/doc/de/autogen/user/rmodifier_commands.txt @@ -1,7 +1,7 @@ [[command_rmodifier_rmodifier]] [command]*`rmodifier`* wandelt Schlüsselwörter mit regulären Ausdrücken (regelt die Darstellung von Texten in WeeChat):: ----------------------------------------- +---- /rmodifier list|listdefault add <name> <modifiers> <groups> <regex> del <name>|-all [<name>...] @@ -27,5 +27,5 @@ Beispiele: /rmodifier del passwort lösche alle rmodifiers: /rmodifier del -all ----------------------------------------- +---- diff --git a/doc/de/autogen/user/ruby_commands.txt b/doc/de/autogen/user/ruby_commands.txt index 26f574744..9962ee989 100644 --- a/doc/de/autogen/user/ruby_commands.txt +++ b/doc/de/autogen/user/ruby_commands.txt @@ -1,7 +1,7 @@ [[command_ruby_ruby]] [command]*`ruby`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /ruby list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/script_commands.txt b/doc/de/autogen/user/script_commands.txt index b6af4bef1..197453e6d 100644 --- a/doc/de/autogen/user/script_commands.txt +++ b/doc/de/autogen/user/script_commands.txt @@ -1,7 +1,7 @@ [[command_script_script]] [command]*`script`* WeeChat Skripten-Manager:: ----------------------------------------- +---- /script list [-o|-i] search <text> show <script> @@ -73,5 +73,5 @@ Beispiele: /script hold urlserver.py /script reload urlserver /script upgrade ----------------------------------------- +---- diff --git a/doc/de/autogen/user/tcl_commands.txt b/doc/de/autogen/user/tcl_commands.txt index 170861d0b..33c08a97e 100644 --- a/doc/de/autogen/user/tcl_commands.txt +++ b/doc/de/autogen/user/tcl_commands.txt @@ -1,7 +1,7 @@ [[command_tcl_tcl]] [command]*`tcl`* auflisten/installieren/deinstallieren von Skripten:: ----------------------------------------- +---- /tcl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: Skript (Datei) welches geladen werden soll -q: unterdrückter Modus: Es werden keine Nachrichten ausgegeben Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf. ----------------------------------------- +---- diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 47a14cb70..bc233382f 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -1,17 +1,17 @@ [[command_weechat_away]] [command]*`away`* Abwesenheitsstatus setzen oder entfernen:: ----------------------------------------- +---- /away [-all] [<message>] -all: Abwesenheitsstatus auf allen verbundenen Server setzen oder entfernen message: Abwesenheitsnachricht (ohne Angabe einer Nachricht wird der Abwesenheitszustand entfernt) ----------------------------------------- +---- [[command_weechat_bar]] [command]*`bar`* Infobars verwalten:: ----------------------------------------- +---- /bar list|listfull|listitems add <name> <type>[,<condition>] <position> <size> <separator> <item1>[,<item2>...] default [input|title|status|nicklist] @@ -58,12 +58,12 @@ Beispiele: /bar scroll nicklist * y+10 scrollt zum Ende der Nicklist im aktuellen Buffer: /bar scroll nicklist * ye ----------------------------------------- +---- [[command_weechat_buffer]] [command]*`buffer`* Buffer verwalten:: ----------------------------------------- +---- /buffer list clear [<number>|<name>|-merged|-all] move|merge <number> @@ -120,12 +120,12 @@ Beispiele: /buffer #weechat wechselt zum nächsten Buffer: /buffer +1 ----------------------------------------- +---- [[command_weechat_color]] [command]*`color`* definiert Farbaliase und stellt eine Palette der möglichen Farben dar:: ----------------------------------------- +---- /color alias <color> <name> unalias <color> reset @@ -145,22 +145,22 @@ Beispiele: /color alias 214 orange löscht die Farbe 214: /color unalias 214 ----------------------------------------- +---- [[command_weechat_command]] [command]*`command`* führe explizit einen WeeChat Befehl oder eine Erweiterung aus:: ----------------------------------------- +---- /command <plugin> <command> plugin: Name der Erweiterung ('weechat' für interne WeeChat Befehle) command: auszuführender Befehl (es wird automatisch ein '/' vorangestellt, falls dieser nicht angegeben wurde) ----------------------------------------- +---- [[command_weechat_cursor]] [command]*`cursor`* Cursor kann frei auf dem Bildschirm bewegt werden, um Aktionen in bestimmten Bildschirmbereichen auszuführen:: ----------------------------------------- +---- /cursor go chat|<bar>|<x>,<y> move up|down|left|right|area_up|area_down|area_left|area_right stop @@ -178,12 +178,12 @@ Beispiele: /cursor go nicklist gehe zu den Koordinaten x=10, y=5: /cursor go 10,5 ----------------------------------------- +---- [[command_weechat_debug]] [command]*`debug`* Debug-Kontrolle für Hauptprogramm und/oder Erweiterung:: ----------------------------------------- +---- /debug list set <plugin> <level> dump [<plugin>] @@ -208,12 +208,12 @@ infolists: zeigt Information über die Infolists an tags: zeigt für jede einzelne Zeile die dazugehörigen Schlagwörter an term: gibt Informationen über das Terminal und verfügbare Farben aus windows: zeigt die Fensterstruktur an ----------------------------------------- +---- [[command_weechat_eval]] [command]*`eval`* wertet eine Expression aus und zeigt das Resultat im Buffer an:: ----------------------------------------- +---- /eval [-n] <expression> [-n] -c <expression1> <operator> <expression2> @@ -266,12 +266,12 @@ Beispiele: /eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd !~ abc ==> 0 ----------------------------------------- +---- [[command_weechat_filter]] [command]*`filter`* Filterfunktion um Nachrichten in Buffer aus- oder einzublenden, dazu können Schlagwörter oder reguläre Ausdrücke verwendet werden:: ----------------------------------------- +---- /filter list enable|disable|toggle [<name>] add <name> <buffer>[,<buffer>...] <tags> <regex> @@ -320,12 +320,12 @@ Beispiele: /filter add toto irc.freenode.#weechat nick_toto * filtert Zeilen die "weechat sucks" im IRC Channel #weechat enthalten: /filter add sucks irc.freenode.#weechat * weechat sucks ----------------------------------------- +---- [[command_weechat_help]] [command]*`help`* Zeigt einen Hilfstext für Befehle und Optionen an:: ----------------------------------------- +---- /help -list|-listfull [<plugin> [<plugin>...]] <command> <option> @@ -335,23 +335,23 @@ Beispiele: plugin: zeigt Befehle explizit für diese Erweiterung an command: Name eines Befehls option: Name einer Option (nutze /set um Optionen anzeigen zu lassen) ----------------------------------------- +---- [[command_weechat_history]] [command]*`history`* Zeigt den Befehlsverlauf des Buffers:: ----------------------------------------- +---- /history clear <value> clear: löscht den Befehlsverlauf value: Anzahl der gewünschten Einträgen im Befehlsverlauf anzeigen ----------------------------------------- +---- [[command_weechat_input]] [command]*`input`* Funktionen für die Befehlszeile:: ----------------------------------------- +---- /input <action> [<arguments>] Auflistung der möglichen Funktionen: @@ -406,12 +406,12 @@ Auflistung der möglichen Funktionen: paste_stop: Einfügen wird beendet (bracketed paste mode) Dieser Befehl wird sinnvollerweise mittels Tastenbelegungen oder Erweiterungen genutzt. ----------------------------------------- +---- [[command_weechat_key]] [command]*`key`* Einer Taste einen Befehl zuordnen oder entfernen:: ----------------------------------------- +---- /key list|listdefault|listdiff [<context>] bind <key> [<command> [<args>]] bindctxt <context> <key> [<command> [<args>]] @@ -461,12 +461,12 @@ Beispiele: /key bindctxt search ctrl-I /input search_stop Auswahl eines Nicknamens mittels mittlerer Maustaste zeigt zusätzliche Informationen zu dem Nick an: /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick} ----------------------------------------- +---- [[command_weechat_layout]] [command]*`layout`* Layout für Buffer und Fenster speichern, anwenden oder zurücksetzen:: ----------------------------------------- +---- /layout save [<name>] [buffers|windows] apply [<name>] [buffers|windows] leave @@ -484,12 +484,12 @@ buffers: speichert bzw. verwendet nur Buffer (Reihenfolge der Buffer) windows: speichert bzw. verwendet nur Fenster (Buffer welche im jeweiligen Fenster dargestellt werden) Wird der Befehl ohne Argumente aufgerufen wird das gespeicherte Layout dargestellt. ----------------------------------------- +---- [[command_weechat_mouse]] [command]*`mouse`* Maussteuerung:: ----------------------------------------- +---- /mouse enable|disable|toggle [<delay>] enable: aktiviert Maus @@ -504,12 +504,12 @@ Beispiele: /mouse enable Mausunterstützung für 5 Sekunden umschalten: /mouse toggle 5 ----------------------------------------- +---- [[command_weechat_mute]] [command]*`mute`* Führt einen Befehl ohne Textausgabe aus:: ----------------------------------------- +---- /mute [-current | -buffer <name> | -all] command -current: Ausgabe im aktuellen Buffer wird unterdrückt @@ -527,12 +527,12 @@ Beispiele: /mute -current msg * hi! Nachricht an den #weechat Channel senden: /mute -buffer irc.freenode.#weechat msg #weechat hi! ----------------------------------------- +---- [[command_weechat_plugin]] [command]*`plugin`* Erweiterungen verwalten (auflisten/installieren/deinstallieren):: ----------------------------------------- +---- /plugin list|listfull [<name>] load <filename> [<arguments>] autoload [<arguments>] @@ -550,12 +550,12 @@ Beispiele: arguments: Argumente die der Erweiterung beim installieren übergeben werden sollen Ohne Angabe eines Arguments werden alle installierten Erweiterungen angezeigt. ----------------------------------------- +---- [[command_weechat_proxy]] [command]*`proxy`* Proxys verwalten:: ----------------------------------------- +---- /proxy list add <name> <type> <address> <port> [<username> [<password>]] del <name>|-all @@ -584,34 +584,34 @@ Beispiele: /proxy add myproxy socks5 sample.host.org 3128 myuser mypass entferne einen Proxy: /proxy del myproxy ----------------------------------------- +---- [[command_weechat_quit]] [command]*`quit`* WeeChat beenden:: ----------------------------------------- +---- /quit [-yes] [<arguments>] -yes: Option muss genutzt werden falls weechat.look.confirm_quit aktiviert sein sollte arguments: Text der beim Signal "quit" verschickt wird (zum Beispiel sendet die IRC Erweiterung diesen Text als Quit-Nachricht an den Server) ----------------------------------------- +---- [[command_weechat_reload]] [command]*`reload`* Konfiguration neu laden:: ----------------------------------------- +---- /reload [<file> [<file>...]] file: Konfigurationsdatei die erneut geladen werden soll (ohne Dateinamenserweiterung ".conf") Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und Erweiterungen) neu geladen. ----------------------------------------- +---- [[command_weechat_repeat]] [command]*`repeat`* Führt einen Befehl mehrfach aus:: ----------------------------------------- +---- /repeat [-interval <delay>] <count> <command> delay: Verzögerung zwischen dem Ausführen der Befehle (in Millisekunden) @@ -623,23 +623,23 @@ Alle Befehle werden in dem Buffer ausgeführt, in welchem dieser Befehl genutzt Beispiel: scrolle zwei Seiten hoch: /repeat 2 /window page_up ----------------------------------------- +---- [[command_weechat_save]] [command]*`save`* Konfiguration abspeichern:: ----------------------------------------- +---- /save [<file> [<file>...]] file: Konfigurationsdatei die gesichert werden soll (ohne Dateinamenserweiterung ".conf") Wird keine Datei angegeben dann werden alle Konfigurationen (WeeChat und Erweiterungen) gesichert. ----------------------------------------- +---- [[command_weechat_secure]] [command]*`secure`* verwaltet zu schützende Daten (Passwörter oder private Daten werden in der Datei sec.conf verschlüsselt):: ----------------------------------------- +---- /secure passphrase <passphrase>|-delete decrypt <passphrase>|-discard set <name> <value> @@ -676,12 +676,12 @@ Beispiele: /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}" alias um den eigenen Nick zu ghosten: /alias ghost /eval /msg -server freenode nickserv ghost meinNick ${sec.data.freenode} ----------------------------------------- +---- [[command_weechat_set]] [command]*`set`* Konfigurationsparameter setzen:: ----------------------------------------- +---- /set [<option> [<value>]] diff [<option> [<option>...]] @@ -706,12 +706,12 @@ Beispiele: /set diff zeigt geänderte Optionen, der IRC Erweiterung, an: /set diff irc.* ----------------------------------------- +---- [[command_weechat_unset]] [command]*`unset`* Konfigurationsparameter freigeben/zurücksetzen:: ----------------------------------------- +---- /unset <option> option: Name einer Option (darf mit Joker "*" beginnen oder enden um mehrere Optionen zurückzusetzen. Nutzen Sie diese Funktion mit äußerster Sorgfalt!) @@ -723,12 +723,12 @@ Beispiele: /unset weechat.look.item_time_format Alle Farboptionen zurücksetzen: /unset weechat.color.* ----------------------------------------- +---- [[command_weechat_upgrade]] [command]*`upgrade`* Aktualisiert WeeChat ohne die Verbindung zum Server zu trennen:: ----------------------------------------- +---- /upgrade [<path_to_binary>|-quit] path_to_binary: Pfad zu einer ausführbaren WeeChat Binärdatei (Standardeinstellung ist die aktuell ausführbare Datei) @@ -754,32 +754,32 @@ Nutzt man die "-quit" Funktion ist die Abfolge geringfügig anders: Die Sitzung kann zu einem späteren Zeitpunkt wiederhergestellt werden: weechat --upgrade WICHTIG: Die Sitzung muss mit exakt den selben Konfigurationsdateien wiederhergestellt werden (*.conf) Es ist möglich die WeeChat-Sitzung auf einem anderen Rechner wiederherzustellen, sofern man den Inhalt des "~/.weechat" Verzeichnisses dorthin kopiert. ----------------------------------------- +---- [[command_weechat_uptime]] [command]*`uptime`* Zeigt die Uptime von Weechat an:: ----------------------------------------- +---- /uptime [-o | -ol] -o: sendet die WeeChat Laufzeit in den aktuellen Buffer (englisch) -ol: sendet die WeeChat Laufzeit in den aktuellen Buffer (in der voreingestellten Landessprache) ----------------------------------------- +---- [[command_weechat_version]] [command]*`version`* Zeigt die WeeChat-Version und das Datum der Kompilierung an:: ----------------------------------------- +---- /version [-o | -ol] -o: sendet die WeeChat Version in den aktuellen Buffer (englisch) -ol: sendet die WeeChat Version in den aktuellen Buffer (in der Voreingestellten Landessprache) ----------------------------------------- +---- [[command_weechat_wait]] [command]*`wait`* Terminiere einen Befehl der ausgeführt werden soll:: ----------------------------------------- +---- /wait <number>[<unit>] <command> number: die Zeit, die gewartet werden soll (dies muss eine natürlich Zahl sein) @@ -799,12 +799,12 @@ Beispiele: /wait 15m /away -all Bin dann mal eben weg Versendet nach zwei Minuten den Text 'Hallo': /wait 2m Hallo ----------------------------------------- +---- [[command_weechat_window]] [command]*`window`* Fenster verwalten:: ----------------------------------------- +---- /window list -1|+1|b#|up|down|left|right [-window <number>] <number> @@ -863,5 +863,5 @@ Beispiele: /window scroll -d Fenster #2 wird vergrößert: /window zoom -window 2 ----------------------------------------- +---- diff --git a/doc/de/autogen/user/xfer_commands.txt b/doc/de/autogen/user/xfer_commands.txt index 65f1a9e59..aac9172b5 100644 --- a/doc/de/autogen/user/xfer_commands.txt +++ b/doc/de/autogen/user/xfer_commands.txt @@ -1,21 +1,21 @@ [[command_xfer_me]] [command]*`me`* sendet CTCP Aktion an entfernten Host:: ----------------------------------------- +---- /me <message> message: zu sendende Nachricht ----------------------------------------- +---- [[command_xfer_xfer]] [command]*`xfer`* Kontrolle der Übertragung(en):: ----------------------------------------- +---- /xfer [list|listfull] list: zeigt Liste der Übertragungen listfull: zeigt eine ausführliche Liste der Übertragungen Ohne Angabe von Argumenten wird der Buffer mit der Übertragungsliste geöffnet. ----------------------------------------- +---- diff --git a/doc/de/weechat.1.de.txt b/doc/de/weechat.1.de.txt index 5929e94c1..73ff6f285 100644 --- a/doc/de/weechat.1.de.txt +++ b/doc/de/weechat.1.de.txt @@ -1,14 +1,11 @@ -WEECHAT(1) -========== += WEECHAT(1) :doctype: manpage -NAME ----- +== NAME weechat - der erweiterbare Chat Client -SYNOPSIS --------- +== SYNOPSIS [verse] 'weechat' [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...] @@ -18,8 +15,7 @@ SYNOPSIS 'weechat' [-l|--license] 'weechat' [-v|--version] -BESCHREIBUNG ------------- +== BESCHREIBUNG WeeChat ist ein schneller, leichter und erweiterbarer Chat Client. @@ -27,13 +23,11 @@ Der Client ist modular aufgebaut (ein kleiner Kern mit nachladbaren Erweiterunge Multiprotokollfähig (IRC und Jabber),erweiterbar mittels C und durch Skripten, wobei verschiedenen Sprachen unterstützt werden. -OPTIONEN --------- +== OPTIONEN include::cmdline_options.de.txt[] -OPTIONEN von ERWEITERUNGEN --------------------------- +== OPTIONEN von ERWEITERUNGEN Um eine vollständige Dokumentation der Optionen zu erhalten, siehe http://weechat.org/doc[WeeChat user's guide]. @@ -51,8 +45,7 @@ Um eine IPv6 Adresse zu nutzen, muss diese in eckige Klammern gesetzt werden: irc://mynick@[2001:db8:0:85a3::ac1f:8001]:6668/#test -DATEIEN -------- +== DATEIEN $HOME/.weechat/weechat.conf:: WeeChats Konfigurationsdatei @@ -90,8 +83,8 @@ $HOME/.weechat/xfer.conf:: $HOME/.weechat/weechat.log:: WeeChat Protokolldatei -AUTOREN -------- +== AUTOREN + WeeChat ist programmiert von Sébastien Helleu und Beitragenden (eine vollständige Auflistung findet man in der AUTHORS Datei). @@ -106,8 +99,7 @@ Please read the COPYING file for more information. Web: <http://weechat.org/> -FEHLER MELDEN -------------- +== FEHLER MELDEN Fehlerbeschreibungen oder Vorschläge für neue Funktionen können auf der Savannah Webseite hinterlegt werden: diff --git a/doc/de/weechat_faq.de.txt b/doc/de/weechat_faq.de.txt index 497bc2747..5a27888dc 100644 --- a/doc/de/weechat_faq.de.txt +++ b/doc/de/weechat_faq.de.txt @@ -1,5 +1,4 @@ -WeeChat FAQ (häufig gestellte Fragen) -===================================== += WeeChat FAQ (häufig gestellte Fragen) Sébastien Helleu <flashcode@flashtux.org> @@ -9,12 +8,10 @@ vorzugsweise immer die aktuell veröffentlichte Version von WeeChat genutzt werd [[general]] -Allgemein ---------- +== Allgemein [[weechat_name]] -Woher kommt eigentlich der Name "WeeChat"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Woher kommt eigentlich der Name "WeeChat"? "Wee" ist ein sich selbst nutzendes Akronym und bedeutet "Wee Enhanced Environment". Somit lautet der vollständige Name "Wee Enhanced Environment for Chat". @@ -23,8 +20,7 @@ Somit lautet der vollständige Name "Wee Enhanced Environment for Chat". Aber dieses trifft nicht auf WeeChat zu!) [[why_choose_weechat]] -Weshalb sollte man WeeChat nutzen? - X-Chat und Irssi sind doch auch sehr gut... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Weshalb sollte man WeeChat nutzen? - X-Chat und Irssi sind doch auch sehr gut... WeeChat ist sehr Speicher schonend und besticht durch innovative Funktionen. @@ -32,12 +28,10 @@ Weitere Informationen gibt es auf der folgenden Internetseite: http://weechat.org/about/features [[compilation_install]] -Kompilierung / Installation ---------------------------- +== Kompilierung / Installation [[gui]] -Ich habe gehört es gibt mehrere GUIs für WeeChat. Wie kann ich diese kompilieren bzw. nutzen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich habe gehört es gibt mehrere GUIs für WeeChat. Wie kann ich diese kompilieren bzw. nutzen? Folgende GUIs sind verfügbar: @@ -47,8 +41,7 @@ Folgende GUIs sind verfügbar: * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -Ich kann WeeChat nach Cloning des git Repository nicht kompilieren - weshalb? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich kann WeeChat nach Cloning des git Repository nicht kompilieren - weshalb? Es wird empfohlen cmake zum kompilieren von WeeChat zu nutzen. @@ -63,8 +56,7 @@ und daher auch weniger brauchbar sein kann. Im Gegensatz zu der Möglichkeit, da das Repository klont und daraus Updates installiert. [[lost]] -Ich habe WeeChat gestartet, komme aber nicht mehr weiter - was kann ich tun? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich habe WeeChat gestartet, komme aber nicht mehr weiter - was kann ich tun? Um Hilfe zu erhalten, nutze den `/help` Befehl. Eine Hilfe zu einem Befehl erhältst Du durch die Eingabe von: `/help Befehlsname`. @@ -76,12 +68,10 @@ Neue Benutzer sollten unbedingt die 'quickstart'-Anleitung lesen (siehe Dokumentation auf der Internetseite). [[display]] -Anzeige -------- +== Anzeige [[charset]] -Teilweise fehlen den Zeichen die Akzente. Wie kann ich das korrigieren? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Teilweise fehlen den Zeichen die Akzente. Wie kann ich das korrigieren? Dies ist ein bekanntes Problem. Aus diesem Grund sollten die folgenden Punkte sorgfältig durchgelesen und *alle* aufgezeigten Lösungsmöglichkeiten überprüft @@ -112,8 +102,7 @@ oder andere locale, bitte vergewissere Dich, dass *alle* Deine Einstellungen (Terminal, screen, ...) sich auch auf ISO beziehen und *nicht* auf UTF-8. [[bars_background]] -Weshalb haben Bars, z.B. Titel und Status, keine Hintergrundfarbe bzw. diese endet direkt nach dem Text? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Weshalb haben Bars, z.B. Titel und Status, keine Hintergrundfarbe bzw. diese endet direkt nach dem Text? Dies kann durch einen falschen Wert in der Variablen TERM Deiner Shell verursacht werden. Bitte überprüfe die Ausgabe von `echo $TERM` in Deinem Terminal. @@ -127,8 +116,7 @@ Abhängig davon von wo WeeChat gestartet wird, solltest Du folgenden Wert haben: Falls nötig korrigiere den Wert Deiner Variablen TERM: `export TERM="xxx"`. [[screen_weird_chars]] -Wenn ich Weechat mit screen/tmux nutze habe ich merkwürdige Zeichen, wie kann ich dies beheben? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wenn ich Weechat mit screen/tmux nutze habe ich merkwürdige Zeichen, wie kann ich dies beheben? Dies kann durch einen falschen Wert in der TERM-Variable Deiner Shell hervorgerufen werden. Bitte überprüfe die Ausgabe von `echo $TERM` in Deinem Terminal (*außerhalb von screen/tmux*). @@ -139,8 +127,7 @@ Nutzte stattdessen lieber 'xterm'. Falls notwendig korrigiere den Wert Deiner TERM-Variable: `export TERM="xxx"`. [[osx_display_broken]] -Ich habe WeeChat unter OS X kompiliert und erhalte nur "(null)" als Textausgabe. Was läuft da schief? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich habe WeeChat unter OS X kompiliert und erhalte nur "(null)" als Textausgabe. Was läuft da schief? Wenn Du ncursesw selber kompiliert haben solltest dann probiere einmal die Standard ncurses aus, welche mit dem System ausgeliefert wird. @@ -148,8 +135,7 @@ mit dem System ausgeliefert wird. Darüber hinaus ist es unter OS X ratsam WeeChat mittels des Homebrew package manager zu installieren. [[buffer_vs_window]] -Ich habe von "Buffern" und "Fenstern" gehört - Worin besteht der Unterschied? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich habe von "Buffern" und "Fenstern" gehört - Worin besteht der Unterschied? Ein 'Buffer' besitzt einen Namen und es wird ihm eine 'Buffer'-Nummer zugeordnet. In einem 'Buffer' werden Textzeilen angezeigt (und noch anderen Daten). @@ -162,42 +148,39 @@ in einem Fenster nicht angezeigt). Oder ein Buffer wird durch ein oder mehrere F angezeigt. [[buffers_list]] -Wie kann ich eine Liste mit den Buffern z.B. auf der linken Seite anzeigen lassen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich eine Liste mit den Buffern z.B. auf der linken Seite anzeigen lassen? Nutze dazu das Skript 'buffers.pl'. Um die Größe der Bar zu limitieren: ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- Um die Bar nach oben zu verschieben: ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -Wie kann ich die Länge eines Nicknamens begrenzen oder die Ausrichtung des Nicks im Chatbereich entfernen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich die Länge eines Nicknamens begrenzen oder die Ausrichtung des Nicks im Chatbereich entfernen? Um die Länge des Nicknamens im Chatbereich auf eine maximale Größe (z.B. 15 Zeichen) zu begrenzen: ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- um die Ausrichtung für Nicks zu entfernen: ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -Wie kann man eine mehrzeilige Eingabezeile einstellen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann man eine mehrzeilige Eingabezeile einstellen? Mit der Option 'size' kann man angeben aus wie vielen Zeilen die Eingabezeile bestehen soll (der Standardwert für die Eingabezeile ist 1), oder man nutzt den @@ -207,41 +190,39 @@ für die Eingabezeile, maximal genutzt werden dürfen (0 = keine Begrenzung) Beispiele um eine dynamische Größe zu nutzen: ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- maximal zwei Zeilen: ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -Ist es möglich nur eine Eingabezeile für alle Fenster zu nutzen (auch falls diese geteilt sind)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ist es möglich nur eine Eingabezeile für alle Fenster zu nutzen (auch falls diese geteilt sind)? Ja, dazu muss eine Bar des Typs "root" erstellt werden (dies muss ein Item besitzen, welches anzeigt in welchem Fenster man sich befindet) und die aktuelle Eingabezeile muss gelöscht werden. Zum Beispiel: ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- Falls Du doch nicht zufrieden sein solltest, dann lösche einfach die neue Bar. WeeChat erstellt automatisch eine neue Eingabezeile sofern das Item "input_text" in keiner anderen Bar genutzt werden sollte: ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -Wie kann ich einen Text kopieren und einfügen ohne das die Nickliste mit eingefügt wird? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich einen Text kopieren und einfügen ohne das die Nickliste mit eingefügt wird? Hierzu kannst Du ein Terminal nutzen welches Block-Auswahl erlaubt (wie z.B. rxvt-unicode, konsole, gnome-terminal, ...). Im Normalfall erfolgt die Markierung mittels der Tasten @@ -249,32 +230,31 @@ konsole, gnome-terminal, ...). Im Normalfall erfolgt die Markierung mittels der Eine weitere Möglichkeit besteht darin die Nickliste nach oben oder unten zu verschieben: ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -Wie kann ich eine URL aufrufen die einen Zeilenumbruch besitzt? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich eine URL aufrufen die einen Zeilenumbruch besitzt? WeeChat stellt standardmäßig die Uhrzeit als auch einen Präfix in jeder Zeile dar. Optional können zusätzlich auch Bars im Chatfenster dargestellt werden. Man kann die Nickliste z.B. am oberen Rand darstellen lassen und die Ausrichtung der Nicknamen entfernen: ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- Ab der WeeChat Version ≥ 0.3.6, kann die Option "eat_newline_glitch" aktiviert werden. Damit wird das Zeichen für einen Zeilenumbruch nicht an die dargestellten Zeilen angefügt (dies führt dazu, dass URLs beim Markieren korrekt erkannt werden): ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] Bei der Nutzung dieser Option kann es zu Darstellungsfehlern kommen. Sollte dies @@ -283,24 +263,22 @@ auftreten, sollte diese Option wieder deaktiviert werden. Eine weitere Möglichkeit ist, ein Skript zu nutzen: http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -Ich möchte die Meldungen von Weechat in einer anderen Sprache ausgeben lassen, ohne WeeChat zu beenden. Ist dies möglich? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich möchte die Meldungen von Weechat in einer anderen Sprache ausgeben lassen, ohne WeeChat zu beenden. Ist dies möglich? Ja, dazu kannst Du das Python-Skript 'shell.py' verwenden (erhältlich auf der Internetseite). Nach dem Laden des Skripts führe folgende Befehle aus: ----------------------------------------- +---- /shell setenv LANG=de_DE.UTF-8 /upgrade ----------------------------------------- +---- Hierdurch erhält man für das Terminal deutsche, UTF-8 kodierte Meldungen. Benutzer von ISO-Kodierungen können folgendes eingeben: `/shell setenv LANG=de_DE`. [[use_256_colors]] -Wie kann ich 256 Farben in WeeChat nutzen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich 256 Farben in WeeChat nutzen? 256 Farben werden ab der WeeChat Version ≥ 0.3.4 unterstützt. @@ -317,18 +295,18 @@ Variable nutzen zu können. Sollte screen genutzt werden, fügt man folgende Zeile an das Ende der Datei '~/.screenrc' ein: ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Enthält die 'TERM'-Umgebungsvariable einen falschen Wert und WeeChat wird bereits ausgeführt, keine Panik! Mit dem Skript 'shell.py' kann eine Änderung der Umgebungsvariable durchgeführt werden, ohne das WeeChat neu gestartet werden muss: ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- Mit der WeeChat Version 0.3.4 muss der Befehl `/color` genutzt werden, um neue Farben zu erstellen. @@ -339,8 +317,7 @@ eine Farbe definieren). Weiterführende Informationen zum Farbmanagement erhält man in der Benutzeranleitung. [[search_text]] -Wie kann ich in einem Buffer nach einem Text suchen (vergleichbar /lastlog in irssi)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich in einem Buffer nach einem Text suchen (vergleichbar /lastlog in irssi)? Die Standardtastenbelegung lautet @k(C-)@k(r) (der dazugehörige Befehl: `/input search_text`). und um zu Highlight-Nachrichten zu springen: @k(A-)@k(p)/@k(n). @@ -348,12 +325,10 @@ und um zu Highlight-Nachrichten zu springen: @k(A-)@k(p)/@k(n). Siehe Benutzeranleitung für weitere Informationen zu dieser Funktion (Standardtastenbelegung). [[key_bindings]] -Tastaturbelegung ----------------- +== Tastaturbelegung [[meta_keys]] -Aus welchem Grund funktionieren manche Meta-Tasten (alt + Taste) nicht? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Aus welchem Grund funktionieren manche Meta-Tasten (alt + Taste) nicht? Wenn Du einen Terminal wie xterm oder uxterm nutzten solltest werden einige Meta-Tasten standardmäßig nicht unterstützt. @@ -361,20 +336,19 @@ In einem solchen Fall sollte folgende Zeile der Konfigurationsdatei '~/.Xresourc hinzugefügt werden: * für xterm: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * für uxterm: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- Danach muss resources neu geladen werden (`xrdb -override ~/.Xresources`) oder man startet X neu. [[customize_key_bindings]] -Wie kann ich die Tastaturbelegung anpassen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich die Tastaturbelegung anpassen? Die Tasten werden mit dem Befehl `/key` belegt. @@ -382,53 +356,49 @@ Mit der voreingestellten Tastenkombination @k(A-)@k(k) kann man sich den Code der jeweiligen Taste anzeigen lassen und in die Eingabezeile einfügen. [[jump_to_buffer_11_or_higher]] -Mit welcher Tastenkombination kann ich zum Buffer 11 (oder höher) wechseln? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mit welcher Tastenkombination kann ich zum Buffer 11 (oder höher) wechseln? Die Tastenkombination lautet @k(A-)@k(j) gefolgt von den zwei Ziffern des Buffers. Zum Beispiel, @k(A-)@k(j), @k(1), @k(1) um zum Buffer 11 zu wechseln. Es kann auch eine neue Taste eingebunden werden um zu einem Buffer zu wechseln: ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- Eine Auflistung der Standardtastenbelegung findet man in der Benutzeranleitung. [[global_history]] -Wie kann ich den globalen Verlaufsspeicher (anstelle des Buffer eigenen) mit den Up-/Down-Tasten nutzen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich den globalen Verlaufsspeicher (anstelle des Buffer eigenen) mit den Up-/Down-Tasten nutzen? Du kannst die Up-/Down-Tasten für den globalen Verlaufsspeicher belegen (als Standardtasten werden genutzt: @k(C-)@k(↑) and @k(C-)@k(↓)). Beispiele: ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] Die Tasten "meta2-A" und "meta2-B" können nach dem jeweils genutzten Terminal variieren. Um die korrekten Tasten zu finden sollte man @k(A-)@k(k) und dann (Up- oder die Down-Taste) drücken. [[mouse]] -Mausunterstützung ------------------ +== Mausunterstützung [[mouse_not_working]] -Die Mausunterstützung funktioniert nicht, was kann ich tun? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Die Mausunterstützung funktioniert nicht, was kann ich tun? Eine Unterstützung von Mausfunktionen ist seit WeeChat ≥ 0.3.6 verfügbar. Als erstes sollte man die Mausunterstützung einschalten: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Falls die Maus von WeeChat nicht erkannt werden sollte muss die TERM Variable der Konsole überprüft werden (die geschieht im Terminal mittels `echo $TERM`). @@ -437,22 +407,21 @@ Entsprechend der ausgegebenen Information, wird ggf. eine Maus nicht unterstütz Um zu testen ob eine Mausunterstützung vom Terminal bereitgestellt wird, sollte man folgende Zeile im Terminal eingeben: ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- Und nun klickt man mit der Maus auf das erste Zeichen im Terminal (linke obere Ecke). Als Ergebnis sollte man folgende Zeichenkette erhalten: " !!#!!". Um die Mausunterstützung im Terminal zu beenden: ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -Mausunterstützung funktioniert nicht falls x/y Koordinaten größer 94 Pixel sind, weshalb? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mausunterstützung funktioniert nicht falls x/y Koordinaten größer 94 Pixel sind, weshalb? Einige Terminals senden ausschließlich ISO Zeichen für die Mauskoordinaten. Deshalb ist eine Nutzung über 94 Pixel hinausgehend, sowohl in den x- wie auch den y-Koordinaten, nicht gegeben. @@ -461,57 +430,52 @@ Dann muss man einen Terminl nutzen der eine Unterstützung von UTF-8 Koordinaten bietet, zum Beispiel rxvt-unicode. [[mouse_select_paste]] -Wie kann ich bei aktivierter Mausunterstützung im Terminal einen Text markieren oder einfügen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich bei aktivierter Mausunterstützung im Terminal einen Text markieren oder einfügen? Ist die Mausunterstützung aktiviert kann man mittels gedrückter @k(-S-)-Taste (Umschalttaste) einen Text im Terminal markieren oder einfügen, als sei die Mausunterstützung deaktiviert. (bei einigen Terminals muss die @k(-A-)-Taste anstelle der @k(-S-)-Taste gedrückt werden). [[irc]] -IRC ---- +== IRC [[irc_ssl_connection]] -Es treten Probleme bei einer Serververbindung mittels SSL auf. Was kann ich tun? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Es treten Probleme bei einer Serververbindung mittels SSL auf. Was kann ich tun? Falls Fehlermeldungen auftreten sollten die besagen, dass der gnutls Handshake nicht geklappt hat, sollte ein kleinerer Diffie-Hellman-Schlüssel verwendet werden (Standardgröße: 2048): ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- Erscheint eine Fehlermeldung, dass etwas mit dem Zertifikat nicht stimmen sollte dann kann eine "ssl_verify" Überprüfung deaktiviert werden (die Verbindung ist in diesem Fall weniger sicher): ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -Bei einem Verbindungsaufbau zum Server, via SSL, erhalte ich "TLS Handshake fehlgeschlagen". Wie kann ich das beheben? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Bei einem Verbindungsaufbau zum Server, via SSL, erhalte ich "TLS Handshake fehlgeschlagen". Wie kann ich das beheben? Man sollte versuchen eine andere Priorität zu nutzen (nur WeeChat ≥ 0.3.5); Im Beispiel muss "xxx" durch den internen Servernamen ersetzt werden: ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -Wie kann ich eine SSL gesicherte Verbindung zum freenode Server herstellen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich eine SSL gesicherte Verbindung zum freenode Server herstellen? Die Option 'weechat.network.gnutls_ca_file' sollte auf die Zertifikationsdatei zeigen: ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] Überprüfe, ob die Zertifikationsdatei auf Deinem System installiert wurde (üblicherweise wird @@ -520,16 +484,15 @@ diese Datei durch das Paket "ca-certificates" bereitgestellt) Konfiguration des Servers, Port, SSL, dhkey_size und dann einen Connect durchführen: ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- [[irc_oauth]] -Wie stellt man eine Verbindung zu einem Server her, der "oauth" verlangt? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie stellt man eine Verbindung zu einem Server her, der "oauth" verlangt? Einige Server, wie z.B. 'twitch', verlangen oauth für eine Verbindung. @@ -538,34 +501,32 @@ Bei oauth handelt es sich lediglich um ein Passwort mit dem Format "oauth:XXXX". Mit folgenden Befehlen kann man einen Server erstellen und sich mit diesem verbinden (Name und Adresse muss durch entsprechende Werte ersetzt werden): ----------------------------------------- +---- /server add name irc.server.org -password="oauth:XXXX" /connect name ----------------------------------------- +---- [[irc_sasl]] -Wie kann ich mich, vor dem Betreten von Channels, identifizieren? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich mich, vor dem Betreten von Channels, identifizieren? Sollte der Server SASL unterstützen, ist es ratsam auf diese Funktion zurückzugreifen und sich nicht mittels "nickserv" zu authentifizieren. Zum Beispiel: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "meinNick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- Unterstützt der Server keine SASL Authentifizierung, kann eine Verzögerung aktiviert werden um sich, vor dem Betreten von Channels, bei "nickserv" zu identifizieren: ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -Was ist der Unterschied zwischen dem Befehl /ignore und /filter? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Was ist der Unterschied zwischen dem Befehl /ignore und /filter? Der Befehl `/ignore` ist ein IRC-Befehl und beeinflusst somit nur die IRC-Buffer (Server und Channel). @@ -583,29 +544,27 @@ Die gefilterten Zeilen können zu jeder Zeit dargestellt werden indem man den Fi (Voreinstellung zum aktivieren/deaktivieren der Filter: @k(A-)@k(=)). [[filter_irc_join_part_quit]] -Wie kann ich join/part/quit Meldungen in den IRC Channels filtern (A.d.ü.: unterdrücken)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich join/part/quit Meldungen in den IRC Channels filtern (A.d.ü.: unterdrücken)? Zum einen mit dem Smart-Filer (join/part/quit Meldungen werden von Usern angezeigt die kürzlich noch etwas geschrieben haben): ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- zum anderen mit einer globalen Filterung (*alle* join/part/quit Nachrichten werden unterdrückt): ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] Für weitere Hilfe: `/help filter` und `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -Wie kann ich Nachrichten filtern wenn ich einen IRC Channel betrete? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich Nachrichten filtern wenn ich einen IRC Channel betrete? Ab WeeChat ≥ 0.4.1 ist es möglich Nachrichten zu deaktivieren. Dazu nutzt man die Option: @@ -614,9 +573,9 @@ nutzt man die Option: Zum Beispiel: Um die Auflistung aller Namen im Channel zu unterdrücken (IRC Nachricht '366'): ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] Für Hilfe: `/help irc.look.display_join_message` @@ -633,17 +592,16 @@ Die Tags von anderen Server-Mitteilungen werden IRC RAW-Buffer ausgegeben Beispiele: * filtert die Auflistung der Namen die sich im Channel befinden: ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * filtert das Topic (und das Datum) des Channels: ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -Wie kann ich voice Nachrichten filtern (z.B. auf Bitlbee Servern)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich voice Nachrichten filtern (z.B. auf Bitlbee Servern)? Voice Nachrichten zu filtern ist nicht einfach da der Voice-Modus mit anderen Modi in einer IRC Nachricht kombiniert werden kann. @@ -655,15 +613,15 @@ in einer anderen Farbe darzustellen. Nutzt man Bitlbee ≥ 3, sollte man im '&bitlbee' Channel folgendes eingeben: ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- für ältere Versionen von Bitlbee gibt man im '&bitlbee' Channel ein: ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- Um sich in WeeChat anzeigen zu lassen welche Nicks abwesend sind siehe: <<color_away_nicks,abwesende Nicks>>. @@ -672,13 +630,12 @@ Wenn man wirklich Voice-Nachrichten filtern möchte kann folgender Befehl angewa werden. Allerdings ist diese Lösung nicht perfekt, da bei mehren Modi als erstes der Voice Modus aufgeführt sein muss): ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -Wie kann ich Nicks in der Nickliste anzeigen lassen die abwesend sind? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich Nicks in der Nickliste anzeigen lassen die abwesend sind? Dazu weist man der Option 'irc.server_default.away_check' ein Zeitintervall zu, in welchen Abständen eine Überprüfung stattfinden soll. Die Angabe des @@ -693,55 +650,50 @@ Im folgenden Beispiel wird der Abwesenheitsstatus alle fünf Minuten überprüft Dabei werden aber nur solche Channels berücksichtigt die nicht mehr als 25 Teilnehmer haben: ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] Für Weechat ≤ 0.3.3, lauten die Optionen 'irc.network.away_check' und 'irc.network.away_check_max_nicks'. [[highlight_notification]] -Wie kann ich mich darüber informieren lassen falls mich jemand in einem Channel highlighted -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich mich darüber informieren lassen falls mich jemand in einem Channel highlighted Dazu kann man ein Skript nutzen wie z.B. 'beep.pl' oder 'launcher.pl'. Beim Skript 'launcher.pl' müssen noch die Befehle angepasst werden: ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/Pfad/zum/Befehl Argumente" ----------------------------------------- +---- andere Skripten die auch zu diesem Thema passen: http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -Wie kann ich bei zusammengefügten Buffern den Zielbuffer ändern (z.B. bei einem Server-Buffer)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich bei zusammengefügten Buffern den Zielbuffer ändern (z.B. bei einem Server-Buffer)? Die Standardtastenkombination lautet @k(C-)@k(x) (der dazugehörige Befehl: `/input switch_active_buffer`). [[plugins_scripts]] -Erweiterungen / Skripten ------------------------- +== Erweiterungen / Skripten [[openbsd_plugins]] -Ich benutze OpenBSD aber WeeChat lädt keine Erweiterungen - weshalb? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich benutze OpenBSD aber WeeChat lädt keine Erweiterungen - weshalb? Unter OpenBSD enden die Dateinamen von Erweiterungen mit ".so.0.0" (".so" bei Linux). Um dies zu beheben muss folgendes konfiguriert werden: ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -Wie kann ich Perl/Python/Ruby/Lua/Tcl Skripten laden und sind Skripten von anderen IRC-Clients kompatibel? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich Perl/Python/Ruby/Lua/Tcl Skripten laden und sind Skripten von anderen IRC-Clients kompatibel? Die Skripten für WeeChat sind mit anderer IRC-Clients nicht kompatibel und vice versa. @@ -756,12 +708,10 @@ Anmerkung: * Eine 'tcl' Erweiterung ist ab Version ≥ 0.3.0 verfügbar. [[settings]] -Einstellungen -------------- +== Einstellungen [[memory_usage]] -Wie kann ich WeeChat dazu bringen weniger Speicher zu verbrauchen? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wie kann ich WeeChat dazu bringen weniger Speicher zu verbrauchen? Damit WeeChat weniger Speicher benötigt, solltest Du folgende Tipps umsetzen: @@ -779,12 +729,10 @@ Damit WeeChat weniger Speicher benötigt, solltest Du folgende Tipps umsetzen: * nutze einen kleineren Wert für die Option 'weechat.history.max_commands' [[development]] -Entwicklung ------------ +== Entwicklung [[bug_task_patch]] -Was kann ich machen falls ich einen Fehler gefunden habe, nach neuen Funktionen fragen oder Patches einsenden möchte? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Was kann ich machen falls ich einen Fehler gefunden habe, nach neuen Funktionen fragen oder Patches einsenden möchte? Es gibt drei Möglichkeiten: @@ -798,29 +746,27 @@ Es gibt drei Möglichkeiten: (Um emails an die "support" Mailing-Liste zu schicken, kannst Du diese abonnieren) [[gdb_error_threads]] -Wenn man WeeChat in gdb startet kann ein Thread-Fehler auftreten. Was beudeutet das? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Wenn man WeeChat in gdb startet kann ein Thread-Fehler auftreten. Was beudeutet das? Falls man WeeChat in gdb ausführt kann folgende Fehlermeldung erscheinen: ----------------------------------------- +---- $ gdb /Pfad/zu/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- Um diesen Fehler zu beheben sollte man gdb wie folgt aufrufen (der Pfad zu libpthread und WeeChat muss natürlich an das eigene System angepasst werden): ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /Pfad/zu/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -Auf welchen Plattformen läuft WeeChat und wird es noch auf andere Betriebssystemen portiert? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Auf welchen Plattformen läuft WeeChat und wird es noch auf andere Betriebssystemen portiert? Eine vollständige Liste der Portierungen findest Du unter: http://weechat.org/download @@ -829,8 +775,7 @@ Aber um WeeChat auf fremden Betriebssystemen zu testen, zu denen wir keinen Zuga ist Hilfe gerne gesehen. [[help_developers]] -Ich möchte den Entwicklern von WeeChat helfen. Was kann ich tun? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ich möchte den Entwicklern von WeeChat helfen. Was kann ich tun? Es gibt einiges zu tun z.B. testen, programmieren, Dokumentation, ... @@ -838,8 +783,7 @@ Bitte kontaktiere uns via IRC oder email, schaue auf die Support-Seite: http://weechat.org/dev/support [[donate]] -Kann ich Geld oder anderes an die WeeChat Entwickler spenden? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Kann ich Geld oder anderes an die WeeChat Entwickler spenden? Du kannst uns Geld zur Unterstützung der weiteren Entwicklung spenden. Details hierzu gibt es auf: http://weechat.org/about/donate diff --git a/doc/de/weechat_quickstart.de.txt b/doc/de/weechat_quickstart.de.txt index b4219fcb0..f29f0c394 100644 --- a/doc/de/weechat_quickstart.de.txt +++ b/doc/de/weechat_quickstart.de.txt @@ -1,11 +1,9 @@ -WeeChat Quickstart Anleitung -============================ += WeeChat Quickstart Anleitung Sébastien Helleu <flashcode@flashtux.org> [[start]] -Start von WeeChat ------------------ +== Start von WeeChat Die bevorzugte Terminal-Emulation für X (aber nicht obligatorisch) ist rxvt-unicode (es besitzt eine gute Unterstützung für UTF-8 und hat keine @@ -13,33 +11,32 @@ Probleme mit der Standard Tastaturbelegung). Starte aus Deiner shell: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Online-Hilfe / Optionen ------------------------ +== Online-Hilfe / Optionen WeeChat bietet für jeden Befehl eine Hilfe an: ----------------------------------------- +---- /help ----------------------------------------- +---- Um sich die Hilfe für einen bestimmten Befehl anzeigen zu lassen: ----------------------------------------- +---- /help Befehl ----------------------------------------- +---- Um Optionen zu setzen benutzt man: ----------------------------------------- +---- /set config.section.option value ----------------------------------------- +---- (dabei ist 'config' der Konfigurationsname ('weechat' für den Kern von weechat, oder der Name einer Erweiterung), 'section' ein Abschnitt dieser Konfiguration und 'option' @@ -56,27 +53,27 @@ Zum Beispiel: Zeit alle Optionen an (WeeChat und Erweiterungen): ----------------------------------------- +---- /set ----------------------------------------- +---- Zeit alle WeeChat Optionen an: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- Zeit alle Optionen der IRC-Erweiterung an: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- Du kannst dir mit dem Befehl `/help` eine Hilfe für Optionen anzeigen lassen, z.B.: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Beim Beenden von WeeChat werden alle Einstellungen gespeichert (mittels `/save` kann das Sichern der Optionen erzwungen werden). @@ -87,8 +84,7 @@ verwenden möchte). [[core_vs_plugins]] -Kern (Core) vs Erweiterungen ----------------------------- +== Kern (Core) vs Erweiterungen Der Kern (core) von WeeChat ist ausschließlich dazu da, Daten auf dem Bildschirm darzustellen, um mit dem Benutzer zu interagieren. Dies bedeutet, WeeChat an sich @@ -102,25 +98,23 @@ Erweiterungen sollten aufgelistet werden. [[create_irc_server]] -Einen IRC-Server erstellen --------------------------- +== Einen IRC-Server erstellen Du kannst einen IRC-Server mit dem Befehl `/server` hinzufügen, z.B.: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- Falls man nicht mehr weiter weiß, einfach die Hilfe aufrufen: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Setzen eigener IRC-Server Optionen ----------------------------------- +== Setzen eigener IRC-Server Optionen WeeChat verwendet Vorgabewerte für alle Server (so genannte "fall backs"), falls Du keine eigenen Werte für entsprechende Server-Optionen bestimmt haben solltest. @@ -134,39 +128,39 @@ Als Beispiel erwähnt ist die Vorgabe (default) für Nicks, die auf dem Un*x Log basiert. Diese Vorgabe kann nun für den oftc-Server mittels folgendem Befehl überschrieben werden: ----------------------------------------- +---- /set irc.server.oftc.nicks "mynick,mynick2,mynick3,mynick4,mynick5" ----------------------------------------- +---- Um einen User- und realen Namen zu setzen: ----------------------------------------- +---- /set irc.server.oftc.username "Mein User-Name" /set irc.server.oftc.realname "Mein wirklicher Name" ----------------------------------------- +---- Um beim Start von WeeChat automatisch eine Verbindung zu einem Server herzustellen: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- Sollte der Server SASL unterstützen, kann man sich damit Authentifizieren (dadurch identifiziert man sich beim Server, bevor man Channels (Chaträume) betritt): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mynick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- Unterstützt der Server keine SASL Authentifizierung, muss man sich bei "nickserv" identifizieren: ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Mehrere Befehle können mittels ';' (Semikolon) getrennt werden. @@ -174,33 +168,32 @@ Mehrere Befehle können mittels ';' (Semikolon) getrennt werden. Um ein auto-join (automatisches 'betreten') von Channels (Räumen) nach der Verbindung zum Server zu erreichen: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#channel1,#channel2" ----------------------------------------- +---- Um einen Wert der Server-Optionen zu entfernen und stattdessen wieder den Vorgabewert (default) zu nutzen, z.B. Nutzung der vorgegebenen Nicks (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Andere Optionen: Du kannst andere Optionen mit folgendem Befehl festlegen ("xxx" ist der Optionsname): ----------------------------------------- +---- /set irc.server.oftc.xxx value ----------------------------------------- +---- [[connect_to_irc_server]] -Verbinden mit dem IRC-Server und auto-join der Channel ------------------------------------------------------- +== Verbinden mit dem IRC-Server und auto-join der Channel ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Dieser Befehl kann dazu benutzt werden um einen neuen Server zu erstellen und @@ -215,37 +208,35 @@ zu wechseln, kannst Du ctrl-X benutzen. Es ist möglich das automatische Zusammenlegen der Server-Buffer zu deaktivieren, um eigenständige Server-Buffer zu nutzen: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Betreten/verlassen der IRC-Channel ----------------------------------- +== Betreten/verlassen der IRC-Channel Einen Channel betreten: ----------------------------------------- +---- /join #channel ----------------------------------------- +---- Einen Channel verlassen (der Buffer bleibt geöffnet): ----------------------------------------- +---- /part [quit message] ----------------------------------------- +---- Schließen eines Server- oder Channel-Buffers (`/close` ist ein Alias für `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Buffer/Fenster Verwaltung -------------------------- +== Buffer/Fenster Verwaltung Ein Buffer ist eine Erweiterung mit einer Nummer, einer Kategorie und einem Namen, verbundene Komponente. Ein Buffer beinhaltet die auf dem Bildschirm @@ -257,10 +248,10 @@ mehreren Buffer gleichzeitig sehen. Befehle, welche Buffer und Fenster verwalten: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (Ich muss jetzt nicht wiederholen dass Du zu diesen Befehlen eine Hilfe mit /help zu erhalten ist) @@ -268,14 +259,13 @@ zu erhalten ist) Ein Beispiel: Um Deinen Bildschirm vertikal in ein kleines Fenster (1/3 Höhe) und ein großes Fenster (2/3 Höhe) aufzuteilen, benutze diesen Befehl: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Tastaturbelegung ----------------- +== Tastaturbelegung WeeChat verwendet viele Standardtasten. Alle Tastenbelegungen sind in der Dokumentation beschrieben. Im folgenden werden die wichtigsten Tastenbelegungen @@ -297,26 +287,25 @@ Eine nützliche Tastenkombination um Tastencodes zu ermitteln ist meta-k (alt-k) Beispiel: Belegung von meta-y (alt-y) mit dem Befehl `/buffer close`: ----------------------------------------- +---- /key bind (drücke meta-k) (drücke meta-y) /buffer close ----------------------------------------- +---- Du wirst folgende Befehlszeile erhalten: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Entfernen der Belegung: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Erweiterungen/Skripten ----------------------- +== Erweiterungen/Skripten Bei einigen Distributionen wie z.B. Debian, sind die Erweiterungen über separate Pakete erhältlich (z.B. weechat-plugins). @@ -331,8 +320,7 @@ weitere Informationen zur Bedienung). [[more_doc]] -Weitere Dokumentation ---------------------- +== Weitere Dokumentation Nun kannst Du WeeChat nutzen, für weitere Fragen lese die FAQ und/oder Dokumentation: http://weechat.org/doc diff --git a/doc/de/weechat_scripting.de.txt b/doc/de/weechat_scripting.de.txt index c68a13ded..59a1699cd 100644 --- a/doc/de/weechat_scripting.de.txt +++ b/doc/de/weechat_scripting.de.txt @@ -1,5 +1,4 @@ -WeeChat Scripting Guide -======================= += WeeChat Scripting Guide Sébastien Helleu <flashcode@flashtux.org> @@ -10,8 +9,7 @@ http://weechat.org/doc [[introduction]] -Einleitung ----------- +== Einleitung WeeChat (Wee Enhanced Environment for Chat) ist ein freier, schneller und schlanker Chat-Client der für viele Betriebssysteme entwickelt wird. @@ -31,28 +29,23 @@ Beinahe alle Beispiele in dieser Dokumentation beziehen sich auf Python. Allerdings ist die API für alle Skriptsprachen nahezu identisch. [[scripts_in_weechat]] -Skripten in WeeChat -------------------- +== Skripten in WeeChat [[languages_specifities]] -Besonderheiten der einzelnen Skriptsprachen -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Besonderheiten der einzelnen Skriptsprachen -Python -^^^^^^ +==== Python * WeeChat muss als Modul eingebunden werden: `import weechat` * Um die WeeChat Funktion `print*` nutzen zu können muss `prnt*` genutzt werden ('print' ist ein reservierter Befehl von Python!) * Funktionen werden im Format `weechat.xxx(arg1, arg2, ...)` ausgeführt -Perl -^^^^ +==== Perl * Funktionen werden im Format `weechat::xxx(arg1, arg2, ...);` ausgeführt -Ruby -^^^^ +==== Ruby * Es muss 'weechat_init' definiert und darin die Funktion 'register' ausgeführt werden * Funktionen werden im Format `Weechat.xxx(arg1, arg2, ...)` ausgeführt @@ -61,23 +54,20 @@ Ruby (3 Callbacks + 3 Data Strings), somit sieht ein Aufruf der Funktion folgendermaßen aus: [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -Lua -^^^ +==== Lua * Funktionen werden im Format `weechat.xxx(arg1, arg2, ...)` ausgeführt -Tcl -^^^ +==== Tcl * Funktionen werden im Format `weechat::xxx arg1 arg2 ...` ausgeführt -Guile (scheme) -^^^^^^^^^^^^^^ +==== Guile (scheme) * Funktionen werden im Format `(weechat:xxx arg1 arg2 ...)` ausgeführt * folgende Funktionen nutzen eine Liste von Argumente (anstelle von vielen @@ -88,8 +78,7 @@ Guile (scheme) ** bar_new [[register_function]] -Die "Register" Funktion -~~~~~~~~~~~~~~~~~~~~~~~ +=== Die "Register" Funktion Jedes WeeChat Skript muss sich bei WeeChat "registrieren". Die "register" Funktion muss deshalb der erste WeeChat Befehl sein der durch das Skript genutzt wird. @@ -97,9 +86,9 @@ muss deshalb der erste WeeChat Befehl sein der durch das Skript genutzt wird. Prototyp: [source,python] ----------------------------------------- +---- weechat.register(Name, Author, Version, Lizenz, Beschreibung, Shutdown_Funktion, Zeichensatz) ----------------------------------------- +---- Argumente: @@ -118,101 +107,99 @@ Beispielskripten, für jede Sprache: * python: [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Test Skript", "", "") weechat.prnt("", "Hallo, von einem python Skript!") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Test Skript", "", ""); weechat::print("", "Hallo, von einem perl Skript!"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Test Skript", "", "") Weechat.print("", "Hallo, von einem ruby Skript!") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Test Skript", "", "") weechat.print("", "Hallo, von einem lua Skript!") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Test Skript" "" "" weechat::print "" "Hallo, von einem tcl Skript!" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Test script" "" "") (weechat:print "" "Hello, from scheme script!") ----------------------------------------- +---- [[load_script]] -Laden von Skripten -~~~~~~~~~~~~~~~~~~ +=== Laden von Skripten Es wird empfohlen die "script" Erweiterung zum Laden von Skripten zu nutzen, zum Beispiel: ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- Es besteht natürlich weiterhin die Möglichkeit, individuell für jede Skriptsprache, den entsprechenden Befehl zu nutzen: ----------------------------------------- +---- /python load python/skript.py /perl load perl/skript.pl /ruby load ruby/skript.rb /lua load lua/skript.lua /tcl load tcl/skript.tcl /guile load guile/skript.scm ----------------------------------------- +---- Um Skripten automatisch beim Start von WeeChat zu laden sollte man einen Link anlegen, der in das Verzeichnis 'Skriptsprache/autoload' zeigt. Ein Beispiel für ein Python-Skript: ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../script.py ----------------------------------------- +---- [NOTE] Installiert man mittels `/script install` ein Skript, dann wird automatisch ein Link in das entsprechende 'autoload' Verzeichnis erzeugt. [[differences_with_c_api]] -Unterschiede zur C API ----------------------- +== Unterschiede zur C API Die Skripten API ist nahezu identisch mit der API der C Erweiterung. Um einen Überblick über alle API Funktionen (Prototyp, Argumente, @@ -226,28 +213,27 @@ wird. Falls Ihr Skript 'test.py' eine WeeChat API Funktion aufruft wird der Aufruf wie folgt abgearbeitet: -........................................ +.... ┌──────────────────────┐ ╔══════════════════╗ │ python Erweiterung │ ║ WeeChat "core" ║ ├────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ Skript API │ C API │ ─────► ║ C API │ ║ └────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... Gibt WeeChat einen Rückgabewert an Ihr Skript 'test.py' zurück wird der Aufruf in umgekehrter Reihenfolge abgearbeitet: -........................................ +.... ╔══════════════════╗ ┌──────────────────────┐ ║ WeeChat "core" ║ │ python Erweiterung │ ║ ┌─────────╢ ├─────────┬────────────┤ ║ │ C API ║ ─────► │ C API │ Skript API │ ─────► test.py ╚════════╧═════════╝ └─────────┴────────────┘ -........................................ +.... [[pointers]] -Pointer -~~~~~~~ +=== Pointer Wie Sie vermutlich wissen existieren in Skripten keine "Pointer". Sendet nun die API Funktion einen Pointer als Rückgabewert an das Skript, dann wird der @@ -264,9 +250,9 @@ Ein leerer String oder "0x0" sind hierbei erlaubt. Beides wird in C als NULL int Im folgenden ein Beispiel um Daten im Core Buffer (WeeChat Hauptbuffer) auszugeben: [source,python] ----------------------------------------- +---- weechat.prnt("", "Hi!") ----------------------------------------- +---- [WARNING] Aus Gründen der Geschwindigkeit wird in vielen Funktionen darauf verzichtet @@ -275,8 +261,7 @@ einen gültigen Pointer zu übergeben. Sollten Sie dies nicht beachten dann werd Sie mit einem netten Crash-Report belohnt ;) [[callbacks]] -Callbacks -~~~~~~~~~ +=== Callbacks Beinahe alle WeeChat Callbacks müssen entweder WEECHAT_RC_OK oder WEECHAT_RC_ERROR als Ergebnis zurück liefern. Eine Ausnahme bildet das modifier Callback, hier wird ein @@ -291,18 +276,18 @@ callback Beispiele, für jede Skriptsprache: * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -310,71 +295,69 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -Skript API ----------- +== Skript API Um weiterführende Informationen zu den API Funktionen zu erhalten lesen Sie bitte 'WeeChat Plugin API Reference'. [[script_api_functions]] -Funktionen -~~~~~~~~~~ +=== Funktionen Liste der Skript API Funktionen: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Kategorie | Funktionen | Allgemein | register @@ -451,16 +434,15 @@ Liste der Skript API Funktionen: hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | Upgrade | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -Konstanten -~~~~~~~~~~ +=== Konstanten Liste der Konstanten in Skript API: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Kategorie | Konstanten | return codes | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -488,23 +470,20 @@ Liste der Konstanten in Skript API: WEECHAT_HOOK_CONNECT_SOCKET_ERROR | hook Signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -Gemeinschaftsaufgabe --------------------- +== Gemeinschaftsaufgabe Dieses Kapitel beinhaltet einige Aufgaben mit Lösungsbeispielen. Die Skript API wird dabei nur sehr oberflächlich besprochen.Um eine vollständige Übersicht aller Befehle zu erhalten nutzen Sie bitte die 'WeeChat Plugin API Reference'. [[buffers]] -Buffer -~~~~~~ +=== Buffer [[buffers_display_messages]] -Nachrichten anzeigen -^^^^^^^^^^^^^^^^^^^^ +==== Nachrichten anzeigen Eine leere Zeichenkette wird häufig verwendet um den WeeChat Core Buffer zu nutzen. Möchten Sie einen anderen Buffer nutzen dann muss der Pointer dieses Buffers verwendet @@ -513,7 +492,7 @@ werden (Übergabe als String, siehe <<pointers,Pointer>>). Beispiele: [source,python] ----------------------------------------- +---- # Gibt den Text "Hallo" im Core Buffer aus weechat.prnt("", "Hallo") @@ -540,14 +519,13 @@ weechat.prnt(buffer, "Nachricht im #weechat Channel") # (bitte beachten Sie dass der Server- und Channelname durch ein Komma zu trennen sind) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "Nachricht im #weechat Channel") ----------------------------------------- +---- [NOTE] Die print Funktion heißt in Perl/Ruby/Lua/Tcl `print`. In Python lautet die Funktion `prnt`. [[buffers_send_text]] -Text in einen Buffer senden -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Text in einen Buffer senden Sie können einen Text oder einen Befehl in einen Buffer senden. Dies entspricht exakt dem Verhalten als ob Sie einen Text oder einen Befehl in die Befehlszeile eingeben und selbigen @@ -556,18 +534,17 @@ mit der [Eingabe] Taste bestätigen. Beispiele: [source,python] ----------------------------------------- +---- # führt den Befehl "/help" im aktuellen Buffer aus (die Ausgabe erfolgt im Core-Buffer) weechat.command("", "/help") # sendet den Text "Hallo" in den IRC Channel #weechat (die Teilnehmer des Channels sehen diese Nachricht) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "Hallo") ----------------------------------------- +---- [[buffers_new]] -neuen Buffer öffnen -^^^^^^^^^^^^^^^^^^^ +==== neuen Buffer öffnen Sie können aus Ihrem Skript einen neuen Buffer öffnen um dort Nachrichten auszugeben. @@ -579,7 +556,7 @@ wenn `/buffer close` genutzt wurde). Beispiele: [source,python] ----------------------------------------- +---- # Callback falls Daten aus der Eingabezeile empfangen wurden def buffer_input_cb(data, buffer, input_data): # ... @@ -598,11 +575,10 @@ weechat.buffer_set(buffer, "Titel", "Dies ist die Überschrift für meinen Buffe # deaktiviert die Protokollierung. Dazu wird die lokale Variable "no_log" auf "1" gesetzt weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -Eigenschaften von Buffern -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Eigenschaften von Buffern Die verschiedenen Eigenschaften von Buffern können in Form eines Strings, Integer oder als Pointer vorliegen und gelesen werden. @@ -610,19 +586,19 @@ vorliegen und gelesen werden. Beispiele: [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() nummer = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") kurz_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- Es ist möglich lokale Variablen eines Buffers hinzuzufügen, zu lesen oder zu löschen: [source,python] ----------------------------------------- +---- # lokale Variable hinzufügen weechat.buffer_set(buffer, "localvar_set_meinevariable", "mit_meinem_Wert") @@ -631,22 +607,20 @@ meine_variable = weechat.buffer_get_string(buffer, "localvar_meinevariable") # lokale Variable löschen weechat.buffer_set(buffer, "localvar_del_meinevariable", "") ----------------------------------------- +---- Um zu sehen welche lokalen Variablen für einen Buffer gesetzt sind führen Sie bitte in WeeChat folgenden Befehl aus: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_command]] -neuen Befehl hinzufügen -^^^^^^^^^^^^^^^^^^^^^^^ +==== neuen Befehl hinzufügen Erstellt mittels `hook_command` einen benutzerdefinierten Befehl. Dabei kann eine benutzerdefinierte Vervollständigung der Argumente genutzt werden. @@ -654,7 +628,7 @@ eine benutzerdefinierte Vervollständigung der Argumente genutzt werden. Beispiel: [source,python] ----------------------------------------- +---- def mein_befehl_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -669,37 +643,35 @@ hook = weechat.hook_command("meinfilter", "Beschreibung meines Filters", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "mein_befehl_cb", "") ----------------------------------------- +---- Der Befehl wird dann in WeeChat wie folgt genutzt: ----------------------------------------- +---- /help meinfilter /meinfilter Argumente... ----------------------------------------- +---- [[hook_timer]] -Nutzung des Timers -^^^^^^^^^^^^^^^^^^ +==== Nutzung des Timers Mittels `hook_timer` wird eine Zeitfunktion implementiert. Beispiele: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # Timer wird jede Minute aufgerufen (wenn die Sekunden auf 00 springen) weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -Hintergrundprozesse -^^^^^^^^^^^^^^^^^^^ +==== Hintergrundprozesse Mit der Funktion `hook_process` kann ein Hintergrundprozess gestartet werden. Der Callback wird aufgerufen sobald der Hintergrundprozess abgearbeitet wurde. @@ -711,7 +683,7 @@ gesetzt. Dies ist der Return Code des Befehls. Beispiele: [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -723,11 +695,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -URL Übertragung -^^^^^^^^^^^^^^^ +==== URL Übertragung _Neu seit Version 0.3.7._ @@ -739,7 +710,7 @@ Beispiel eines URL Transfers, ohne zusätzliche Optionen: Die HTML Seite wird dabei in der Callback-Variable "out" gesichert (Standardausgabe des Prozesses): [source,python] ----------------------------------------- +---- # Zeigt die aktuelle stabile Version von WeeChat an. weechat_version = "" @@ -753,7 +724,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] Alle Informationen die WeeChat betreffen findet man auf: http://weechat.org/dev/info @@ -762,7 +733,7 @@ Beispiel eines URL Transfers, mit zusätzliche Optionen: Es wird das neuste WeeChat Entwicklerpaket in die Datei '/tmp/weechat-devel.tar.gz' gesichert: [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "End of transfer (rc=%s)" % rc) @@ -771,18 +742,16 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- Für weiterführende Informationen zum URL Transfer und für die verfügbaren Optionen, siehe `hook_process` und `hook_process_hashtable` in der API Erweiterung Anleitung. [[config_options]] -Konfiguration / Optionen -~~~~~~~~~~~~~~~~~~~~~~~~ +=== Konfiguration / Optionen [[config_options_set_script]] -Optionen von Skripten setzen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen von Skripten setzen Die Funktion `config_is_set_plugin` wird dazu benutzt um zu testen ob eine Option gesetzt ist oder nicht. Mit der Funktion `config_set_plugin` wird eine Option gesetzt. @@ -790,7 +759,7 @@ gesetzt ist oder nicht. Mit der Funktion `config_set_plugin` wird eine Option ge Beispiele: [source,python] ----------------------------------------- +---- skript_optionen = { "Option1" : "Wert1", "Option2" : "Wert2", @@ -799,11 +768,10 @@ skript_optionen = { for option, standardwert in skript_optionen.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, standardwert) ----------------------------------------- +---- [[config_options_detect_changes]] -Veränderungen bemerken -^^^^^^^^^^^^^^^^^^^^^^ +==== Veränderungen bemerken Die Funktion `hook_config` wird dazu benutzt um festzustellen falls ein Anwender eine Option des Skripts verändert hat. @@ -811,7 +779,7 @@ eine Option des Skripts verändert hat. Beispiele: [source,python] ----------------------------------------- +---- SKRIPT_NAME = "meinskript" # ... @@ -826,17 +794,16 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SKRIPT_NAME + ".*", "config_cb", "") # für die jeweilige Programmiersprache muss "python" durch "perl", "ruby", "lua" oder "tcl" ersetzt werden. ----------------------------------------- +---- [[config_options_weechat]] -WeeChat Optionen lesen -^^^^^^^^^^^^^^^^^^^^^^ +==== WeeChat Optionen lesen Die Funktion `config_get` gibt einen Pointer zu einer Option zurück. Abhängig vom Typ der Option muss entweder `config_string`, `config_boolean`, `config_integer` oder `config_color` genutzt werden. [source,python] ----------------------------------------- +---- # string weechat.prnt("", "Wert der Option weechat.look.item_time_format ist: %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -852,15 +819,13 @@ weechat.prnt("", "Wert der Option weechat.look.scroll_page_percent ist: %d" # color weechat.prnt("", "Wert der Option weechat.color.chat_delimiters ist: %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -IRC -~~~ +=== IRC [[irc_catch_messages]] -Nachrichten abfangen -^^^^^^^^^^^^^^^^^^^^ +==== Nachrichten abfangen Die IRC Erweiterung sendet zwei Signale wenn eine Nachricht empfangen wurde. `xxx` ist der interne IRC Servername, `yyy` ist der IRC Befehl der empfangen @@ -873,7 +838,7 @@ xxx,irc_in2_yyy:: Signal wird gesendet nachdem die Nachricht verarbeitet wurde. [source,python] ----------------------------------------- +---- def join_cb(data, signal, signal_data): # Das Signal lautet: "freenode,irc_in2_join" # signal_data enthält die IRC Nachricht, zum Beispiel: ":nick!user@host JOIN :#channel" @@ -888,53 +853,49 @@ def join_cb(data, signal, signal_data): # es ist sinnvoll als Server "*" anzugeben um alle JOIN Nachrichten von allen # IRC Servern abzufangen weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -Modify messages -^^^^^^^^^^^^^^^ +==== Modify messages Die IRC Erweiterung verschickt einen "modifier" mit Namen "irc_in_xxx" ("xxx" steht für den Namen des IRC Befehls) um eine Nachricht zu empfangen die dann modifiziert werden kann. [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # füge den Namen des Server zu allen empfangenen Nachrichten hinzu # (Okay dies ist nicht wirklich sinnvoll, aber es ist auch nur ein Beispiel!) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] Eine fehlerhafte Nachricht kann WeeChat zum Absturz bringen oder andere ernsthafte Probleme erzeugen! [[irc_message_parse]] -Nachrichten parsen -^^^^^^^^^^^^^^^^^^ +==== Nachrichten parsen _Neu seit Version 0.3.4._ Man kann IRC Nachrichten mittels einer info_hashtable mit dem Namen "irc_message_parse" parsen. [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message here" }) weechat.prnt("", "dict: %s" % dict) # output: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -Infos -~~~~~ +=== Infos [[infos_weechat_version]] -WeeChat Version -^^^^^^^^^^^^^^^ +==== WeeChat Version Die sinnvollste Methode um die Version abzufragen ist die Nutzung von "version_number". Das Ergebnis sollte mit einem hexadezimalen @@ -943,13 +904,13 @@ Integer-Wert verglichen werden. Beispiele: [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "Es handelt sich um WeeChat 0.3.2 oder neuer") else: weechat.prnt("", "Es handelt sich um WeeChat 0.3.1 oder älter") ----------------------------------------- +---- [NOTE] Versionen ≤ 0.3.1.1 geben einen leeren String zurück wenn man 'info_get("version_number")' @@ -958,31 +919,28 @@ aufruft. Deshalb müssen Sie prüfen ob der Rückgabe wert *nicht* leer ist. Um die Version als String zu erhalten: [source,python] ----------------------------------------- +---- # Dies gibt z.B. "Version 0.3.2" im Core Buffer aus weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -andere Informationen -^^^^^^^^^^^^^^^^^^^^ +==== andere Informationen [source,python] ----------------------------------------- +---- # WeeChat Hauptverzeichnis, zum Beispiel: "/home/xxxx/.weechat" weechat.prnt("", "WeeChat Hauptverzeichnis: %s" % weechat.info_get("weechat_dir", "")) # Inaktivität der Tastatur weechat.prnt("", "Tastatur ist seit %s Sekunden nicht mehr betätigt worden" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -Infolisten -~~~~~~~~~~ +=== Infolisten [[infolists_read]] -Infoliste einlesen -^^^^^^^^^^^^^^^^^^ +==== Infoliste einlesen Es können Infolisten eingelesen werden die entweder von WeeChat oder von Erweiterungen erstellt wurden. @@ -990,7 +948,7 @@ Erweiterungen erstellt wurden. Beispiele: [source,python] ----------------------------------------- +---- # Infoliste "buffer" einlesen, um eine Liste aller Buffer zu erhalten infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -998,7 +956,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "Buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] Vergessen Sie bitte nicht `infolist_free` aufzurufen um den Speicher wieder diff --git a/doc/de/weechat_tester.de.txt b/doc/de/weechat_tester.de.txt index 224757303..a9480dcba 100644 --- a/doc/de/weechat_tester.de.txt +++ b/doc/de/weechat_tester.de.txt @@ -1,11 +1,9 @@ -WeeChat Anleitung für Testpersonen -================================== += WeeChat Anleitung für Testpersonen Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -Intention ---------- +== Intention Viele dankbare Anwender fragen uns wie sie bei der Entwicklung von WeeChat helfen können. Der einfachste (aber auch der kniffligste) Weg uns zu helfen ist: @@ -30,8 +28,7 @@ alte Fehler schon behoben wurden. [[prepare_system]] -Bereite Dein System vor ------------------------ +== Bereite Dein System vor Es wäre uns schon sehr damit geholfen wenn Du Linux 'core' Dateien aktivieren würdest. Falls WeeChat abstürzen sollte wird eine Datei Namens 'core' erzeugt. Diese Datei @@ -41,14 +38,13 @@ zu lokalisieren. Falls Du die 'bash' als shell benutzt, dann ergänze Deine `~/.bashrc` durch folgende Zeile: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -Besorge Dir die Entwickler-Version ----------------------------------- +== Besorge Dir die Entwickler-Version aktueller Programmcode (mit den aktuellen Fehlern und Funktionen) ist im GIT Repository gespeichert. @@ -61,56 +57,55 @@ Du könntest Dich dazu entscheiden es manuell zu bauen (empfohlen): von WeeChat auch nicht. [[get_sources]] -Beschaffe und baue die Quellen -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Beschaffe und baue die Quellen Erstelle zuerst einen neuen Ordner, z.B. 'weechat-git': ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- Falls Du git installiert hast, clone das git Repository (empfohlen): ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- NOTE: Um auf den aktuellen Stand zu kommen verwendest Du z.B. "`git pull`" in diesem Ordner. Ansonsten kannst Du das 'Entwickler-Paket' herunterladen und entpacken: ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- Um die Quellen zu übersetzen, wird cmake empfohlen: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- Falls Du cmake nicht hast, ist es auch möglich die autotools zu nutzen: ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -Installieren des Programm-Paketes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Installieren des Programm-Paketes + Abhängig Deiner Linux Distribution: * Debian: http://debian.flashtux.org/ @@ -120,17 +115,16 @@ Abhängig Deiner Linux Distribution: [[run]] -WeeChat starten ---------------- +== WeeChat starten Es wird empfohlen WeeChat durch die Option `--dir` mit einem anderen Ordner zu starten (nicht mit dem Ordner der stabilen Version). Die Befehlszeile lautet: ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- Immer noch munter? Dann solltest Du jetzt das bekannte Interface sehen und nun prahle vor Anderen, dass Du die neueste WeeChat-Version verwendest :) @@ -144,8 +138,7 @@ Auch falls alles korrekt funktionieren sollte gib uns trotzdem Bescheid, wir brauchen Deine Rückmeldung! [[links]] -Nützliche Links ---------------- +== Nützliche Links * GIT repository: http://git.savannah.gnu.org/gitweb/?p=weechat.git * Bug tracker: https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt index 867fbe483..24478a4c3 100644 --- a/doc/de/weechat_user.de.txt +++ b/doc/de/weechat_user.de.txt @@ -1,5 +1,4 @@ -WeeChat Benutzerhandbuch -======================== += WeeChat Benutzerhandbuch Sébastien Helleu <flashcode@flashtux.org> @@ -10,15 +9,13 @@ http://weechat.org/doc [[introduction]] -Einleitung ----------- +== Einleitung WeeChat (Wee Enhanced Environment for Chat) ist ein freier, schneller und schlanker Chat-Client der für unterschiedliche Betriebssysteme entwickelt wird. [[features]] -Funktionen -~~~~~~~~~~ +=== Funktionen wesentliche Merkmale: @@ -39,8 +36,7 @@ wesentliche Merkmale: Die WeeChat Homepage findet man unter: http://weechat.org/ [[pre-requisites]] -Vorbereitung -~~~~~~~~~~~~ +=== Vorbereitung Um WeeChat zu installieren wird folgendes benötigt: @@ -50,12 +46,10 @@ Um WeeChat zu installieren wird folgendes benötigt: * ncurses Bibliothek [[install]] -Installation ------------- +== Installation [[binary_packages]] -Binärpaket -~~~~~~~~~~ +=== Binärpaket Binärpakete sind für folgende Distributionen erhältlich: @@ -74,20 +68,18 @@ Für andere Distributionen schauen Sie bitte in die jeweilige Anleitung, wie Pakete installiert werden können. [[source_package]] -Quellpakete -~~~~~~~~~~~ +=== Quellpakete WeeChat kann mittels cmake oder autotools kompiliert werden (cmake sollte dabei die bevorzugte Methode sein). [[dependencies]] -Abhängigkeiten -^^^^^^^^^^^^^^ +==== Abhängigkeiten folgende Tabelle beschreibt welche Pakete zwingend notwendig sind um WeeChat zu kompilieren und welche Pakete optional genutzt werden können. [width="100%",cols="5,^3,^3,13",options="header"] -|======================================== +|=== | Paket ^(1)^ | Version | benötigt | Funktion | cmake | | *ja* | Zum kompilieren (autotools ist möglich. cmake wird aber empfohlen) | libncursesw5-dev ^(2)^ | | *ja* | Ncurses Oberfläche @@ -108,7 +100,7 @@ welche Pakete optional genutzt werden können. | source-highlight | | | Syntax Highlight für Quelltext in Dokumentation | xsltproc, docbook-xml, docbook-xsl | | | Erstellt man page -|======================================== +|=== [NOTE] ^(1)^ Paketnamen wurden von der Debian GNU/Linux Distribution übernommen. Versionen und Paketnamen @@ -119,35 +111,34 @@ treten dabei Darstellungsfehler mit breiten Zeichen auf). + aber nicht mit Version ≤ 2.6 oder ≥ 3.0). [[compile_with_cmake]] -Kompilieren mit cmake -^^^^^^^^^^^^^^^^^^^^^ +==== Kompilieren mit cmake * Installation in das Systemverzeichnis (benötigt 'root' Privilegien): ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. $ make % make install (als root) ----------------------------------------- +---- * Installation in ein benutzerdefiniertes Verzeichnis: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=/Pfad/zum/Verzeichnis $ make $ make install ----------------------------------------- +---- Optionen für cmake können mit dem Format, "-DOPTION=VALUE", genutzt werden. Liste von häufig verwendeten Optionen: [width="100%",cols="2m,2,5m,12",options="header"] -|======================================== +|=== | Option | Wert | Standardwert | Beschreibung | CMAKE_BUILD_TYPE | `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel` | | @@ -243,23 +234,22 @@ Liste von häufig verwendeten Optionen: | ENABLE_XFER | `ON`, `OFF` | ON | kompiliert <<xfer_plugin,Xfer Erweiterung>>. -|======================================== +|=== Weitere Optionen können mit folgendem Befehl angezeigt werden: ----------------------------------------- +---- $ cmake -LA ----------------------------------------- +---- oder mittels der Curses-Oberfläche: ----------------------------------------- +---- $ ccmake .. ----------------------------------------- +---- [[compile_with_autotools]] -Kompilieren mit autotools -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Kompilieren mit autotools [WARNING] Ausschließlich das Kompilieren mittels cmake wird offiziell unterstützt. Autotools @@ -269,51 +259,49 @@ als cmake. * Installation in das Systemverzeichnis (benötigt 'root' Privilegien): ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure $ make % make install (als root) ----------------------------------------- +---- * Installation in ein benutzerdefiniertes Verzeichnis: ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure --prefix=/Pfad/zum/Verzeichnis $ make $ make install ----------------------------------------- +---- Die Optionen können auch für das 'configure' Skript verwendet und mittels folgendem Befehl angezeigt werden: ----------------------------------------- +---- $ ./configure --help ----------------------------------------- +---- [[git_sources]] -Git Quellen -~~~~~~~~~~~ +=== Git Quellen Warnung: Git Quellen sollten nur von erfahrenen Nutzern verwendet werden. Eventuell lassen sich die Quellen nicht kompilieren oder der Code ist nicht stabil. Sie sind gewarnt! Um die Git Quellen zu beziehen nutzen Sie folgende Befehle: ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git ----------------------------------------- +---- Folgen Sie bitte der Anleitung zur Erstellung aus Quellpaketen (siehe <<source_package,Quellpakete>>). [[report_crashes]] -Abstürze melden -~~~~~~~~~~~~~~~ +=== Abstürze melden Falls es zu einem Absturz von WeeChat gekommen ist und Sie diesen Fehler melden möchten: @@ -322,29 +310,27 @@ Falls es zu einem Absturz von WeeChat gekommen ist und Sie diesen Fehler melden * installieren Sie gdb [[debug_info]] -Debug info -^^^^^^^^^^ +==== Debug info Bei der Kompilierung mit cmake muss folgende Option gesetzt werden: ----------------------------------------- +---- $ cmake .. -DCMAKE_BUILD_TYPE=Debug ----------------------------------------- +---- Bei der Kompilierung mit autotools, ist debug standardmäßig aktiviert (`--with-debug=1`). Wird ein Binärpaket genutzt dann muss zusätzlich das Paket 'weechat-dbg' installiert werden. [[core_files]] -Core Dateien -^^^^^^^^^^^^ +==== Core Dateien Um 'core' Dateien zu aktivieren kann folgende Option genutzt werden: <<option_weechat.startup.sys_rlimit,weechat.startup.sys_rlimit>>: ----------------------------------------- +---- /set weechat.startup.sys_rlimit "core:-1" ----------------------------------------- +---- Wird eine WeeChat Version ≤ 0.3.8 verwendet oder man möchte die 'core' Dateien aktivieren, bevor WeeChat gestaret wird, wird der Befehl `ulimit` benötigt. @@ -352,19 +338,18 @@ aktivieren, bevor WeeChat gestaret wird, wird der Befehl `ulimit` benötigt. Zum Beispiel muss unter Linux in einer 'bash' Shell folgender Befehl in die `~/.bashrc` Datei eingetragen werden: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- optional kann noch die maximale Dateigröße bestimmt werden: ----------------------------------------- +---- ulimit -c 200000 ----------------------------------------- +---- [[gdb_backtrace]] -Rückverfolgung mit gdb -^^^^^^^^^^^^^^^^^^^^^^ +==== Rückverfolgung mit gdb Falls WeeChat abstürzen sollte wird auf Ihrem System eine 'core' bzw. 'core.12345' Datei ('12345' ist die Prozess-Id) erzeugt. @@ -374,9 +359,9 @@ ist *nicht* das Verzeichnis in welchem sich WeeChat befindet!). Beispiel: 'weechat' ist installiert in '/usr/bin/' und die 'core' Datei befindet sich in '/home/xxx/'. Nun wird gdb mit folgendem Befehl aufgerufen: ----------------------------------------- +---- gdb /usr/bin/weechat /home/xxx/core ----------------------------------------- +---- [NOTE] Ist das Binärpaket 'weechat-dbg' (z.B. Debian) installiert dann sollte dieser Pfad zum @@ -385,7 +370,7 @@ starten von WeeChat genutzt werden: '/usr/lib/debug/usr/bin/weechat' Nun startet man 'gdb' und führt den Befehl `bt full` innerhalb gdb aus um die Fehlermeldung auszugeben. Eine Fehlermeldung von gdb sieht z.B. wie folgt aus: ----------------------------------------- +---- (gdb) set logging file /tmp/crash.txt (gdb) set logging on Copying output to /tmp/crash.txt. @@ -412,37 +397,34 @@ Copying output to /tmp/crash.txt. write_fds = {fds_bits = {0 <repeats 16 times>}} except_fds = {fds_bits = {0 <repeats 16 times>}} max_fd = <value optimized out> ----------------------------------------- +---- Diese Fehlermeldung senden Sie bitte an den Entwickler und beschreiben was den Fehler ausgelöst hat. Danke für Ihre Mithilfe! [[debug_running_weechat]] -Eine laufende Session von WeeChat debuggen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Eine laufende Session von WeeChat debuggen Um eine laufende Session von WeeChat zu debuggen (zum Beispiel wenn WeeChat nicht mehr reagieren sollte) sollte man gdb mit der Prozess-ID starten ('12345' muss durch die PID des laufenden weechat Prozesses ersetzt werden): ----------------------------------------- +---- gdb /usr/bin/weechat 12345 ----------------------------------------- +---- Sollte WeeChat abgestürzt sein, muss der Befehl `bt full` genutzt werden: ----------------------------------------- +---- (gdb) bt full ----------------------------------------- +---- [[usage]] -Nutzung -------- +== Nutzung [[running_weechat]] -WeeChat starten -~~~~~~~~~~~~~~~ +=== WeeChat starten Befehlszeile: @@ -450,9 +432,9 @@ include::cmdline_options.de.txt[] Um WeeChat zu starten muss folgender Befehl ausgeführt werden: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- Wird WeeChat zum ersten mal gestartet wird eine Konfigurationsdatei mit Standardparametern erstellt. Die Konfigurationsdatei heißt: @@ -463,13 +445,12 @@ Veränderungen an der Konfigurationsdatei mit dem internen Befehl `/set` durchf <<weechat_commands,WeeChat Befehle>>). [[screen_layout]] -Screen layout -~~~~~~~~~~~~~ +=== Screen layout Beispiel des WeeChat-Terminals: // TRANSLATION MISSING -........................................ +.... ▼ bar "title" ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ @@ -494,7 +475,7 @@ Beispiel des WeeChat-Terminals: │[@Flashy(i)] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ bars "status" and "input" bar "nicklist" ▲ -........................................ +.... Der Bildschirm setzt sich aus folgenden Bereichen zusammen: @@ -511,7 +492,7 @@ Der Bildschirm setzt sich aus folgenden Bereichen zusammen: Die 'status'-Bar besitzt als Standardeinträge: [width="100%",cols="^3,^3,10",options="header"] -|======================================== +|=== | Item | Beispiel | Beschreibung | time | `[12:55]` | Uhrzeit | buffer_count | `[6]` | Anzahl der geöffneten Buffer @@ -525,12 +506,12 @@ Die 'status'-Bar besitzt als Standardeinträge: | hotlist | `[H: 4:#abc(2,5), 6]` | Liste der Buffer mit Aktivität (ungelesene Nachrichten) (für das Beispiel: 2 Highlights und 5 ungelesene Nachrichten im Channel '#abc', eine ungelesene Nachricht in Buffer #6) | completion | `abc(2) def(5)` | Liste von Wörtern für Vervollständigung, die Zahl zeigt an wie viele Varianten möglich sind | scroll | `-MORE(50)-` | Scroll Indikator, zeigt an wie viele Zeilen unterhalb der zur Zeit dargestellten Zeile vorhanden sind -|======================================== +|=== In der 'input' Bar lautet die Standardeinstellung: [width="100%",cols="^3,^6,8",options="header"] -|======================================== +|=== | Item | Beispiel | Beschreibung | input_paste | `[Paste 7 lines ? [ctrl-Y] Ja [ctrl-N] Nein]` | Nachfrage ob sieben Zeilen eingefügt werden sollen // TRANSLATION MISSING @@ -538,11 +519,10 @@ In der 'input' Bar lautet die Standardeinstellung: | away | `(away)` | Abwesenheitsanzeige | input_search | `[Search (~ str,msg)]` | Suchindikatoren ("`~`": Groß-und Kleinschreibung ignorieren, "`==`": Groß-und Kleinschreibung berücksichtigen, "`str`": einfache Textsuche, "`regex`": suche mit regulären Ausdrücken, "`msg`": Suche in Nachrichten, "`pre`": Suche in Präfix, "`pre\|msg`": Suche in Präfix und Nachrichten) | input_text | `hi peter!` | Text der eingegeben wird -|======================================== +|=== [[buffers_and_windows]] -Buffer und Fenster -~~~~~~~~~~~~~~~~~~ +=== Buffer und Fenster Ein 'Buffer' besteht aus einer Nummer, besitzt einem Namen, hat Zeilen die angezeigt werden (und noch anderen Daten). @@ -563,7 +543,7 @@ angezeigt. Beispiele für eine horizontal Fensteraufteilung (`/window splith`): -........................................ +.... ▼ Fenster #2 (Buffer #4) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #abc │ @@ -591,11 +571,11 @@ Beispiele für eine horizontal Fensteraufteilung (`/window splith`): │[@Flashy] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ Fenster #1 (Buffer #3) -........................................ +.... Beispiele für eine vertikale Fensteraufteilung (`/window splitv`): -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #abc │ │12:54:15 peter | hey! │@Flashy│12:55:12 Max | hi │@Flashy│ @@ -619,11 +599,11 @@ Beispiele für eine vertikale Fensteraufteilung (`/window splitv`): │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ Fenster #1 (Buffer #3) ▲ Fenster #2 (Buffer #4) -........................................ +.... Beispiele für eine vertikale und horizontale Fensteraufteilung: -........................................ +.... ▼ Fenster #3 (Buffer #5) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #def │ @@ -651,11 +631,10 @@ Beispiele für eine vertikale und horizontale Fensteraufteilung: │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ Fenster #1 (Buffer #3) ▲ Fenster #2 (Buffer #4) -........................................ +.... [[bars]] -Bars -~~~~ +=== Bars Eine 'Bar' ist ein Bereich, der neben dem Chatfenster, jedwede Art von Text enthalten kann. @@ -665,7 +644,7 @@ für den Namen der Bar und `option` für die Option für diese Bar. Aufzählung von Bar-Optionen: [width="100%",cols="2m,2,10",options="header"] -|======================================== +|=== | Option | Wert | Beschreibung | type | `root`, `window` | @@ -729,11 +708,10 @@ Aufzählung von Bar-Optionen: | conditions | string | Bedingungen, wann die Bar angezeigt wird (siehe <<bar_conditions,conditions>> für weitere Informationen). -|======================================== +|=== [[bar_items]] -Items -^^^^^ +==== Items Die Option 'items' ist ein String, mit einer Anzahl von Bar-Items. Diese werden durch Komma voneinander getrennt (auf dem Bildschirm wird das Komma durch ein @@ -748,11 +726,11 @@ dargestellt (Option 'color_delim'). Beispiel einer Bar mit den Items, "[time],buffer_number+:+buffer_plugin+.+buffer_name": -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │[12:55] 3:irc/freenode.#weechat │ └───────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Eine Besonderheit stellt die Möglichkeit dar, ein Item eines bestimmten Buffers anzuzeigen. Syntax: "@buffer:item" ("buffer" ist der vollständige Name des Buffers @@ -765,13 +743,12 @@ ist. Beispiel: Nickliste von bitlbee permanent in einer root-Bar darstellen (die Bar heißt hierbei 'bitlist' und der Name des bitlbee Servers 'bitlbee'): ----------------------------------------- +---- /set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist" ----------------------------------------- +---- [[bar_filling]] -Darstellung innerhalb einer Bar -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Darstellung innerhalb einer Bar Es gibt folgende vier Möglichkeiten um Text innerhalb einer Bar darzustellen: @@ -792,7 +769,7 @@ Darstellung und die Standard-Bar 'nicklist' nutzt eine 'vertical' Darstellung. Einige Beispiele, wie die Bar 'nicklist' dargestellt werden kann: -........................................ +.... ┌──────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ │12:54:15 peter | hey! │@carl │ @@ -846,11 +823,10 @@ Einige Beispiele, wie die Bar 'nicklist' dargestellt werden kann: │───────────────────────────────────────────────────────────────────────│ │ │ filling_top_bottom = columns_horizontal ▲ -........................................ +.... [[bar_conditions]] -Bedingungen -^^^^^^^^^^^ +==== Bedingungen Die Option 'conditions' ist eine Zeichenkette die direkten Einfluss darauf nimmt, ob die Bar in einem Fenster dargestellt wird oder nicht (diese Option @@ -879,20 +855,19 @@ Folgende Zeiger sind verfügbar: Beispiel wie man die Bar-Nicklist in allen Buffer, die eine Nicklist besitzen, darstellt, aber nur wenn das Fenster eine Mindestbreite von > 100 Pixeln aufweist: ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && ${window.win_width} > 100" ----------------------------------------- +---- Gleiche Bedingungen, aber die Nickliste wird im Buffer '&bitlbee' immer angezeigt (auch wenn das Fenster kleiner als 100 Pixel ist): ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)" ----------------------------------------- +---- [[notify_levels]] -Benachrichtigungsstufen -~~~~~~~~~~~~~~~~~~~~~~~ +=== Benachrichtigungsstufen Es gibt vier Benachrichtigungsstufen für Nachrichten, welche in Buffern dargestellt werden. Nachfolgend eine Liste, sortiert von niedrig nach hoch: @@ -911,47 +886,45 @@ werden: Der Standardwert ist 'all'. [width="50%",cols="3m,10",options="header"] -|======================================== +|=== | Benachrichtigungsstufe | Welche Nachrichten Berücksichtigung in der Hotlist finden | none | (keine) | highlight | 'highlight' + 'private Nachrichten' | message | 'highlight' + 'private Nachrichten' + 'normale Nachrichten' | all | 'highlight' + 'private Nachrichten' + 'normal Nachrichten' + 'Nachrichten mit einer niedrigen Priorität' -|======================================== +|=== Benachrichtigungsstufen können für mehrere Buffer definiert werden. Zum Beispiel für alle Buffer des IRC Servers "freenode": ----------------------------------------- +---- /set weechat.notify.irc.freenode message ----------------------------------------- +---- Setzt die Benachrichtigungsstufe ausschließlich für den Channel "#weechat", auf die Stufe 'highlight': ----------------------------------------- +---- /set weechat.notify.irc.freenode.#weechat highlight ----------------------------------------- +---- Die Benachrichtigungsstufe für einen Buffer kann mittels dem `/buffer` Befehl festgelegt werden: ----------------------------------------- +---- /buffer notify highlight ----------------------------------------- +---- [[key_bindings]] -Standard Tastenbelegung -~~~~~~~~~~~~~~~~~~~~~~~ +=== Standard Tastenbelegung // 'C-' = ctrl, 'A-' = alt, 'S-' = shift [[key_bindings_command_line]] -Tastenbefehle für die Befehlszeile -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tastenbefehle für die Befehlszeile [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Taste | Beschreibung | Befehl | @k(←) .2+| setzt den Cursor eine Position nach links .2+| `/input move_previous_char` | @k(C-)@k(b) @@ -996,14 +969,13 @@ Tastenbefehle für die Befehlszeile | @k(A-)@k(k) | zeigt den Tastencode, einschließlich des eingebundenen Befehls, einer Tastenkombination an und fügt diesen in die Befehlszeile ein | `/input grab_key_command` | @k(A-)@k(r) | komplette Eingabezeile löschen| `/input delete_line` | @k(A-)@k(s) | schaltet die Aspell Funktion an/aus | `/mute aspell toggle` -|======================================== +|=== [[key_bindings_buffers_windows]] -Tastenbefehle für Buffer / Fenster -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tastenbefehle für Buffer / Fenster [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Taste | Beschreibung | Befehl | @k(C-)@k(l) | Fenster wird neu gezeichnet | `/window refresh` | @k(C-)@k(s) , @k(C-)@k(u) | setzt für alle Buffer die Markierung für ungelesene Nachrichten | `/input set_unread` @@ -1053,17 +1025,16 @@ Tastenbefehle für Buffer / Fenster | @k(A-)@k(>) | springt zum nächsten besuchten Buffer | `/input jump_next_visited_buffer` | @k(A-)@k(/) | wechselt zum jeweils zuletzt angezeigten Buffern | `/input jump_last_buffer_displayed` | @k(A-)@k(=) | schaltet Filterfunktion an/aus | `/filter toggle` -|======================================== +|=== [[key_bindings_search_context]] -Tasten für "Suchen"-Kontext -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasten für "Suchen"-Kontext Diese Tasten werden im Kontext "search" verwendet (wenn @k(C-)@k(r) genutzt wird um in einem Buffer nach einem Text zu suchen). [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Taste | Beschreibung | Befehl | @k(C-)@k(r) | Wechsel des Suchmodus: einfache Textsuche (Standard), reguläre Ausdrücke | `/input search_switch_regex` | @k(A-)@k(c) | auf Groß-/Kleinschreibung umschalten | `/input search_switch_case` @@ -1073,16 +1044,15 @@ in einem Buffer nach einem Text zu suchen). | @k(Enter) .3+| Suche abbrechen .3+| `/input search_stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_cursor_context]] -Tasten für "Cursor"-Kontext -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasten für "Cursor"-Kontext Diese Tasten werden im Kontext "cursor" verwendet (Cursor kann frei auf dem Bildschirm bewegt werden) [width="100%",cols="^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Taste | Bereich | Beschreibung | Befehl | @k(↑) | - | bewegt Cursor eine Zeile nach oben | `/cursor move up` | @k(↓) | - | bewegt Cursor eine Zeile nach unten | `/cursor move down` @@ -1103,16 +1073,15 @@ Diese Tasten werden im Kontext "cursor" verwendet (Cursor kann frei auf dem Bild | @k(Enter) .3+| - .3+| beendet den Cursor-Modus .3+| `/cursor stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_mouse_context]] -Tasten für "mouse"-Kontext -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasten für "mouse"-Kontext Diese Tasten werden im Kontext "mouse" verwendet, wenn eine Mausfunktion genutzt worden ist. [width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Maustaste ^(1)^ | Mausgeste | Bereich | Beschreibung | Befehl | ◾◽◽ | - | Chat | wechselt zum Fenster | `/window ${_window_number}` | ◾◽◽ | links | Chat | zum vorherigen Buffer springen | `/window ${_window_number};/buffer +1` @@ -1140,42 +1109,40 @@ Diese Tasten werden im Kontext "mouse" verwendet, wenn eine Mausfunktion genutzt | ⇑ | - | jede Bar | blättert Bar um 20% nach oben | `/bar scroll ${_bar_name} ${_window_number} -20%` | ⇓ | - | jede Bar | blättert Bar um 20% nach unten | `/bar scroll ${_bar_name} ${_window_number} +20%` | ◽◾◽ | - | überall | aktiviert den Cursor-Modus an dieser Position | `/cursor go ${_x},${_y}` -|======================================== +|=== [NOTE] ^(1)^ "⇑" und "⇓" sind Symbole für Mausrad hoch/runter. [[mouse]] -Mausunterstützung -~~~~~~~~~~~~~~~~~ +=== Mausunterstützung WeeChat unterstützt Maustasten als auch Mausgesten. Dies funktioniert sowohl im lokalen Terminal wie auch über eine Remote Verbindung via SSH. [[mouse_enable]] -Mausunterstützung aktivieren -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Mausunterstützung aktivieren Um die Mausunterstützung beim Programmstart zu aktivieren: ----------------------------------------- +---- /set weechat.look.mouse on ----------------------------------------- +---- Um die Mausunterstützung direkt zu aktivieren, kann man den Tastenkurzbefehl @k(A-)@k(m) nutzen oder folgenden Befehl ausführen: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Es ist möglich die Mausunterstützung kurzzeitig zu deaktivieren und dies auf einen Tastenkurzbefehl zu legen. Zum Beispiel soll über den Tastenkurzbefehl @k(A-)@k(x) die Mausunterstützung für 10 Sekunden deaktiviert werden: ----------------------------------------- +---- /key bind meta-x /mouse toggle 10 ----------------------------------------- +---- Ist die Mausunterstützung aktiviert kann man mittels gedrückter @k(-S-)-Taste (Umschalttaste) Text im Terminal markieren oder einfügen, als ob die Mausunterstützung deaktiviert sei (bei @@ -1185,8 +1152,7 @@ einigen Terminals muss die @k(-A-)-Taste anstelle der @k(-S-)-Taste gedrückt we Sollten Probleme bei der Mausunterstützung auftreten, dann sollte Bitte die 'WeeChat FAQ' gelesen werden. [[mouse_bind_events]] -Befehle einem Maus-Ereignis zuweisen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Befehle einem Maus-Ereignis zuweisen Es gibt eine Anzahl von Maus-Ereignissen, die standardmäßig durch WeeChat definiert sind (siehe <<key_bindings_mouse_context,Tasten für "mouse"-Kontext>>). @@ -1200,17 +1166,17 @@ und der Mausgeste (optional). Die unterschiedlichen Elemente werden durch ein "- Liste der Modifiers: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Modifier | Beschreibung | ctrl | Taste @k(-C-) | alt | Taste @k(-A-) | ctrl-alt | Taste @k(-C-) und @k(-A-) -|======================================== +|=== Liste der Maustasten/Mausrad: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Maustaste/-rad | Beschreibung | button1 | Linker Mausknopf wird gedrückt | button2 | Rechter Mausknopf wird gedrückt @@ -1218,12 +1184,12 @@ Liste der Maustasten/Mausrad: | button4 ... button9 | 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): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Mausgeste | Distanz | gesture-up | 3 ... 19 | gesture-up-long | ≥ 20 @@ -1233,16 +1199,16 @@ Liste der Mausgesten (nur für Maustasten, nicht für das Mausrad, anwendbar): | gesture-left-long | ≥ 40 | gesture-right | 3 ... 39 | gesture-right-long | ≥ 40 -|======================================== +|=== Liste von unvollständigen Ereignissen (nur für Mausknopf, nützlich für Erweiterungen/Skripten): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Ereignis | Beschreibung | event-down | Mausknopf ist gedrückt | event-drag | Maus wurde mit gedrücktem Mausknopf bewegt -|======================================== +|=== Bespiele von Ereignissen: @@ -1266,40 +1232,37 @@ Man führt den Befehl in der Eingabezeile aus und startet das Ereignis. Als Erge man in der Eingabezeile den Namen des ausgeführten Mausereignisses. [[command_line]] -Befehlszeile -~~~~~~~~~~~~ +=== Befehlszeile In der WeeChat Befehlszeile (am unteren Rand des Fensters) können Befehle ausgeführt oder ein Text in den Buffer geschrieben werden. [[command_line_syntax]] -Syntax -^^^^^^ +==== Syntax Ein Befehl wird durch das Zeichen "/" eingeleitet, gefolgt von dem Namen des Befehls. In folgendem Beispiel werden alle Konfigurationsoptionen angezeigt: ----------------------------------------- +---- /set ----------------------------------------- +---- Jeder Text der nicht mit dem Zeichen "/" beginnt wird in den Buffer geschrieben. In folgendem Beispiel wird der Text 'Hallo' in den aktuellen Buffer geschrieben: ----------------------------------------- +---- Hallo ----------------------------------------- +---- Dennoch ist es möglich einen Text in den Buffer zu schreiben der mit dem Zeichen "/" beginnt. Dazu muss dem ersten "/" ein zweites "/" vorangestellt werden. Um den Befehl'/set' als Text zu senden: ----------------------------------------- +---- //set ----------------------------------------- +---- [[command_line_colors]] -Farbkodierung -^^^^^^^^^^^^^ +==== Farbkodierung Für einige Erweiterungen wie z.B. der IRC Erweiterung können Farbkodierungen und Attribute für den Text gesetzt werden. Dazu muss die Tastenkombination @k(C-)@k(c), gefolgt von einem der folgenden @@ -1334,7 +1297,7 @@ um die Farbkodierungen bzw. Attribute zu deaktivieren. Farbtabelle für @k(C-)@k(c) , @k(c): [width="50%",cols="^1m,3,3",options="header"] -|======================================== +|=== | Code | IRC | WeeChat (curses) | 00 | weiß | white | 01 | schwarz | black @@ -1352,22 +1315,21 @@ Farbtabelle für @k(C-)@k(c) , @k(c): | 13 | hell magenta | lightmagenta | 14 | grau | gray | 15 | hellgrau | white -|======================================== +|=== Beispiel: Im Buffer wird "Hallo an alle!" ausgegeben. Dabei wird "Hallo" in fett und hellblau und "an alle" rot und unterstrichen dargestellt. ----------------------------------------- +---- ^Cc12^CbHallo ^Cb^Cc04^Cuan alle^Cu^Cc! ----------------------------------------- +---- [NOTE] Die Farben können in der IRC Erweiterung neu belegt werden, mittels der Option <<option_irc.color.mirc_remap,irc.color.mirc_remap>>. [[colors]] -Farben -~~~~~~ +=== Farben WeeChat kann bis zu 256 Farbpaarungen nutzen um einen Text in Bars oder im Chatbereich darzustellen (der Terminal muss natürlich 256 Farben unterstützten). @@ -1376,13 +1338,13 @@ Gemäß der Einstellung in der 'TERM'-Umgebungsvariable bestehen folgende Einsch was die Farbdarstellung in WeeChat betrifft: [width="50%",cols="8,>2,>2",options="header"] -|======================================== +|=== | $TERM | Farben | Paare ^(1)^ | "rxvt-unicode", "xterm",... | 88 | 256 | "rxvt-256color", "xterm-256color",... | 256 | 32767 | "screen" | 8 | 64 | "screen-256color" | 256 | 32767 -|======================================== +|=== [NOTE] ^(1)^ Auch falls die Terminal-Emulation mehr als 256 Farbpaare unterstützten sollte @@ -1405,27 +1367,26 @@ Variable nutzen zu können. Sollte screen genutzt werden, fügt man folgende Zeile an das Ende der Datei '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Enthält die 'TERM'-Umgebungsvariable einen falschen Wert und WeeChat wird bereits ausgeführt, keine Panik! Mittels dem Skript 'shell.py' kann eine Änderung der Umgebungsvariable durchgeführt werden, ohne das WeeChat neu gestartet werden muss: ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- [[colors_basic]] -Basisfarben -^^^^^^^^^^^ +==== Basisfarben Basisfarben in WeeChat sind: [width="50%",cols="^3m,8",options="header"] -|======================================== +|=== | Name | Farbe | default | Standard Terminalfarbe (transparent für Hintergrund) | black | Schwarz @@ -1444,11 +1405,10 @@ Basisfarben in WeeChat sind: | lightcyan | Hell türkis | gray | Grau | white | Weiß -|======================================== +|=== [[colors_extended]] -erweiterte Farbpalette -^^^^^^^^^^^^^^^^^^^^^^ +==== erweiterte Farbpalette WeeChat belegt die Farbpaare dynamisch, sobald die Farbe genutzt werden sollte. Zum Beispiel um mit einer Farbe Buffer oder Bars zu nutzen. @@ -1462,19 +1422,18 @@ Terminalfarben wechseln um eine Farbe auszuwählen. Um zum Beispiel die Uhrzeit in einem Buffer in einem schönen Orange darzustellen: ----------------------------------------- +---- /set weechat.color.chat_time 214 ----------------------------------------- +---- oder falls man den Hintergrund der Statusbar in einm sehr dunklen Grün haben möchte: ----------------------------------------- +---- /set weechat.bar.status.color_bg 22 ----------------------------------------- +---- [[colors_aliases]] -Alias -^^^^^ +==== Alias Man kann einer Farbe einen Alias zuordnen um diesen Alias anstelle einer Zahl in die Optionen einzutragen. Um einen Alias zu definieren nutzt man den Befehl @@ -1482,14 +1441,13 @@ die Optionen einzutragen. Um einen Alias zu definieren nutzt man den Befehl Beispiel: ----------------------------------------- +---- /color alias 214 orange /set weechat.color.chat_delimiters orange ----------------------------------------- +---- [[colors_attributes]] -Attribute -^^^^^^^^^ +==== Attribute Er ist möglich einer Farbe ein Attribut hinzuzufügen. Dazu wird dem Farbnamen oder der Farbnummer ein- oder mehrere Attribute vorangestellt. @@ -1503,16 +1461,16 @@ Farbnamen oder der Farbnummer ein- oder mehrere Attribute vorangestellt. Um zum Beispiel dem eigenen Nick die Farbe weiß und unterstrichen zuzuordnen: ----------------------------------------- +---- /set weechat.color.chat_nick_self _white ----------------------------------------- +---- oder um die Zeitanzeige in der Statusbar orange, fett und unterstrichen darzustellen: ----------------------------------------- +---- /set weechat.color.status_time *_214 ----------------------------------------- +---- Um einer Standard-Terminalfarbe (-1) ein Attribut hinzuzufügen muss eine Zahl gewählt werden die größer ist als die letzte genutzte Farbe des Terminals. @@ -1520,39 +1478,36 @@ Zum Beispiel; maximale Farbwahl in WeeChat: 99999. Um der Vordergrundfarbe des Terminals das Attribut "fett" zuzuordnen: ----------------------------------------- +---- /set weechat.color.status_time *99999 ----------------------------------------- +---- [[options_and_commands]] -Optionen und Befehle -~~~~~~~~~~~~~~~~~~~~ +=== Optionen und Befehle [[sec_options]] -Optionen für schutzwürdige Daten (sec.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen für schutzwürdige Daten (sec.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | section | Control command | Beschreibung | crypt | /set sec.crypt.* | Optionen für Verschlüsselung | data | <<command_weechat_secure,/secure>> | geschützte Daten -|======================================== +|=== Optionen: include::autogen/user/sec_options.txt[] [[weechat_options]] -WeeChat Optionen (weechat.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== WeeChat Optionen (weechat.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | debug | <<command_weechat_debug,/debug set>> + /set weechat.debug.* | Debug level, for core and plugins (Optionen können in Sektion hinzugefügt/entfernt werden) @@ -1575,21 +1530,19 @@ Sektionen: | key_search | <<command_weechat_key,/key>> | Tastenbefehle in search context | key_cursor | <<command_weechat_key,/key>> | Tastenbefehle in cursor context | key_mouse | <<command_weechat_key,/key>> | Tastenbefehle in mouse context -|======================================== +|=== Optionen: include::autogen/user/weechat_options.txt[] [[weechat_commands]] -WeeChat Befehle -^^^^^^^^^^^^^^^ +==== WeeChat Befehle include::autogen/user/weechat_commands.txt[] [[plugins]] -Erweiterungen -------------- +== Erweiterungen Eine WeeChat Erweiterung ist eine dynamische Bibliothek (library), die in C geschrieben und kompiliert ist. Unter GNU/Linux besitzt eine Erweiterung als Dateiendung ".so", unter @@ -1611,16 +1564,16 @@ Diese Buffer werden dann geschlossen. Beispiele wie man Erweiterungen lädt, entfernt und auflistet: ----------------------------------------- +---- /plugin load irc /plugin unload irc /plugin list ----------------------------------------- +---- Standarderweiterungen: [width="50%",cols="^1,5",options="header"] -|======================================== +|=== | Erweiterung | Beschreibung | alias | definiert Alias für Befehle | aspell | Rechtschreibprüfung für Befehlszeile @@ -1638,59 +1591,53 @@ Standarderweiterungen: | tcl | Tcl-Skript API | guile | Guile(scheme)-Skript API | xfer | Datentransfer und Direktchat -|======================================== +|=== Um mehr über Erweiterungen- und Skriptenprogrammierung (mittels API) zu erfahren, sollten Sie die 'WeeChat Plugin API Reference' oder 'WeeChat Scripting Guide' lesen. [[alias_plugin]] -Alias Erweiterung -~~~~~~~~~~~~~~~~~ +=== Alias Erweiterung Die Alias-Erweiterung erlaubt es, für Befehle, sogenannte Kurzbefehle (einen Alias) zu erstellen. [[alias_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/alias_commands.txt[] [[aspell_plugin]] -Aspell Erweiterung -~~~~~~~~~~~~~~~~~~ +=== Aspell Erweiterung Mit der ASpell Erweiterung findet eine Rechtschreibprüfung Einzug in WeeChat. Dabei ist es möglich mehrere Wörterbücher für einen Buffer zu nutzen. [[aspell_options]] -Optionen (aspell.conf) -^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen (aspell.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | color | /set aspell.color.* | Farben | check | /set aspell.check.* | Optionen um Einstellungen an der Rechtschreibprüfung vorzunehmen | dict | <<command_aspell_aspell,/aspell setdict>> + /set aspell.dict.* | Wörterbücher für Buffer (Optionen können in Sektion hinzugefügt/entfernt werden) | option | /set aspell.option.* | <<aspell_speller_options,Optionen für Rechtschreibprüfung>> (Optionen können in Sektion hinzugefügt/entfernt werden) -|======================================== +|=== Optionen: include::autogen/user/aspell_options.txt[] [[aspell_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/aspell_commands.txt[] [[aspell_speller_options]] -Optionen für Rechtschreibprüfung -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen für Rechtschreibprüfung Optionen für die Rechtschreibprüfung können definiert werden indem man die entsprechende Option in die Sektion "option" der Aspell-Konfiguration hinzufügt. @@ -1698,19 +1645,18 @@ Option in die Sektion "option" der Aspell-Konfiguration hinzufügt. Den Name der Option findet man in der ASpell-Konfigurationsdatei. Eine Auflistung aller möglichen Optionen erhält man durch: ----------------------------------------- +---- $ aspell config ----------------------------------------- +---- Um zum Beispiel die Option "ignore-case" einzuschalten: ----------------------------------------- +---- /set aspell.option.ignore-case "true" ----------------------------------------- +---- [[aspell_suggestions]] -Rechtschreibkorrektur -^^^^^^^^^^^^^^^^^^^^^ +==== Rechtschreibkorrektur Eine Rechtschreibkorrektur wird in der Bar-Item "aspell_suggest" angezeigt. Die Anzahl an Vorschlägen, für die Rechtschreibkorrektur, kann mit der Option @@ -1722,23 +1668,22 @@ Beispiel 'status', hinzufügt werden. Beispiel der Rechtschreibkorrektur, mit einem deutschen Wörterbuch (`de`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [dies,Diebs,Viehs] │ │[@Flashy] diehs █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Beispiel der Rechtschreibkorrektur, mit zwei Wörterbüchern (`en,de`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune/Prinz] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... [[charset_plugin]] -Charset Erweiterung -~~~~~~~~~~~~~~~~~~~ +=== Charset Erweiterung Die Charset Erweiterung übernimmt das de-/kodieren der Zeichensätze. @@ -1751,16 +1696,16 @@ nicht genutzt wird steht WeeChat lediglich UTF-8 zur Verfügung. Die Charset Erweiterung wird automatisch von WeeChat geladen. Um sicher zu gehen dass diese Erweiterung geladen wurde führen Sie folgenden Befehl aus: ----------------------------------------- +---- /charset ----------------------------------------- +---- Wird der Befehl nicht gefunden dann kann die Erweiterung mit dem nachfolgenden Befehl nachgeladen werden: ----------------------------------------- +---- /plugin load charset ----------------------------------------- +---- Wird die Erweiterung nicht geladen dann sollten Sie WeeChat nochmals mit allen Erweiterungen und der Charset Unterstützung kompilieren. @@ -1771,48 +1716,45 @@ welchen Zeichensatz Sie lokal nutzen. Intern wird UTF-8 genutzt. Beispiel: -........................................ +.... charset: terminal: ISO-8859-15, internal: UTF-8 -........................................ +.... [[charset_options]] -Optionen (charset.conf) -^^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen (charset.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | default | /set charset.default.* | Vorgegebener Zeichensatz zum De-/kodieren. | decode | <<command_charset_charset,/charset decode>> + /set charset.decode.* | Zeichensatz zum dekodieren (Optionen können in Sektion hinzugefügt/entfernt werden) | encode | <<command_charset_charset,/charset encode>> + /set charset.encode.* | Zeichensatz zum kodieren (Optionen können in Sektion hinzugefügt/entfernt werden) -|======================================== +|=== Optionen: include::autogen/user/charset_options.txt[] [[charset_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/charset_commands.txt[] [[charset_set]] -Zeichensatz auswählen -^^^^^^^^^^^^^^^^^^^^^ +==== Zeichensatz auswählen Um einen Zeichensatz zum de-/kodieren zu bestimmen wird der Befehl `/set` genutzt. Beispiel: ----------------------------------------- +---- /set charset.default.decode ISO-8859-15 /set charset.default.encode ISO-8859-15 ----------------------------------------- +---- Wenn der globale Zeichensatz zum dekodieren nicht gesetzt ist (dies tritt beim ersten Aufruf des Charset Erweiterung auf) dann wird automatisch der Zeichensatz @@ -1828,36 +1770,34 @@ zum kodieren als auch dekodieren genutzt. Beispiel: ----------------------------------------- +---- /charset ISO-8859-15 ----------------------------------------- +---- ist identisch mit den Befehlen: ----------------------------------------- +---- /charset decode ISO-8859-15 /charset encode ISO-8859-15 ----------------------------------------- +---- Um den Zeichensatz in einem IRC-Channel (oder in einem privaten Buffer) zu ändern wird der selbe Befehl im entsprechenden Buffer genutzt. Um sich alle genutzten Zeichensätze anzeigen zu lassen wird folgender Befehl genutzt: ----------------------------------------- +---- /set charset.* ----------------------------------------- +---- [[charset_troubleshooting]] -Fehlersuche -^^^^^^^^^^^ +==== Fehlersuche sollten Probleme bei der Zeichensatzdarstellung auftreten dann werfen Sie bitte einen Blick in die 'WeeChat FAQ'. [[fifo_plugin]] -Fifo Erweiterung -~~~~~~~~~~~~~~~~ +=== Fifo Erweiterung Sie können WeeChat fern steuern indem Sie Befehle oder einen Text an die FIFO Pipe schicken (dazu muss die Option "plugins.var.fifo.fifo" aktiviert sein (standardmäßig @@ -1868,42 +1808,42 @@ Die FIFO pipe findet man in '~/.weechat/' und heisst 'weechat_fifo_xxxx' Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus: -........................................ +.... plugin.buffer *hier Text oder Befehl *hier Text oder Befehl -........................................ +.... einige Beispiele: * Den eigenen Nick auf dem IRC Server freenode in "newnick" ändern: ----------------------------------------- +---- $ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * Den Text 'Hallo!' in den Channel #weechat schreiben: ----------------------------------------- +---- $ echo 'irc.freenode.#weechat *Hallo!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * Einen Text im aktuellen Buffer ausgeben: ----------------------------------------- +---- $ echo '*hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen mit "\n" getrennt werden): ----------------------------------------- +---- $ echo -e '*/python unload\n*/python autoload' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- Das nachfolgende Skript sendet einen Befehl an alle laufenden WeeChat Instanzen: [source,shell] ----------------------------------------- +---- #!/bin/sh if [ $# -eq 1 ]; then for fifo in ~/.weechat/weechat_fifo_* @@ -1911,17 +1851,16 @@ if [ $# -eq 1 ]; then echo -e "$1" >$fifo done fi ----------------------------------------- +---- Falls man das Skript "auto_weechat_command" benennt ruft man es wie folgt auf: ----------------------------------------- +---- $ ./auto_weechat_command 'irc.freenode.#weechat *Hallo' ----------------------------------------- +---- [[irc_plugin]] -IRC Erweiterung -~~~~~~~~~~~~~~~ +=== IRC Erweiterung Die IRC Erweiterung ist konzipiert um mittels dem IRC Protokoll mit anderen Menschen zu chatten. @@ -1929,30 +1868,28 @@ Die Erweiterung ist Multi-Server fähig und verfügt über alle IRC Befehle, ein und Datenübertragung (via xfer Erweiterung, siehe <<xfer_plugin,Xfer Erweiterung>>). [[irc_command_line_options]] -Kommandozeilen Befehle -^^^^^^^^^^^^^^^^^^^^^^ +==== Kommandozeilen Befehle Es ist möglich eine oder mehrere URL von IRC Servern zu übergeben: ----------------------------------------- +---- irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] ----------------------------------------- +---- Beispiel: Anmelden beim Server 'irc.freenode.net' mit dem Nick 'nono' und betreten der Channels '#weechat' und '#toto' (Standardport (6667) wird genutzt): ----------------------------------------- +---- $ weechat irc://nono@irc.freenode.net/#weechat,#toto ----------------------------------------- +---- [[irc_options]] -Optionen (irc.conf) -^^^^^^^^^^^^^^^^^^^ +==== Optionen (irc.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set irc.look.* | Erscheinungsbild | color | /set irc.color.* | Farben @@ -1963,21 +1900,19 @@ Sektionen: | server_default | /set irc.server_default.* | Standardwerte für Server (werden genutzt, falls keine Optionen für einen Server gesetzt sind) | server | <<command_irc_server,/server>> + /set irc.server.* | Server -|======================================== +|=== Optionen: include::autogen/user/irc_options.txt[] [[irc_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/irc_commands.txt[] [[irc_ssl_certificates]] -SSL Zertifikate -^^^^^^^^^^^^^^^ +==== SSL Zertifikate Wenn eine Verbindung mittels SSL zu einem IRC Server hergestellt wird dann überprüft WeeChat immer ob dieser Verbindung sicher ist. @@ -2004,51 +1939,48 @@ die Verifizierung sehr streng genommen wird und dadurch vielleicht versagt. Auch die Verbindung mit einer vorherigen Version (<0.3.1) funktioniert hat. [[irc_connect_oftc_with_certificate]] -erstes Beispiel: Verbindung zu oftc und Überprüfung der Zertifikate -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +===== erstes Beispiel: Verbindung zu oftc und Überprüfung der Zertifikate * Importieren Sie die Zertifikate in einer Shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt ----------------------------------------- +---- Hinweis: es ist möglich mehrere Zertifikate in der Datei CAs.pem zu halten. * In WeeChat startet man nun eine Verbindung zum "oftc" Server (der vorher angelegt werden musste): ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [[irc_connect_oftc_with_certfp]] -zweites Beispiel: Verbindung zu oftc mittels CertFP -+++++++++++++++++++++++++++++++++++++++++++++++++++ +===== zweites Beispiel: Verbindung zu oftc mittels CertFP * Erstellen Sie ein Zertifikat in der Shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ----------------------------------------- +---- * In WeeChat startet man nun eine Verbindung zum "oftc" Server (der vorher angelegt werden musste): ----------------------------------------- +---- /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem" /connect oftc /msg nickserv cert add ----------------------------------------- +---- Für weiterreichende Informationen lesen Sie bitte: http://www.oftc.net/oftc/NickServ/CertFP [[irc_sasl_authentication]] -SASL Authentifizierung -^^^^^^^^^^^^^^^^^^^^^^ +==== SASL Authentifizierung WeeChat unterstützt eine SASL Authentifikation, mittels verschiedener Mechanismen: @@ -2066,17 +1998,16 @@ Optionen für Server sind: Soll "dh-blowfish" standardmäßig auf allen Servern angewandt werden: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish ----------------------------------------- +---- [NOTE] Die "gcrypt" Bibliothek wird beim kompilieren von WeeChat benötigt um "dh-blowfish"nutzen zu können (siehe <<dependencies,Abhängigkeiten>>). [[irc_tor_freenode]] -Verbindung zu Freenode mittels TOR/SASL herstellen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Verbindung zu Freenode mittels TOR/SASL herstellen Neben der Möglichkeit eine Verbindung zum Freenode Server mittels SSL aufzubauen, kann man außerdem eine Verbindung via TOR (https://www.torproject.org/) herstellen. @@ -2088,48 +2019,47 @@ bietet "dh-blowfish" eine größere Sicherheit als eine "plain" Authentifikation Im ersten Schritt muss TOR installiert werden. Für Debian (und Derivate): ----------------------------------------- +---- $ sudo apt-get install tor ----------------------------------------- +---- In WeeChat muss nun ein socks5 Proxy für den TOR Service erstellt werden (Hostname/IP und Port müssen dabei an die eigene TOR Konfiguration angepasst werden): ----------------------------------------- +---- /proxy add tor socks5 127.0.0.1 9050 ----------------------------------------- +---- Nun erstellt man einen neuen Server, zum Beispiel: ----------------------------------------- +---- /server add freenode-tor p4fsi4ockecnea7l.onion ----------------------------------------- +---- Der Proxy muss für TOR angelegt werden: ----------------------------------------- +---- /set irc.server.freenode-tor.proxy "tor" ----------------------------------------- +---- Die SASL Authentifikation einstellen: ----------------------------------------- +---- /set irc.server.freenode-tor.sasl_mechanism dh-blowfish /set irc.server.freenode-tor.sasl_username "your_nickname" /set irc.server.freenode-tor.sasl_password "your_password" ----------------------------------------- +---- Zum Abschluss stellt man eine Verbindung zum Server her: ----------------------------------------- +---- /connect freenode-tor ----------------------------------------- +---- Um mehr über Freenode und TOR zu erfahren: http://freenode.net/irc_servers.shtml#tor [[irc_smart_filter_join_part_quit]] -einfacher Filter für join/part/quit Nachrichten -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== einfacher Filter für join/part/quit Nachrichten Es existiert ein einfacher Filter für join/part/quit Nachrichten falls ein Nick für eine vorgegebene Zeit in einem Channel inaktiv gewesen ist. @@ -2137,38 +2067,37 @@ eine vorgegebene Zeit in einem Channel inaktiv gewesen ist. Diese Funktion ist standardmäßig aktiviert, aber Sie müssen einen Filter erstellen damit solche Nachrichten im Buffer unterdrückt werden. Ein Beispiel: ----------------------------------------- +---- /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- Dabei ist es natürlich möglich den Filter in der Form einzurichten dass er nur für einen Channel Gültigkeit besitzt oder aber für mehrere Channels die mit dem selben Namen beginnen (siehe `/help filter`): ----------------------------------------- +---- /filter add irc_smart_weechat irc.freenode.#weechat irc_smart_filter * /filter add irc_smart_weechats irc.freenode.#weechat* irc_smart_filter * ----------------------------------------- +---- Sie können auch nur join oder part/quit Nachrichten unterdrücken: ----------------------------------------- +---- /set irc.look.smart_filter_join on /set irc.look.smart_filter_quit on ----------------------------------------- +---- Zusätzlich kann auch eine Verzögerung (in Minuten) eingestellt werden: ----------------------------------------- +---- /set irc.look.smart_filter_delay 5 ----------------------------------------- +---- Falls ein Nick in den letzten fünf Minuten nicht aktiv gewesen ist werden seine join und/oder part/quit Nachrichten im Channel unterdrückt. [[irc_ctcp_replies]] -CTCP Antworten -^^^^^^^^^^^^^^ +==== CTCP Antworten Sie haben die Möglichkeit CTCP Antworten anzupassen oder aber bestimmte CTCP Anfragen zu sperren (es wird nicht darauf geantwortet). @@ -2176,43 +2105,43 @@ Anfragen zu sperren (es wird nicht darauf geantwortet). Beispiel: Um eine Antwort auf die CTCP Anfrage "VERSION" anzupassen nutzen Sie folgenden Befehl: ----------------------------------------- +---- /set irc.ctcp.version "I'm running WeeChat $version, it rocks!" ----------------------------------------- +---- Wenn Sie die Anfrage CTCP "VERSION" blockieren möchten (es wird nicht darauf geantwortet) dann löschen Sie einfach den Rückgabe-String: ----------------------------------------- +---- /set irc.ctcp.version "" ----------------------------------------- +---- Selbst bisher unbekannte CTCP Anfragen können beantwortet werden. Nehmen wir zum Beispiel die Anfrage CTCP "BLABLA": ----------------------------------------- +---- /set irc.ctcp.blabla "Dies ist meine Antwort auf CTCP BLABLA" ----------------------------------------- +---- Auch kann man CTCP Antworten für jeden einzelnen Server anpassen. Dazu muss man lediglich den internen Servernamen vor die CTCP Anfrage setzen: ----------------------------------------- +---- /set irc.ctcp.freenode.version "WeeChat $version (for freenode)" ----------------------------------------- +---- Sollen die CTCP Antworten wieder auf die Standardeinstellungen zurück gesetzt werden dann müssen Sie lediglich die Option löschen: ----------------------------------------- +---- /unset irc.ctcp.version ----------------------------------------- +---- Folgende Platzhalter können in den CTCP-Antworten genutzt werden. Diese werden dann mit dem entsprechenden Wert ersetzt: [width="100%",cols="^2l,4,8",options="header"] -|======================================== +|=== | Platzhalter | Beschreibung | Wert/Beispiel | $clientinfo | Liste der CTCP Antworten | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | $version | WeeChat Version | `0.4.0-dev` @@ -2225,7 +2154,7 @@ mit dem entsprechenden Wert ersetzt: | $time | Aktuelle Uhrzeit/Datum | `Sun, 16 Dec 2012 10:40:48 +0100` | $username | Username beim IRC Server | `Name` | $realname | Realname beim IRC Server | `John Doe` -|======================================== +|=== [NOTE] ^(1)^ Die Git Version wird durch die Ausgabe des Befehls `git describe` ermittelt. @@ -2235,7 +2164,7 @@ und das Git überhaupt installiert ist. Falls CTCP Optionen nicht festgelegt sind, lauten die CTCP Antworten: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | CTCP | Antwortformat | Beispiel | CLIENTINFO | `$clientinfo` | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | FINGER | `WeeChat $versiongit` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)` @@ -2243,11 +2172,10 @@ Falls CTCP Optionen nicht festgelegt sind, lauten die CTCP Antworten: | TIME | `$time` | `Sun, 16 Dec 2012 10:40:48 +0100` | USERINFO | `$username ($realname)` | `Name (John Doe)` | VERSION | `WeeChat $versiongit ($compilation)` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)` -|======================================== +|=== [[irc_target_buffer]] -Zielbuffer für IRC Nachrichten -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Zielbuffer für IRC Nachrichten Sie können einen Zielbuffer einstellen in welchem IRC Nachrichten dargestellt werden sollen. Dazu dienen die Optionen `irc.msgbuffer.*`. @@ -2273,7 +2201,7 @@ Falls die Option nicht gesetzt ist (Standard) wählt WeeChat einen geeigneten Bu Unvollständige Liste der IRC Nachrichten bzw. Alias die angepasst werden können: [width="60%",cols="^1m,^3m,8",options="header"] -|======================================== +|=== | Nachricht | Alias | Beschreibung | error | | Fehler | invite | | Einladung in einen Channel @@ -2341,7 +2269,7 @@ Unvollständige Liste der IRC Nachrichten bzw. Alias die angepasst werden könne | 728 | quietlist | quiet Liste | 729 | quietlist | Ende der quiet Liste | 901 | | Sie sind nun eingelogged -|======================================== +|=== andere nummerische Befehle können angepasst werden. @@ -2352,65 +2280,61 @@ einige Beispiele: * gibt die Antwort von `/whois` im privaten Buffer aus: ----------------------------------------- +---- /set irc.msgbuffer.whois private ----------------------------------------- +---- * stellt die Ausgabe von whois wieder auf Standardbuffer zurück (Server Buffer): ----------------------------------------- +---- /unset irc.msgbuffer.whois ----------------------------------------- +---- * zeigt Einladungen im aktuellen Buffer an, nur für den "freenode" Server: ----------------------------------------- +---- /set irc.msgbuffer.freenode.invite current ----------------------------------------- +---- * die Nachricht "303" (ison) wird im WeeChat "core" Buffer angezeigt: ----------------------------------------- +---- /set irc.msgbuffer.303 weechat ----------------------------------------- +---- [[logger_plugin]] -Logger Erweiterung -~~~~~~~~~~~~~~~~~~ +=== Logger Erweiterung Die Logger Erweiterung erlaubt es den Inhalt von Buffern in Dateien zu sichern. Dabei kann man über Optionen Einfluss darauf nehmen was gesichert und wie etwas gesichert werden soll. [[logger_options]] -Optionen (logger.conf) -^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen (logger.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set logger.look.* | Erscheinungsbild | color | /set logger.color.* | Farben | file | /set logger.file.* | Optionen für Protokolldateien | level | /set logger.level.* | Protokollierungslevel pro Buffer (Optionen können in Sektion hinzugefügt/entfernt werden) | mask | /set logger.mask.* | Dateinamenmaske pro buffer (Optionen können in Sektion hinzugefügt/entfernt werden) -|======================================== +|=== Optionen: include::autogen/user/logger_options.txt[] [[logger_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/logger_commands.txt[] [[logger_log_levels]] -Log Levels -^^^^^^^^^^ +==== Log Levels Die Protokollierung wird durch einen sogenannten Level für jeden Buffer sichergestellt. Der Standardlevel ist dabei 9 (damit werden alle Nachrichten die im Buffer angezeigt @@ -2436,68 +2360,66 @@ weitere Beispiele: * Level 3 für IRC Channel #weechat nutzen: ----------------------------------------- +---- /set logger.level.irc.freenode.#weechat 3 ----------------------------------------- +---- * Level 3 für freenode Server Buffer nutzen: ----------------------------------------- +---- /set logger.level.irc.server.freenode 3 ----------------------------------------- +---- * Level 3 für alle Channels auf dem Server freenode nutzen: ----------------------------------------- +---- /set logger.level.irc.freenode 3 ----------------------------------------- +---- * Level 2 für alle IRC Buffers nutzen: ----------------------------------------- +---- /set logger.level.irc 2 ----------------------------------------- +---- [[logger_filenames_masks]] -Dateinamenmaske -^^^^^^^^^^^^^^^ +==== Dateinamenmaske Es ist möglich eine Dateinamenmaske für jeden Buffer zu erstellen und diese Maske mit lokalen Buffervariablen zu füllen. Um zu sehen welche lokalen Variabel es gibt: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- Zum Beispiel für den Buffer "irc.freenode.#weechat". WeeChat sucht in dieser Reihenfolge nach einer Maske: ----------------------------------------- +---- logger.mask.irc.freenode.#weechat logger.mask.irc.freenode logger.mask.irc logger.file.mask ----------------------------------------- +---- Dies bedeutet dass man eine Maske speziell für einen IRC Server ("logger.mask.irc.freenode") anlegen kann oder aber global für die Erweiterung ("logger.mask.irc"). [[logger_files_by_date]] -Protokolldatei nach Datum -+++++++++++++++++++++++++ +===== Protokolldatei nach Datum Um Protokolldateien mit einer Datumsrelevanz zu erstellen müssen Datumsspezifikationen in der Maske genutzt werden (siehe `man strftime` für das Format). Zum Beispiel: ----------------------------------------- +---- /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" ----------------------------------------- +---- Erstellt eine Struktur in folgender Form: -........................................ +.... ~/.weechat/ |--- logs/ |--- 2010/ @@ -2508,22 +2430,21 @@ Erstellt eine Struktur in folgender Form: |--- 12/ | irc.server.freenode.weechatlog | irc.freenode.#weechat.weechatlog -........................................ +.... [[logger_irc_files_by_server_channel]] -Protokolldateien nach Server und Channel -++++++++++++++++++++++++++++++++++++++++ +===== Protokolldateien nach Server und Channel Soll für jeden IRC Server ein Verzeichnis erstellt werden mit jeweils einer Protokolldatei für jeden Channel: ----------------------------------------- +---- /set logger.mask.irc "irc/$server/$channel.weechatlog" ----------------------------------------- +---- Erstellt eine Struktur in folgender Form: -........................................ +.... ~/.weechat/ |--- logs/ |--- irc/ @@ -2535,11 +2456,10 @@ Erstellt eine Struktur in folgender Form: | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog -........................................ +.... [[relay_plugin]] -Relay Erweiterung -~~~~~~~~~~~~~~~~~ +=== Relay Erweiterung Die Relay-Erweiterung wird genutzt um Daten, mittels unterschiedlicher Protokolle, über ein Netzwerk zu übermitteln: @@ -2550,13 +2470,12 @@ Die Relay-Erweiterung wird genutzt um Daten, mittels unterschiedlicher Protokoll zu teilen (zum Beispiel QWeeChat) [[relay_options]] -Optionen (relay.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Optionen (relay.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set relay.look.* | Erscheinungsbild | color | /set relay.color.* | Farben @@ -2564,34 +2483,31 @@ Sektionen: | 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) -|======================================== +|=== Optionen: include::autogen/user/relay_options.txt[] [[relay_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/relay_commands.txt[] [[relay_password]] -Passwort -^^^^^^^^ +==== Passwort Es wird nachdrücklich Empfohlen ein Passwort für die Relay-Verbindung zu nutzen: ----------------------------------------- +---- /set relay.network.password "meinPasswort" ----------------------------------------- +---- Dieses Passwort wird sowohl für das 'irc' als auch für das 'weechat' Protokoll verwendet. [[relay_ssl]] -SSL -^^^ +==== SSL Man kann SSL mittels eines selbst erstellten Zertifikates und eines privaten Schlüssels nutzen. Um SSL für die Verbindung zu aktivieren stellt man dem @@ -2603,22 +2519,22 @@ Die Standarddatei für Zertifikate/Schlüssel ist '~/.weechat/ssl/relay.pem' Ein Zertifikat und einen privaten Schlüssel kann man mit folgenden Befehlen erstellen: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----------------------------------------- +---- Sollte WeeChat schon gestartet worden sein, kann man das Zertifikat und der private Schlüssel mittels folgendem Befehl nachträglich geladen werden: ----------------------------------------- +---- /relay sslcertkey ----------------------------------------- +---- [[relay_irc_proxy]] -IRC Proxy -^^^^^^^^^ +==== IRC Proxy + Die Relay Erweiterung kann wie ein IRC Proxy genutzt werden. Dabei simuliert die Erweiterung einen IRC Server und man kann sich mit jedem IRC Client zu WeeChat verbinden. @@ -2629,45 +2545,43 @@ alle Server. Wird ein Port für alle Server genutzt, dann muss der Client den internen Namen des zu nutzenden Servers mit dem IRC Befehl "PASS" anfordern: ----------------------------------------- +---- PASS server:meinPasswort ----------------------------------------- +---- Beispiel: IRC Proxy mit SSL für einen beliebigen Server (Client wählt aus): ----------------------------------------- +---- /relay add ssl.irc 8000 ----------------------------------------- +---- Beispiel: IRC Proxy ohne SSL und nur für "freenode": ----------------------------------------- +---- /relay add irc.freenode 8000 ----------------------------------------- +---- Nun kann man eine Verbindung zum Port 8000 mit jedem beliebigen IRC Client herstellen, indem man das Server Passwort "meinPasswort" nutzt (oder "freenode:meinPasswort" sofern kein Server angegeben wurde). [[relay_weechat_protocol]] -WeeChat Protokoll -^^^^^^^^^^^^^^^^^ +==== WeeChat Protokoll Die Relay-Erweiterung kann Daten, mittels dem WeeChat Protokoll, an eine externe Oberfläche senden. Zum Beispiel: ----------------------------------------- +---- /relay add weechat 9000 ----------------------------------------- +---- Nun kann man über den Port 9000 mittels einer Oberfläche und dem Passwort "meinPasswort" eine Verbindung zu WeeChat herstellen. [[relay_websocket]] -WebSocket -^^^^^^^^^ +==== WebSocket Das WebSocket Protokoll (http://tools.ietf.org/html/rfc6455[RFC 6455]) wird nun in der Relay Erweiterung unterstützt. @@ -2679,16 +2593,15 @@ bestätigt wurde (siehe Option <<option_relay.network.websocket_allowed_origins, Ein WebSocket kann in HTML5, mit einer JavaScript Zeile, geöffnet werden: [source,js] ----------------------------------------- +---- 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). [[rmodifier_plugin]] -Rmodifier Erweiterung -~~~~~~~~~~~~~~~~~~~~~ +=== Rmodifier Erweiterung Mittels der Rmodifer Erweiterung kann man Schlüsselwörter mittels regulären Ausdrücken wandeln. Ein typischer Anwendungsfall ist das Passwörter bei der Eingabe verborgen werden, @@ -2697,32 +2610,29 @@ Ein einfaches Anwendungsbeispiel. Es ist möglich jedes einzelne Zeichen eines P durch das Zeichen `*` zu ersetzen. [[rmodifier_options]] -Optionen (rmodifier.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Optionen (rmodifier.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set rmodifier.look.* | Erscheinungsbild | modifier | <<command_rmodifier_rmodifier,/rmodifier add>> + /set rmodifier.modifier.* | Rmodifiers -|======================================== +|=== Optionen: include::autogen/user/rmodifier_options.txt[] [[rmodifier_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/rmodifier_commands.txt[] [[rmodifier_creation]] -Erstellen eines rmodifier -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Erstellen eines rmodifier Ein rmodifier besteht aus drei Elementen: @@ -2760,8 +2670,7 @@ Lautet die Befehlszeile `/oper nick password` wird diese in der Befehlszeile als `/oper nick ********` dargestellt. [[scripts_plugins]] -Erweiterungen für Skripten -~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Erweiterungen für Skripten WeeChat unterstützt sechs Skript-Erweiterungen: Python, Perl, Ruby, Lua, Tcl und Guile (scheme). @@ -2777,68 +2686,59 @@ Sollten wir Ihr Interesse geweckt haben, selber Skripten für WeeChat zu program bitte die 'WeeChat Scripting Guide'. [[script_options]] -Script Optionen (script.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Script Optionen (script.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set script.look.* | Erscheinungsbild | color | /set script.color.* | Farben | scripts | /set script.scripts.* | Optionen für den Download von Skripten -|======================================== +|=== Optionen: include::autogen/user/script_options.txt[] [[script_commands]] -Skript Befehle -^^^^^^^^^^^^^^ +==== Skript Befehle include::autogen/user/script_commands.txt[] [[python_commands]] -Python Befehle -^^^^^^^^^^^^^^ +==== Python Befehle include::autogen/user/python_commands.txt[] [[perl_commands]] -Perl Befehle -^^^^^^^^^^^^ +==== Perl Befehle include::autogen/user/perl_commands.txt[] [[ruby_commands]] -Ruby Befehle -^^^^^^^^^^^^ +==== Ruby Befehle include::autogen/user/ruby_commands.txt[] [[lua_commands]] -Lua Befehle -^^^^^^^^^^^ +==== Lua Befehle include::autogen/user/lua_commands.txt[] [[tcl_commands]] -Tcl Befehle -^^^^^^^^^^^ +==== Tcl Befehle include::autogen/user/tcl_commands.txt[] [[guile_commands]] -Guile Befehle -^^^^^^^^^^^^^ +==== Guile Befehle include::autogen/user/guile_commands.txt[] [[xfer_plugin]] -Xfer Erweiterung -~~~~~~~~~~~~~~~~ +=== Xfer Erweiterung Mit der xfer Erweiterung kann man: @@ -2847,33 +2747,30 @@ Mit der xfer Erweiterung kann man: * Datentransfer, zum Beispiel "DCC" mittels IRC Erweiterung [[xfer_options]] -Optionen (xfer.conf) -^^^^^^^^^^^^^^^^^^^^ +==== Optionen (xfer.conf) Sektionen: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Beschreibung | look | /set xfer.look.* | Erscheinungsbild | color | /set xfer.color.* | Farben | network | /set xfer.network.* | Netzwerkoptionen | file | /set xfer.file.* | Optionen zum Versenden und Empfangen von Dateien -|======================================== +|=== Optionen: include::autogen/user/xfer_options.txt[] [[xfer_commands]] -Befehle -^^^^^^^ +==== Befehle include::autogen/user/xfer_commands.txt[] [[support]] -Unterstützung -------------- +== Unterstützung Bevor Sie um Unterstützung nachsuchen lesen Sie bitte die Dokumentation und die FAQ von WeeChat durch (mit Dokumentation ist dieses Dokument gemeint. Falls Sie nicht diff --git a/doc/docgen.py b/doc/docgen.py index d68816c7e..3adb9e978 100644 --- a/doc/docgen.py +++ b/doc/docgen.py @@ -418,7 +418,7 @@ def docgen_cmd_cb(data, buffer, args): args_desc = translate(_cmd['args_description']) f.write('[[command_{0}_{1}]]\n'.format(plugin, command)) f.write('[command]*`{0}`* {1}::\n\n'.format(command, desc)) - f.write('----------------------------------------\n') + f.write('----\n') prefix = '/' + command + ' ' if args_formats != ['']: for fmt in args_formats: @@ -428,7 +428,7 @@ def docgen_cmd_cb(data, buffer, args): f.write('\n') for line in args_desc.split('\n'): f.write(line + '\n') - f.write('----------------------------------------\n\n') + f.write('----\n\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'commands') @@ -501,7 +501,7 @@ def docgen_cmd_cb(data, buffer, args): tmpfilename = filename + '.tmp' f = open(tmpfilename, 'w') f.write('[width="100%",cols="^1,^2,6,6",options="header"]\n') - f.write('|========================================\n') + f.write('|===\n') f.write('| {0} | {1} | {2} | {3}\n\n' ''.format(_('Plugin'), _('Name'), _('Description'), _('Arguments'))) @@ -513,7 +513,7 @@ def docgen_cmd_cb(data, buffer, args): f.write('| {0} | {1} | {2} | {3}\n\n' ''.format(escape(plugin), escape(info), escape(desc), escape(args_desc))) - f.write('|========================================\n') + f.write('|===\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'infos') @@ -523,7 +523,7 @@ def docgen_cmd_cb(data, buffer, args): tmpfilename = filename + '.tmp' f = open(tmpfilename, 'w') f.write('[width="100%",cols="^1,^2,6,6,6",options="header"]\n') - f.write('|========================================\n') + f.write('|===\n') f.write('| {0} | {1} | {2} | {3} | {4}\n\n' ''.format(_('Plugin'), _('Name'), _('Description'), _('Hashtable (input)'), _('Hashtable (output)'))) @@ -537,7 +537,7 @@ def docgen_cmd_cb(data, buffer, args): ''.format(escape(plugin), escape(info), escape(desc), escape(args_desc), escape(output_desc))) - f.write('|========================================\n') + f.write('|===\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'infos_hashtable') @@ -547,7 +547,7 @@ def docgen_cmd_cb(data, buffer, args): tmpfilename = filename + '.tmp' f = open(tmpfilename, 'w') f.write('[width="100%",cols="^1,^2,5,5,5",options="header"]\n') - f.write('|========================================\n') + f.write('|===\n') f.write('| {0} | {1} | {2} | {3} | {4}\n\n' ''.format(_('Plugin'), _('Name'), _('Description'), _('Pointer'), _('Arguments'))) @@ -561,7 +561,7 @@ def docgen_cmd_cb(data, buffer, args): ''.format(escape(plugin), escape(infolist), escape(desc), escape(pointer_desc), escape(args_desc))) - f.write('|========================================\n') + f.write('|===\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'infolists') @@ -596,7 +596,7 @@ def docgen_cmd_cb(data, buffer, args): tmpfilename = filename + '.tmp' f = open(tmpfilename, 'w') f.write('[width="65%",cols="^1,^2,8",options="header"]\n') - f.write('|========================================\n') + f.write('|===\n') f.write('| {0} | {1} | {2}\n\n' ''.format(_('Plugin'), _('Name'), _('Description'))) for plugin in sorted(completions): @@ -606,7 +606,7 @@ def docgen_cmd_cb(data, buffer, args): f.write('| {0} | {1} | {2}\n\n' ''.format(escape(plugin), escape(completion_item), escape(desc))) - f.write('|========================================\n') + f.write('|===\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'completions') @@ -616,7 +616,7 @@ def docgen_cmd_cb(data, buffer, args): tmpfilename = filename + '.tmp' f = open(tmpfilename, 'w') f.write('[width="100%",cols="2,^1,7",options="header"]\n') - f.write('|========================================\n') + f.write('|===\n') f.write('| {0} | {1} | {2}\n\n' ''.format(_('Option'), _('Type'), _('Constants') + ' ^(1)^')) for option in url_options: @@ -626,7 +626,7 @@ def docgen_cmd_cb(data, buffer, args): f.write('| {0} | {1} |{2}\n\n' ''.format(escape(option['name']), escape(option['type']), escape(constants))) - f.write('|========================================\n') + f.write('|===\n') f.close() update_file(filename, tmpfilename, num_files, num_files_updated, 'url_options') diff --git a/doc/en/autogen/plugin_api/completions.txt b/doc/en/autogen/plugin_api/completions.txt index 4dd4fb19a..9a91bcb8c 100644 --- a/doc/en/autogen/plugin_api/completions.txt +++ b/doc/en/autogen/plugin_api/completions.txt @@ -1,5 +1,5 @@ [width="65%",cols="^1,^2,8",options="header"] -|======================================== +|=== | Plugin | Name | Description | alias | alias | list of aliases @@ -130,4 +130,4 @@ | xfer | nick | nicks of DCC chat -|======================================== +|=== diff --git a/doc/en/autogen/plugin_api/infolists.txt b/doc/en/autogen/plugin_api/infolists.txt index 24b8b170c..39e672b01 100644 --- a/doc/en/autogen/plugin_api/infolists.txt +++ b/doc/en/autogen/plugin_api/infolists.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,5,5,5",options="header"] -|======================================== +|=== | Plugin | Name | Description | Pointer | Arguments | alias | alias | list of aliases | alias pointer (optional) | alias name (can start or end with "*" as wildcard) (optional) @@ -70,4 +70,4 @@ | xfer | xfer | list of xfer | xfer pointer (optional) | - -|======================================== +|=== diff --git a/doc/en/autogen/plugin_api/infos.txt b/doc/en/autogen/plugin_api/infos.txt index 2981b9f66..edae6f78b 100644 --- a/doc/en/autogen/plugin_api/infos.txt +++ b/doc/en/autogen/plugin_api/infos.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,6,6",options="header"] -|======================================== +|=== | Plugin | Name | Description | Arguments | aspell | aspell_dict | comma-separated list of dictionaries used in buffer | buffer pointer ("0x12345678") or buffer full name ("irc.freenode.#weechat") @@ -62,4 +62,4 @@ | weechat | weechat_upgrading | 1 if WeeChat is upgrading (command `/upgrade`) | - -|======================================== +|=== diff --git a/doc/en/autogen/plugin_api/infos_hashtable.txt b/doc/en/autogen/plugin_api/infos_hashtable.txt index e870dfa67..c0bd15a72 100644 --- a/doc/en/autogen/plugin_api/infos_hashtable.txt +++ b/doc/en/autogen/plugin_api/infos_hashtable.txt @@ -1,9 +1,9 @@ [width="100%",cols="^1,^2,6,6,6",options="header"] -|======================================== +|=== | Plugin | Name | Description | Hashtable (input) | Hashtable (output) | irc | irc_message_parse | parse an IRC message | "message": IRC message, "server": server name (optional) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel) | irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages, "count": number of messages -|======================================== +|=== diff --git a/doc/en/autogen/plugin_api/url_options.txt b/doc/en/autogen/plugin_api/url_options.txt index 1d768e655..11dcfa6e7 100644 --- a/doc/en/autogen/plugin_api/url_options.txt +++ b/doc/en/autogen/plugin_api/url_options.txt @@ -1,5 +1,5 @@ [width="100%",cols="2,^1,7",options="header"] -|======================================== +|=== | Option | Type | Constants ^(1)^ | verbose | long | @@ -298,4 +298,4 @@ | new_directory_perms | long | -|======================================== +|=== diff --git a/doc/en/autogen/user/alias_commands.txt b/doc/en/autogen/user/alias_commands.txt index 41190ec3b..669879e7b 100644 --- a/doc/en/autogen/user/alias_commands.txt +++ b/doc/en/autogen/user/alias_commands.txt @@ -1,7 +1,7 @@ [[command_alias_alias]] [command]*`alias`* create an alias for a command:: ----------------------------------------- +---- /alias [-completion <completion>] <alias> [<command> [;<command>...]] completion: completion for alias (optional, by default completion is done with target command) @@ -30,5 +30,5 @@ Examples: /alias hello /allchan -exclude=#weechat msg * hello alias /forcejoin to send IRC command "forcejoin" with completion of /sajoin: /alias -completion %%sajoin forcejoin /quote forcejoin ----------------------------------------- +---- diff --git a/doc/en/autogen/user/aspell_commands.txt b/doc/en/autogen/user/aspell_commands.txt index d53a0c433..4cf0980a9 100644 --- a/doc/en/autogen/user/aspell_commands.txt +++ b/doc/en/autogen/user/aspell_commands.txt @@ -1,7 +1,7 @@ [[command_aspell_aspell]] [command]*`aspell`* aspell plugin configuration:: ----------------------------------------- +---- /aspell enable|disable|toggle listdict setdict <dict>[,<dict>...] @@ -23,5 +23,5 @@ To enable aspell on all buffers, use option "default_dict", then enable aspell, /aspell enable Default key to toggle aspell is alt-s. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/charset_commands.txt b/doc/en/autogen/user/charset_commands.txt index cdd60f095..cdfe9df8a 100644 --- a/doc/en/autogen/user/charset_commands.txt +++ b/doc/en/autogen/user/charset_commands.txt @@ -1,7 +1,7 @@ [[command_charset_charset]] [command]*`charset`* change charset for current buffer:: ----------------------------------------- +---- /charset decode|encode <charset> reset @@ -9,5 +9,5 @@ encode: change encoding charset charset: new charset for current buffer reset: reset charsets for current buffer ----------------------------------------- +---- diff --git a/doc/en/autogen/user/guile_commands.txt b/doc/en/autogen/user/guile_commands.txt index c6132bd9c..3a339f99e 100644 --- a/doc/en/autogen/user/guile_commands.txt +++ b/doc/en/autogen/user/guile_commands.txt @@ -1,7 +1,7 @@ [[command_guile_guile]] [command]*`guile`* list/load/unload scripts:: ----------------------------------------- +---- /guile list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt index 127893521..01a50877f 100644 --- a/doc/en/autogen/user/irc_commands.txt +++ b/doc/en/autogen/user/irc_commands.txt @@ -1,16 +1,16 @@ [[command_irc_admin]] [command]*`admin`* find information about the administrator of the server:: ----------------------------------------- +---- /admin [<target>] target: server ----------------------------------------- +---- [[command_irc_allchan]] [command]*`allchan`* execute a command on all channels of all connected servers:: ----------------------------------------- +---- /allchan [-current] [-exclude=<channel>[,<channel>...]] <command> [<arguments>] -current: execute command for channels of current server only @@ -25,12 +25,12 @@ Examples: /allchan -exclude=#weechat msg * hello say 'hello' everywhere but not on #weechat and channels beginning with #linux: /allchan -exclude=#weechat,#linux* msg * hello ----------------------------------------- +---- [[command_irc_allserv]] [command]*`allserv`* execute a command on all connected servers:: ----------------------------------------- +---- /allserv [-exclude=<server>[,<server>...]] <command> [<arguments>] -exclude: exclude some servers ('*' is allowed at beginning or end of server name, to exclude many servers) @@ -44,24 +44,24 @@ Examples: /allserv away I'm away do a whois on my nick on all servers: /allserv whois $nick ----------------------------------------- +---- [[command_irc_ban]] [command]*`ban`* ban nicks or hosts:: ----------------------------------------- +---- /ban [<channel>] [<nick> [<nick>...]] channel: channel for ban nick: user or host to ban Without argument, this command display ban list for current channel. ----------------------------------------- +---- [[command_irc_connect]] [command]*`connect`* connect to IRC server(s):: ----------------------------------------- +---- /connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-auto|-open [-nojoin] [-switch] @@ -85,33 +85,33 @@ Examples: /connect my.server.org/6697 -ssl -password=test /connect irc://nick@irc.oftc.net/#channel /connect -switch ----------------------------------------- +---- [[command_irc_ctcp]] [command]*`ctcp`* send a CTCP message (Client-To-Client Protocol):: ----------------------------------------- +---- /ctcp <target> <type> [<arguments>] target: nick or channel to send CTCP to type: CTCP type (examples: "version", "ping", ..) arguments: arguments for CTCP ----------------------------------------- +---- [[command_irc_cycle]] [command]*`cycle`* leave and rejoin a channel:: ----------------------------------------- +---- /cycle [<channel>[,<channel>...]] [<message>] channel: channel name for cycle message: part message (displayed to other users) ----------------------------------------- +---- [[command_irc_dcc]] [command]*`dcc`* start a DCC (file transfer or direct chat):: ----------------------------------------- +---- /dcc chat <nick> send <nick> <file> @@ -123,76 +123,76 @@ Examples: /dcc chat toto send file "/home/foo/bar.txt" to nick "toto": /dcc send toto /home/foo/bar.txt ----------------------------------------- +---- [[command_irc_dehalfop]] [command]*`dehalfop`* remove channel half-operator status from nick(s):: ----------------------------------------- +---- /dehalfop <nick> [<nick>...] nick: nick or mask (can start or end with "*" as wildcard) *: remove channel half-operator status from everybody on channel except yourself ----------------------------------------- +---- [[command_irc_deop]] [command]*`deop`* remove channel operator status from nick(s):: ----------------------------------------- +---- /deop <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: remove channel operator status from everybody on channel except yourself ----------------------------------------- +---- [[command_irc_devoice]] [command]*`devoice`* remove voice from nick(s):: ----------------------------------------- +---- /devoice <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: remove voice from everybody on channel ----------------------------------------- +---- [[command_irc_die]] [command]*`die`* shutdown the server:: ----------------------------------------- +---- /die [<target>] target: server name ----------------------------------------- +---- [[command_irc_disconnect]] [command]*`disconnect`* disconnect from one or all IRC servers:: ----------------------------------------- +---- /disconnect [<server>|-all|-pending [<reason>]] server: server name to disconnect -all: disconnect from all servers -pending: cancel auto-reconnection on servers currently reconnecting reason: reason for quit ----------------------------------------- +---- [[command_irc_halfop]] [command]*`halfop`* give channel half-operator status to nick(s):: ----------------------------------------- +---- /halfop <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: give channel half-operator status to everybody on channel ----------------------------------------- +---- [[command_irc_ignore]] [command]*`ignore`* ignore nicks/hosts from servers or channels:: ----------------------------------------- +---- /ignore list add [re:]<nick> [<server> [<channel>]] del <number>|-all @@ -215,40 +215,40 @@ Examples: /ignore add toto@domain.com freenode ignore host "toto*@*.domain.com" on freenode/#weechat: /ignore add toto*@*.domain.com freenode #weechat ----------------------------------------- +---- [[command_irc_info]] [command]*`info`* get information describing the server:: ----------------------------------------- +---- /info [<target>] target: server name ----------------------------------------- +---- [[command_irc_invite]] [command]*`invite`* invite a nick on a channel:: ----------------------------------------- +---- /invite <nick> [<nick>...] [<channel>] nick: nick to invite channel: channel to invite ----------------------------------------- +---- [[command_irc_ison]] [command]*`ison`* check if a nick is currently on IRC:: ----------------------------------------- +---- /ison <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_join]] [command]*`join`* join a channel:: ----------------------------------------- +---- /join [-noswitch] [-server <server>] [<channel1>[,<channel2>...]] [<key1>[,<key2>...]] -noswitch: do not switch to new buffer @@ -261,23 +261,23 @@ Examples: /join #protectedchan,#weechat key /join -server freenode #weechat /join -noswitch #weechat ----------------------------------------- +---- [[command_irc_kick]] [command]*`kick`* forcibly remove a user from a channel:: ----------------------------------------- +---- /kick [<channel>] <nick> [<reason>] channel: channel where user is nick: nick to kick reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ----------------------------------------- +---- [[command_irc_kickban]] [command]*`kickban`* kicks and bans a nick from a channel:: ----------------------------------------- +---- /kickban [<channel>] <nick> [<reason>] channel: channel where user is @@ -289,32 +289,32 @@ It is possible to kick/ban with a mask, nick will be extracted from mask and rep Example: ban "*!*@host.com" and then kick "toto": /kickban toto!*@host.com ----------------------------------------- +---- [[command_irc_kill]] [command]*`kill`* close client-server connection:: ----------------------------------------- +---- /kill <nick> <reason> nick: nick to kill reason: reason for kill ----------------------------------------- +---- [[command_irc_links]] [command]*`links`* list all servernames which are known by the server answering the query:: ----------------------------------------- +---- /links [[<server>] <server_mask>] server: this server should answer the query server_mask: list of servers must match this mask ----------------------------------------- +---- [[command_irc_list]] [command]*`list`* list channels and their topic:: ----------------------------------------- +---- /list [<channel>[,<channel>...]] [<server>] [-re <regex>] channel: channel to list @@ -328,37 +328,37 @@ Examples: /list #weechat list all channels beginning with "#weechat" (can be very slow on large networks): /list -re #weechat.* ----------------------------------------- +---- [[command_irc_lusers]] [command]*`lusers`* get statistics about the size of the IRC network:: ----------------------------------------- +---- /lusers [<mask> [<target>]] mask: servers matching the mask only target: server for forwarding request ----------------------------------------- +---- [[command_irc_map]] [command]*`map`* show a graphical map of the IRC network:: ----------------------------------------- ----------------------------------------- +---- +---- [[command_irc_me]] [command]*`me`* send a CTCP action to the current channel:: ----------------------------------------- +---- /me <message> message: message to send ----------------------------------------- +---- [[command_irc_mode]] [command]*`mode`* change channel or user mode:: ----------------------------------------- +---- /mode [<channel>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<arguments>] <nick> [+|-]i|s|w|o @@ -390,62 +390,62 @@ Examples: /mode #weechat +t become invisible on server: /mode nick +i ----------------------------------------- +---- [[command_irc_motd]] [command]*`motd`* get the "Message Of The Day":: ----------------------------------------- +---- /motd [<target>] target: server name ----------------------------------------- +---- [[command_irc_msg]] [command]*`msg`* send message to a nick or channel:: ----------------------------------------- +---- /msg [-server <server>] <target>[,<target>...] <text> server: send to this server (internal name) target: nick or channel (may be mask, '*' = current channel) text: text to send ----------------------------------------- +---- [[command_irc_names]] [command]*`names`* list nicks on channels:: ----------------------------------------- +---- /names [<channel>[,<channel>...]] channel: channel name ----------------------------------------- +---- [[command_irc_nick]] [command]*`nick`* change current nick:: ----------------------------------------- +---- /nick [-all] <nick> -all: set new nick for all connected servers nick: new nick ----------------------------------------- +---- [[command_irc_notice]] [command]*`notice`* send notice message to user:: ----------------------------------------- +---- /notice [-server <server>] <target> <text> server: send to this server (internal name) target: nick or channel text: text to send ----------------------------------------- +---- [[command_irc_notify]] [command]*`notify`* add a notification for presence or away status of nicks on servers:: ----------------------------------------- +---- /notify add <nick> [<server> [-away]] del <nick>|-all [<server>] @@ -465,96 +465,96 @@ Examples: /notify add toto freenode notify when "toto" is away or back on freenode server: /notify add toto freenode -away ----------------------------------------- +---- [[command_irc_op]] [command]*`op`* give channel operator status to nick(s):: ----------------------------------------- +---- /op <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: give channel operator status to everybody on channel ----------------------------------------- +---- [[command_irc_oper]] [command]*`oper`* get operator privileges:: ----------------------------------------- +---- /oper <user> <password> user: user password: password ----------------------------------------- +---- [[command_irc_part]] [command]*`part`* leave a channel:: ----------------------------------------- +---- /part [<channel>[,<channel>...]] [<message>] channel: channel name to leave message: part message (displayed to other users) ----------------------------------------- +---- [[command_irc_ping]] [command]*`ping`* send a ping to server:: ----------------------------------------- +---- /ping <server1> [<server2>] server1: server server2: forward ping to this server ----------------------------------------- +---- [[command_irc_pong]] [command]*`pong`* answer to a ping message:: ----------------------------------------- +---- /pong <daemon> [<daemon2>] daemon: daemon who has responded to Ping message daemon2: forward message to this daemon ----------------------------------------- +---- [[command_irc_query]] [command]*`query`* send a private message to a nick:: ----------------------------------------- +---- /query [-server <server>] <nick>[,<nick>...] [<text>] server: send to this server (internal name) nick: nick for private conversation text: text to send ----------------------------------------- +---- [[command_irc_quiet]] [command]*`quiet`* quiet nicks or hosts:: ----------------------------------------- +---- /quiet [<channel>] [<nick> [<nick>...]] channel: channel for quiet nick: user or host to quiet Without argument, this command display quiet list for current channel. ----------------------------------------- +---- [[command_irc_quote]] [command]*`quote`* send raw data to server without parsing:: ----------------------------------------- +---- /quote [-server <server>] <data> server: send to this server (internal name) data: raw data to send ----------------------------------------- +---- [[command_irc_reconnect]] [command]*`reconnect`* reconnect to server(s):: ----------------------------------------- +---- /reconnect <server> [<server>...] [-nojoin] [-switch] -all [-nojoin] [-switch] @@ -562,80 +562,80 @@ server: send to this server (internal name) -all: reconnect to all servers -nojoin: do not join any channel (even if autojoin is enabled on server) -switch: switch to next server address ----------------------------------------- +---- [[command_irc_rehash]] [command]*`rehash`* tell the server to reload its config file:: ----------------------------------------- +---- /rehash [<option>] option: extra option, for some servers ----------------------------------------- +---- [[command_irc_restart]] [command]*`restart`* tell the server to restart itself:: ----------------------------------------- +---- /restart [<target>] target: server name ----------------------------------------- +---- [[command_irc_sajoin]] [command]*`sajoin`* force a user to join channel(s):: ----------------------------------------- +---- /sajoin <nick> <channel>[,<channel>...] nick: nick channel: channel name ----------------------------------------- +---- [[command_irc_samode]] [command]*`samode`* change mode on channel, without having operator status:: ----------------------------------------- +---- /samode <channel> <mode> channel: channel name mode: mode for channel ----------------------------------------- +---- [[command_irc_sanick]] [command]*`sanick`* force a user to use another nick:: ----------------------------------------- +---- /sanick <nick> <new_nick> nick: nick new_nick: new nick ----------------------------------------- +---- [[command_irc_sapart]] [command]*`sapart`* force a user to leave channel(s):: ----------------------------------------- +---- /sapart <nick> <channel>[,<channel>...] nick: nick channel: channel name ----------------------------------------- +---- [[command_irc_saquit]] [command]*`saquit`* force a user to quit server with a reason:: ----------------------------------------- +---- /saquit <nick> <reason> nick: nick reason: reason ----------------------------------------- +---- [[command_irc_server]] [command]*`server`* list, add or remove IRC servers:: ----------------------------------------- +---- /server list|listfull [<server>] add <server> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>] copy|rename <server> <new_name> @@ -668,179 +668,179 @@ Examples: /server rename oftc newoftc /server del freenode /server deloutq ----------------------------------------- +---- [[command_irc_service]] [command]*`service`* register a new service:: ----------------------------------------- +---- /service <nick> <reserved> <distribution> <type> <reserved> <info> distribution: visibility of service type: reserved for future usage ----------------------------------------- +---- [[command_irc_servlist]] [command]*`servlist`* list services currently connected to the network:: ----------------------------------------- +---- /servlist [<mask> [<type>]] mask: list only services matching this mask type: list only services of this type ----------------------------------------- +---- [[command_irc_squery]] [command]*`squery`* deliver a message to a service:: ----------------------------------------- +---- /squery <service> <text> service: name of service text: text to send ----------------------------------------- +---- [[command_irc_squit]] [command]*`squit`* disconnect server links:: ----------------------------------------- +---- /squit <server> <comment> server: server name comment: comment for quit ----------------------------------------- +---- [[command_irc_stats]] [command]*`stats`* query statistics about server:: ----------------------------------------- +---- /stats [<query> [<server>]] query: c/h/i/k/l/m/o/y/u (see RFC1459) server: server name ----------------------------------------- +---- [[command_irc_summon]] [command]*`summon`* give users who are on a host running an IRC server a message asking them to please join IRC:: ----------------------------------------- +---- /summon <user> [<target> [<channel>]] user: username target: server name channel: channel name ----------------------------------------- +---- [[command_irc_time]] [command]*`time`* query local time from server:: ----------------------------------------- +---- /time [<target>] target: query time from specified server ----------------------------------------- +---- [[command_irc_topic]] [command]*`topic`* get/set channel topic:: ----------------------------------------- +---- /topic [<channel>] [<topic>|-delete] channel: channel name topic: new topic for channel -delete: delete channel topic ----------------------------------------- +---- [[command_irc_trace]] [command]*`trace`* find the route to specific server:: ----------------------------------------- +---- /trace [<target>] target: server ----------------------------------------- +---- [[command_irc_unban]] [command]*`unban`* unban nicks or hosts:: ----------------------------------------- +---- /unban [<channel>] <nick> [<nick>...] channel: channel for unban nick: user or host to unban ----------------------------------------- +---- [[command_irc_userhost]] [command]*`userhost`* return a list of information about nicks:: ----------------------------------------- +---- /userhost <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_users]] [command]*`users`* list of users logged into the server:: ----------------------------------------- +---- /users [<target>] target: server ----------------------------------------- +---- [[command_irc_version]] [command]*`version`* give the version info of nick or server (current or specified):: ----------------------------------------- +---- /version [<server>|<nick>] server: server name nick: nick ----------------------------------------- +---- [[command_irc_voice]] [command]*`voice`* give voice to nick(s):: ----------------------------------------- +---- /voice <nick> [<nick>...] nick: nick or mask (can start or end with "*" as wildcard) *: give voice to everybody on channel ----------------------------------------- +---- [[command_irc_wallchops]] [command]*`wallchops`* send a notice to channel ops:: ----------------------------------------- +---- /wallchops [<channel>] <text> channel: channel name text: text to send ----------------------------------------- +---- [[command_irc_wallops]] [command]*`wallops`* send a message to all currently connected users who have set the 'w' user mode for themselves:: ----------------------------------------- +---- /wallops <text> text: text to send ----------------------------------------- +---- [[command_irc_who]] [command]*`who`* generate a query which returns a list of information:: ----------------------------------------- +---- /who [<mask> [o]] mask: only information which match this mask o: only operators are returned according to the mask supplied ----------------------------------------- +---- [[command_irc_whois]] [command]*`whois`* query information about user(s):: ----------------------------------------- +---- /whois [<server>] [<nick>[,<nick>...]] server: server name @@ -849,16 +849,16 @@ server: server name Without argument, this command will do a whois on: - your own nick if buffer is a server/channel - remote nick if buffer is a private. ----------------------------------------- +---- [[command_irc_whowas]] [command]*`whowas`* ask for information about a nick which no longer exists:: ----------------------------------------- +---- /whowas <nick>[,<nick>...] [<count> [<target>]] nick: nick to search count: number of replies to return (full search if negative number) target: reply should match this mask ----------------------------------------- +---- diff --git a/doc/en/autogen/user/logger_commands.txt b/doc/en/autogen/user/logger_commands.txt index 026955982..9391257ae 100644 --- a/doc/en/autogen/user/logger_commands.txt +++ b/doc/en/autogen/user/logger_commands.txt @@ -1,7 +1,7 @@ [[command_logger_logger]] [command]*`logger`* logger plugin configuration:: ----------------------------------------- +---- /logger list set <level> flush @@ -33,5 +33,5 @@ Examples: /set logger.level.core.weechat 0 use a directory per IRC server and a file per channel inside: /set logger.mask.irc "$server/$channel.weechatlog" ----------------------------------------- +---- diff --git a/doc/en/autogen/user/lua_commands.txt b/doc/en/autogen/user/lua_commands.txt index 93b6a1b6d..3eef0f9d2 100644 --- a/doc/en/autogen/user/lua_commands.txt +++ b/doc/en/autogen/user/lua_commands.txt @@ -1,7 +1,7 @@ [[command_lua_lua]] [command]*`lua`* list/load/unload scripts:: ----------------------------------------- +---- /lua list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/perl_commands.txt b/doc/en/autogen/user/perl_commands.txt index 559e3153b..543d7205b 100644 --- a/doc/en/autogen/user/perl_commands.txt +++ b/doc/en/autogen/user/perl_commands.txt @@ -1,7 +1,7 @@ [[command_perl_perl]] [command]*`perl`* list/load/unload scripts:: ----------------------------------------- +---- /perl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/python_commands.txt b/doc/en/autogen/user/python_commands.txt index 8cd81d654..4eb178c76 100644 --- a/doc/en/autogen/user/python_commands.txt +++ b/doc/en/autogen/user/python_commands.txt @@ -1,7 +1,7 @@ [[command_python_python]] [command]*`python`* list/load/unload scripts:: ----------------------------------------- +---- /python list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/relay_commands.txt b/doc/en/autogen/user/relay_commands.txt index 5330f7871..645989442 100644 --- a/doc/en/autogen/user/relay_commands.txt +++ b/doc/en/autogen/user/relay_commands.txt @@ -1,7 +1,7 @@ [[command_relay_relay]] [command]*`relay`* relay control:: ----------------------------------------- +---- /relay list|listfull|listrelay add [ipv4.][ipv6.][ssl.]<protocol.name> <port> del [ipv4.][ipv6.][ssl.]<protocol.name> @@ -42,5 +42,5 @@ Examples: /relay add ipv6.ssl.weechat 9001 weechat protocol with SSL, using IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ----------------------------------------- +---- diff --git a/doc/en/autogen/user/rmodifier_commands.txt b/doc/en/autogen/user/rmodifier_commands.txt index ce6967b74..b27009d56 100644 --- a/doc/en/autogen/user/rmodifier_commands.txt +++ b/doc/en/autogen/user/rmodifier_commands.txt @@ -1,7 +1,7 @@ [[command_rmodifier_rmodifier]] [command]*`rmodifier`* alter modifier strings with regular expressions:: ----------------------------------------- +---- /rmodifier list|listdefault add <name> <modifiers> <groups> <regex> del <name>|-all [<name>...] @@ -27,5 +27,5 @@ Examples: /rmodifier del password delete all rmodifiers: /rmodifier del -all ----------------------------------------- +---- diff --git a/doc/en/autogen/user/ruby_commands.txt b/doc/en/autogen/user/ruby_commands.txt index 19ff82afa..59a0f085d 100644 --- a/doc/en/autogen/user/ruby_commands.txt +++ b/doc/en/autogen/user/ruby_commands.txt @@ -1,7 +1,7 @@ [[command_ruby_ruby]] [command]*`ruby`* list/load/unload scripts:: ----------------------------------------- +---- /ruby list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/script_commands.txt b/doc/en/autogen/user/script_commands.txt index 223efc825..bdac7ab9c 100644 --- a/doc/en/autogen/user/script_commands.txt +++ b/doc/en/autogen/user/script_commands.txt @@ -1,7 +1,7 @@ [[command_script_script]] [command]*`script`* WeeChat scripts manager:: ----------------------------------------- +---- /script list [-o|-i] search <text> show <script> @@ -73,5 +73,5 @@ Examples: /script hold urlserver.py /script reload urlserver /script upgrade ----------------------------------------- +---- diff --git a/doc/en/autogen/user/tcl_commands.txt b/doc/en/autogen/user/tcl_commands.txt index c8cf35574..fb6647d87 100644 --- a/doc/en/autogen/user/tcl_commands.txt +++ b/doc/en/autogen/user/tcl_commands.txt @@ -1,7 +1,7 @@ [[command_tcl_tcl]] [command]*`tcl`* list/load/unload scripts:: ----------------------------------------- +---- /tcl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: script (file) to load -q: quiet mode: do not display messages Without argument, this command lists all loaded scripts. ----------------------------------------- +---- diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 2489ee253..ab2040949 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -1,17 +1,17 @@ [[command_weechat_away]] [command]*`away`* set or remove away status:: ----------------------------------------- +---- /away [-all] [<message>] -all: set or remove away status on all connected servers message: message for away (if no message is given, away status is removed) ----------------------------------------- +---- [[command_weechat_bar]] [command]*`bar`* manage bars:: ----------------------------------------- +---- /bar list|listfull|listitems add <name> <type>[,<condition>] <position> <size> <separator> <item1>[,<item2>...] default [input|title|status|nicklist] @@ -58,12 +58,12 @@ Examples: /bar scroll nicklist * y+10 scroll to end of nicklist on current buffer: /bar scroll nicklist * ye ----------------------------------------- +---- [[command_weechat_buffer]] [command]*`buffer`* manage buffers:: ----------------------------------------- +---- /buffer list clear [<number>|<name>|-merged|-all] move|merge <number> @@ -120,12 +120,12 @@ Examples: /buffer #weechat jump to next buffer: /buffer +1 ----------------------------------------- +---- [[command_weechat_color]] [command]*`color`* define color aliases and display palette of colors:: ----------------------------------------- +---- /color alias <color> <name> unalias <color> reset @@ -145,22 +145,22 @@ Examples: /color alias 214 orange delete color 214: /color unalias 214 ----------------------------------------- +---- [[command_weechat_command]] [command]*`command`* launch explicit WeeChat or plugin command:: ----------------------------------------- +---- /command <plugin> <command> plugin: plugin name ('weechat' for WeeChat internal command) command: command to execute (a '/' is automatically added if not found at beginning of command) ----------------------------------------- +---- [[command_weechat_cursor]] [command]*`cursor`* free movement of cursor on screen to execute actions on specific areas of screen:: ----------------------------------------- +---- /cursor go chat|<bar>|<x>,<y> move up|down|left|right|area_up|area_down|area_left|area_right stop @@ -178,12 +178,12 @@ Examples: /cursor go nicklist go to coordinates x=10, y=5: /cursor go 10,5 ----------------------------------------- +---- [[command_weechat_debug]] [command]*`debug`* control debug for core/plugins:: ----------------------------------------- +---- /debug list set <plugin> <level> dump [<plugin>] @@ -208,12 +208,12 @@ infolists: display infos about infolists tags: display tags for lines term: display infos about terminal windows: display windows tree ----------------------------------------- +---- [[command_weechat_eval]] [command]*`eval`* evaluate expression and send result to buffer:: ----------------------------------------- +---- /eval [-n] <expression> [-n] -c <expression1> <operator> <expression2> @@ -266,12 +266,12 @@ Examples: /eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd !~ abc ==> 0 ----------------------------------------- +---- [[command_weechat_filter]] [command]*`filter`* filter messages in buffers, to hide/show them according to tags or regex:: ----------------------------------------- +---- /filter list enable|disable|toggle [<name>] add <name> <buffer>[,<buffer>...] <tags> <regex> @@ -320,12 +320,12 @@ Examples: /filter add toto irc.freenode.#weechat nick_toto * filter lines containing "weechat sucks" on IRC channel #weechat: /filter add sucks irc.freenode.#weechat * weechat sucks ----------------------------------------- +---- [[command_weechat_help]] [command]*`help`* display help about commands and options:: ----------------------------------------- +---- /help -list|-listfull [<plugin> [<plugin>...]] <command> <option> @@ -335,23 +335,23 @@ Examples: plugin: list commands for this plugin command: a command name option: an option name (use /set to see list) ----------------------------------------- +---- [[command_weechat_history]] [command]*`history`* show buffer command history:: ----------------------------------------- +---- /history clear <value> clear: clear history value: number of history entries to show ----------------------------------------- +---- [[command_weechat_input]] [command]*`input`* functions for command line:: ----------------------------------------- +---- /input <action> [<arguments>] list of actions: @@ -406,12 +406,12 @@ list of actions: paste_stop: stop paste (bracketed paste mode) This command is used by key bindings or plugins. ----------------------------------------- +---- [[command_weechat_key]] [command]*`key`* bind/unbind keys:: ----------------------------------------- +---- /key list|listdefault|listdiff [<context>] bind <key> [<command> [<args>]] bindctxt <context> <key> [<command> [<args>]] @@ -461,12 +461,12 @@ Examples: /key bindctxt search ctrl-I /input search_stop middle button of mouse on a nick to retrieve info on nick: /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick} ----------------------------------------- +---- [[command_weechat_layout]] [command]*`layout`* save/apply/reset layout for buffers and windows:: ----------------------------------------- +---- /layout save [<name>] [buffers|windows] apply [<name>] [buffers|windows] leave @@ -484,12 +484,12 @@ buffers: save/apply only buffers (order of buffers) windows: save/apply only windows (buffer displayed by each window) Without argument, this command displays saved layouts. ----------------------------------------- +---- [[command_weechat_mouse]] [command]*`mouse`* mouse control:: ----------------------------------------- +---- /mouse enable|disable|toggle [<delay>] enable: enable mouse @@ -504,12 +504,12 @@ Examples: /mouse enable toggle mouse for 5 seconds: /mouse toggle 5 ----------------------------------------- +---- [[command_weechat_mute]] [command]*`mute`* execute a command silently:: ----------------------------------------- +---- /mute [-current | -buffer <name> | -all] command -current: no output on current buffer @@ -527,12 +527,12 @@ Examples: /mute -current msg * hi! message to #weechat channel: /mute -buffer irc.freenode.#weechat msg #weechat hi! ----------------------------------------- +---- [[command_weechat_plugin]] [command]*`plugin`* list/load/unload plugins:: ----------------------------------------- +---- /plugin list|listfull [<name>] load <filename> [<arguments>] autoload [<arguments>] @@ -550,12 +550,12 @@ Examples: arguments: arguments given to plugin on load Without argument, this command lists loaded plugins. ----------------------------------------- +---- [[command_weechat_proxy]] [command]*`proxy`* manage proxies:: ----------------------------------------- +---- /proxy list add <name> <type> <address> <port> [<username> [<password>]] del <name>|-all @@ -584,34 +584,34 @@ Examples: /proxy add myproxy socks5 sample.host.org 3128 myuser mypass delete a proxy: /proxy del myproxy ----------------------------------------- +---- [[command_weechat_quit]] [command]*`quit`* quit WeeChat:: ----------------------------------------- +---- /quit [-yes] [<arguments>] -yes: required if option weechat.look.confirm_quit is enabled arguments: text sent with signal "quit" (for example irc plugin uses this text to send quit message to server) ----------------------------------------- +---- [[command_weechat_reload]] [command]*`reload`* reload configuration files from disk:: ----------------------------------------- +---- /reload [<file> [<file>...]] file: configuration file to reload (without extension ".conf") Without argument, all files (WeeChat and plugins) are reloaded. ----------------------------------------- +---- [[command_weechat_repeat]] [command]*`repeat`* execute a command several times:: ----------------------------------------- +---- /repeat [-interval <delay>] <count> <command> delay: delay between execution of commands (in milliseconds) @@ -623,23 +623,23 @@ All commands are executed on buffer where this command was issued. Example: scroll 2 pages up: /repeat 2 /window page_up ----------------------------------------- +---- [[command_weechat_save]] [command]*`save`* save configuration files to disk:: ----------------------------------------- +---- /save [<file> [<file>...]] file: configuration file to save (without extension ".conf") Without argument, all files (WeeChat and plugins) are saved. ----------------------------------------- +---- [[command_weechat_secure]] [command]*`secure`* manage secured data (passwords or private data encrypted in file sec.conf):: ----------------------------------------- +---- /secure passphrase <passphrase>|-delete decrypt <passphrase>|-discard set <name> <value> @@ -676,12 +676,12 @@ Examples: /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}" alias to ghost the nick "mynick": /alias ghost /eval /msg -server freenode nickserv ghost mynick ${sec.data.freenode} ----------------------------------------- +---- [[command_weechat_set]] [command]*`set`* set config options:: ----------------------------------------- +---- /set [<option> [<value>]] diff [<option> [<option>...]] @@ -706,12 +706,12 @@ Examples: /set diff display changed options in irc plugin: /set diff irc.* ----------------------------------------- +---- [[command_weechat_unset]] [command]*`unset`* unset/reset config options:: ----------------------------------------- +---- /unset <option> option: name of an option (may begin or end with "*" to mass-reset options, use carefully!) @@ -723,12 +723,12 @@ Examples: /unset weechat.look.item_time_format reset all color options: /unset weechat.color.* ----------------------------------------- +---- [[command_weechat_upgrade]] [command]*`upgrade`* upgrade WeeChat without disconnecting from servers:: ----------------------------------------- +---- /upgrade [<path_to_binary>|-quit] path_to_binary: path to WeeChat binary (default is current binary) @@ -754,32 +754,32 @@ With option "-quit", the process is slightly different: Then later you can restore session with command: weechat --upgrade IMPORTANT: you must restore the session with exactly same configuration (files *.conf). It is possible to restore WeeChat session on another machine if you copy the content of directory "~/.weechat". ----------------------------------------- +---- [[command_weechat_uptime]] [command]*`uptime`* show WeeChat uptime:: ----------------------------------------- +---- /uptime [-o | -ol] -o: send uptime to current buffer as input (english string) -ol: send uptime to current buffer as input (translated string) ----------------------------------------- +---- [[command_weechat_version]] [command]*`version`* show WeeChat version and compilation date:: ----------------------------------------- +---- /version [-o | -ol] -o: send version to current buffer as input (english string) -ol: send version to current buffer as input (translated string) ----------------------------------------- +---- [[command_weechat_wait]] [command]*`wait`* schedule a command execution in future:: ----------------------------------------- +---- /wait <number>[<unit>] <command> number: amount of time to wait (integer number) @@ -799,12 +799,12 @@ Examples: /wait 15m /away -all I'm away say 'hello' in 2 minutes: /wait 2m hello ----------------------------------------- +---- [[command_weechat_window]] [command]*`window`* manage windows:: ----------------------------------------- +---- /window list -1|+1|b#|up|down|left|right [-window <number>] <number> @@ -863,5 +863,5 @@ Examples: /window scroll -d zoom on window #2: /window zoom -window 2 ----------------------------------------- +---- diff --git a/doc/en/autogen/user/xfer_commands.txt b/doc/en/autogen/user/xfer_commands.txt index 44a86650b..15fd49038 100644 --- a/doc/en/autogen/user/xfer_commands.txt +++ b/doc/en/autogen/user/xfer_commands.txt @@ -1,21 +1,21 @@ [[command_xfer_me]] [command]*`me`* send a CTCP action to remote host:: ----------------------------------------- +---- /me <message> message: message to send ----------------------------------------- +---- [[command_xfer_xfer]] [command]*`xfer`* xfer control:: ----------------------------------------- +---- /xfer [list|listfull] list: list xfer listfull: list xfer (verbose) Without argument, this command opens buffer with xfer list. ----------------------------------------- +---- diff --git a/doc/en/weechat.1.en.txt b/doc/en/weechat.1.en.txt index f30b84bdd..d2a8207c9 100644 --- a/doc/en/weechat.1.en.txt +++ b/doc/en/weechat.1.en.txt @@ -1,14 +1,11 @@ -WEECHAT(1) -========== += WEECHAT(1) :doctype: manpage -NAME ----- +== NAME weechat - the extensible chat client -SYNOPSIS --------- +== SYNOPSIS [verse] 'weechat' [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...] @@ -18,21 +15,18 @@ SYNOPSIS 'weechat' [-l|--license] 'weechat' [-v|--version] -DESCRIPTION ------------ +== DESCRIPTION WeeChat is a fast, light and extensible chat client. It is modular (lightweight core with plugins), multi-protocols (IRC and Jabber), extensible with C and scripts written in several languages. -OPTIONS -------- +== OPTIONS include::cmdline_options.en.txt[] -PLUGIN OPTIONS --------------- +== PLUGIN OPTIONS For complete doc on plugin options, please look at plugins documentation in http://weechat.org/doc[WeeChat user's guide]. @@ -50,8 +44,7 @@ example: irc://mynick@[2001:db8:0:85a3::ac1f:8001]:6668/#test -FILES ------ +== FILES $HOME/.weechat/weechat.conf:: main WeeChat configuration file @@ -89,8 +82,7 @@ $HOME/.weechat/xfer.conf:: $HOME/.weechat/weechat.log:: WeeChat log file -AUTHORS -------- +== AUTHORS WeeChat is written by Sébastien Helleu and contributors (complete list is in the AUTHORS file). @@ -106,8 +98,7 @@ Please read the COPYING file for more information. Web: <http://weechat.org/> -REPORTING BUGS --------------- +== REPORTING BUGS Please report bugs or feature requests at Savannah website: diff --git a/doc/en/weechat_dev.en.txt b/doc/en/weechat_dev.en.txt index 94d9b78c2..b93b2de7b 100644 --- a/doc/en/weechat_dev.en.txt +++ b/doc/en/weechat_dev.en.txt @@ -1,5 +1,4 @@ -WeeChat Developer's Guide -========================= += WeeChat Developer's Guide Sébastien Helleu <flashcode@flashtux.org> @@ -10,8 +9,7 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and light, designed for many operating systems. @@ -25,8 +23,7 @@ This manual documents WeeChat internals: * how to contribute to WeeChat [[repository]] -Repository ----------- +== Repository WeeChat has two main repositories: @@ -38,13 +35,12 @@ WeeChat has two main repositories: This manual documents only core repository. [[overview]] -Overview -~~~~~~~~ +=== Overview The main WeeChat directories are: [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Directory | Description | debian/ | Debian packaging | src/ | Root of sources @@ -71,15 +67,13 @@ The main WeeChat directories are: | doc/ | Documentation | po/ | Translations files (gettext) | test/ | Weercd: WeeChat flood irc server, written in Python -|======================================== +|=== [[sources]] -Sources -~~~~~~~ +=== Sources [[sources_core]] -Core -^^^^ +==== Core WeeChat "core" reside in following directories: @@ -87,7 +81,7 @@ WeeChat "core" reside in following directories: * 'src/gui/': functions about interface (buffers, windows, ...) [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Path/file | Description | core/ | Core functions: entry point, internal structures | weechat.c | Entry point, command line options, main functions, startup @@ -144,14 +138,13 @@ WeeChat "core" reside in following directories: | gui-curses-mouse.c | Mouse | gui-curses-term.c | Functions about terminal | gui-curses-window.c | Windows -|======================================== +|=== [[sources_plugins]] -Plugins -^^^^^^^ +==== Plugins [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Path/file | Description | plugins/ | Root of plugins | plugin.c | Plugins management (load/unload dynamic C libraries) @@ -275,16 +268,15 @@ Plugins | xfer-info.c | Xfer info/infolists/hdata | xfer-network.c | Network functions for xfer | xfer-upgrade.c | Save/restore xfer data when upgrading WeeChat -|======================================== +|=== [[documentation_translations]] -Documentation / translations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Documentation / translations Documentation files: [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Path/file | Description | doc/ | Documentation | asciidoc.conf | Asciidoc configuration file (some macros) @@ -304,25 +296,23 @@ Documentation files: | autogen/ | Files auto-built with script docgen.py (do *NEVER* update manually!) | user/ | Files auto-built for user's guide (do *NEVER* update manually!) | plugin_api/ | Files auto-built for plugin API (do *NEVER* update manually!) -|======================================== +|=== Translations for WeeChat and plugins are done with gettext, files are in 'po/' directory: [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Path/file | Description | po/ | Translation files (gettext) | XX.po | Translations for language XX (fr, de, it, ...), base language is English | weechat.pot | Template for translations (auto-built) -|======================================== +|=== [[coding_rules]] -Coding rules ------------- +== Coding rules [[coding_general_rules]] -General rules -~~~~~~~~~~~~~ +=== General rules * In source code, your comments, variable names, .. must be written in English *only* (no other language is allowed) @@ -330,7 +320,7 @@ General rules license and below that a short description of file. Example in C: [source,C] ----------------------------------------- +---- /* * Copyright (C) 2013 Your Name <your@email.com> * @@ -353,11 +343,10 @@ General rules /* * weechat.c: core functions for WeeChat */ ----------------------------------------- +---- [[coding_c_style]] -C style -~~~~~~~ +=== C style Some basic rules you *must* follow when you write C code: @@ -371,7 +360,7 @@ Some basic rules you *must* follow when you write C code: Example: [source,C] ----------------------------------------- +---- /* * Checks if a string with boolean value is valid. * @@ -395,14 +384,14 @@ foo () i = 2; printf ("%d\n", i); } ----------------------------------------- +---- * Use explicit variable names, for example "nicks_count" instead of "n" or "nc". Exception: in `for` loops, where variables like "i" or "n" are OK. * Initialize local variables after declaration, in body of function, example: [source,C] ----------------------------------------- +---- void foo () { @@ -412,7 +401,7 @@ foo () buffer_count = 1; /* ... */ } ----------------------------------------- +---- * Use parentheses to explicitly show how expression is evaluated, even if they are not required, for example: write `x + (y * z)` instead of `x + y * z` @@ -420,18 +409,18 @@ foo () spaces used for line above opening curly bracket (the `if` in example): [source,C] ----------------------------------------- +---- if (nicks_count == 1) { /* something */ } ----------------------------------------- +---- * Use empty lines to separate many different blocks inside functions, and if possible add a comment for each one, like this: [source,C] ----------------------------------------- +---- /* * Sends a message from out queue. */ @@ -468,13 +457,13 @@ irc_server_outqueue_send (struct t_irc_server *server) /* ... */ } ----------------------------------------- +---- * Indent the `if` conditions, and use parentheses around conditions with an operator (not needed for single booleans), like this: [source,C] ----------------------------------------- +---- if (something) { /* something */ @@ -493,12 +482,12 @@ else { /* something else */ } ----------------------------------------- +---- * Indent the `switch` statements like this: [source,C] ----------------------------------------- +---- switch (string[0]) { case 'A': /* first case */ @@ -511,12 +500,12 @@ switch (string[0]) baz (); break; } ----------------------------------------- +---- * Use `typedef` for function prototypes, not structures: [source,C] ----------------------------------------- +---- typedef int (t_hook_callback_fd)(void *data, int fd); struct t_hook_fd @@ -533,38 +522,34 @@ struct t_hook_fd struct t_hook_fd *new_hook_fd; new_hook_fd = malloc (sizeof (*new_hook_fd)); ----------------------------------------- +---- * This lisp code can be used in your '~/.emacs.el' to indent properly if you are using Emacs as text editor: [source,lisp] ----------------------------------------- +---- (add-hook 'c-mode-common-hook '(lambda () (c-toggle-hungry-state t) (c-set-style "k&r") (setq c-basic-offset 4 c-tab-always-indent t) (c-set-offset 'case-label '+))) ----------------------------------------- +---- [[coding_python_style]] -Python style -~~~~~~~~~~~~ +=== Python style See http://www.python.org/dev/peps/pep-0008/ [[core_internals]] -Core internals --------------- +== Core internals [[naming_convention]] -Naming convention -~~~~~~~~~~~~~~~~~ +=== Naming convention [[naming_convention_files]] -Files -^^^^^ +==== Files File names are composed by letters and hyphens, with format: 'xxx-yyyyy.[ch]', where 'xxx' is directory/component (can be abbreviation) where the file is, and @@ -576,7 +561,7 @@ The main file of a directory may have same name as directory, for example Examples: [width="100%",cols="1l,5",options="header"] -|======================================== +|=== | Directory | Files | src/core/ | weechat.c, wee-backtrace.c, wee-command.c, ... | src/gui/ | gui-bar.c, gui-bar-item.c, gui-bar-window.c, ... @@ -584,14 +569,13 @@ Examples: | src/plugins/ | plugin.c, plugin-api.c, plugin-config.c, plugin-script.c, ... | src/plugins/irc/ | irc.c, irc-bar-item.c, irc-buffer.c, ... | 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'. [[naming_convention_structures]] -Structures -^^^^^^^^^^ +==== Structures Structures have name 't_X_Y' or 't_X_Y_Z': @@ -602,7 +586,7 @@ Structures have name 't_X_Y' or 't_X_Y_Z': Example: an IRC nick (from 'src/plugins/irc/irc-nick.h'): [source,C] ----------------------------------------- +---- struct t_irc_nick { char *name; /* nickname */ @@ -615,11 +599,10 @@ struct t_irc_nick struct t_irc_nick *prev_nick; /* link to previous nick on channel */ struct t_irc_nick *next_nick; /* link to next nick on channel */ }; ----------------------------------------- +---- [[naming_convention_variables]] -Variables -^^^^^^^^^ +==== Variables Global variables (outside functions) have name 'X_Y_Z': @@ -633,11 +616,11 @@ Exception are variables for "last" node of a list, name is 'last_X' (where Example: windows (from 'src/gui/gui-window.c'): [source,C] ----------------------------------------- +---- struct t_gui_window *gui_windows = NULL; /* first window */ struct t_gui_window *last_gui_window = NULL; /* last window */ struct t_gui_window *gui_current_window = NULL; /* current window */ ----------------------------------------- +---- There is no naming convention for local variables (in functions). The only recommendation is that name is explicit (not too short). @@ -645,8 +628,7 @@ Nevertheless, pointers to structures are often named 'ptr_xxxx', for example a pointer on a 'struct t_gui_buffer *' will be: '*ptr_buffer'. [[naming_convention_functions]] -Functions -^^^^^^^^^ +==== Functions Naming convention for functions is the same as <<naming_convention_variables,variables,>>. @@ -654,7 +636,7 @@ Naming convention for functions is the same as Example: creation of a new window (from 'src/gui/gui-window.c'): [source,C] ----------------------------------------- +---- /* * Creates a new window. * @@ -670,11 +652,10 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer, return new_window; } ----------------------------------------- +---- [[single_thread]] -Single thread -~~~~~~~~~~~~~ +=== Single thread WeeChat is single threaded. That means every part of code should execute very fast, and that calls to functions like `sleep` are *strictly forbidden* (it is @@ -683,8 +664,7 @@ true for WeeChat core, but also C plugins and scripts). If for some reasons you have to sleep a while, use `hook_timer` with a callback. [[doubly_linked_lists]] -Doubly linked lists -~~~~~~~~~~~~~~~~~~~ +=== Doubly linked lists Most of WeeChat linked lists are doubly linked lists: each node has pointer to previous and next node. @@ -692,7 +672,7 @@ previous and next node. Example: list of buffers (from 'src/gui/gui-buffer.h'): [source,C] ----------------------------------------- +---- struct t_gui_buffer { /* data */ @@ -702,19 +682,18 @@ struct t_gui_buffer struct t_gui_buffer *prev_buffer; /* link to previous buffer */ struct t_gui_buffer *next_buffer; /* link to next buffer */ }; ----------------------------------------- +---- Then the two list pointers, to the head and tail of list: [source,C] ----------------------------------------- +---- struct t_gui_buffer *gui_buffers = NULL; /* first buffer */ struct t_gui_buffer *last_gui_buffer = NULL; /* last buffer */ ----------------------------------------- +---- [[color_codes_in_strings]] -Color codes in strings -~~~~~~~~~~~~~~~~~~~~~~ +=== Color codes in strings WeeChat uses own color codes in strings to display attributes (bold, underline, ...) and colors on screen. @@ -750,7 +729,7 @@ In following table, these conventions are used: All combinations are summarized in this table: [width="100%",cols="3,2,1,5",options="header"] -|======================================== +|=== | Code | Example | Areas | Description | @h(19) + STD | @h(19)`01` | chat + bars | Set attributes and color using option, see table below | @h(19) + EXT | @h(19)`@00001` | chat | Set color with a ncurses pair (used only on `/color` buffer) @@ -777,12 +756,12 @@ All combinations are summarized in this table: | @h(1A) + ATTR | @h(1A)`*` | chat + bars | Set attribute | @h(1B) + ATTR | @h(1B)`*` | chat + bars | Remove attribute | @h(1C) | @h(1C) | chat + bars | Reset attributes and color -|======================================== +|=== Color codes using options (see 't_gui_color_enum', in file 'src/gui/gui-color.h'): [width="60%",cols="^1m,10",options="header"] -|======================================== +|=== | Code | Option | 00 | weechat.color.separator | 01 | weechat.color.chat @@ -828,12 +807,12 @@ Color codes using options (see 't_gui_color_enum', in file 'src/gui/gui-color.h' | 41 | weechat.color.chat_nick_suffix _(new in version 0.4.1)_ | 42 | weechat.color.emphasis _(new in version 0.4.2)_ | 43 | weechat.color.chat_day_change _(new in version 0.4.2)_ -|======================================== +|=== WeeChat colors are: [width="40%",cols="^1m,6",options="header"] -|======================================== +|=== | Code | Color | 00 | Default (terminal foreground/background) | 01 | Black @@ -852,12 +831,12 @@ WeeChat colors are: | 14 | Light cyan | 15 | Gray | 16 | White -|======================================== +|=== Examples of color codes: [width="50%",cols="1,2",options="header"] -|======================================== +|=== | Code | Description | @h(19)`01` | Color of option "01" (chat text) | @h(19)`*08,03` | Yellow on red @@ -866,11 +845,10 @@ Examples of color codes: | @h(1A)`_` | Set underline | @h(1B)`_` | Remove underline | @h(1C) | Reset attributes and color -|======================================== +|=== [[plugin_internals]] -Plugin internals ----------------- +== Plugin internals The file 'src/plugins/weechat-plugin.h' defines and exports all functions available for API. @@ -885,7 +863,7 @@ For example, function 'hook_timer' is defined in structure 't_weechat_plugin' like this: [source,C] ----------------------------------------- +---- struct t_hook *(*hook_timer) (struct t_weechat_plugin *plugin, long interval, int align_second, @@ -893,36 +871,34 @@ struct t_hook *(*hook_timer) (struct t_weechat_plugin *plugin, int (*callback)(void *data, int remaining_calls), void *callback_data); ----------------------------------------- +---- And the macro used to call this function is: [source,C] ----------------------------------------- +---- #define weechat_hook_timer(__interval, __align_second, __max_calls, \ __callback, __data) \ weechat_plugin->hook_timer(weechat_plugin, __interval, \ __align_second, __max_calls, \ __callback, __data) ----------------------------------------- +---- So in a plugin, the call to function will be for example: [source,C] ----------------------------------------- +---- server->hook_timer_sasl = weechat_hook_timer (timeout * 1000, 0, 1, &irc_server_timer_sasl_cb, server); ----------------------------------------- +---- [[contribute]] -Contribute to WeeChat ---------------------- +== Contribute to WeeChat [[git_repository]] -Git repository -~~~~~~~~~~~~~~ +=== Git repository Git repository is at this URL: http://git.savannah.gnu.org/gitweb/?p=weechat.git @@ -931,9 +907,9 @@ is a patch made with `git diff` or `git format-patch`, sent by e-mail. Format of commit message is the following: ----------------------------------------- +---- component: fix a problem (bug #12345) ----------------------------------------- +---- Where 'component' is one of following: @@ -950,30 +926,28 @@ Some rules to follow: Examples of commit messages: ----------------------------------------- +---- core: add callback "nickcmp" for nick comparison in buffers irc: fix freeze when reading on socket with SSL enabled (bug #35097) ruby: add detection of ruby version 1.9.3 in cmake python: fix crash when unloading a script without pointer to interpreter core: update Japanese translations (patch #7783) ----------------------------------------- +---- [[translations]] -Translations -~~~~~~~~~~~~ +=== Translations [[gettext]] -Gettext -^^^^^^^ +==== Gettext Gettext files are in directory 'po/'. If you want to initialize a new language, use command `msginit`. For example to create a dutch empty file: ----------------------------------------- +---- $ cd po $ msginit -i weechat.pot -l nl_NL -o nl.po ----------------------------------------- +---- Base language for WeeChat is English, so you must of course understand English in order to translate to your language. @@ -981,29 +955,28 @@ in order to translate to your language. When done, you *have* to check your file with script 'msgcheck.py' (https://github.com/flashcode/msgcheck): ----------------------------------------- +---- $ msgcheck.py xx.po ----------------------------------------- +---- [[build_autogen_files]] -Build auto-generated files -++++++++++++++++++++++++++ +===== Build auto-generated files Files in directory 'doc/XX/autogen/' are auto-generated by script 'doc/docgen.py'. Copy this python script to your python directory (for example '~/.weechat/python'). Then you can load this script in your WeeChat, and setup path to your '/doc' directory: ----------------------------------------- +---- /python load docgen.py /set plugins.var.python.docgen.path "~/src/weechat/doc" ----------------------------------------- +---- Then create this alias to build files: ----------------------------------------- +---- /alias doc /perl unload; /python unload; /ruby unload; /lua unload; /tcl unload; /guile unload; /python load docgen.py; /wait 1ms /docgen ----------------------------------------- +---- And use command `/doc` to build all auto-generated files (for all languages). @@ -1012,8 +985,7 @@ When using command `/doc`, be sure all C plugins (irc, charset, ...) are loaded, because files are built using options currently in memory. [[asciidoc]] -Asciidoc -^^^^^^^^ +==== Asciidoc Asciidoc files are in directory 'doc/XX/' where 'XX' is language (en, fr, de, it, ...) @@ -1021,14 +993,14 @@ First make a copy of an English asciidoc file (in directory 'doc/en/'), then wor The translations missing in files are indicated by this string: ----------------------------------------- +---- // TRANSLATION MISSING ----------------------------------------- +---- You must translate whole file except links and special keywords for notes, warnings, ... These words must be kept unchanged: ----------------------------------------- +---- [[link_name]] <<link_name>> @@ -1037,24 +1009,10 @@ warnings, ... These words must be kept unchanged: [IMPORTANT] [WARNING] [CAUTION] ----------------------------------------- +---- When there is a name after `<<link_name>>`, then you must translate it: ----------------------------------------- +---- <<link_name,this text must be translated>> ----------------------------------------- - -Please make sure special chars below titles are exactly same length as title -(not too short or too long): - ----------------------------------------- -This is a correct title -======================= - -This is a wrong title -============ - -This is a wrong title -============================= ----------------------------------------- +---- diff --git a/doc/en/weechat_faq.en.txt b/doc/en/weechat_faq.en.txt index 9f3a3c698..dfad870af 100644 --- a/doc/en/weechat_faq.en.txt +++ b/doc/en/weechat_faq.en.txt @@ -1,5 +1,4 @@ -WeeChat FAQ (Frequently Asked Questions) -======================================== += WeeChat FAQ (Frequently Asked Questions) Sébastien Helleu <flashcode@flashtux.org> @@ -9,12 +8,10 @@ used with latest stable version of WeeChat. [[general]] -General -------- +== General [[weechat_name]] -Where does the name "WeeChat" come from? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Where does the name "WeeChat" come from? "Wee" is a recursive acronym and stands for "Wee Enhanced Environment". So complete name is "Wee Enhanced Environment for Chat". @@ -23,20 +20,17 @@ So complete name is "Wee Enhanced Environment for Chat". apply to WeeChat!). [[why_choose_weechat]] -Why choose WeeChat? X-Chat and Irssi are so good... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Why choose WeeChat? X-Chat and Irssi are so good... Because WeeChat is very light and brings innovating features. More info on this page: http://weechat.org/about/features [[compilation_install]] -Compilation / install ---------------------- +== Compilation / install [[gui]] -I heard about many GUIs for WeeChat. How can I compile/use them? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I heard about many GUIs for WeeChat. How can I compile/use them? Some remote GUIs are available: @@ -46,8 +40,7 @@ Some remote GUIs are available: * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -I can't compile WeeChat after cloning git repository, why? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I can't compile WeeChat after cloning git repository, why? The recommended way to compile WeeChat is with cmake. @@ -60,8 +53,7 @@ package may not correspond exactly to git base and that it's less convenient than git cloning for installing updates. [[lost]] -I've launched WeeChat, but I'm lost, what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I've launched WeeChat, but I'm lost, what can I do? For help you can type `/help`. For help about a command, type `/help command`. Keys and commands are listed in documentation. @@ -70,12 +62,10 @@ It's recommended for new users to read the quickstart guide (see the doc page on the website). [[display]] -Display -------- +== Display [[charset]] -I don't see some chars with accents, what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I don't see some chars with accents, what can I do? It's common issue, please read carefully and check *ALL* solutions below: @@ -102,8 +92,7 @@ locale, please check that *all* your settings (terminal, screen, ..) are ISO and *not* UTF-8. [[bars_background]] -Bars like title and status are not filled, background color stops after text, why? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Bars like title and status are not filled, background color stops after text, why? This may be caused by a bad value of the TERM variable in your shell (look at output of `echo $TERM` in your terminal). @@ -118,8 +107,7 @@ Depending on where you launch WeeChat, you should have: If needed, fix your TERM variable: `export TERM="xxx"`. [[screen_weird_chars]] -When I'm using weechat under screen/tmux, I have weird random chars, how do I fix that? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== When I'm using weechat under screen/tmux, I have weird random chars, how do I fix that? This may be caused by bad value of the TERM variable in your shell (look at output of `echo $TERM` in your terminal, *outside screen/tmux*). @@ -130,8 +118,7 @@ which is OK (like many other values). If needed, fix your TERM variable: `export TERM="xxx"`. [[osx_display_broken]] -I compiled WeeChat under OS X, and I see "(null)" everywhere on screen, what's wrong? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I compiled WeeChat under OS X, and I see "(null)" everywhere on screen, what's wrong? If you compiled ncursesw yourself, try to use standard ncurses (that comes with system). @@ -140,8 +127,7 @@ Moreover, under OS X, it is recommended to install WeeChat with Homebrew package manager. [[buffer_vs_window]] -I heard about "buffers" and "windows", what's the difference? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I heard about "buffers" and "windows", what's the difference? A 'buffer' is composed by a number, a name, lines displayed (and some other data). @@ -153,42 +139,39 @@ Each window displays one buffer. A buffer can be hidden (not displayed by a window) or displayed by one or more windows. [[buffers_list]] -How to display the buffers list on the left side? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How to display the buffers list on the left side? Use script 'buffers.pl'. To limit size of bar: ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- To move bar to bottom: ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -How can I reduce length of nicks or remove nick alignment in chat area? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I reduce length of nicks or remove nick alignment in chat area? To reduce max length of nicks in chat area: ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- To remove nick alignment: ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -How to use command line with more than one line? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How to use command line with more than one line? The option 'size' in input bar can be set to a value higher than 1 (for fixed size, default size is 1) or 0 for dynamic size, and then option 'size_max' will @@ -196,72 +179,69 @@ set the max size (0 = no limit). Example with dynamic size: ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- Max size of 2: ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -Is it possible to display only one input bar for all windows (after split)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Is it possible to display only one input bar for all windows (after split)? Yes, you will have to create a bar with type "root" (with an item to know in which window you are), then delete current input bar. For example: ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- If ever you are not satisfied with that, just delete new bar, WeeChat will automatically create default bar "input" if item "input_text" is not used in any bar: ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -How can I copy/paste text without pasting nicklist? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I copy/paste text without pasting nicklist? You can use a terminal with rectangular selection (like rxvt-unicode, konsole, gnome-terminal, ...). Key is usually @k(C-)@k(A-) mouse selection. Another solution is to move nicklist to top or bottom, for example: ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -How can I click on long URLs (more than one line)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I click on long URLs (more than one line)? By default, WeeChat displays time and prefix for each line and optional bars around chat area. To make easier URL click, you can move nicklist to top and remove alignment on nick: ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- With WeeChat ≥ 0.3.6, you can enable option "eat_newline_glitch", so that new line char is not added at the end of each line displayed (it will not break URL selection): ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] This option may cause display bugs. If you experience such problem, you must @@ -270,23 +250,21 @@ turn off this option. Other solution is to use a script: http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -I want to change the language used by WeeChat for messages, but without exiting WeeChat, is it possible? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I want to change the language used by WeeChat for messages, but without exiting WeeChat, is it possible? Yes, you have to use a python script, 'shell.py' (available on WeeChat website) and issue these commands when script is loaded: ----------------------------------------- +---- /shell setenv LANG=en_US.UTF-8 /upgrade ----------------------------------------- +---- To have English messages with UTF-8 encoding for terminal, for ISO users, you can issue: `/shell setenv LANG=en_US`. [[use_256_colors]] -How can I use 256 colors in WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I use 256 colors in WeeChat? 256 colors are supported with WeeChat ≥ 0.3.4. @@ -302,17 +280,17 @@ variable. If you are using screen, you can add this line to your '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- If your 'TERM' variable has wrong value and that WeeChat is already running, don't panic! You can change it without restarting, thanks to script 'shell.py': ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- For version 0.3.4, you must use command `/color` to add new colors. @@ -322,8 +300,7 @@ can add color aliases with command `/color`). Please read user's guide for more information about colors management. [[search_text]] -How can I search text in buffer (like /lastlog in irssi)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I search text in buffer (like /lastlog in irssi)? The default key is @k(C-)@k(r) (command is: `/input search_text`). And jump to highlights: @k(A-)@k(p)/@k(n). @@ -331,83 +308,76 @@ And jump to highlights: @k(A-)@k(p)/@k(n). See user's guide for more info about this feature (default key bindings). [[key_bindings]] -Key bindings ------------- +== Key bindings [[meta_keys]] -Some meta keys (alt + key) are not working, why? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Some meta keys (alt + key) are not working, why? If you're using some terminals like xterm or uxterm, some meta keys does not work by default. You can add a line in file '~/.Xresources': * for xterm: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * for uxterm: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- And then reload resources (`xrdb -override ~/.Xresources`) or restart X. [[customize_key_bindings]] -How can I customize key bindings? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I customize key bindings? Key bindings are customizable with `/key` command. Default key @k(A-)@k(k) lets you grab key code and insert it in command line. [[jump_to_buffer_11_or_higher]] -What is the key to jump to buffer 11 (or higher number)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== What is the key to jump to buffer 11 (or higher number)? The key is @k(A-)@k(j) and then 2 digits, for example @k(A-)@k(j) then @k(1), @k(1) to jump to buffer 11. You can bind a key, for example: ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- List of default keys is in User's guide. [[global_history]] -How to use global history (instead of buffer history) with up and down keys? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How to use global history (instead of buffer history) with up and down keys? You can bind the up and down keys on global history (default keys for global history are @k(C-)@k(↑) and @k(C-)@k(↓)). Example: ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] Keys "meta2-A" and "meta2-B" may be different in your terminal. To find key code press @k(A-)@k(k) then key (up or down). [[mouse]] -Mouse ------ +== Mouse [[mouse_not_working]] -Mouse is not working at all, what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mouse is not working at all, what can I do? Mouse is supported with WeeChat ≥ 0.3.6. First try to enable mouse: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- If mouse is still not working, check the TERM variable in your shell (look at output of `echo $TERM` in your terminal). @@ -415,21 +385,20 @@ According to terminfo used, mouse may not be supported. You can test mouse support in terminal: ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- And then click on first char of terminal (upper left). You should see " !!#!!". To disable mouse in terminal: ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -Mouse does nothing for X or Y greater than 94, why? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mouse does nothing for X or Y greater than 94, why? Some terminals are sending only ISO chars for mouse coordinates, so it does not work for X/Y greater than 94. @@ -438,55 +407,50 @@ You should use a terminal that supports UTF-8 coordinates for mouse, like rxvt-unicode. [[mouse_select_paste]] -How can I select or paste text in terminal when mouse is enabled in WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I select or paste text in terminal when mouse is enabled in WeeChat? When mouse is enabled in WeeChat, you can use @k(-S-) modifier to select or click in terminal, as if the mouse was disabled (on some terminals like iTerm, you have to use @k(-A-) instead of @k(-S-)). [[irc]] -IRC ---- +== IRC [[irc_ssl_connection]] -I have some problems when connecting to a server using SSL, what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I have some problems when connecting to a server using SSL, what can I do? If you see errors about gnutls handshake, you can try to use a smaller Diffie-Hellman key (default is 2048): ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- If you see errors about certificate, you can disable "ssl_verify" (be careful, connection will be less secure by doing that): ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -When connecting to server with SSL, I see only error "TLS handshake failed", what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== When connecting to server with SSL, I see only error "TLS handshake failed", what can I do? You can try a different priority string (WeeChat ≥ 0.3.5 only), replace "xxx" by your server name: ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -How can I connect to freenode server using SSL? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I connect to freenode server using SSL? Set option 'weechat.network.gnutls_ca_file' to file with certificates: ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] Check that you have this file on your system (commonly brought by package @@ -494,16 +458,15 @@ Check that you have this file on your system (commonly brought by package Setup server port, SSL, dhkey_size, then connect: ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- [[irc_oauth]] -How to connect to a server that requires "oauth"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How to connect to a server that requires "oauth"? Some servers like 'twitch' require oauth to connect. @@ -512,34 +475,32 @@ The oauth is simply a password with the value "oauth:XXXX". You can create such server and connect with following commands (replace name and address by appropriate values): ----------------------------------------- +---- /server add name irc.server.org -password="oauth:XXXX" /connect name ----------------------------------------- +---- [[irc_sasl]] -How can I be identified before joining channels? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I be identified before joining channels? If server supports SASL, you should use that instead of sending command for nickserv authentication, for example: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "mynick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- If server does not support SASL, you can add a delay (between command and join of channels): ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -What is the difference between the /ignore and /filter commands? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== What is the difference between the /ignore and /filter commands? The `/ignore` command is an IRC command, so it applies only for IRC buffers (servers and channels). @@ -555,37 +516,35 @@ Filtered lines are only hidden, not deleted, and you can see them if you disable filters (by default, the key @k(A-)@k(=) toggles filters). [[filter_irc_join_part_quit]] -How can I filter join/part/quit messages on IRC channels? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I filter join/part/quit messages on IRC channels? With smart filter (keep join/part/quit from users who spoke recently): ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- With a global filter (hide *all* join/part/quit): ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] For help: `/help filter` and `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -How can I filter some messages displayed when I join an IRC channel? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I filter some messages displayed when I join an IRC channel? With WeeChat ≥ 0.4.1, you can disable some messages with option 'irc.look.display_join_message'. For example, to disable names (which is IRC message '366'): ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] For help: `/help irc.look.display_join_message` @@ -602,17 +561,16 @@ You can find tags for other messages by looking at IRC raw server Examples: * filter names: ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * filter topic (and date): ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -How can I filter voice messages (eg on Bitlbee server)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I filter voice messages (eg on Bitlbee server)? It's not easy to filter voice messages, because voice mode can be set with other modes in same IRC message. @@ -623,15 +581,15 @@ that and let WeeChat use a special color for away nicks in nicklist. For Bitlbee ≥ 3, do that on channel '&bitlbee': ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- For older version of Bitlbee, do that on channel '&bitlbee': ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- For checking away nicks in WeeChat, see question about <<color_away_nicks,away nicks>>. @@ -639,13 +597,12 @@ For checking away nicks in WeeChat, see question about If you really want to filter voice messages, you can use this command, but this is not perfect (will work only if first mode changed is voice): ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -How can I see away nicks in nicklist? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I see away nicks in nicklist? You have to set option 'irc.server_default.away_check' to a positive value (minutes between each check of away nicks). @@ -656,55 +613,50 @@ on small channels only. For example, check every 5 minutes for away nicks, for channels with max 25 nicks: ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] For WeeChat ≤ 0.3.3, options are 'irc.network.away_check' and 'irc.network.away_check_max_nicks'. [[highlight_notification]] -How can I be warned when someone highlights me on a channel? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I be warned when someone highlights me on a channel? You can use a script like 'beep.pl' or 'launcher.pl'. For 'launcher.pl', you have to setup command: ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/path/to/command arguments" ----------------------------------------- +---- Other scripts on this subject: http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -How can I change target buffer for commands on merged buffers (like buffer with servers)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I change target buffer for commands on merged buffers (like buffer with servers)? The default key is @k(C-)@k(x) (command is: `/input switch_active_buffer`). [[plugins_scripts]] -Plugins / scripts ------------------ +== Plugins / scripts [[openbsd_plugins]] -I'm using OpenBSD and WeeChat does not load any plugins, what's wrong? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I'm using OpenBSD and WeeChat does not load any plugins, what's wrong? Under OpenBSD, plugin filenames end with ".so.0.0" (".so" for Linux). You must set that up: ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -How can I load Perl/Python/Ruby/Lua/Tcl scripts? Are scripts compatible with other IRC clients? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I load Perl/Python/Ruby/Lua/Tcl scripts? Are scripts compatible with other IRC clients? You can use the commands `/perl`, `/python`, `/ruby`, `/lua` and `/tcl` to load scripts (default path for scripts is '~/.weechat/<language>/'). @@ -718,12 +670,10 @@ Notes: * a 'tcl' plugin is available with version ≥ 0.3.0. [[settings]] -Settings --------- +== Settings [[memory_usage]] -How can I tweak WeeChat to consume less memory? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How can I tweak WeeChat to consume less memory? You can try following tips to consume less memory: @@ -739,12 +689,10 @@ You can try following tips to consume less memory: * reduce value of option 'weechat.history.max_commands' [[development]] -Development ------------ +== Development [[bug_task_patch]] -How should I report bugs, ask for new features or send patches? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How should I report bugs, ask for new features or send patches? There are 3 ways: @@ -758,29 +706,27 @@ There are 3 ways: (you can subscribe and send to "support" mailing list) [[gdb_error_threads]] -When I run WeeChat under gdb, there is error about threads, what can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== When I run WeeChat under gdb, there is error about threads, what can I do? When you run WeeChat under gdb, you may have this error: ----------------------------------------- +---- $ gdb /path/to/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- To fix that, you can run gdb with this command (replace path to libpthread and WeeChat with paths on your system): ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -What is the list of supported platforms for WeeChat? Will it be ported to other operating systems? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== What is the list of supported platforms for WeeChat? Will it be ported to other operating systems? The full list is on this page: http://weechat.org/download @@ -788,8 +734,7 @@ We do our best to run on as many platforms as possible. Help is welcome for some OS' we don't have, to test WeeChat. [[help_developers]] -I want to help WeeChat developers. What can I do? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== I want to help WeeChat developers. What can I do? There's many tasks to do (testing, code, documentation, ...) @@ -797,8 +742,7 @@ Please contact us via IRC or mail, look at support page: http://weechat.org/dev/support [[donate]] -Can I give money or other things to WeeChat developers? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Can I give money or other things to WeeChat developers? You can give us money to help development. Details on http://weechat.org/about/donate diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index c34d41fb2..43db83c20 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -1,5 +1,4 @@ -WeeChat Plugin API Reference -============================ += WeeChat Plugin API Reference Sébastien Helleu <flashcode@flashtux.org> @@ -10,8 +9,7 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and light, designed for many operating systems. @@ -20,8 +18,7 @@ This manual documents WeeChat plugins API, used by C plugins to interact with WeeChat core. [[plugins_in_weechat]] -Plugins in WeeChat ------------------- +== Plugins in WeeChat A plugin is a C program which can call WeeChat functions defined in an interface. @@ -38,8 +35,7 @@ code). This file defines structures and types used to communicate with WeeChat. [[macros]] -Macros -~~~~~~ +=== Macros The plugin must use some macros (to define some variables): @@ -56,26 +52,24 @@ WEECHAT_PLUGIN_LICENSE("GPL3"):: plugin license [[main_functions]] -Main functions -~~~~~~~~~~~~~~ +=== Main functions The plugin must use two functions: * weechat_plugin_init * weechat_plugin_end -weechat_plugin_init -^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_init This function is called when plugin is loaded by WeeChat. Prototype: [source,C] ----------------------------------------- +---- int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]); ----------------------------------------- +---- Arguments: @@ -88,17 +82,16 @@ Return value: * 'WEECHAT_RC_OK' if successful (plugin will be loaded) * 'WEECHAT_RC_ERROR' if error (plugin will NOT be loaded) -weechat_plugin_end -^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_end This function is called when plugin is unloaded by WeeChat. Prototype: [source,C] ----------------------------------------- +---- int weechat_plugin_end (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Arguments: @@ -110,22 +103,20 @@ Return value: * 'WEECHAT_RC_ERROR' if error [[compile_plugin]] -Compile plugin -~~~~~~~~~~~~~~ +=== Compile plugin Compile does not need WeeChat sources, only file 'weechat-plugin.h' is required. To compile a plugin which has one file "toto.c" (under GNU/Linux): ----------------------------------------- +---- $ gcc -fPIC -Wall -c toto.c $ gcc -shared -fPIC -o libtoto.so toto.o ----------------------------------------- +---- [[load_plugin]] -Load plugin -~~~~~~~~~~~ +=== Load plugin Copy file 'libtoto.so' into system plugins directory (for example '/usr/local/lib/weechat/plugins') or into user's plugins directory (for example @@ -133,20 +124,19 @@ Copy file 'libtoto.so' into system plugins directory (for example Under WeeChat: ----------------------------------------- +---- /plugin load toto ----------------------------------------- +---- [[plugin_example]] -Plugin example -~~~~~~~~~~~~~~ +=== Plugin example Full example of plugin, which adds a command '/double': displays two times arguments on current buffer, or execute two times a command (ok that's not very useful, but that's just an example!): [source,C] ----------------------------------------- +---- #include <stdlib.h> #include "weechat-plugin.h" @@ -206,11 +196,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) return WEECHAT_RC_OK; } ----------------------------------------- +---- [[plugin_api]] -Plugin API ----------- +== Plugin API Following chapters describe functions in API, sorted by category. @@ -224,22 +213,20 @@ For each function, we give: * example in Python script (syntax for other scripting languages is similar). [[plugins]] -Plugins -~~~~~~~ +=== Plugins Functions to get infos about plugins. -weechat_plugin_get_name -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_get_name Get plugin name. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_plugin_get_name (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Arguments: @@ -252,32 +239,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *name = weechat_plugin_get_name (plugin); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype name = weechat.plugin_get_name(plugin) # example plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin") name = weechat.plugin_get_name(plugin) ----------------------------------------- +---- [[strings]] -Strings -~~~~~~~ +=== Strings Many string functions below are already available thru standard C functions, but it's recommended to use functions in this API because they are ok with UTF-8 and locale. -weechat_charset_set -^^^^^^^^^^^^^^^^^^^ +==== weechat_charset_set Set new plugin charset (default charset is 'UTF-8', so if your plugin uses 'UTF-8', you don't need to call this function). @@ -285,9 +270,9 @@ Set new plugin charset (default charset is 'UTF-8', so if your plugin uses Prototype: [source,C] ----------------------------------------- +---- void weechat_charset_set (const char *charset); ----------------------------------------- +---- Arguments: @@ -296,32 +281,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_charset_set ("iso-8859-1"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.charset_set(charset) # example weechat.charset_set("iso-8859-1") ----------------------------------------- +---- -weechat_iconv_to_internal -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_to_internal Convert string to WeeChat internal charset (UTF-8). Prototype: [source,C] ----------------------------------------- +---- char *weechat_iconv_to_internal (const char *charset, const char *string); ----------------------------------------- +---- Arguments: @@ -335,34 +319,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_iconv_to_internal ("iso-8859-1", "iso string: é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.iconv_to_internal(charset, string) # example str = weechat.iconv_to_internal("iso-8859-1", "iso string: é à") ----------------------------------------- +---- -weechat_iconv_from_internal -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_from_internal Convert string from internal WeeChat charset (UTF-8) to another. Prototype: [source,C] ----------------------------------------- +---- char *weechat_iconv_from_internal (const char *charset, const char *string); ----------------------------------------- +---- Arguments: @@ -376,34 +359,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_iconv_from_internal ("iso-8859-1", "utf-8 string: é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.iconv_from_internal(charset, string) # example str = weechat.iconv_from_internal("iso-8859-1", "utf-8 string: é à") ----------------------------------------- +---- -weechat_gettext -^^^^^^^^^^^^^^^ +==== weechat_gettext Return translated string (depends on local language). Prototype: [source,C] ----------------------------------------- +---- const char *weechat_gettext (const char *string); ----------------------------------------- +---- Arguments: @@ -416,23 +398,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_gettext ("hello"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.gettext(string) # example str = weechat.gettext("hello") ----------------------------------------- +---- -weechat_ngettext -^^^^^^^^^^^^^^^^ +==== weechat_ngettext Return translated string, using single or plural form, according to 'count' argument. @@ -440,10 +421,10 @@ argument. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_ngettext (const char *string, const char *plural, int count); ----------------------------------------- +---- Arguments: @@ -459,33 +440,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_ngettext ("file", "files", num_files); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.ngettext(string, plural, count) # example num_files = 2 str = weechat.ngettext("file", "files", num_files) ----------------------------------------- +---- -weechat_strndup -^^^^^^^^^^^^^^^ +==== weechat_strndup Return duplicated string, with 'length' chars max. Prototype: [source,C] ----------------------------------------- +---- char *weechat_strndup (const char *string, int length); ----------------------------------------- +---- Arguments: @@ -499,26 +479,25 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_strndup ("abcdef", 3); /* result: "abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_tolower -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_tolower Convert UTF-8 string to lower case. Prototype: [source,C] ----------------------------------------- +---- void weechat_string_tolower (const char *string); ----------------------------------------- +---- Arguments: @@ -527,25 +506,24 @@ Arguments: C example: [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_tolower (str); /* str is now: "abcdé" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_toupper -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_toupper Convert UTF-8 string to upper case. Prototype: [source,C] ----------------------------------------- +---- void weechat_string_toupper (const char *string); ----------------------------------------- +---- Arguments: @@ -554,25 +532,24 @@ Arguments: C example: [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_toupper (str); /* str is now: "ABCDé" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strcasecmp -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp Locale and case independent string comparison. Prototype: [source,C] ----------------------------------------- +---- int weechat_strcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Arguments: @@ -589,15 +566,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strcasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp_range _WeeChat ≥ 0.3.7._ @@ -607,9 +583,9 @@ comparison. Prototype: [source,C] ----------------------------------------- +---- int weechat_strcasecmp_range (const char *string1, const char *string2, int range); ----------------------------------------- +---- Arguments: @@ -633,24 +609,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp_range ("nick{away}", "NICK[away]", 29); /* == 0 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strncasecmp -^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp Locale and case independent string comparison, for 'max' chars. Prototype: [source,C] ----------------------------------------- +---- int weechat_strncasecmp (const char *string1, const char *string2, int max); ----------------------------------------- +---- Arguments: @@ -668,15 +643,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp ("aabb", "aacc", 2); /* == 0 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strncasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp_range _WeeChat ≥ 0.3.7._ @@ -686,9 +660,9 @@ for case comparison. Prototype: [source,C] ----------------------------------------- +---- int weechat_strncasecmp_range (const char *string1, const char *string2, int max, int range); ----------------------------------------- +---- Arguments: @@ -713,15 +687,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* == 0 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strcmp_ignore_chars -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcmp_ignore_chars Locale (and optionally case independent) string comparison, ignoring some chars. @@ -729,11 +702,11 @@ chars. Prototype: [source,C] ----------------------------------------- +---- int weechat_strcmp_ignore_chars (const char *string1, const char *string2, const char *chars_ignored, int case_sensitive); ----------------------------------------- +---- Arguments: @@ -752,24 +725,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strcasestr -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasestr Locale and case independent string search. Prototype: [source,C] ----------------------------------------- +---- char *weechat_strcasestr (const char *string, const char *search); ----------------------------------------- +---- Arguments: @@ -783,15 +755,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *pos = weechat_strcasestr ("aBcDeF", "de"); /* result: pointer to "DeF" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_strlen_screen -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strlen_screen _WeeChat ≥ 0.4.2._ @@ -802,9 +773,9 @@ Non-printable chars have a width of 1 (this is the difference with the function Prototype: [source,C] ----------------------------------------- +---- int weechat_strlen_screen (const char *string); ----------------------------------------- +---- Arguments: @@ -817,33 +788,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype length = weechat.strlen_screen(string) # example length = weechat.strlen_screen("é") # 1 ----------------------------------------- +---- -weechat_string_match -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_match Check if a string matches a mask. Prototype: [source,C] ----------------------------------------- +---- int weechat_string_match (const char *string, const char *mask, int case_sensitive); ----------------------------------------- +---- Arguments: @@ -859,17 +829,17 @@ Return value: C example: [source,C] ----------------------------------------- +---- int match1 = weechat_string_match ("abcdef", "abc*", 0); /* == 1 */ int match2 = weechat_string_match ("abcdef", "*dd*", 0); /* == 0 */ int match3 = weechat_string_match ("abcdef", "*def", 0); /* == 1 */ int match4 = weechat_string_match ("abcdef", "*de*", 0); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype match = weechat.string_match(string, mask, case_sensitive) @@ -878,20 +848,19 @@ match1 = weechat.string_match("abcdef", "abc*", 0) # 1 match2 = weechat.string_match("abcdef", "*dd*", 0) # 0 match3 = weechat.string_match("abcdef", "*def", 0) # 1 match4 = weechat.string_match("abcdef", "*de*", 0) # 1 ----------------------------------------- +---- -weechat_string_replace -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_replace Replace all occurrences of a string by another string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_replace (const char *string, const char *search, const char *replace); ----------------------------------------- +---- Arguments: @@ -907,17 +876,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_string_replace ("test", "s", "x"); /* result: "text" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_expand_home -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_expand_home _WeeChat ≥ 0.3.3._ @@ -927,9 +895,9 @@ with `~`, then same string is returned. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_expand_home (const char *path); ----------------------------------------- +---- Arguments: @@ -943,18 +911,17 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_string_expand_home ("~/file.txt"); /* result: "/home/xxx/file.txt" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_remove_quotes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_quotes Remove quotes at beginning and end of string (ignore spaces if there are before first quote or after last quote). @@ -962,9 +929,9 @@ first quote or after last quote). Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_remove_quotes (const char *string, const char *quotes); ----------------------------------------- +---- Arguments: @@ -979,28 +946,27 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_string_remove_quotes (string, " 'I can't' ", "'"); /* result: "I can't" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_strip -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_strip Strip chars at beginning and/or end of string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_strip (const char *string, int left, int right, const char *chars); ----------------------------------------- +---- Arguments: @@ -1016,17 +982,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = weechat_string_strip (".abc -", 0, 1, "- ."); /* result: ".abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_mask_to_regex -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_mask_to_regex Return a regex, built with a mask, where only special char is "`*`". All other special chars for regex are escaped. @@ -1034,9 +999,9 @@ special chars for regex are escaped. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_mask_to_regex (const char *mask); ----------------------------------------- +---- Arguments: @@ -1049,26 +1014,25 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str_regex = weechat_string_mask_to_regex ("test*mask"); /* result: "test.*mask" */ /* ... */ free (str_regex); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype regex = weechat.string_mask_to_regex(mask) # example regex = weechat.string_mask_to_regex("test*mask") # "test.*mask" ----------------------------------------- +---- -weechat_string_regex_flags -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regex_flags _WeeChat ≥ 0.3.7._ @@ -1078,9 +1042,9 @@ expression. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags) ----------------------------------------- +---- Arguments: @@ -1110,18 +1074,17 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *regex = "(?i)test"; int flags; const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags); /* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_regcomp -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regcomp _WeeChat ≥ 0.3.7._ @@ -1131,9 +1094,9 @@ format of flags, see <<_weechat_string_regex_flags,weechat_string_regex_flags>>) Prototype: [source,C] ----------------------------------------- +---- int weechat_string_regcomp (void *preg, const char *regex, int default_flags) ----------------------------------------- +---- Arguments: @@ -1153,29 +1116,28 @@ Return value: C example: [source,C] ----------------------------------------- +---- regex_t my_regex; if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0) { /* error */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_has_highlight -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_has_highlight Check if a string has one or more highlights, using list of highlight words. Prototype: [source,C] ----------------------------------------- +---- int weechat_string_has_highlight (const char *string, const char highlight_words); ----------------------------------------- +---- Arguments: @@ -1189,23 +1151,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype highlight = weechat.string_has_highlight(string, highlight_words) # example highlight = weechat.string_has_highlight("my test string", "test,word2") # 1 ----------------------------------------- +---- -weechat_string_has_highlight_regex -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_has_highlight_regex _WeeChat ≥ 0.3.4._ @@ -1216,9 +1177,9 @@ by word chars (alphanumeric character, "-", "_" or "|"). Prototype: [source,C] ----------------------------------------- +---- int weechat_string_has_highlight_regex (const char *string, const char *regex); ----------------------------------------- +---- Arguments: @@ -1232,34 +1193,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype highlight = weechat.string_has_highlight_regex(string, regex) # example highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1 ----------------------------------------- +---- -weechat_string_split -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split Split a string according to one or more delimiter(s). Prototype: [source,C] ----------------------------------------- +---- char **weechat_string_split (const char *string, const char *separators, int keep_eol, int num_items_max, int *num_items); ----------------------------------------- +---- Arguments: @@ -1281,7 +1241,7 @@ Return value: C examples: [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc); @@ -1301,22 +1261,21 @@ argv = weechat_string_split ("abc de fghi", " ", 1, 0, &argc); argc == 3 */ weechat_string_free_split (argv); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_free_split -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split Free memory used by a split string. Prototype: [source,C] ----------------------------------------- +---- void weechat_string_free_split (char **split_string); ----------------------------------------- +---- Arguments: @@ -1326,29 +1285,28 @@ Arguments: C example: [source,C] ----------------------------------------- +---- char *argv; int argc; argv = weechat_string_split (string, " ", 0, 0, &argc); /* ... */ weechat_string_free_split (argv); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_build_with_split_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_build_with_split_string Build a string with a split string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_build_with_split_string (char **split_string, const char *separator); ----------------------------------------- +---- Arguments: @@ -1363,7 +1321,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); @@ -1371,13 +1329,12 @@ char *str = weechat_string_build_with_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split_command Split a list of commands separated by 'separator' (which can be escaped by "\" in string). @@ -1385,9 +1342,9 @@ in string). Prototype: [source,C] ----------------------------------------- +---- char **weechat_string_split_command (const char *command, char separator); ----------------------------------------- +---- Arguments: @@ -1402,28 +1359,27 @@ Return value: C example: [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/command1 arg;/command2", ';'); /* result: argv[0] == "/command1 arg" argv[1] == "/command2" */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_free_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split_command Free memory used by a split command. Prototype: [source,C] ----------------------------------------- +---- void weechat_string_free_split_command (char **split_command); ----------------------------------------- +---- Arguments: @@ -1433,17 +1389,16 @@ Arguments: C example: [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/command1 arg;/command2", ';'); /* ... */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_format_size -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_format_size Build a string with formatted file size and a unit translated to local language. @@ -1451,9 +1406,9 @@ language. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_format_size (unsigned long long size); ----------------------------------------- +---- Arguments: @@ -1466,7 +1421,7 @@ Return value: C examples: [source,C] ----------------------------------------- +---- /* examples with english locale */ char *str = weechat_string_format_size (0); /* str == "0 byte" */ @@ -1484,23 +1439,22 @@ free (str); char *str = weechat_string_format_size (2097152); /* str == "2 MB" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_remove_color -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_color Remove WeeChat colors from a string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_remove_color (const char *string, const char *replacement); ----------------------------------------- +---- Arguments: @@ -1516,7 +1470,7 @@ Return value: C examples: [source,C] ----------------------------------------- +---- /* remove color codes */ char *str = weechat_string_remove_color (my_string1, NULL); /* ... */ @@ -1526,21 +1480,20 @@ free (str); char *str = weechat_string_remove_color (my_string2, "?"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.string_remove_color(string, replacement) # example str = weechat.string_remove_color(my_string, "?") ----------------------------------------- +---- -weechat_string_encode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_encode_base64 _WeeChat ≥ 0.3.2._ @@ -1549,9 +1502,9 @@ Encode a string in base64. Prototype: [source,C] ----------------------------------------- +---- void weechat_string_encode_base64 (const char *from, int length, char *to); ----------------------------------------- +---- Arguments: @@ -1563,17 +1516,16 @@ Arguments: C example: [source,C] ----------------------------------------- +---- char *string = "abcdefgh", result[128]; weechat_string_encode_base64 (string, strlen (string), result); /* result == "YWJjZGVmZ2g=" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_decode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_decode_base64 _WeeChat ≥ 0.3.2._ @@ -1582,9 +1534,9 @@ Decode a base64 string. Prototype: [source,C] ----------------------------------------- +---- int weechat_string_decode_base64 (const char *from, char *to); ----------------------------------------- +---- Arguments: @@ -1599,18 +1551,17 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *string = "YWJjZGVmZ2g=", result[128]; int length; length = weechat_string_decode_base64 (string, result); /* length == 8, result == "abcdefgh" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_string_is_command_char -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_is_command_char _WeeChat ≥ 0.3.2._ @@ -1619,9 +1570,9 @@ Check if first char of string is a command char (default command char is '/'). Prototype: [source,C] ----------------------------------------- +---- int weechat_string_is_command_char (const char *string); ----------------------------------------- +---- Arguments: @@ -1634,25 +1585,24 @@ Return value: C examples: [source,C] ----------------------------------------- +---- int command_char1 = weechat_string_is_command_char ("/test"); /* == 1 */ int command_char2 = weechat_string_is_command_char ("test"); /* == 0 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype is_cmdchar = weechat.string_is_command_char(string) # examples command_char1 = weechat.string_is_command_char("/test") # == 1 command_char2 = weechat.string_is_command_char("test") # == 0 ----------------------------------------- +---- -weechat_string_input_for_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_input_for_buffer _WeeChat ≥ 0.3.2._ @@ -1662,9 +1612,9 @@ NULL if it's a command. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_string_input_for_buffer (const char *string); ----------------------------------------- +---- Arguments: @@ -1677,16 +1627,16 @@ Return value: C examples: [source,C] ----------------------------------------- +---- const char *str1 = weechat_string_input_for_buffer ("test"); /* "test" */ const char *str2 = weechat_string_input_for_buffer ("/test"); /* NULL */ const char *str3 = weechat_string_input_for_buffer ("//test"); /* "/test" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.string_input_for_buffer(string) @@ -1694,10 +1644,9 @@ str = weechat.string_input_for_buffer(string) str1 = weechat.string_input_for_buffer("test") # "test" str2 = weechat.string_input_for_buffer("/test") # "" str3 = weechat.string_input_for_buffer("//test") # "/test" ----------------------------------------- +---- -weechat_string_eval_expression -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_eval_expression _WeeChat ≥ 0.4.0, updated in 0.4.2._ @@ -1708,12 +1657,12 @@ Special variables with format `${variable}` are expanded (see command `/eval` in Prototype: [source,C] ----------------------------------------- +---- char *weechat_string_eval_expression (const char *expr, struct t_hashtable *pointers, struct t_hashtable *extra_vars, struct t_hashtable *options); ----------------------------------------- +---- Arguments: @@ -1739,7 +1688,7 @@ Return value: C examples: [source,C] ----------------------------------------- +---- struct t_hashtable *options = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -1750,12 +1699,12 @@ if (options) char *str1 = weechat_string_eval_expression ("${buffer.full_name}", NULL, NULL, NULL); /* "core.weechat" */ char *str2 = weechat_string_eval_expression ("${window.win_width} > 100", NULL, NULL, options); /* "1" */ char *str3 = weechat_string_eval_expression ("abc =~ def", NULL, NULL, options); /* "0" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype str = weechat.string_eval_expression(expr, pointers, extra_vars, options) @@ -1763,25 +1712,23 @@ str = weechat.string_eval_expression(expr, pointers, extra_vars, options) str1 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core.weechat" str2 = weechat.string_eval_expression("${window.win_width} > 100", {}, {}, {"type": "condition"}) # "1" str3 = weechat.string_eval_expression("abc =~ def", {}, {}, {"type": "condition"}) # "0" ----------------------------------------- +---- [[utf-8]] -UTF-8 -~~~~~ +=== UTF-8 Some UTF-8 string functions. -weechat_utf8_has_8bits -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_has_8bits Check if a string has 8-bits chars. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_has_8bits (const char *string); ----------------------------------------- +---- Arguments: @@ -1794,27 +1741,26 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_utf8_has_8bits (string)) { /* ... */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_is_valid -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_is_valid Check if a string is UTF-8 valid. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_is_valid (const char *string, char **error); ----------------------------------------- +---- Arguments: @@ -1829,7 +1775,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *error; if (weechat_utf8_is_valid (string, &error)) { @@ -1839,22 +1785,21 @@ else { /* "error" points to first invalid char */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_normalize -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_normalize Normalize UTF-8 string: remove non UTF-8 chars and replace them by a char. Prototype: [source,C] ----------------------------------------- +---- void weechat_utf8_normalize (char *string, char replacement); ----------------------------------------- +---- Arguments: @@ -1864,24 +1809,23 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_utf8_normalize (string, '?'); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_prev_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_prev_char Return pointer to previous UTF-8 char in a string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_utf8_prev_char (const char *string_start, const char *string); ----------------------------------------- +---- Arguments: @@ -1896,24 +1840,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *prev_char = weechat_utf8_prev_char (string, ptr_in_string); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_next_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_next_char Return pointer to next UTF-8 char in a string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_utf8_next_char (const char *string); ----------------------------------------- +---- Arguments: @@ -1926,24 +1869,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *next_char = weechat_utf8_next_char (string); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_char_int -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_int Return UTF-8 char as integer. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_char_int (const char *string); ----------------------------------------- +---- Arguments: @@ -1956,24 +1898,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int char_int = weechat_utf8_char_int ("être"); /* "ê" as integer */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_char_size -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size Return UTF-8 char size (in bytes). Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_char_size (const char *string); ----------------------------------------- +---- Arguments: @@ -1986,24 +1927,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int char_size = weechat_utf8_char_size ("être"); /* == 2 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_strlen -^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen Return UTF-8 string length (in UTF-8 chars). Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_strlen (const char *string); ----------------------------------------- +---- Arguments: @@ -2016,24 +1956,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int length = weechat_utf8_strlen ("chêne"); /* == 5 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_strnlen -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strnlen Return UTF-8 string length (in UTF-8 chars), for max 'bytes' in string. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_strnlen (const char *string, int bytes); ----------------------------------------- +---- Arguments: @@ -2047,24 +1986,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int length = weechat_utf8_strnlen ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_strlen_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen_screen Return number of chars needed on screen to display UTF-8 string. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_strlen_screen (const char *string); ----------------------------------------- +---- Arguments: @@ -2077,24 +2015,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_charcmp -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcmp Compare two UTF-8 chars. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_charcmp (const char *string1, const char *string2); ----------------------------------------- +---- Arguments: @@ -2111,24 +2048,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcmp ("aaa", "ccc"); /* == -2 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_charcasecmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcasecmp Compare two UTF-8 chars, ignoring case. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_charcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Arguments: @@ -2145,24 +2081,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_char_size_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size_screen Return number of chars needed on screen to display UTF-8 char. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_char_size_screen (const char *string); ----------------------------------------- +---- Arguments: @@ -2175,24 +2110,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_char_size_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_add_offset -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_add_offset Move forward N chars in an UTF-8 string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_utf8_add_offset (const char *string, int offset); ----------------------------------------- +---- Arguments: @@ -2206,25 +2140,24 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *str = "chêne"; char *str2 = weechat_utf8_add_offset (str, 3); /* points to "ne" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_real_pos -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_real_pos Return real position in UTF-8 string. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_real_pos (const char *string, int pos); ----------------------------------------- +---- Arguments: @@ -2238,24 +2171,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int pos = weechat_utf8_real_pos ("chêne", 3); /* == 4 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_pos -^^^^^^^^^^^^^^^^ +==== weechat_utf8_pos Return position in UTF-8 string. Prototype: [source,C] ----------------------------------------- +---- int weechat_utf8_pos (const char *string, int real_pos); ----------------------------------------- +---- Arguments: @@ -2269,24 +2201,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- int pos = weechat_utf8_pos ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_utf8_strndup -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strndup Return duplicate string, with 'length' chars max. Prototype: [source,C] ----------------------------------------- +---- char *weechat_utf8_strndup (const char *string, int length); ----------------------------------------- +---- Arguments: @@ -2300,32 +2231,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *string = weechat_utf8_strndup ("chêne", 3); /* returns "chê" */ /* ... */ free (string); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. [[directories]] -Directories -~~~~~~~~~~~ +=== Directories Some functions related to directories. -weechat_mkdir_home -^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_home Create a directory in WeeChat home. Prototype: [source,C] ----------------------------------------- +---- int weechat_mkdir_home (char *directory, int mode); ----------------------------------------- +---- Arguments: @@ -2339,35 +2268,34 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (!weechat_mkdir_home ("temp", 0755)) { /* error */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.mkdir_home(directory, mode) # example weechat.mkdir_home("temp", 0755) ----------------------------------------- +---- -weechat_mkdir -^^^^^^^^^^^^^ +==== weechat_mkdir Create a directory. Prototype: [source,C] ----------------------------------------- +---- int weechat_mkdir (char *directory, int mode); ----------------------------------------- +---- Arguments: @@ -2381,35 +2309,34 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (!weechat_mkdir ("/tmp/mydir", 0755)) { /* error */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.mkdir(directory, mode) # example weechat.mkdir("/tmp/mydir", 0755) ----------------------------------------- +---- -weechat_mkdir_parents -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_parents Create a directory and make parent directories as needed. Prototype: [source,C] ----------------------------------------- +---- int weechat_mkdir_parents (char *directory, int mode); ----------------------------------------- +---- Arguments: @@ -2423,39 +2350,38 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (!weechat_mkdir_parents ("/tmp/my/dir", 0755)) { /* error */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.mkdir_parents(directory, mode) # example weechat.mkdir_parents("/tmp/my/dir", 0755) ----------------------------------------- +---- -weechat_exec_on_files -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_exec_on_files Find files in a directory and execute a callback on each file. Prototype: [source,C] ----------------------------------------- +---- void weechat_exec_on_files (const char *directory, int hidden_files, void *data, void (*callback)(void *data, const char *filename)); ----------------------------------------- +---- Arguments: @@ -2469,20 +2395,19 @@ Arguments: C example: [source,C] ----------------------------------------- +---- void callback (void *data, const char *filename) { /* ... */ } ... weechat_exec_on_files ("/tmp", 0, NULL, &callback); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_file_get_content -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_file_get_content _WeeChat ≥ 0.3.1._ @@ -2491,9 +2416,9 @@ Get content of text file in a string. Prototype: [source,C] ----------------------------------------- +---- char *weechat_file_get_content (const char *filename); ----------------------------------------- +---- Arguments: @@ -2506,34 +2431,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *content; content = weechat_file_get_content ("/tmp/test.txt"); /* ... */ free (content); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. [[util]] -Util -~~~~ +=== Util Some useful functions. -weechat_util_timeval_cmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_cmp Compare two "timeval" structures. Prototype: [source,C] ----------------------------------------- +---- int weechat_util_timeval_cmp (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Arguments: @@ -2549,27 +2472,26 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_util_timeval_cmp (&tv1, &tv2) > 0) { /* tv1 > tv2 */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_util_timeval_diff -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_diff Return difference (in milliseconds) between two "timeval" structures. Prototype: [source,C] ----------------------------------------- +---- long weechat_util_timeval_diff (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Arguments: @@ -2583,24 +2505,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- long diff = weechat_util_timeval_diff (&tv1, &tv2); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_util_timeval_add -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_add Add interval (in milliseconds) to a timeval structure. Prototype: [source,C] ----------------------------------------- +---- void weechat_util_timeval_add (struct timeval *tv, long interval); ----------------------------------------- +---- Arguments: @@ -2610,15 +2531,14 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_util_timeval_add (&tv, 2000); /* add 2 seconds */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_util_get_time_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_get_time_string _WeeChat ≥ 0.3.2._ @@ -2627,9 +2547,9 @@ Get date/time as a string built with "strftime". Prototype: [source,C] ----------------------------------------- +---- char *weechat_util_get_time_string (const time_t *date); ----------------------------------------- +---- Arguments: @@ -2638,17 +2558,16 @@ Arguments: C example: [source,C] ----------------------------------------- +---- time_t date = time (NULL); weechat_printf (NULL, "date: %s", weechat_util_get_time_string (&date)); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_util_version_number -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_version_number _WeeChat ≥ 0.3.9._ @@ -2657,9 +2576,9 @@ Convert a string with WeeChat version to a number. Prototype: [source,C] ----------------------------------------- +---- int weechat_util_version_number (const char *version); ----------------------------------------- +---- Arguments: @@ -2668,33 +2587,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- version_number = weechat_util_version_number ("0.3.8"); /* == 0x00030800 */ version_number = weechat_util_version_number ("0.3.9-dev"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9-rc1"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9"); /* == 0x00030900 */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. [[sorted_lists]] -Sorted lists -~~~~~~~~~~~~ +=== Sorted lists Sorted list functions. -weechat_list_new -^^^^^^^^^^^^^^^^ +==== weechat_list_new Create a new list. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist *weechat_list_new (); ----------------------------------------- +---- Return value: @@ -2703,35 +2620,34 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist *list = weechat_list_new (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype list = weechat.list_new() # example list = weechat.list_new() ----------------------------------------- +---- -weechat_list_add -^^^^^^^^^^^^^^^^ +==== weechat_list_add Add an item in a list. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_add (struct t_weelist *weelist, const char *data, const char *where, void *user_data); ----------------------------------------- +---- Arguments: @@ -2750,34 +2666,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *my_item = weechat_list_add (list, "my data", WEECHAT_LIST_POS_SORT, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_add(list, data, where, user_data) # example item = weechat.list_add(list, "my data", weechat.WEECHAT_LIST_POS_SORT, "") ----------------------------------------- +---- -weechat_list_search -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search Search an item in a list. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_search (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Arguments: @@ -2791,23 +2706,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_search (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_search(list, data) # example item = weechat.list_search(list, "my data") ----------------------------------------- +---- -weechat_list_search_pos -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search_pos _WeeChat ≥ 0.3.4._ @@ -2816,10 +2730,10 @@ Search an item position in a list. Prototype: [source,C] ----------------------------------------- +---- int weechat_list_search_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Arguments: @@ -2833,33 +2747,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- int pos_item = weechat_list_search_pos (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype pos_item = weechat.list_search_pos(list, data) # example pos_item = weechat.list_search_pos(list, "my data") ----------------------------------------- +---- -weechat_list_casesearch -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch Search an item in a list, ignoring case. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_casesearch (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Arguments: @@ -2873,23 +2786,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_casesearch (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_casesearch(list, data) # example item = weechat.list_casesearch(list, "my data") ----------------------------------------- +---- -weechat_list_casesearch_pos -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch_pos _WeeChat ≥ 0.3.4._ @@ -2898,10 +2810,10 @@ Search an item position in a list, ignoring case. Prototype: [source,C] ----------------------------------------- +---- int weechat_list_casesearch_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Arguments: @@ -2915,33 +2827,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- int pos_item = weechat_list_casesearch_pos (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype pos_item = weechat.list_casesearch_pos(list, data) # example pos_item = weechat.list_casesearch_pos(list, "my data") ----------------------------------------- +---- -weechat_list_get -^^^^^^^^^^^^^^^^ +==== weechat_list_get Return an item in a list by position. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_get (struct t_weelist *weelist, int position); ----------------------------------------- +---- Arguments: @@ -2955,32 +2866,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_get (list, 0); /* first item */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_get(list, position) # example item = weechat.list_get(list, 0) ----------------------------------------- +---- -weechat_list_set -^^^^^^^^^^^^^^^^ +==== weechat_list_set Set new value for an item. Prototype: [source,C] ----------------------------------------- +---- void weechat_list_set (struct t_weelist_item *item, const char *value); ----------------------------------------- +---- Arguments: @@ -2990,32 +2900,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_list_set (item, "new data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.list_set(item, value) # example weechat.list_set(item, "new data") ----------------------------------------- +---- -weechat_list_next -^^^^^^^^^^^^^^^^^ +==== weechat_list_next Return next item in list. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_next (struct t_weelist_item *item); ----------------------------------------- +---- Arguments: @@ -3028,32 +2937,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *next_item = weechat_list_next (item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_next(item) # example item = weechat.list_next(item) ----------------------------------------- +---- -weechat_list_prev -^^^^^^^^^^^^^^^^^ +==== weechat_list_prev Return previous item in list. Prototype: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_prev (struct t_weelist_item *item); ----------------------------------------- +---- Arguments: @@ -3066,32 +2974,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_weelist_item *prev_item = weechat_list_prev (item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.list_prev(item) # example item = weechat.list_prev(item) ----------------------------------------- +---- -weechat_list_string -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_string Return string value of an item. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_list_string (struct t_weelist_item *item); ----------------------------------------- +---- Arguments: @@ -3104,32 +3011,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "value of item: %s", weechat_list_string (item)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.list_string(item) # example weechat.prnt("", "value of item: %s" % weechat.list_string(item)) ----------------------------------------- +---- -weechat_list_size -^^^^^^^^^^^^^^^^^ +==== weechat_list_size Return size of list (number of items). Prototype: [source,C] ----------------------------------------- +---- char *weechat_list_size (struct t_weelist *weelist); ----------------------------------------- +---- Arguments: @@ -3142,33 +3048,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "size of list: %d", weechat_list_size (list)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype size = weechat.list_size(list) # example weechat.prnt("", "size of list: %d" % weechat.list_size(list)) ----------------------------------------- +---- -weechat_list_remove -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove Remove an item in a list. Prototype: [source,C] ----------------------------------------- +---- void weechat_list_remove (struct t_weelist *weelist, struct t_weelist_item *item); ----------------------------------------- +---- Arguments: @@ -3178,32 +3083,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_list_remove (list, item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.list_remove(list, item) # example weechat.list_remove(list, item) ----------------------------------------- +---- -weechat_list_remove_all -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove_all Remove all items in a list. Prototype: [source,C] ----------------------------------------- +---- void weechat_list_remove_all (struct t_weelist *weelist); ----------------------------------------- +---- Arguments: @@ -3212,32 +3116,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_list_remove_all (list); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.list_remove_all(list) # example weechat.list_remove_all(list) ----------------------------------------- +---- -weechat_list_free -^^^^^^^^^^^^^^^^^ +==== weechat_list_free Free a list. Prototype: [source,C] ----------------------------------------- +---- void weechat_list_free (struct t_weelist *weelist); ----------------------------------------- +---- Arguments: @@ -3246,29 +3149,27 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_list_free (list); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.list_free(list) # example weechat.list_free(list) ----------------------------------------- +---- [[hashtables]] -Hashtables -~~~~~~~~~~ +=== Hashtables Hashtable functions. -weechat_hashtable_new -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_new _WeeChat ≥ 0.3.3._ @@ -3277,7 +3178,7 @@ Create a new hashtable. Prototype: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hashtable_new (int size, const char *type_keys, const char *type_values, @@ -3286,7 +3187,7 @@ struct t_hashtable *weechat_hashtable_new (int size, int (*callback_keycmp)(struct t_hashtable *hashtable, const void *key1, const void *key2)); ----------------------------------------- +---- Arguments: @@ -3329,19 +3230,18 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, NULL, NULL); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_set_with_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_with_size _WeeChat ≥ 0.3.3, updated in 0.4.2._ @@ -3350,11 +3250,11 @@ Add or update item in a hashtable with size for key and value. Prototype: [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set_with_size (struct t_hashtable *hashtable, const void *key, int key_size, const void *value, int value_size); ----------------------------------------- +---- Arguments: @@ -3373,16 +3273,15 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_set_with_size (hashtable, "my_key", 0, my_buffer, sizeof (my_buffer_struct)); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_set -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set _WeeChat ≥ 0.3.3, updated in 0.4.2._ @@ -3391,10 +3290,10 @@ Add or update item in a hashtable. Prototype: [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set (struct t_hashtable *hashtable, const void *key, const void *value); ----------------------------------------- +---- Arguments: @@ -3409,15 +3308,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_set (hashtable, "my_key", "my_value"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_get -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get _WeeChat ≥ 0.3.3._ @@ -3426,9 +3324,9 @@ Get value associated with a key in a hashtable. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hashtable_get (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Arguments: @@ -3442,15 +3340,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- void *value = weechat_hashtable_get (hashtable, "my_key"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_has_key -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_has_key _WeeChat ≥ 0.3.4._ @@ -3459,9 +3356,9 @@ Return 1 if hashtable has key, otherwise 0. Prototype: [source,C] ----------------------------------------- +---- int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Arguments: @@ -3475,19 +3372,18 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_hashtable_has_key (hashtable, "my_key")) { /* key is in hashtable */ /* ... */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_map -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map _WeeChat ≥ 0.3.3._ @@ -3496,14 +3392,14 @@ Call a function on all hashtable entries. Prototype: [source,C] ----------------------------------------- +---- void hashtable_map (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const void *key, const void *value), void *callback_map_data); ----------------------------------------- +---- Arguments: @@ -3514,7 +3410,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const void *key, const void *value) @@ -3526,13 +3422,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_map_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map_string _WeeChat ≥ 0.3.7._ @@ -3541,14 +3436,14 @@ Call a function on all hashtable entries, sending keys and values as strings. Prototype: [source,C] ----------------------------------------- +---- void hashtable_map_string (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const char *key, const char *value), void *callback_map_data); ----------------------------------------- +---- Arguments: @@ -3563,7 +3458,7 @@ are deleted after call to callback. C example: [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const char *key, const char *value) @@ -3574,13 +3469,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map_string (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_integer _WeeChat ≥ 0.3.3._ @@ -3589,10 +3483,10 @@ Return integer value of a hashtable property. Prototype: [source,C] ----------------------------------------- +---- int weechat_hashtable_get_integer (struct t_hashtable *hashtable, void *property); ----------------------------------------- +---- Arguments: @@ -3608,15 +3502,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_string _WeeChat ≥ 0.3.4._ @@ -3625,10 +3518,10 @@ Return string value of a hashtable property. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hashtable_get_string (struct t_hashtable *hashtable, const char *property); ----------------------------------------- +---- Arguments: @@ -3661,18 +3554,17 @@ Return value: C examples: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "keys are type: %s", weechat_hashtable_get_string (hashtable, "type_keys")); weechat_printf (NULL, "list of keys: %s", weechat_hashtable_get_string (hashtable, "keys")); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_pointer _WeeChat ≥ 0.3.4._ @@ -3681,10 +3573,10 @@ Set pointer value of a hashtable property. Prototype: [source,C] ----------------------------------------- +---- void weechat_hashtable_set_pointer (struct t_hashtable *hashtable, const char *property, void *pointer); ----------------------------------------- +---- Arguments: @@ -3697,7 +3589,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- void my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) { @@ -3705,13 +3597,12 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) } weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_add_to_infolist -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_add_to_infolist _WeeChat ≥ 0.3.3._ @@ -3720,11 +3611,11 @@ Add hashtable items to an infolist item. Prototype: [source,C] ----------------------------------------- +---- int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, struct t_infolist_item *infolist_item, const char *prefix); ----------------------------------------- +---- Arguments: @@ -3739,7 +3630,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); /* if hashtable contains: @@ -3751,13 +3642,12 @@ weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); "testhash_name_00001" = "key2" "testhash_value_00001" = "value 2" */ ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_remove -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove _WeeChat ≥ 0.3.3._ @@ -3766,9 +3656,9 @@ Remove an item in a hashtable. Prototype: [source,C] ----------------------------------------- +---- void weechat_hashtable_remove (struct t_hashtable *hashtable, const void *key); ----------------------------------------- +---- Arguments: @@ -3778,15 +3668,14 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_remove (hashtable, "my_key"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove_all _WeeChat ≥ 0.3.3._ @@ -3795,9 +3684,9 @@ Remove all items in a hashtable. Prototype: [source,C] ----------------------------------------- +---- void weechat_hashtable_remove_all (struct t_hashtable *hashtable); ----------------------------------------- +---- Arguments: @@ -3806,15 +3695,14 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_remove_all (hashtable); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hashtable_free -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_free _WeeChat ≥ 0.3.3._ @@ -3823,9 +3711,9 @@ Free a hashtable. Prototype: [source,C] ----------------------------------------- +---- void weechat_hashtable_free (struct t_hashtable *hashtable); ----------------------------------------- +---- Arguments: @@ -3834,33 +3722,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_hashtable_free (hashtable); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. [[configuration_files]] -Configuration files -~~~~~~~~~~~~~~~~~~~ +=== Configuration files Functions for configuration files. -weechat_config_new -^^^^^^^^^^^^^^^^^^ +==== weechat_config_new Create a new configuration file. Prototype: [source,C] ----------------------------------------- +---- struct t_config_file *weechat_config_new (const char *name, int (*callback_reload)(void *data, struct t_config_file *config_file), void *callback_reload_data); ----------------------------------------- +---- Arguments: @@ -3890,7 +3776,7 @@ You should call this function only after adding some sections (with C example: [source,C] ----------------------------------------- +---- int my_config_reload_cb (void *data, struct t_config_file *config_file) { @@ -3902,12 +3788,12 @@ my_config_reload_cb (void *data, struct t_config_file *config_file) struct t_config_file *config_file = weechat_config_new ("test", &my_config_reload_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype config_file = weechat.config_new(name, calback_reload, callback_reload_data) @@ -3917,17 +3803,16 @@ def my_config_reload_cb(data, config_file): return weechat.WEECHAT_RC_OK config_file = weechat.config_new("test", "my_config_reload_cb", "") ----------------------------------------- +---- -weechat_config_new_section -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_section Create a new section in configuration file. Prototype: [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_new_section ( struct t_config_file *config_file, const char *name, @@ -3958,7 +3843,7 @@ struct t_config_section *weechat_config_new_section ( struct t_config_section *section, struct t_config_option *option), void *callback_delete_option_data); ----------------------------------------- +---- Arguments: @@ -4041,7 +3926,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_section_read_cb (void *data, struct t_config_file *config_file, struct t_config_section *section, const char *option_name, @@ -4115,12 +4000,12 @@ struct t_config_section *new_section2 = &my_section_write_default_cb, NULL, &my_section_create_option_cb, NULL, &my_section_delete_option_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype section = weechat.config_new_section(config_file, name, user_can_add_options, user_can_delete_options, @@ -4159,21 +4044,20 @@ section = weechat.config_new_section(config_file, "section1", 1, 1, "my_section_write_default_cb", "", "my_section_create_option_cb", "", "my_section_delete_option_cb", "") ----------------------------------------- +---- -weechat_config_search_section -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section Search a section in a configuration file. Prototype: [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_search_section ( struct t_config_file *config_file, const char *section_name); ----------------------------------------- +---- Arguments: @@ -4187,31 +4071,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_section *section = weechat_config_search_section (config_file, "section"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype section = weechat.config_search_section(config_file, section_name) # example section = weechat.config_search_section(config_file, "section") ----------------------------------------- +---- -weechat_config_new_option -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_option Create a new option in a section of a configuration file. Prototype: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_new_option ( struct t_config_file *config_file, struct t_config_section *section, @@ -4234,7 +4117,7 @@ struct t_config_option *weechat_config_new_option ( void (*callback_delete)(void *data, struct t_config_option *option), void *callback_delete_data); ----------------------------------------- +---- Arguments: @@ -4285,7 +4168,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- /* boolean */ struct t_config_option *option1 = weechat_config_new_option (config_file, section, "option1", "boolean", @@ -4350,12 +4233,12 @@ struct t_config_option *option5 = NULL, NULL, /* check callback */ NULL, NULL, /* change callback */ NULL, NULL); /* delete callback */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype option = weechat.config_new_option(config_file, section, name, type, description, string_values, min, max, default_value, value, null_value_allowed, @@ -4410,27 +4293,26 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color", "", "", "", "", "", "") ----------------------------------------- +---- [NOTE] In Ruby, the 3 callbacks + data (6 strings) must be given in an array of 6 strings (due to a Ruby limitation of 15 arguments by function), see the 'WeeChat Scripting Guide' for more info _(fixed in version 0.4.1)_. -weechat_config_search_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_option Search an option in a section of a configuration file. Prototype: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_search_option ( struct t_config_file *config_file, struct t_config_section *section, const char *option_name); ----------------------------------------- +---- Arguments: @@ -4445,37 +4327,36 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_search_option (config_file, section, "option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype option = weechat.config_search_option(config_file, section, option_name) # example option = weechat.config_search_option(config_file, section, "option") ----------------------------------------- +---- -weechat_config_search_section_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section_option Search a section and an option in a configuration file or section. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_search_section_option (struct t_config_file *config_file, struct t_config_section *section, const char *option_name, struct t_config_section **section_found, struct t_config_option **option_found); ----------------------------------------- +---- Arguments: @@ -4490,7 +4371,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4507,26 +4388,25 @@ else { /* option not found */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_config_search_with_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_with_string Search an option with full name. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_search_with_string (const char *option_name, struct t_config_file **config_file, struct t_config_section **section, struct t_config_option **option, char **pos_option_name); ----------------------------------------- +---- Arguments: @@ -4543,7 +4423,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_config_file *ptr_config_file; struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4562,22 +4442,21 @@ else { /* option not found */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_config_string_to_boolean -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_to_boolean Check if a text is "true" or "false", as boolean value. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_string_to_boolean (const char *text); ----------------------------------------- +---- Arguments: @@ -4591,7 +4470,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_config_string_to_boolean (option_value)) { /* value is "true" */ @@ -4600,32 +4479,31 @@ else { /* value is "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string_to_boolean(text) # example if weechat.config_string_to_boolean(text): # ... ----------------------------------------- +---- -weechat_config_option_reset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_reset Reset an option to its default value. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_reset (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Arguments: @@ -4642,7 +4520,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_option_reset (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4655,12 +4533,12 @@ switch (weechat_config_option_reset (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_reset(option, run_callback) @@ -4672,20 +4550,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set Set new value for an option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_set (struct t_config_option *option, const char *value, int run_callback); ----------------------------------------- +---- Arguments: @@ -4703,7 +4580,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_option_set (option, "new_value", 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4716,12 +4593,12 @@ switch (weechat_config_option_set (option, "new_value", 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_set(option, value, run_callback) @@ -4733,20 +4610,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set_null Set null (undefined value) for an option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_set_null (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Arguments: @@ -4767,7 +4643,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_option_set_null (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4780,12 +4656,12 @@ switch (weechat_config_option_set_null (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_set_null(option, run_callback) @@ -4797,19 +4673,18 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_unset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_unset Unset/reset option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_unset (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -4825,7 +4700,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_option_unset (option)) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -4841,12 +4716,12 @@ switch (weechat_config_option_unset (option)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_unset(option) @@ -4860,20 +4735,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_rename -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_rename Rename an option. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_option_rename (struct t_config_option *option, const char *new_name); ----------------------------------------- +---- Arguments: @@ -4883,33 +4757,32 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_config_option_rename (option, "new_name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_option_rename(option, new_name) # example weechat.config_option_rename(option, "new_name") ----------------------------------------- +---- -weechat_config_option_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_get_pointer Return a pointer on an option property. Prototype: [source,C] ----------------------------------------- +---- void *weechat_config_option_get_pointer (struct t_config_option *option, const char *property); ----------------------------------------- +---- Arguments: @@ -4935,24 +4808,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *description = weechat_config_option_get_pointer (option, "description"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_config_option_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_is_null Check if an option is "null" (undefined value). Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_is_null (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -4966,7 +4838,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_config_option_is_null (option)) { /* value is "null" */ @@ -4975,31 +4847,30 @@ else { /* value is not "null" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype is_null = weechat.config_option_is_null(option) # example if weechat.config_option_is_null(option): # ... ----------------------------------------- +---- -weechat_config_option_default_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_default_is_null Check if default value for an option is "null" (undefined value). Prototype: [source,C] ----------------------------------------- +---- int weechat_config_option_default_is_null (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5013,7 +4884,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_config_option_default_is_null (option)) { /* default value is "null" */ @@ -5022,31 +4893,30 @@ else { /* default value is not "null" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype is_null = weechat.config_option_default_is_null(option) # example if weechat.config_option_default_is_null(option): # ... ----------------------------------------- +---- -weechat_config_boolean -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean Return boolean value of option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_boolean (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5059,7 +4929,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean (option)) { @@ -5069,12 +4939,12 @@ else { /* value is "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_boolean(option) @@ -5082,19 +4952,18 @@ value = weechat.config_boolean(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean(option): # ... ----------------------------------------- +---- -weechat_config_boolean_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean_default Return default boolean value of option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_boolean_default (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5107,7 +4976,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean_default (option)) { @@ -5117,12 +4986,12 @@ else { /* value is "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_boolean_default(option) @@ -5130,19 +4999,18 @@ value = weechat.config_boolean_default(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean_default(option): # ... ----------------------------------------- +---- -weechat_config_integer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer Return integer value of option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_integer (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5155,34 +5023,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_integer(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_integer(option) ----------------------------------------- +---- -weechat_config_integer_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer_default Return default integer value of option. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_integer_default (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5195,34 +5062,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_integer_default(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_integer_default(option) ----------------------------------------- +---- -weechat_config_string -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string Return string value of option. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_config_string (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5235,34 +5101,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_string(option) ----------------------------------------- +---- -weechat_config_string_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_default Return default string value of option. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_config_string_default (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5275,34 +5140,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string_default(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_string_default(option) ----------------------------------------- +---- -weechat_config_color -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color Return color value of option. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_config_color (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5315,34 +5179,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_color(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_color(option) ----------------------------------------- +---- -weechat_config_color_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color_default Return default color value of option. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_config_color_default (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5355,25 +5218,24 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_color_default(option) # example option = weechat.config_get("plugin.section.option") value = weechat.config_color_default(option) ----------------------------------------- +---- -weechat_config_write_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_option Write a line in a configuration file with option and its value (this function should be called only in "write" or "write_default" callbacks for a section). @@ -5381,10 +5243,10 @@ should be called only in "write" or "write_default" callbacks for a section). Prototype: [source,C] ----------------------------------------- +---- void weechat_config_write_option (struct t_config_file *config_file, struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5394,7 +5256,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5405,12 +5267,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_write_option(config_file, option) @@ -5419,10 +5281,9 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "my_section", "") weechat.config_write_option(config_file, option) return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write_line -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_line Write a line in a configuration file (this function should be called only in "write" or "write_default" callbacks for a section). @@ -5430,11 +5291,11 @@ Write a line in a configuration file (this function should be called only in Prototype: [source,C] ----------------------------------------- +---- void weechat_config_write_line (struct t_config_file *config_file, const char *option_name, const char *value, ...); ----------------------------------------- +---- Arguments: @@ -5446,7 +5307,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5458,12 +5319,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_write_line(config_file, option_name, value) @@ -5472,19 +5333,18 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "my_section", "") weechat.config_write_line(config_file, "option", "value") return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write Write configuration file to disk. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_write (struct t_config_file *config_file); ----------------------------------------- +---- Arguments: @@ -5499,7 +5359,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_write (config_file)) { case WEECHAT_CONFIG_WRITE_OK: @@ -5512,12 +5372,12 @@ switch (weechat_config_write (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_write(config_file) @@ -5529,19 +5389,18 @@ elif rc == weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_WRITE_ERROR: # ... ----------------------------------------- +---- -weechat_config_read -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_read Read configuration file from disk. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_read (struct t_config_file *config_file); ----------------------------------------- +---- Arguments: @@ -5556,7 +5415,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_read (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5569,12 +5428,12 @@ switch (weechat_config_read (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_read(config_file) @@ -5586,19 +5445,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_reload -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_reload Reload configuration file from disk. Prototype: [source,C] ----------------------------------------- +---- int weechat_config_reload (struct t_config_file *config_file); ----------------------------------------- +---- Arguments: @@ -5613,7 +5471,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_reload (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5626,12 +5484,12 @@ switch (weechat_config_reload (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_reload(config_file) @@ -5643,19 +5501,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_option_free -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_free Free an option. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_option_free (struct t_config_option *option); ----------------------------------------- +---- Arguments: @@ -5664,32 +5521,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_config_option_free (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_option_free(option) # example weechat.config_option_free(option) ----------------------------------------- +---- -weechat_config_section_free_options -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free_options Free all options in a section. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_section_free_options (struct t_config_section *section); ----------------------------------------- +---- Arguments: @@ -5698,32 +5554,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_config_section_free_options (section); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_section_free_options(section) # example weechat.config_section_free_options(section) ----------------------------------------- +---- -weechat_config_section_free -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free Free a section. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_section_free (struct t_config_section *section); ----------------------------------------- +---- Arguments: @@ -5732,32 +5587,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_config_section_free (section); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_section_free(section) # example weechat.config_section_free(section) ----------------------------------------- +---- -weechat_config_free -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_free Free a configuration file. Prototype: [source,C] ----------------------------------------- +---- void weechat_config_free (struct t_config_file *config_file); ----------------------------------------- +---- Arguments: @@ -5766,32 +5620,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_config_free (config_file); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_free(config_file) # example weechat.config_free(config_file) ----------------------------------------- +---- -weechat_config_get -^^^^^^^^^^^^^^^^^^ +==== weechat_config_get Search an option with full name. Prototype: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_get (const char *option_name); ----------------------------------------- +---- Arguments: @@ -5804,32 +5657,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("weechat.look.item_time_format"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype option = weechat.config_get(option_name) # example option = weechat.config_get("weechat.look.item_time_format") ----------------------------------------- +---- -weechat_config_get_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_get_plugin Search an option in plugins configuration file (plugins.conf). Prototype: [source,C] ----------------------------------------- +---- const char *weechat_config_get_plugin (const char *option_name); ----------------------------------------- +---- Arguments: @@ -5843,34 +5695,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- /* if current plugin is "test", then look for value of option "plugins.var.test.option" in file plugins.conf */ char *value = weechat_config_get_plugin ("option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_get_plugin(option_name) # example value = weechat.config_get_plugin("option") ----------------------------------------- +---- -weechat_config_is_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_is_set_plugin Check if option is set in plugins configuration file (plugins.conf). Prototype: [source,C] ----------------------------------------- +---- int weechat_config_is_set_plugin (const char *option_name); ----------------------------------------- +---- Arguments: @@ -5884,7 +5735,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_config_is_set_plugin ("option")) { /* option is set */ @@ -5893,12 +5744,12 @@ else { /* option does not exist */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.config_is_set_plugin(option_name) @@ -5909,19 +5760,18 @@ if weechat.config_is_set_plugin("option"): else: # option does not exist # ... ----------------------------------------- +---- -weechat_config_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_plugin Set new value for option in plugins configuration file (plugins.conf). Prototype: [source,C] ----------------------------------------- +---- int weechat_config_set_plugin (const char *option_name, const char *value); ----------------------------------------- +---- Arguments: @@ -5939,7 +5789,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_set_plugin ("option", "test_value")) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -5955,12 +5805,12 @@ switch (weechat_config_set_plugin ("option", "test_value")) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_set_plugin(option_name, value) @@ -5974,10 +5824,9 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_set_desc_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_desc_plugin _WeeChat ≥ 0.3.5._ @@ -5986,10 +5835,10 @@ Set description for option in plugins configuration file (plugins.conf). Prototype: [source,C] ----------------------------------------- +---- void weechat_config_set_desc_plugin (const char *option_name, const char *description); ----------------------------------------- +---- Arguments: @@ -6004,14 +5853,14 @@ A future creation of option with this name will use this description. C example: [source,C] ----------------------------------------- +---- weechat_config_set_desc_plugin ("option", "description of option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.config_set_desc_plugin(option_name, description) @@ -6019,19 +5868,18 @@ weechat.config_set_desc_plugin(option_name, description) version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030500: weechat.config_set_desc_plugin("option", "description of option") ----------------------------------------- +---- -weechat_config_unset_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_unset_plugin Unset option in plugins configuration file (plugins.conf). Prototype: [source,C] ----------------------------------------- +---- int weechat_config_unset_plugin (const char *option_name); ----------------------------------------- +---- Arguments: @@ -6048,7 +5896,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- switch (weechat_config_unset_plugin ("option")) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -6064,12 +5912,12 @@ switch (weechat_config_unset_plugin ("option")) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_unset_plugin(option_name) @@ -6083,16 +5931,14 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- [[key_bindings]] -Key bindings -~~~~~~~~~~~~ +=== Key bindings Functions for key bindings. -weechat_key_bind -^^^^^^^^^^^^^^^^ +==== weechat_key_bind _WeeChat ≥ 0.3.6._ @@ -6106,9 +5952,9 @@ binding, only new keys are created. To remove a key binding, use Prototype: [source,C] ----------------------------------------- +---- int weechat_key_bind (const char *context, struct t_hashtable *keys); ----------------------------------------- +---- Arguments: @@ -6126,7 +5972,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hashtable *keys = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -6140,12 +5986,12 @@ if (keys) weechat_key_bind ("mouse", keys); weechat_hashtable_free (keys); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype num_keys = weechat.key_bind(context, keys) @@ -6154,10 +6000,9 @@ keys = { "@chat(python.test):button1": "hsignal:test_mouse", "@chat(python.test):wheelup": "/mycommand up", "@chat(python.test):wheeldown": "/mycommand down" } weechat.key_bind("mouse", keys) ----------------------------------------- +---- -weechat_key_unbind -^^^^^^^^^^^^^^^^^^ +==== weechat_key_unbind _WeeChat ≥ 0.3.6._ @@ -6169,9 +6014,9 @@ When calling this function, ensure that you will not remove a user key binding. Prototype: [source,C] ----------------------------------------- +---- int weechat_key_unbind (const char *context, const char *key); ----------------------------------------- +---- Arguments: @@ -6186,18 +6031,18 @@ Return value: C examples: [source,C] ----------------------------------------- +---- /* remove a single key */ weechat_key_unbind ("mouse", "@chat(plugin.buffer):button1"); /* remove all keys with area "chat(plugin.buffer)" */ weechat_key_unbind ("mouse", "area:chat(plugin.buffer)"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype num_keys = weechat.key_unbind(context, key) @@ -6208,39 +6053,37 @@ weechat.key_unbind("mouse", "@chat(plugin.buffer):button1") # remove all keys with area "chat(python.test)" weechat.key_unbind("mouse", "area:chat(python.test)") ----------------------------------------- +---- [[display]] -Display -~~~~~~~ +=== Display Functions to display text in buffers. -weechat_prefix -^^^^^^^^^^^^^^ +==== weechat_prefix Return a prefix. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_prefix (const char *prefix); ----------------------------------------- +---- Arguments: * 'prefix': name of prefix: [width="70%",cols="^2e,^1,^3,5",options="header"] -|======================================== +|=== | Prefix | Value | Color | Description | error | `=!=` | yellow | Error message | network | `--` | magenta | Message from network | action | `*` | white | Self action | join | `-->` | lightgreen | Someone joins current chat | quit | `<--` | lightred | Someone leaves current chat -|======================================== +|=== [NOTE] Values and colors can be customized with command `/set`. @@ -6253,32 +6096,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "%sThis is an error...", weechat_prefix ("error")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.prefix(prefix) # example weechat.prnt("", "%sThis is an error..." % weechat.prefix("error")) ----------------------------------------- +---- -weechat_color -^^^^^^^^^^^^^ +==== weechat_color Return a string color code for display. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_color (const char *color_name); ----------------------------------------- +---- Arguments: @@ -6330,36 +6172,35 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Color: %sblue %sdefault color %syellow on red", weechat_color ("blue"), weechat_color ("chat"), weechat_color ("yellow,red")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.color(color_name) # example weechat.prnt("", "%sColor: %sblue %sdefault color %syellow on red" % (weechat.color("blue"), weechat.color("chat"), weechat.color("yellow,red"))) ----------------------------------------- +---- -weechat_printf -^^^^^^^^^^^^^^ +==== weechat_printf Display a message on a buffer. Prototype: [source,C] ----------------------------------------- +---- void weechat_printf (struct t_gui_buffer *buffer, const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6380,19 +6221,19 @@ set to 0. C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Hello on WeeChat buffer"); weechat_printf (buffer, "Hello on this buffer"); weechat_printf (buffer, "%sThis is an error!", weechat_prefix ("error")); weechat_printf (buffer, " \tMessage without prefix but with \t some \t tabs"); weechat_printf (buffer, "\t\tMessage without time/alignment"); weechat_printf (buffer, "\t\t"); /* empty line (without time) */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.prnt(buffer, message) @@ -6403,23 +6244,22 @@ weechat.prnt(buffer, "%sThis is an error!" % weechat.prefix("error")) weechat.prnt(buffer, " \tMessage without prefix but with \t some \t tabs") weechat.prnt(buffer, "\t\tMessage without time/alignment") weechat.prnt(buffer, "\t\t") # empty line (without time) ----------------------------------------- +---- [NOTE] Function is called "print" in scripts ("prnt" in Python). -weechat_printf_date -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date Display a message on a buffer, using a custom date. Prototype: [source,C] ----------------------------------------- +---- void weechat_printf_date (struct t_gui_buffer *buffer, time_t date, const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6430,25 +6270,24 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_printf_date (NULL, time (NULL) - 120, "Hello, 2 minutes ago"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_printf_tags -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_tags Display a message on a buffer, using a custom tags. Prototype: [source,C] ----------------------------------------- +---- void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags, const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6459,26 +6298,25 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_printf_tags (NULL, "notify_message", "Message with a tag 'notify_message'"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_printf_date_tags -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date_tags Display a message on a buffer, using a custom date and tags. Prototype: [source,C] ----------------------------------------- +---- void weechat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, const char *tags, const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6490,7 +6328,7 @@ Arguments: Tags commonly used (non-exhaustive list): [width="70%",cols="1m,4",options="header"] -|======================================== +|=== | Tag | Description | no_filter | Line can not be filtered | no_highlight | No highlight is possible on line @@ -6510,20 +6348,20 @@ Tags commonly used (non-exhaustive list): | irc_ctcp_reply | Reply to CTCP message | irc_smart_filter | IRC message that can be filtered with the "smart filter" | away_info | Message with away info -|======================================== +|=== C example: [source,C] ----------------------------------------- +---- weechat_printf_date_tags (NULL, time (NULL) - 120, "notify_message", "Message 2 minutes ago, with a tag 'notify_message'"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.prnt_date_tags(buffer, date, tags, message) @@ -6531,23 +6369,22 @@ weechat.prnt_date_tags(buffer, date, tags, message) time = int(time.time()) weechat.prnt_date_tags("", time - 120, "notify_message", "Message 2 minutes ago, with a tag 'notify_message'") ----------------------------------------- +---- [NOTE] Function is called "print_date_tags" in scripts ("prnt_date_tags" in Python). -weechat_printf_y -^^^^^^^^^^^^^^^^ +==== weechat_printf_y Display a message on a line of a buffer with free content. Prototype: [source,C] ----------------------------------------- +---- void weechat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6558,35 +6395,34 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_printf_y (buffer, 2, "My message on third line"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.prnt_y(buffer, y, message) # example weechat.prnt_y("", 2, "My message on third line") ----------------------------------------- +---- [NOTE] Function is called "print_y" in scripts ("prnt_y" in Python). -weechat_log_printf -^^^^^^^^^^^^^^^^^^ +==== weechat_log_printf Write a message in WeeChat log file (weechat.log). Prototype: [source,C] ----------------------------------------- +---- void weechat_log_printf (const char *message, ...); ----------------------------------------- +---- Arguments: @@ -6595,32 +6431,30 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_log_printf ("My message in log file"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.log_print(message) # example weechat.log_print("My message in log file") ----------------------------------------- +---- [NOTE] Function is called "log_print" in scripts. [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_priority]] [float] -Hook priority -^^^^^^^^^^^^^ +==== Hook priority _WeeChat ≥ 0.3.4._ @@ -6638,23 +6472,22 @@ Default priority is 1000. C example: [source,C] ----------------------------------------- +---- /* hook modifier with priority = 2000 */ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL); ----------------------------------------- +---- Following hook types allow priority: command, command_run, signal, hsignal, config, completion, modifier, info, info_hashtable, infolist, hdata, focus. -weechat_hook_command -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command Hook a command. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command (const char *command, const char *description, const char *args, @@ -6666,7 +6499,7 @@ struct t_hook *weechat_hook_command (const char *command, char **argv, char **argv_eol), void *callback_data); ----------------------------------------- +---- Arguments: @@ -6707,7 +6540,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -6739,7 +6572,7 @@ struct t_hook *my_command_hook = &my_command_cb, /* callback_data */ NULL); ----------------------------------------- +---- For example, if command called is `/command abc def ghi`, then 'argv' and 'argv_eol' have following values: @@ -6760,7 +6593,7 @@ For scripts, 'args' has value "abc def ghi". Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_command(command, description, args, args_description, completion, callback, callback_data) @@ -6780,23 +6613,22 @@ hook = weechat.hook_command("myfilter", "description of myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- -weechat_hook_command_run -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command_run Hook a command when WeeChat runs it. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command_run (const char *command, int (*callback)(void *data, struct t_gui_buffer *buffer, const char *command), void *callback_data); ----------------------------------------- +---- Arguments: @@ -6823,7 +6655,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -6836,12 +6668,12 @@ my_command_run_cb (void *data, struct t_gui_buffer *buffer, struct t_hook *my_command_run_hook = weechat_hook_command_run ("/input complete*", &my_command_run_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_command_run(command, callback, callback_data) @@ -6851,24 +6683,23 @@ def my_command_run_cb(data, buffer, command): return weechat.WEECHAT_RC_OK_EAT hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "") ----------------------------------------- +---- -weechat_hook_timer -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_timer Hook a timer. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_timer (long interval, int align_second, int max_calls, int (*callback)(void *data, int remaining_calls), void *callback_data); ----------------------------------------- +---- Arguments: @@ -6892,7 +6723,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_timer_cb (void *data, int remaining_calls) { @@ -6903,12 +6734,12 @@ my_timer_cb (void *data, int remaining_calls) /* timer called each 20 seconds */ struct t_hook *my_timer_hook = weechat_hook_timer (20 * 1000, 0, 0, &my_timer_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data) @@ -6919,17 +6750,16 @@ def my_timer_cb(data, remaining_calls): # timer called each 20 seconds hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "") ----------------------------------------- +---- -weechat_hook_fd -^^^^^^^^^^^^^^^ +==== weechat_hook_fd Hook a file descriptor (file or socket). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_fd (int fd, int flag_read, int flag_write, @@ -6937,7 +6767,7 @@ struct t_hook *weechat_hook_fd (int fd, int (*callback)(void *data, int fd), void *callback_data); ----------------------------------------- +---- Arguments: @@ -6961,7 +6791,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_fd_cb (void *data, int fd) { @@ -6973,12 +6803,12 @@ int sock = socket (AF_INET, SOCK_STREAM, 0); /* set socket options */ /* ... */ struct t_hook *my_fd_hook = weechat_hook_fd (sock, 1, 0, 0, &my_fd_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data) @@ -6989,10 +6819,9 @@ def my_fd_cb(data, fd): sock = ... hook = weechat.hook_fd(sock, 1, 0, 0, "my_fd_cb", "") ----------------------------------------- +---- -weechat_hook_process -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process Hook a process (launched with fork), and catch output. @@ -7008,7 +6837,7 @@ arguments in the hashtable 'options' _(WeeChat ≥ 0.4.0)_. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process (const char *command, int timeout, int (*callback)(void *data, @@ -7017,7 +6846,7 @@ struct t_hook *weechat_hook_process (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Arguments: @@ -7075,7 +6904,7 @@ many calls and use data only when return code is nonnegative. C example: [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7106,12 +6935,12 @@ my_process_cb (void *data, const char *command, int return_code, struct t_hook *my_process_hook = weechat_hook_process ("ls", 5000, &my_process_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_process(command, timeout, callback, callback_data) @@ -7129,10 +6958,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK hook = weechat.hook_process("ls", 5000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_process_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process_hashtable _WeeChat ≥ 0.3.7._ @@ -7142,7 +6970,7 @@ output. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process_hashtable (const char *command, struct t_hashtable *options, int timeout, @@ -7152,7 +6980,7 @@ struct t_hook *weechat_hook_process_hashtable (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Arguments are the same as function <<_weechat_hook_process,weechat_hook_process>>, with an extra argument: @@ -7187,7 +7015,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7267,12 +7095,12 @@ if (options_cmd2) &my_process_cb, NULL); weechat_hashtable_free (options_cmd2); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data) @@ -7307,17 +7135,16 @@ hook3 = weechat.hook_process_hashtable("sh", { "arg1": "-c", "arg2": "ls -l /tmp | grep something" }, 20000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_connect -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_connect Hook a connection (background connection to a remote host). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_connect (const char *proxy, const char *address, int port, @@ -7335,7 +7162,7 @@ struct t_hook *weechat_hook_connect (const char *proxy, const char *error, const char *ip_address), void *callback_data); ----------------------------------------- +---- Arguments: @@ -7390,7 +7217,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, const char *ip_address) @@ -7440,12 +7267,12 @@ struct t_hook *my_connect_hook = weechat_hook_connect (NULL, NULL, NULL, 0, /* GnuTLS */ NULL, &my_connect_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname, callback, callback_data) @@ -7478,17 +7305,16 @@ def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address): hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "", "my_connect_cb", "") ----------------------------------------- +---- -weechat_hook_print -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_print Hook a message printed. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *tags, const char *message, @@ -7503,7 +7329,7 @@ struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *prefix, const char *message), void *callback_data); ----------------------------------------- +---- Arguments: @@ -7537,7 +7363,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, int tags_count, const char **tags, @@ -7551,12 +7377,12 @@ my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, /* catch all messages, on all buffers, without color */ struct t_hook *my_print_hook = weechat_hook_print (NULL, NULL, NULL, 1, &my_print_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data) @@ -7567,24 +7393,23 @@ def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message) # catch all messages, on all buffers, without color hook = weechat.hook_print("", "", "", 1, "my_print_cb", "") ----------------------------------------- +---- -weechat_hook_signal -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal Hook a signal. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_signal (const char *signal, int (*callback)(void *data, const char *signal, const char *type_data, void *signal_data), void *callback_data); ----------------------------------------- +---- Arguments: @@ -7592,7 +7417,7 @@ Arguments: (priority allowed, see note about <<hook_priority,priority>>): [width="100%",cols="^1,^3,4,5",options="header"] -|======================================== +|=== | Plugin | Signal | Arguments | Description | aspell | aspell_suggest + @@ -8103,7 +7928,7 @@ Arguments: _(WeeChat ≥ 0.3.2)_ | Pointer: infolist with xfer info | Xfer has ended -|======================================== +|=== [NOTE] ^(1)^ 'xxx' is IRC server name, 'yyy' is IRC command name. @@ -8131,7 +7956,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -8143,12 +7968,12 @@ my_signal_cb (void *data, const char *signal, const char *type_data, /* catch signal "quit" */ struct t_hook *my_signal_hook = weechat_hook_signal ("quit", &my_signal_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_signal(signal, callback, callback_data) @@ -8159,20 +7984,19 @@ def my_signal_cb(data, signal, signal_data): # catch signal "quit" hook = weechat.hook_signal("quit", "my_signal_cb", "") ----------------------------------------- +---- -weechat_hook_signal_send -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal_send Send a signal. Prototype: [source,C] ----------------------------------------- +---- void weechat_hook_signal_send (const char *signal, const char *type_data, void *signal_data); ----------------------------------------- +---- Arguments: @@ -8184,24 +8008,23 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.hook_signal_send(signal, type_data, signal_data) # example weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string) ----------------------------------------- +---- [[signal_logger_backlog]] -Signal logger_backlog -+++++++++++++++++++++ +===== Signal logger_backlog The signal "logger_backlog" can be sent to display backlog (chat history) in buffer (for example if you open your own buffer in your plugin/script). @@ -8211,20 +8034,19 @@ Argument is a pointer to buffer. C example: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("logger_backlog", WEECHAT_HOOK_SIGNAL_POINTER, buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_signal_send("logger_backlog", weechat.WEECHAT_HOOK_SIGNAL_POINTER, buffer) ----------------------------------------- +---- [[signals_xxx_script_install]] -Signals xxx_script_install -++++++++++++++++++++++++++ +===== Signals xxx_script_install Five signals can be sent to install a script, according to language: @@ -8248,22 +8070,21 @@ Argument is a string with path to script to install. C example: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py") ----------------------------------------- +---- [[signals_xxx_script_remove]] -Signals xxx_script_remove -+++++++++++++++++++++++++ +===== Signals xxx_script_remove Five signals can be sent to remove list of scripts, according to language: @@ -8283,24 +8104,23 @@ is name without path, for example 'script.py'). C example: [source,C] ----------------------------------------- +---- /* unload and remove scripts test.py and script.py */ weechat_hook_signal_send ("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # unload and remove scripts test.py and script.py weechat.hook_signal_send("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py") ----------------------------------------- +---- [[signal_irc_input_send]] -Signal irc_input_send -+++++++++++++++++++++ +===== Signal irc_input_send _WeeChat ≥ 0.3.4._ @@ -8324,7 +8144,7 @@ Argument is a string with following format: C examples: [source,C] ----------------------------------------- +---- /* say "Hello!" on freenode server, #weechat channel */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Hello!"); @@ -8332,12 +8152,12 @@ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, /* send command "/whois FlashCode" on freenode server, with low priority */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # say "Hello!" on freenode server, #weechat channel weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Hello!") @@ -8345,10 +8165,9 @@ weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, # send command "/whois FlashCode" on freenode server, with low priority weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- -weechat_hook_hsignal -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal _WeeChat ≥ 0.3.4._ @@ -8357,13 +8176,13 @@ Hook a hsignal (signal with hashtable). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hsignal (const char *signal, int (*callback)(void *data, const char *signal, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Arguments: @@ -8371,7 +8190,7 @@ Arguments: (priority allowed, see note about <<hook_priority,priority>>): [width="100%",cols="^1,^3,5,5",options="header"] -|======================================== +|=== | Plugin | Signal | Arguments | Description | irc | irc_redirection_xxx_yyy ^(1)^ + @@ -8420,7 +8239,7 @@ Arguments: 'parent_group' ('struct t_gui_nick_group *'): parent group + 'nick' ('struct t_gui_nick *'): nick | Nick changed in nicklist -|======================================== +|=== [NOTE] ^(1)^ 'xxx' is signal argument used in redirection, 'yyy' is redirection @@ -8445,7 +8264,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8455,12 +8274,12 @@ my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) struct t_hook *my_hsignal_hook = weechat_hook_hsignal ("test", &my_hsignal_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_hsignal(signal, callback, callback_data) @@ -8470,10 +8289,9 @@ def my_hsignal_cb(data, signal, hashtable): return weechat.WEECHAT_RC_OK hook = weechat.hook_hsignal("test", "my_hsignal_cb", "") ----------------------------------------- +---- -weechat_hook_hsignal_send -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal_send _WeeChat ≥ 0.3.4._ @@ -8482,9 +8300,9 @@ Send a hsignal (signal with hashtable). Prototype: [source,C] ----------------------------------------- +---- void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable); ----------------------------------------- +---- Arguments: @@ -8494,7 +8312,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8506,22 +8324,21 @@ if (hashtable) weechat_hook_hsignal_send ("my_hsignal", hashtable); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.hook_hsignal_send(signal, hashtable) # example weechat.hook_hsignal_send("my_hsignal", { "key": "value" }) ----------------------------------------- +---- [[hsignal_irc_redirect_command]] -Hsignal irc_redirect_command -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_command _WeeChat ≥ 0.3.4._ @@ -8578,7 +8395,7 @@ Hashtable sent in hsignal has following content (key and values are strings): C example: [source,C] ----------------------------------------- +---- int test_whois_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8604,12 +8421,12 @@ if (hashtable) "freenode;;2;;/whois FlashCode"); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- def test_whois_cb(data, signal, hashtable): weechat.prnt("", "error = %s" % hashtable["error"]) weechat.prnt("", "output = %s" % hashtable["output"]) @@ -8621,11 +8438,10 @@ weechat.hook_hsignal_send("irc_redirect_command", "string": "FlashCode" }) weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- [[hsignal_irc_redirect_pattern]] -Hsignal irc_redirect_pattern -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_pattern _WeeChat ≥ 0.3.4._ @@ -8645,9 +8461,9 @@ For each command in 'cmd_start', 'cmd_stop' and 'cmd_extra', it is possible to give integer with position of "string" that must be found in received message, for example: ----------------------------------------- +---- 352:1,354,401:1 ----------------------------------------- +---- For commands 352 and 401, "string" must be found in received message, as first argument. @@ -8659,7 +8475,7 @@ for many redirections, you must create pattern before each redirect. C example: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8680,12 +8496,12 @@ if (hashtable) /* ... */ weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_hsignal_send("irc_redirect_pattern", { "pattern": "my_whois", "timeout": "30", "cmd_start": "311:1", @@ -8694,23 +8510,22 @@ weechat.hook_hsignal_send("irc_redirect_pattern", # now redirect irc whois command with hsignal irc_redirect_command # using pattern "my_whois" # ... ----------------------------------------- +---- -weechat_hook_config -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_config Hook a configuration option. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_config (const char *option, int (*callback)(void *data, const char *option, const char *value), void *callback_data); ----------------------------------------- +---- Arguments: @@ -8734,7 +8549,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_config_cb (void *data, const char *option, const char *value) { @@ -8745,12 +8560,12 @@ my_config_cb (void *data, const char *option, const char *value) /* catch changes to option "weechat.look.item_time_format" */ struct t_hook *my_config_hook = weechat_hook_config ("weechat.look.item_time_format", &my_config_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_config(option, callback, callback_data) @@ -8761,17 +8576,16 @@ def my_config_cb(data, option, value): # catch changes to option "weechat.look.item_time_format" hook = weechat.hook_config("weechat.look.item_time_format", "my_config_cb", "") ----------------------------------------- +---- -weechat_hook_completion -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion Hook a completion. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_completion (const char *completion_item, const char *description, int (*callback)(void *data, @@ -8779,7 +8593,7 @@ struct t_hook *weechat_hook_completion (const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion), void *callback_data); ----------------------------------------- +---- Arguments: @@ -8812,7 +8626,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -8828,12 +8642,12 @@ my_completion_cb (void *data, const char *completion_item, struct t_hook *my_completion_hook = weechat_hook_completion ("plugin_item", "my custom completion!", &my_completion_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_completion(completion_item, description, callback, callback_data) @@ -8845,10 +8659,9 @@ def my_completion_cb(data, completion_item, buffer, completion): hook = weechat.hook_completion("plugin_item", "my custom completion!", "my_completion_cb", "") ----------------------------------------- +---- -weechat_hook_completion_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_get_string _WeeChat ≥ 0.3.4._ @@ -8857,10 +8670,10 @@ Get a completion property as string. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hook_completion_get_string (struct t_gui_completion *completion, const char *property); ----------------------------------------- +---- Arguments: @@ -8873,7 +8686,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -8887,12 +8700,12 @@ my_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hook_completion_get_string(completion, property) @@ -8903,22 +8716,21 @@ def my_completion_cb(data, completion_item, buffer, completion): # completion depending on args # ... return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_hook_completion_list_add -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_list_add Add a word for a completion. Prototype: [source,C] ----------------------------------------- +---- void weechat_hook_completion_list_add (struct t_gui_completion *completion, const char *word, int nick_completion, const char *where); ----------------------------------------- +---- Arguments: @@ -8935,29 +8747,28 @@ C example: see <<_weechat_hook_completion,weechat_hook_completion>>. Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.hook_completion_list_add(completion, word, nick_completion, where) # example: see function hook_completion above ----------------------------------------- +---- -weechat_hook_modifier -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier Hook a modifier. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_modifier (const char *modifier, char *(*callback)(void *data, const char *modifier, const char *modifier_data, const char *string), void *callback_data); ----------------------------------------- +---- Arguments: @@ -8965,7 +8776,7 @@ Arguments: (priority allowed, see note about <<hook_priority,priority>>): [width="100%",cols="^2,3,4,4",options="header"] -|======================================== +|=== | Modifier | Modifier data | String | Output | charset_decode | @@ -9058,7 +8869,7 @@ Arguments: plugin + ";" + buffer_name + ";" + tags | Message printed | New message printed -|======================================== +|=== [NOTE] ^(1)^ 'xxx' is IRC command name. + @@ -9079,7 +8890,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- char * my_modifier_cb (void *data, const char *modifier, const char *modifier_data, @@ -9104,12 +8915,12 @@ my_modifier_cb (void *data, const char *modifier, struct t_hook *my_modifier_hook = weechat_hook_modifier ("weechat_print", &my_modifier_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_modifier(modifier, callback, callback_data) @@ -9118,21 +8929,20 @@ def my_modifier_cb(data, modifier, modifier_data, string): return "%s xxx" % string hook = weechat.hook_modifier("weechat_print", "my_modifier_cb", "") ----------------------------------------- +---- -weechat_hook_modifier_exec -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier_exec Execute modifier(s). Prototype: [source,C] ----------------------------------------- +---- char *weechat_hook_modifier_exec (const char *modifier, const char *modifier_data, const char *string); ----------------------------------------- +---- Arguments: @@ -9147,31 +8957,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- char *new_string = weechat_hook_modifier_exec ("my_modifier", my_data, my_string); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.hook_modifier_exec(modifier, modifier_data, string) # example weechat.hook_modifier_exec("my_modifier", my_data, my_string) ----------------------------------------- +---- -weechat_hook_info -^^^^^^^^^^^^^^^^^ +==== weechat_hook_info Hook an information (callback takes and returns a string). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info (const char *info_name, const char *description, const char *args_description, @@ -9179,7 +8988,7 @@ struct t_hook *weechat_hook_info (const char *info_name, const char *info_name, const char *arguments), void *callback_data); ----------------------------------------- +---- Arguments: @@ -9201,7 +9010,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char * my_info_cb (void *data, const char *info_name, const char *arguments) { @@ -9214,12 +9023,12 @@ struct t_hook *my_info_hook = weechat_hook_info ("my_info", "Some info", "Info about arguments", &my_info_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_info(info_name, description, args_description, callback, callback_data) @@ -9229,10 +9038,9 @@ def my_info_cb(data, info_name, arguments): hook = weechat.hook_info("my_info", "Some info", "Info about arguments", "my_info_cb", "") ----------------------------------------- +---- -weechat_hook_info_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_info_hashtable _WeeChat ≥ 0.3.4._ @@ -9241,7 +9049,7 @@ Hook an information (callback takes and returns a hashtable). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *description, const char *args_description, @@ -9250,7 +9058,7 @@ struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *info_name, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Arguments: @@ -9274,7 +9082,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hashtable * my_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) { @@ -9288,12 +9096,12 @@ struct t_hook *my_info_hook = weechat_hook_info_hashtable ("my_info_hashtable", "Info about input hashtable", "Info about output hashtable", &my_info_hashtable_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_info_hashtable(info_name, description, args_description, output_description, callback, callback_data) @@ -9306,17 +9114,16 @@ hook = weechat.hook_info_hashtable("my_info_hashtable", "Some info", "Info about input hashtable", "Info about output hashtable", "my_info_hashtable_cb", "") ----------------------------------------- +---- -weechat_hook_infolist -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_infolist Hook an infolist: callback will return pointer to infolist asked. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_infolist (const char *infolist_name, const char *description, const char *pointer_description, @@ -9326,7 +9133,7 @@ struct t_hook *weechat_hook_infolist (const char *infolist_name, void *pointer, const char *arguments), void *callback_data); ----------------------------------------- +---- Arguments: @@ -9352,7 +9159,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist * my_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -9371,12 +9178,12 @@ struct t_hook *my_infolist = weechat_hook_infolist ("my_infolist", "Info about pointer", "Info about arguments", &my_infolist_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_infolist(infolist_name, description, pointer_description, args_description, callback, callback_data) @@ -9390,23 +9197,22 @@ def my_infolist_cb(data, infolist_name, pointer, arguments): hook = weechat.hook_infolist("my_infolist", "Infolist with some data", "Info about pointer", "Info about arguments", "my_infolist_cb", "") ----------------------------------------- +---- -weechat_hook_hdata -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hdata Hook a hdata: callback will return pointer to hdata asked. Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hdata (const char *hdata_name, const char *description, struct t_hdata *(*callback)(void *data, const char *hdata_name), void *callback_data); ----------------------------------------- +---- Arguments: @@ -9427,7 +9233,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata * my_hdata_cb (void *data, const char *hdata_name) { @@ -9443,13 +9249,12 @@ my_hdata_cb (void *data, const char *hdata_name) struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata", "Hdata for my structure", &my_hdata_cb, NULL); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hook_focus -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_focus Hook a focus: mouse event or key pressed in cursor mode (free movement of cursor). @@ -9457,12 +9262,12 @@ cursor). Prototype: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_focus (const char *area, struct t_hashtable *(*callback)(void *data, struct t_hashtable *info), void *callback_data); ----------------------------------------- +---- Arguments: @@ -9489,7 +9294,7 @@ hashtable. Content of hashtable sent to callback (keys and values are of type "string"): [width="100%",cols="5m,5,8,3",options="header"] -|======================================== +|=== | Key ^(1)^ | Description | Value examples | Value if N/A | _x | Column on screen 2+| "0" ... "n" | _y | Line on screen 2+| "0" ... "n" @@ -9520,7 +9325,7 @@ Content of hashtable sent to callback (keys and values are of type "string"): | _bar_item_name | Name of bar item | "buffer_nicklist", "hotlist", ... | "" | _bar_item_line | Line in bar item | "0" ... "n" | "-1" | _bar_item_col | Column in bar item | "0" ... "n" | "-1" -|======================================== +|=== [NOTE] ^(1)^ There are same keys suffixed with "2" (ie: "_x2", "_y2", "_window2", ...) @@ -9534,13 +9339,13 @@ button has been released). + Extra info for bar item "buffer_nicklist": [width="70%",cols="3m,3,8",options="header"] -|======================================== +|=== | Key | Plugin ^(1)^ | Description | nick | core | Nick name | prefix | core | Prefix for nick | group | core | Group name | irc_host | irc | Host for nick (if known) -|======================================== +|=== [NOTE] ^(1)^ The name of plugin which defines a hook_focus to return info for this bar @@ -9554,7 +9359,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hashtable * my_focus_nicklist_cb (void *data, struct t_hashtable *info) { @@ -9567,12 +9372,12 @@ my_focus_nicklist_cb (void *data, struct t_hashtable *info) /* add focus on nicklist */ struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist", &my_focus_nicklist_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_focus(area, callback, callback_data) @@ -9583,10 +9388,9 @@ def my_focus_nicklist_cb(data, info): return my_dict hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "") ----------------------------------------- +---- -weechat_hook_set -^^^^^^^^^^^^^^^^ +==== weechat_hook_set _WeeChat ≥ 0.3.9._ @@ -9595,10 +9399,10 @@ Set string value of a hook property. Prototype: [source,C] ----------------------------------------- +---- void weechat_hook_set (struct t_hook *hook, const char *property, const char *value); ----------------------------------------- +---- Arguments: @@ -9606,39 +9410,38 @@ Arguments: * 'property' and 'value': property name, with its value: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Name | Value | Description | subplugin | any string | Name of sub plugin (commonly script name, which is displayed in `/help command` for a hook of type 'command') -|======================================== +|=== C example: [source,C] ----------------------------------------- +---- struct t_hook *my_command_hook = weechat_hook_command ("abcd", "description", "args", "description args", "", &my_command_cb, NULL); weechat_hook_set (my_command_hook, "subplugin", "test"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_unhook -^^^^^^^^^^^^^^ +==== weechat_unhook Unhook something hooked. Prototype: [source,C] ----------------------------------------- +---- void weechat_unhook (struct t_hook *hook); ----------------------------------------- +---- Arguments: @@ -9647,68 +9450,65 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_hook *my_hook = weechat_hook_command ( /* ... */ ); /* ... */ weechat_unhook (my_hook); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.unhook(hook) # example weechat.unhook(my_hook) ----------------------------------------- +---- -weechat_unhook_all -^^^^^^^^^^^^^^^^^^ +==== weechat_unhook_all Unhook everything that has been hooked by current plugin. Prototype: [source,C] ----------------------------------------- +---- void weechat_unhook_all (); ----------------------------------------- +---- C example: [source,C] ----------------------------------------- +---- weechat_unhook_all (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.unhook_all() # example weechat.unhook_all() ----------------------------------------- +---- [[buffers]] -Buffers -~~~~~~~ +=== Buffers Functions to create/query/close buffers. -weechat_buffer_new -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_new Open a new buffer. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_new (const char *name, int (*input_callback)(void *data, struct t_gui_buffer *buffer, @@ -9717,7 +9517,7 @@ struct t_gui_buffer *weechat_buffer_new (const char *name, int (*close_callback)(void *data, struct t_gui_buffer *buffer), void *close_callback_data); ----------------------------------------- +---- Arguments: @@ -9747,7 +9547,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_input_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) { @@ -9766,12 +9566,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) struct t_gui_buffer *my_buffer = weechat_buffer_new ("my_buffer", &my_input_cb, NULL, &my_close_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_new(name, input_callback, input_callback_data, close_callback, close_callback_data) @@ -9786,19 +9586,18 @@ def my_close_cb(data, buffer): return weechat.WEECHAT_RC_OK buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "") ----------------------------------------- +---- -weechat_current_buffer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_buffer Return pointer to current buffer (buffer displayed by current window). Prototype: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_current_buffer (); ----------------------------------------- +---- Return value: @@ -9807,33 +9606,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (weechat_current_buffer (), "Text on current buffer"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype buffer = weechat.current_buffer() # example weechat.prnt(weechat.current_buffer(), "Text on current buffer") ----------------------------------------- +---- -weechat_buffer_search -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search Search a buffer by plugin and/or name. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search (const char *plugin, const char *name); ----------------------------------------- +---- Arguments: @@ -9848,24 +9646,23 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("my_plugin", "my_buffer"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_search(plugin, name) # example buffer = weechat.buffer_search("my_plugin", "my_buffer") ----------------------------------------- +---- -weechat_buffer_search_main -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search_main Search WeeChat main buffer ('core' buffer, first buffer displayed when WeeChat is starting). @@ -9873,9 +9670,9 @@ is starting). Prototype: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search_main (); ----------------------------------------- +---- Return value: @@ -9884,32 +9681,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer = weechat_buffer_search_main (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_search_main() # example buffer = weechat.buffer_search_main() ----------------------------------------- +---- -weechat_buffer_clear -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_clear Clear content of a buffer. Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_clear (struct t_gui_buffer *buffer); ----------------------------------------- +---- Arguments: @@ -9918,19 +9714,19 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("my_plugin", "my_buffer"); if (my_buffer) { weechat_buffer_clear (my_buffer); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.buffer_clear(buffer) @@ -9938,19 +9734,18 @@ weechat.buffer_clear(buffer) buffer = weechat.buffer_search("my_plugin", "my_buffer") if buffer != "": weechat.buffer_clear(buffer) ----------------------------------------- +---- -weechat_buffer_close -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_close Close a buffer. Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_close (struct t_gui_buffer *buffer); ----------------------------------------- +---- Arguments: @@ -9959,18 +9754,18 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_new ("my_buffer", &my_input_cb, NULL, &my_close_cb, NULL); /* ... */ weechat_buffer_close (my_buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.buffer_close(buffer) @@ -9978,10 +9773,9 @@ weechat.buffer_close(buffer) buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "") # ... weechat.buffer_close(buffer) ----------------------------------------- +---- -weechat_buffer_merge -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_merge Merge buffer into another buffer: both buffers will still exist separately, but with same number, and WeeChat will display lines from both buffers (mixed @@ -9990,10 +9784,10 @@ lines). Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_merge (struct t_gui_buffer *buffer, struct t_gui_buffer *target_buffer); ----------------------------------------- +---- Arguments: @@ -10003,36 +9797,35 @@ Arguments: C example: [source,C] ----------------------------------------- +---- /* merge current buffer with weechat "core" buffer */ weechat_buffer_merge (weechat_current_buffer (), weechat_buffer_search_main ()); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.buffer_merge(buffer, target_buffer) # example # merge current buffer with WeeChat "core" buffer weechat.buffer_merge(weechat.current_buffer(), weechat.buffer_search_main()) ----------------------------------------- +---- -weechat_buffer_unmerge -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_unmerge Unmerge buffer from a group of merged buffers. Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_unmerge (struct t_gui_buffer *buffer, int number); ----------------------------------------- +---- Arguments: @@ -10043,33 +9836,32 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_buffer_unmerge (weechat_current_buffer (), 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.buffer_unmerge(buffer, number) # example weechat.buffer_unmerge(weechat.current_buffer(), 1) ----------------------------------------- +---- -weechat_buffer_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_integer Return integer value of a buffer property. Prototype: [source,C] ----------------------------------------- +---- int weechat_buffer_get_integer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Arguments: @@ -10119,34 +9911,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "my buffer number is: %d", weechat_buffer_get_integer (my_buffer, "number")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_integer(buffer, property) # example weechat.prnt("", "my buffer number is: %d" % weechat.buffer_get_integer(my_buffer, "number")) ----------------------------------------- +---- -weechat_buffer_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_string Return string value of a buffer property. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_buffer_get_string (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Arguments: @@ -10176,16 +9967,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "name / short name of buffer are: %s / %s", weechat_buffer_get_string (my_buffer, "name"), weechat_buffer_get_string (my_buffer, "short_name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_string(buffer, property) @@ -10193,20 +9984,19 @@ value = weechat.buffer_get_string(buffer, property) weechat.prnt("", "name / short name of buffer are: %s / %s" % (weechat.buffer_get_string(my_buffer, "name"), weechat.buffer_get_string(my_buffer, "short_name"))) ----------------------------------------- +---- -weechat_buffer_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_pointer Return pointer value of a buffer property. Prototype: [source,C] ----------------------------------------- +---- void *weechat_buffer_pointer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Arguments: @@ -10223,34 +10013,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "plugin pointer of my buffer: %lx", weechat_buffer_get_pointer (my_buffer, "plugin")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_pointer(buffer, property) # example weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin")) ----------------------------------------- +---- -weechat_buffer_set -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set Set string value of a buffer property. Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property, const char *value); ----------------------------------------- +---- Arguments: @@ -10258,7 +10047,7 @@ Arguments: * 'property' and 'value': property name, with its value: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Name | Value | Description | hotlist | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE, @@ -10369,12 +10158,12 @@ Arguments: | localvar_del_xxx | - | Remove local variable 'xxx' -|======================================== +|=== C example: [source,C] ----------------------------------------- +---- /* disable hotlist (for all buffers) */ weechat_buffer_set (NULL, "hotlist", "-"); @@ -10389,12 +10178,12 @@ weechat_buffer_set (my_buffer, "localvar_set_toto", "abc"); /* remove local variable "toto" */ weechat_buffer_set (my_buffer, "localvar_del_toto", NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.buffer_set(buffer, property, value) @@ -10414,20 +10203,19 @@ weechat.buffer_set(my_buffer, "localvar_set_toto", "abc") # remove local variable "toto" weechat.buffer_set(my_buffer, "localvar_del_toto", "") ----------------------------------------- +---- -weechat_buffer_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set_pointer Set pointer value of a buffer property. Prototype: [source,C] ----------------------------------------- +---- void weechat_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property, void *pointer); ----------------------------------------- +---- Arguments: @@ -10445,18 +10233,18 @@ Arguments: Prototypes for callbacks: [source,C] ----------------------------------------- +---- int close_callback (void *data, struct t_gui_buffer *buffer); int input_callback (void *data, struct t_gui_buffer *buffer, const char *input_data); int nickcmp_callback (void *data, struct t_gui_buffer *buffer, const char *nick1, const char *nick2); ----------------------------------------- +---- C example: [source,C] ----------------------------------------- +---- int my_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -10465,13 +10253,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) } weechat_buffer_set_pointer (my_buffer, "close_callback", &my_close_cb); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_buffer_string_replace_local_var -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_string_replace_local_var Replace local variables in a string by their values, using buffer local variables. @@ -10479,10 +10266,10 @@ variables. Prototype: [source,C] ----------------------------------------- +---- char *weechat_buffer_string_replace_local_var (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Arguments: @@ -10496,18 +10283,18 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_buffer_set (my_buffer, "localvar_set_toto", "abc"); char *str = weechat_buffer_string_replace_local_var (my_buffer, "test with $toto"); /* str contains "test with abc" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_string_replace_local_var(buffer, string) @@ -10515,10 +10302,9 @@ value = weechat.buffer_string_replace_local_var(buffer, string) weechat.buffer_set(my_buffer, "localvar_set_toto", "abc") str = weechat.buffer_string_replace_local_var(my_buffer, "test with $toto") # str contains "test with abc" ----------------------------------------- +---- -weechat_buffer_match_list -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_match_list _WeeChat ≥ 0.3.5._ @@ -10527,9 +10313,9 @@ Check if buffer matches a list of buffers. Prototype: [source,C] ----------------------------------------- +---- int weechat_buffer_match_list (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Arguments: @@ -10546,7 +10332,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_buffer *buffer = weechat_buffer_search ("irc", "freenode.#weechat"); if (buffer) { @@ -10555,12 +10341,12 @@ if (buffer) weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.freenode.*")); /* 1 */ weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.oftc.*,python.*")); /* 0 */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype match = weechat.buffer_match_list(buffer, string) @@ -10571,25 +10357,23 @@ if buffer: weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "*,!*#weechat*")) # 0 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.freenode.*")) # 1 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.oftc.*,python.*")) # 0 ----------------------------------------- +---- [[windows]] -Windows -~~~~~~~ +=== Windows Functions to query windows. -weechat_current_window -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_window Return pointer to current window. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_current_window (); ----------------------------------------- +---- Return value: @@ -10598,23 +10382,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_window *current_window = weechat_current_window (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype window = weechat.current_window() # example current_window = weechat.current_window() ----------------------------------------- +---- -weechat_window_search_with_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_search_with_buffer _WeeChat ≥ 0.3.5._ @@ -10623,9 +10406,9 @@ Return pointer to window displaying buffer. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer); ----------------------------------------- +---- Arguments: @@ -10638,36 +10421,35 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "window displaying core buffer: %lx", weechat_window_search_with_buffer (weechat_buffer_search_main ())); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype window = weechat.window_search_with_buffer(buffer) # example weechat.prnt("", "window displaying core buffer: %s" % weechat.window_search_with_buffer(weechat.buffer_search_main())) ----------------------------------------- +---- -weechat_window_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_integer Return integer value of a window property. Prototype: [source,C] ----------------------------------------- +---- int weechat_window_get_integer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Arguments: @@ -10699,16 +10481,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "current window is at position (x,y): (%d,%d)", weechat_window_get_integer (weechat_current_window (), "win_x"), weechat_window_get_integer (weechat_current_window (), "win_y")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.window_get_integer(window, property) @@ -10716,10 +10498,9 @@ value = weechat.window_get_integer(window, property) weechat.prnt("", "current window is at position (x,y): (%d,%d)" % (weechat.window_get_integer(weechat.current_window(), "win_x"), weechat.window_get_integer(weechat.current_window(), "win_y"))) ----------------------------------------- +---- -weechat_window_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_string Return string value of a window property. @@ -10729,10 +10510,10 @@ This function is not used today, it is reserved for a future version. Prototype: [source,C] ----------------------------------------- +---- int weechat_window_get_string (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Arguments: @@ -10743,18 +10524,17 @@ Return value: * string value of property -weechat_window_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_pointer Return pointer value of a window property. Prototype: [source,C] ----------------------------------------- +---- void *weechat_window_get_pointer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Arguments: @@ -10770,35 +10550,34 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "buffer displayed in current window: %lx", weechat_window_get_pointer (weechat_current_window (), "buffer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.window_get_pointer(window, property) # example weechat.prnt("", "buffer displayed in current window: %s" % weechat.window_get_pointer(weechat.current_window(), "buffer")) ----------------------------------------- +---- -weechat_window_set_title -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_set_title Set title for terminal. Prototype: [source,C] ----------------------------------------- +---- void weechat_window_set_title (const char *title); ----------------------------------------- +---- Arguments: @@ -10807,42 +10586,40 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_window_set_title ("new title here"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.window_set_title(window, title) # example weechat.window_set_title("new title here") ----------------------------------------- +---- [[nicklist]] -Nicklist -~~~~~~~~ +=== Nicklist Functions for buffer nicklist. -weechat_nicklist_add_group -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_group Add a group in a nicklist. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_add_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *parent_group, const char *name, const char *color, int visible); ----------------------------------------- +---- Arguments: @@ -10874,40 +10651,39 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *my_group = weechat_nicklist_add_group (my_buffer, my_parent_group, "test_group", "weechat.color.nicklist_group", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible) # example group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group", "weechat.color.nicklist_group", 1) ----------------------------------------- +---- -weechat_nicklist_search_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_group Search a group in a nicklist. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_search_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Arguments: @@ -10923,31 +10699,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer, NULL, "test_group"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype group = weechat.nicklist_search_group(buffer, from_group, name) # example group = weechat.nicklist_search_group(my_buffer, "", "test_group") ----------------------------------------- +---- -weechat_nicklist_add_nick -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_nick Add a nick in a group. 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, @@ -10955,7 +10730,7 @@ struct t_gui_nick_group *weechat_nicklist_add_nick (struct t_gui_buffer *buffer, const char *prefix, const char *prefix_color, int visible); ----------------------------------------- +---- Arguments: @@ -10988,19 +10763,19 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick *my_nick = weechat_nicklist_add_nick (my_buffer, my_group, "test_nick", (nick_away) ? "weechat.color.nicklist_away" : "bar_fg", "@", "lightgreen", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible) @@ -11010,21 +10785,20 @@ if nick_away: else: color = "bar_fg" nick = weechat.nicklist_add_nick(my_buffer, my_group, "test_nick", color, "@", "lightgreen", 1) ----------------------------------------- +---- -weechat_nicklist_search_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_nick Search a nick in a nicklist. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_nick *weechat_nicklist_search_nick (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Arguments: @@ -11040,34 +10814,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer, NULL, "test_nick"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype nick = weechat.nicklist_search_nick(buffer, from_group, name) # example nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick") ----------------------------------------- +---- -weechat_nicklist_remove_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_group Remove a group from a nicklist. Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *group); ----------------------------------------- +---- Arguments: @@ -11077,33 +10850,32 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_group (my_buffer, my_group); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_group(buffer, group) # example weechat.nicklist_remove_group(my_buffer, my_group) ----------------------------------------- +---- -weechat_nicklist_remove_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_nick Remove a nick from a nicklist. Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_nick (struct t_gui_buffer *buffer, struct t_gui_nick *nick); ----------------------------------------- +---- Arguments: @@ -11113,32 +10885,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_nick (my_buffer, my_nick); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_nick(buffer, nick) # example weechat.nicklist_remove_nick(my_buffer, my_nick) ----------------------------------------- +---- -weechat_nicklist_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_all Remove all groups/nicks from a nicklist. Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_all (struct t_gui_buffer *buffer); ----------------------------------------- +---- Arguments: @@ -11147,23 +10918,22 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_all (my_buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_all(buffer) # example weechat.nicklist_remove_all(my_buffer) ----------------------------------------- +---- -weechat_nicklist_get_next_item -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_get_next_item _WeeChat ≥ 0.3.7._ @@ -11172,11 +10942,11 @@ Get next group or nick from nicklist (mainly used to display nicklist). Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_get_next_item (struct t_gui_buffer *buffer, struct t_gui_nick_group **group, struct t_gui_nick **nick); ----------------------------------------- +---- Arguments: @@ -11187,7 +10957,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group; struct t_gui_nick *ptr_nick; @@ -11208,13 +10978,12 @@ while (ptr_group || ptr_nick) } weechat_nicklist_get_next_item (buffer, &ptr_group, &ptr_nick); } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_nicklist_group_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_integer _WeeChat ≥ 0.3.4._ @@ -11223,11 +10992,11 @@ Return integer value of a group property. Prototype: [source,C] ----------------------------------------- +---- int weechat_nicklist_group_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Arguments: @@ -11244,23 +11013,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_group_get_integer (buffer, group, "visible"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_integer(buffer, group, property) # example visible = weechat.nicklist_group_get_integer(buffer, group, "visible") ----------------------------------------- +---- -weechat_nicklist_group_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_string _WeeChat ≥ 0.3.4._ @@ -11269,11 +11037,11 @@ Return string value of a group property. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_nicklist_group_get_string (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Arguments: @@ -11290,23 +11058,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_group_get_string (buffer, group, "color"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_string(buffer, group, property) # example color = weechat.nicklist_group_get_string(buffer, group, "color") ----------------------------------------- +---- -weechat_nicklist_group_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_pointer _WeeChat ≥ 0.3.4._ @@ -11315,11 +11082,11 @@ Return pointer value of a group property. Prototype: [source,C] ----------------------------------------- +---- void *weechat_nicklist_group_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Arguments: @@ -11335,23 +11102,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *parent = weechat_nicklist_group_get_pointer (buffer, group, "parent"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_pointer(buffer, group, property) # example parent = weechat.nicklist_group_get_pointer(buffer, group, "parent") ----------------------------------------- +---- -weechat_nicklist_group_set -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_set _WeeChat ≥ 0.3.4._ @@ -11360,12 +11126,12 @@ Set string value of a group property. Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_group_set (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property, const char *value); ----------------------------------------- +---- Arguments: @@ -11374,7 +11140,7 @@ Arguments: * 'property' and 'value': property name, with its value: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Name | Value | Description | color | WeeChat color option name | @@ -11383,12 +11149,12 @@ Arguments: | visible | "0", "1" | "0" = hidden group, "1" = visible group -|======================================== +|=== C examples: [source,C] ----------------------------------------- +---- /* change group color to "bar_fg" */ weechat_nicklist_group_set (buffer, group, "color", "bar_fg"); @@ -11397,12 +11163,12 @@ weechat_nicklist_group_set (buffer, group, "color", "yellow"); /* hide group in nicklist */ weechat_nicklist_group_set (buffer, group, "visible", "0"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_group_set(buffer, group, property, value) @@ -11416,10 +11182,9 @@ weechat.nicklist_group_set(buffer, group, "color", "yellow") # hide group in nicklist weechat.nicklist_group_set(buffer, group, "visible", "0") ----------------------------------------- +---- -weechat_nicklist_nick_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_integer _WeeChat ≥ 0.3.4._ @@ -11428,11 +11193,11 @@ Return integer value of a nick property. Prototype: [source,C] ----------------------------------------- +---- int weechat_nicklist_nick_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Arguments: @@ -11448,23 +11213,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_nick_get_integer (buffer, nick, "visible"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_integer(buffer, nick, property) # example visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible") ----------------------------------------- +---- -weechat_nicklist_nick_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_string _WeeChat ≥ 0.3.4._ @@ -11473,11 +11237,11 @@ Return string value of a nick property. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_nicklist_nick_get_string (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Arguments: @@ -11496,23 +11260,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_nick_get_string (buffer, nick, "color"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_string(buffer, nick, property) # example color = weechat.nicklist_nick_get_string(buffer, nick, "color") ----------------------------------------- +---- -weechat_nicklist_nick_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_pointer _WeeChat ≥ 0.3.4._ @@ -11521,11 +11284,11 @@ Return pointer value of a nick property. Prototype: [source,C] ----------------------------------------- +---- void *weechat_nicklist_nick_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Arguments: @@ -11541,23 +11304,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *group = weechat_nicklist_nick_get_pointer (buffer, nick, "group"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_pointer(buffer, nick, property) # example group = weechat.nicklist_nick_get_pointer(buffer, nick, "group") ----------------------------------------- +---- -weechat_nicklist_nick_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_set _WeeChat ≥ 0.3.4._ @@ -11566,12 +11328,12 @@ Set string value of a nick property. Prototype: [source,C] ----------------------------------------- +---- void weechat_nicklist_nick_set (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property, const char *value); ----------------------------------------- +---- Arguments: @@ -11580,7 +11342,7 @@ Arguments: * 'property' and 'value': property name, with its value: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Name | Value | Description | color | WeeChat color option name | @@ -11596,12 +11358,12 @@ Arguments: | visible | "0", "1" | "0" = hidden nick, "1" = visible nick -|======================================== +|=== C examples: [source,C] ----------------------------------------- +---- /* change nick color to cyan */ weechat_nicklist_nick_set (buffer, nick, "color", "cyan"); @@ -11613,12 +11375,12 @@ weechat_nicklist_nick_set (buffer, nick, "prefix_color", "yellow"); /* hide nick in nicklist */ weechat_nicklist_nick_set (buffer, nick, "visible", "0"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_nick_set(buffer, nick, property, value) @@ -11635,25 +11397,23 @@ weechat.nicklist_nick_set(buffer, nick, "prefix_color", "yellow") # hide nick in nicklist weechat.nicklist_nick_set(buffer, nick, "visible", "0") ----------------------------------------- +---- [[bars]] -Bars -~~~~ +=== Bars Functions for bars. -weechat_bar_item_search -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_search Search a bar item. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_search (const char *name); ----------------------------------------- +---- Arguments: @@ -11666,23 +11426,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *bar_item = weechat_bar_item_search ("myitem"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype bar_item = weechat.bar_item_search(name) # example bar_item = weechat.bar_item_search("myitem") ----------------------------------------- +---- -weechat_bar_item_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_new _Updated in version 0.4.2._ @@ -11691,7 +11450,7 @@ Create a new bar item. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_new (const char *name, char *(*build_callback)(void *data, struct t_gui_bar_item *item, @@ -11699,7 +11458,7 @@ struct t_gui_bar_item *weechat_bar_item_new (const char *name, struct t_gui_buffer *buffer, struct t_hashtable *extra_info), void *build_callback_data); ----------------------------------------- +---- Arguments: @@ -11726,7 +11485,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- char * my_build_callback (void *data, struct t_gui_bar_item *item, @@ -11740,7 +11499,7 @@ my_build_callback (void *data, struct t_gui_bar_item *my_item = weechat_bar_item_new ("myitem", &my_build_callback, NULL); ----------------------------------------- +---- Script (Python): @@ -11751,7 +11510,7 @@ To use a callback with all arguments, you must add "(extra)" before the name, see example below (supported only in WeeChat ≥ 0.4.2). [source,python] ----------------------------------------- +---- # prototype bar_item = weechat.bar_item_new(name, build_callback, build_callback_data) @@ -11766,19 +11525,18 @@ def my_build_callback2(data, item, window, buffer, extra_info): return "my content" bar_item2 = weechat.bar_item_new("(extra)myitem2", "my_build_callback2", "") # WeeChat ≥ 0.4.2 ----------------------------------------- +---- -weechat_bar_item_update -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_update Update content of a bar item, by calling its build callback. Prototype: [source,C] ----------------------------------------- +---- void weechat_bar_item_update (const char *name); ----------------------------------------- +---- Arguments: @@ -11787,32 +11545,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_bar_item_update ("myitem"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.bar_item_update(name) # example weechat.bar_item_update("myitem") ----------------------------------------- +---- -weechat_bar_item_remove -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_remove Remove a bar item. Prototype: [source,C] ----------------------------------------- +---- void weechat_bar_item_remove (struct t_gui_bar_item *item); ----------------------------------------- +---- Arguments: @@ -11821,32 +11578,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_bar_item_remove (&my_item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.bar_item_remove(item) # example weechat.bar_item_remove(myitem) ----------------------------------------- +---- -weechat_bar_search -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_search Search a bar. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_search (const char *name); ----------------------------------------- +---- Arguments: @@ -11859,30 +11615,29 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_bar *bar = weechat_bar_search ("mybar"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype bar = weechat.bar_search(name) # example bar = weechat.bar_search("mybar") ----------------------------------------- +---- -weechat_bar_new -^^^^^^^^^^^^^^^ +==== weechat_bar_new Create a new bar. Prototype: [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_new (const char *name, const char *hidden, const char *priority, @@ -11898,7 +11653,7 @@ struct t_gui_bar *weechat_bar_new (const char *name, const char *color_bg, const char *separator, const char *items); ----------------------------------------- +---- Arguments: @@ -11943,7 +11698,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "off", "100", @@ -11959,12 +11714,12 @@ struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "blue", "off", "time,buffer_number+buffer_name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype bar = weechat.bar_new(name, hidden, priority, type, condition, position, filling_top_bottom, filling_left_right, size, size_max, @@ -11973,20 +11728,19 @@ bar = weechat.bar_new(name, hidden, priority, type, condition, position, # example bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical", "0", "5", "default", "cyan", "blue", "off", "time,buffer_number+buffer_name") ----------------------------------------- +---- -weechat_bar_set -^^^^^^^^^^^^^^^ +==== weechat_bar_set Set a new value for a bar property. Prototype: [source,C] ----------------------------------------- +---- int weechat_bar_set (struct t_gui_bar *bar, const char *property, const char *value); ----------------------------------------- +---- Arguments: @@ -12003,32 +11757,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_bar_set (mybar, "position", "bottom"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.bar_set(bar, property, value) # example weechat.bar_set(my_bar, "position", "bottom") ----------------------------------------- +---- -weechat_bar_update -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_update Refresh content of a bar on screen. Prototype: [source,C] ----------------------------------------- +---- void weechat_bar_update (const char *name); ----------------------------------------- +---- Arguments: @@ -12037,32 +11790,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_bar_update ("mybar"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.bar_update(name) # example weechat.bar_update("mybar") ----------------------------------------- +---- -weechat_bar_remove -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_remove Remove a bar. Prototype: [source,C] ----------------------------------------- +---- void weechat_bar_remove (struct t_gui_bar *bar); ----------------------------------------- +---- Arguments: @@ -12071,38 +11823,36 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_bar_remove (mybar); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.bar_remove(bar) # example weechat.bar_remove(my_bar) ----------------------------------------- +---- [[commands]] -Commands -~~~~~~~~ +=== Commands Functions for executing WeeChat commands. -weechat_command -^^^^^^^^^^^^^^^ +==== weechat_command Execute a command. Prototype: [source,C] ----------------------------------------- +---- void weechat_command (struct t_gui_buffer *buffer, const char *command); ----------------------------------------- +---- Arguments: @@ -12114,30 +11864,28 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"), "/whois FlashCode"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.command(buffer, command) # example weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode") ----------------------------------------- +---- [[network]] -Network -~~~~~~~ +=== Network Network functions. -weechat_network_pass_proxy -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_pass_proxy Establish a connection/authentification to a proxy. @@ -12148,12 +11896,12 @@ process only, to not block WeeChat. Prototype: [source,C] ----------------------------------------- +---- int weechat_network_pass_proxy (const char *proxy, int sock, const char *address, int port); ----------------------------------------- +---- Arguments: @@ -12169,7 +11917,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_network_pass_proxy ("my_proxy", sock, "irc.freenode.net", 6667)) { /* OK */ @@ -12178,13 +11926,12 @@ else { /* error */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_network_connect_to -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_connect_to Establish a connection to a remote host. @@ -12195,12 +11942,12 @@ process only, to not block WeeChat. Prototype: [source,C] ----------------------------------------- +---- int weechat_network_connect_to (const char *proxy, int sock, unsigned long address, int port); ----------------------------------------- +---- Arguments: @@ -12216,7 +11963,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct sockaddr_in addr; socklen_t length; unsigned long address; @@ -12235,28 +11982,26 @@ else { /* error */ } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. [[infos]] -Infos -~~~~~ +=== Infos Functions to get infos. -weechat_info_get -^^^^^^^^^^^^^^^^ +==== weechat_info_get Return info, as string, from WeeChat or a plugin. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_info_get (const char *info_name, const char *arguments); ----------------------------------------- +---- Arguments: @@ -12272,18 +12017,18 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Current WeeChat version is: %s (compiled on %s)", weechat_info_get ("version", NULL), weechat_info_get ("date", NULL)); weechat_printf (NULL, "WeeChat home is: %s", weechat_info_get ("weechat_dir", NULL)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.info_get(info_name, arguments) @@ -12291,10 +12036,9 @@ value = weechat.info_get(info_name, arguments) weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) weechat.prnt("", "WeeChat home is: %s" % weechat.info_get("weechat_dir", "")) ----------------------------------------- +---- -weechat_info_get_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_info_get_hashtable _WeeChat ≥ 0.3.4._ @@ -12303,10 +12047,10 @@ Return info, as hashtable, from WeeChat or a plugin. Prototype: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_info_get_hashtable (const char *info_name, struct t_hashtable *hashtable); ----------------------------------------- +---- Arguments: @@ -12322,7 +12066,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable_in, *hashtable_out; hashtable_in = weechat_hashtable_new (8, @@ -12347,12 +12091,12 @@ if (hashtable_in) weechat_hashtable_free (hashtable_in); weechat_hashtable_free (hashtable_out); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype dict = weechat.info_get_hashtable(info_name, dict_in) @@ -12360,11 +12104,10 @@ dict = weechat.info_get_hashtable(info_name, dict_in) dict_in = { "message": ":nick!user@host PRIVMSG #weechat :message here" } weechat.prnt("", "message parsed: %s" % weechat.info_get_hashtable("irc_message_parse", dict_in)) ----------------------------------------- +---- [[infolists]] -Infolists -~~~~~~~~~ +=== Infolists An infolist is a list of "items". Each item contains variables. @@ -12380,17 +12123,16 @@ Each variable has a type and a value. Possible types are: * 'buffer': buffer with fixed length, containing any data * 'time': time value -weechat_infolist_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new Create a new infolist. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_new (); ----------------------------------------- +---- Return value: @@ -12399,32 +12141,31 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_new (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype infolist = weechat.infolist_new() # example infolist = weechat.infolist_new() ----------------------------------------- +---- -weechat_infolist_new_item -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_item Add an item in an infolist. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_item *weechat_infolist_new_item (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -12437,34 +12178,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist_item *item = weechat_infolist_new_item (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype item = weechat.infolist_new_item(infolist) # example item = weechat.infolist_new_item(infolist) ----------------------------------------- +---- -weechat_infolist_new_var_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_integer Add an integer variable to an infolist item. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_integer (struct t_infolist_item *item, const char *name, int value); ----------------------------------------- +---- Arguments: @@ -12479,36 +12219,35 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_integer (item, "my_integer", 123); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_integer(item, name, value) # example var = weechat.infolist_new_var_integer(item, "my_integer", 123) ----------------------------------------- +---- -weechat_infolist_new_var_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_string Add a string variable to an infolist item. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_string (struct t_infolist_item *item, const char *name, const char *value); ----------------------------------------- +---- Arguments: @@ -12523,36 +12262,35 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_string (item, "my_string", "value"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_string(item, name, value) # example var = weechat.infolist_new_var_string(item, "my_string", "value") ----------------------------------------- +---- -weechat_infolist_new_var_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_pointer Add a pointer variable to an infolist item. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_pointer (struct t_infolist_item *item, const char *name, void *pointer); ----------------------------------------- +---- Arguments: @@ -12567,37 +12305,36 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_pointer (item, "my_pointer", &pointer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_pointer(item, name, pointer) # example var = weechat.infolist_new_var_pointer(item, "my_pointer", pointer) ----------------------------------------- +---- -weechat_infolist_new_var_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_buffer Add a buffer variable to an infolist item. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_buffer (struct t_infolist_item *item, const char *name, void *pointer, int size); ----------------------------------------- +---- Arguments: @@ -12613,31 +12350,30 @@ Return value: C example: [source,C] ----------------------------------------- +---- char buffer[256]; /* ... */ struct t_infolist_var *var = weechat_infolist_new_var_buffer (item, "my_buffer", &buffer, sizeof (buffer)); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_infolist_new_var_time -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_time Add a time variable to an infolist item. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_time (struct t_infolist_item *item, const char *name, time_t time); ----------------------------------------- +---- Arguments: @@ -12652,25 +12388,24 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_time (item, "my_time", time (NULL)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_time(item, name, time) # example var = weechat.infolist_new_var_time(item, "my_time", int(time.time())) ----------------------------------------- +---- -weechat_infolist_get -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_get Return infolist from WeeChat or a plugin. @@ -12684,11 +12419,11 @@ have more info than hdata, which is raw data), see <<hdata,hdata>>. Prototype: [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_get (const char *infolist_name, void *pointer, const char *arguments); ----------------------------------------- +---- Arguments: @@ -12706,23 +12441,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_get ("irc_server", NULL, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype infolist = weechat.infolist_get(infolist_name, pointer, arguments) # example infolist = weechat.infolist_get("irc_server", "", "") ----------------------------------------- +---- -weechat_infolist_next -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_next Move "cursor" to next item in an infolist. The first call to this function for an infolist moves cursor to first item in infolist. @@ -12730,9 +12464,9 @@ an infolist moves cursor to first item in infolist. Prototype: [source,C] ----------------------------------------- +---- int weechat_infolist_next (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -12745,7 +12479,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_infolist_next (infolist)) { /* read variables in item... */ @@ -12754,12 +12488,12 @@ else { /* no more item available */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.infolist_next(infolist) @@ -12769,10 +12503,9 @@ if rc: # read variables in item... else: # no more item available ----------------------------------------- +---- -weechat_infolist_prev -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_prev Move "cursor" to previous item in an infolist. The first call to this function for an infolist moves cursor to last item in infolist. @@ -12780,9 +12513,9 @@ for an infolist moves cursor to last item in infolist. Prototype: [source,C] ----------------------------------------- +---- int weechat_infolist_prev (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -12796,7 +12529,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_infolist_prev (infolist)) { /* read variables in item... */ @@ -12805,12 +12538,12 @@ else { /* no more item available */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.infolist_prev(infolist) @@ -12820,19 +12553,18 @@ if rc: # read variables in item... else: # no more item available ----------------------------------------- +---- -weechat_infolist_reset_item_cursor -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_reset_item_cursor Reset "cursor" for infolist. Prototype: [source,C] ----------------------------------------- +---- void weechat_infolist_reset_item_cursor (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -12841,32 +12573,31 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_infolist_reset_item_cursor (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.infolist_reset_item_cursor(infolist) # example weechat.infolist_reset_item_cursor(infolist) ----------------------------------------- +---- -weechat_infolist_fields -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_fields Return list of fields for current infolist item. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_infolist_fields (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -12881,16 +12612,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *fields = weechat_infolist_fields (infolist); /* fields contains something like: "i:my_integer,s:my_string,p:my_pointer,b:my_buffer,t:my_time" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype fields = weechat.infolist_fields(infolist) @@ -12898,19 +12629,18 @@ fields = weechat.infolist_fields(infolist) fields = weechat.infolist_fields(infolist) # fields contains something like: # "i:my_integer,s:my_string,p:my_pointer,b:my_buffer,t:my_time" ----------------------------------------- +---- -weechat_infolist_integer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_integer Return value of integer variable in current infolist item. Prototype: [source,C] ----------------------------------------- +---- int weechat_infolist_integer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Arguments: @@ -12924,33 +12654,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "integer = %d", weechat_infolist_integer (infolist, "my_integer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_integer(infolist, var) # example weechat.prnt("", "integer = %d" % weechat.infolist_integer(infolist, "my_integer")) ----------------------------------------- +---- -weechat_infolist_string -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_string Return value of string variable in current infolist item. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_infolist_string (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Arguments: @@ -12964,33 +12693,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "string = %s", weechat_infolist_string (infolist, "my_string")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_string(infolist, var) # example weechat.prnt("", "string = %s" % weechat.infolist_string(infolist, "my_string")) ----------------------------------------- +---- -weechat_infolist_pointer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_pointer Return value of pointer variable in current infolist item. Prototype: [source,C] ----------------------------------------- +---- void *weechat_infolist_pointer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Arguments: @@ -13004,34 +12732,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "pointer = 0x%lx", weechat_infolist_pointer (infolist, "my_pointer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_pointer(infolist, var) # example weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer")) ----------------------------------------- +---- -weechat_infolist_buffer -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_buffer Return value of buffer variable in current infolist item. Prototype: [source,C] ----------------------------------------- +---- void *weechat_infolist_buffer (struct t_infolist *infolist, const char *var, int *size); ----------------------------------------- +---- Arguments: @@ -13046,27 +12773,26 @@ Return value: C example: [source,C] ----------------------------------------- +---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); weechat_printf (NULL, "buffer = 0x%lx, size = %d", pointer, size); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_infolist_time -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_time Return value of time variable in current infolist item. Prototype: [source,C] ----------------------------------------- +---- time_t weechat_infolist_time (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Arguments: @@ -13080,33 +12806,32 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "time = %ld", weechat_infolist_time (infolist, "my_time")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_time(infolist, var) # example weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time")) ----------------------------------------- +---- -weechat_infolist_free -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_free Free an infolist. Prototype: [source,C] ----------------------------------------- +---- void weechat_infolist_free (struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -13115,24 +12840,23 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_infolist_free (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.infolist_free(infolist) # example weechat.infolist_free(infolist) ----------------------------------------- +---- [[hdata]] -Hdata -~~~~~ +=== Hdata Functions for hdata (raw access to WeeChat or plugins data). @@ -13140,8 +12864,7 @@ Functions for hdata (raw access to WeeChat or plugins data). Hdata provides read-only access to data. It is *STRICTLY FORBIDDEN* to write something in memory pointed by hdata variables. -weechat_hdata_new -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new _WeeChat ≥ 0.3.6, updated in 0.3.9 and 0.4.0._ @@ -13149,19 +12872,19 @@ Create a new hdata. [NOTE] .hdata vs infolist -======================================== +==== Hdata is a fast way to read WeeChat or plugins data. It is similar to infolist, but there are some differences: * it is faster and uses less memory: direct read of data without duplication * it may have different info than infolist: it contains only raw data in structures (infolist may add some extra data for convenience) -======================================== +==== Prototype: [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, int create_allowed, int delete_allowed, int (*callback_update)(void *data, @@ -13169,7 +12892,7 @@ struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, void *pointer, struct t_hashtable *hashtable), void *callback_update_data); ----------------------------------------- +---- Arguments: @@ -13199,15 +12922,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_new_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_var _WeeChat ≥ 0.3.6, updated in 0.3.9._ @@ -13216,10 +12938,10 @@ Create a new variable in hdata. Prototype: [source,C] ----------------------------------------- +---- void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, int update_allowed, const char *array_size, const char *hdata_name); ----------------------------------------- +---- Arguments: @@ -13249,7 +12971,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13271,12 +12993,12 @@ weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, ta weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- The macro "WEECHAT_HDATA_VAR" can be used to shorten code: [source,C] ----------------------------------------- +---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); @@ -13284,13 +13006,12 @@ WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", N WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_new_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_list _WeeChat ≥ 0.3.6._ @@ -13299,9 +13020,9 @@ Create a new list pointer in hdata. Prototype: [source,C] ----------------------------------------- +---- void weechat_hdata_new_list (struct t_hdata *hdata, const char *name, void *pointer); ----------------------------------------- +---- Arguments: @@ -13312,7 +13033,7 @@ Arguments: C example: [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13337,21 +13058,20 @@ weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), W weechat_hdata_new_list (hdata, "buffers", &buffers); weechat_hdata_new_list (hdata, "last_buffer", &last_buffer); ----------------------------------------- +---- The macro "WEECHAT_HDATA_LIST" can be used to shorten code: [source,C] ----------------------------------------- +---- WEECHAT_HDATA_LIST(buffers); WEECHAT_HDATA_LIST(last_buffer); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_get -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get _WeeChat ≥ 0.3.6._ @@ -13365,9 +13085,9 @@ WeeChat/plugin object to read some data. Prototype: [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_get (const char *hdata_name); ----------------------------------------- +---- Arguments: @@ -13384,23 +13104,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hdata = weechat.hdata_get(hdata_name) # example hdata = weechat.hdata_get("irc_server") ----------------------------------------- +---- -weechat_hdata_get_var_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_offset _WeeChat ≥ 0.3.6._ @@ -13409,9 +13128,9 @@ Return offset of variable in hdata. Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_offset (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Arguments: @@ -13425,23 +13144,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- int offset = weechat_hdata_get_var_offset (hdata, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype offset = weechat.hdata_get_var_offset(hdata, name) # example offset = weechat.hdata_get_var_offset(hdata, "name") ----------------------------------------- +---- -weechat_hdata_get_var_type -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type _WeeChat ≥ 0.3.6._ @@ -13450,9 +13168,9 @@ Return type of variable in hdata (as integer). Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_type (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Arguments: @@ -13466,7 +13184,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int type = weechat_hdata_get_var_type (hdata, "name"); switch (type) { @@ -13498,13 +13216,12 @@ switch (type) /* variable not found */ break; } ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_get_var_type_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type_string _WeeChat ≥ 0.3.6._ @@ -13513,9 +13230,9 @@ Return type of variable in hdata (as string). Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_type_string (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Arguments: @@ -13529,23 +13246,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype type = weechat.hdata_get_var_type_string(hdata, name) # example weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string("name")) ----------------------------------------- +---- -weechat_hdata_get_var_array_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size _WeeChat ≥ 0.3.9._ @@ -13554,9 +13270,9 @@ Return array size for variable in hdata. Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_array_size (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -13571,23 +13287,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- int array_size = weechat_hdata_get_var_array_size (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype array_size = weechat.hdata_get_var_array_size(hdata, pointer, name) # example array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_array_size_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size_string _WeeChat ≥ 0.3.9._ @@ -13596,10 +13311,10 @@ Return array size for variable in hdata (as string). Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_array_size_string (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -13615,23 +13330,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- const char *array_size = weechat_hdata_get_var_array_size_string (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name) # example array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_hdata -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_hdata _WeeChat ≥ 0.3.6._ @@ -13640,9 +13354,9 @@ Return hdata for a variable in hdata. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Arguments: @@ -13656,23 +13370,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hdata_name = weechat.hdata_get_var_hdata(hdata, name) # example weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name")) ----------------------------------------- +---- -weechat_hdata_get_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var _WeeChat ≥ 0.3.6._ @@ -13681,9 +13394,9 @@ Return pointer to content of variable in hdata. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -13698,17 +13411,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); void *pointer = weechat_hdata_get_var (hdata, buffer, "name"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_get_var_at_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_at_offset _WeeChat ≥ 0.3.6._ @@ -13717,9 +13429,9 @@ Return pointer to content of variable in hdata, using offset. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer, int offset); ----------------------------------------- +---- Arguments: @@ -13734,18 +13446,17 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); int offset = weechat_hdata_get_var_offset (hdata, "name"); void *pointer = weechat_hdata_get_var_at_offset (hdata, buffer, offset); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_get_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_list _WeeChat ≥ 0.3.6._ @@ -13754,9 +13465,9 @@ Return list pointer from hdata. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_list (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Arguments: @@ -13770,25 +13481,24 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffers = weechat_hdata_get_list (hdata, "gui_buffers"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype list = weechat.hdata_get_list(hdata, name) # example hdata = weechat.hdata_get("buffer") buffers = weechat.hdata_get_list(hdata, "gui_buffers") ----------------------------------------- +---- -weechat_hdata_check_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_check_pointer _WeeChat ≥ 0.3.7._ @@ -13797,9 +13507,9 @@ Check if a pointer is valid for a hdata and a list pointer. Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_check_pointer (struct t_hdata *hdata, void *list, void *pointer); ----------------------------------------- +---- Arguments: @@ -13814,7 +13524,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- /* check if a buffer pointer is valid */ struct t_hdata *hdata = weechat_hdata_get ("buffer"); if (weechat_hdata_check_pointer (hdata, @@ -13827,12 +13537,12 @@ else { /* invalid pointer */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.hdata_check_pointer(hdata, list, pointer) @@ -13844,10 +13554,9 @@ if weechat.hdata_check_pointer(hdata, weechat.hdata_get_list(hdata, "gui_buffers else: # invalid pointer # ... ----------------------------------------- +---- -weechat_hdata_move -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_move _WeeChat ≥ 0.3.6._ @@ -13856,9 +13565,9 @@ Move pointer to another element in list. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_move (struct t_hdata *hdata, void *pointer, int count); ----------------------------------------- +---- Arguments: @@ -13874,7 +13583,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); @@ -13884,12 +13593,12 @@ buffer = weechat_hdata_move (hdata, buffer, 2); /* move to previous buffer */ if (buffer) buffer = weechat_hdata_move (hdata, buffer, -1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype pointer = weechat.hdata_move(hdata, pointer, count) @@ -13903,10 +13612,9 @@ buffer = weechat.hdata_move(hdata, buffer, 2) # move to previous buffer if buffer: buffer = weechat.hdata_move(hdata, buffer, -1) ----------------------------------------- +---- -weechat_hdata_search -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_search _WeeChat ≥ 0.4.1._ @@ -13916,9 +13624,9 @@ in list, until element is found (or end of list). Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_search (struct t_hdata *hdata, void *pointer, const char *search, int move); ----------------------------------------- +---- Arguments: @@ -13937,7 +13645,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); void *servers = weechat_hdata_get (hdata, "irc_servers"); @@ -13947,12 +13655,12 @@ if (server) { /* ... */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype pointer = weechat.hdata_search(hdata, pointer, search, count) @@ -13964,10 +13672,9 @@ servers = weechat.hdata_get_list(hdata, "irc_servers") server = weechat.hdata_search(hdata, servers, "${irc_server.name} == freenode", 1) if server: # ... ----------------------------------------- +---- -weechat_hdata_char -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_char _WeeChat ≥ 0.3.7._ @@ -13976,9 +13683,9 @@ Return value of char variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- char weechat_hdata_char (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -13994,23 +13701,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "letter = %c", weechat_hdata_char (hdata, pointer, "letter")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_char(hdata, pointer, name) # example weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter")) ----------------------------------------- +---- -weechat_hdata_integer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_integer _WeeChat ≥ 0.3.6._ @@ -14019,9 +13725,9 @@ Return value of integer variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_integer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14037,16 +13743,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "number = %d", weechat_hdata_integer (hdata, buffer, "number")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_integer(hdata, pointer, name) @@ -14054,10 +13760,9 @@ value = weechat.hdata_integer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) ----------------------------------------- +---- -weechat_hdata_long -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_long _WeeChat ≥ 0.3.6._ @@ -14066,9 +13771,9 @@ Return value of long variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- long weechat_hdata_long (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14084,23 +13789,22 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "longvar = %ld", weechat_hdata_long (hdata, pointer, "longvar")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_long(hdata, pointer, name) # example weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar")) ----------------------------------------- +---- -weechat_hdata_string -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_string _WeeChat ≥ 0.3.6._ @@ -14109,9 +13813,9 @@ Return value of string variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hdata_string (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14127,16 +13831,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "name = %s", weechat_hdata_string (hdata, buffer, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_string(hdata, pointer, name) @@ -14144,10 +13848,9 @@ value = weechat.hdata_string(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "name = %s" % weechat.hdata_string(hdata, buffer, "name")) ----------------------------------------- +---- -weechat_hdata_pointer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_pointer _WeeChat ≥ 0.3.6._ @@ -14156,9 +13859,9 @@ Return value of pointer variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- void *weechat_hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14174,16 +13877,16 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "lines = %lx", weechat_hdata_pointer (hdata, buffer, "lines")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_pointer(hdata, pointer, name) @@ -14191,10 +13894,9 @@ value = weechat.hdata_pointer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "lines = %lx" % weechat.hdata_pointer(hdata, buffer, "lines")) ----------------------------------------- +---- -weechat_hdata_time -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_time _WeeChat ≥ 0.3.6._ @@ -14203,9 +13905,9 @@ Return value of time variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- time_t weechat_hdata_time (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14221,7 +13923,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *ptr = weechat_buffer_search_main (); ptr = weechat_hdata_pointer (hdata, ptr, "lines"); @@ -14241,12 +13943,12 @@ if (ptr) } } } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_time(hdata, pointer, name) @@ -14260,10 +13962,9 @@ if ptr: if ptr: date = weechat.hdata_time(weechat.hdata_get("line_data"), ptr, "date") weechat.prnt("", "time of first line displayed = %s" % time.strftime("%F %T", time.localtime(int(date)))) ----------------------------------------- +---- -weechat_hdata_hashtable -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_hashtable _WeeChat ≥ 0.3.7._ @@ -14272,9 +13973,9 @@ Return value of hashtable variable in structure using hdata. Prototype: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Arguments: @@ -14290,18 +13991,18 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); struct t_hashtable *hashtable = weechat_hdata_hashtable (hdata, buffer, "local_variables"); weechat_printf (NULL, "%d local variables in core buffer", weechat_hashtable_get_integer (hashtable, "items_count")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hashtable = weechat.hdata_hashtable(hdata, pointer, name) @@ -14312,10 +14013,9 @@ hash = weechat.hdata_hashtable(hdata, buffer, "local_variables") weechat.prnt("", "local variables in core buffer:") for key in hash: weechat.prnt("", " %s == %s" % (key, hash[key])) ----------------------------------------- +---- -weechat_hdata_set -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_set _WeeChat ≥ 0.3.9._ @@ -14329,9 +14029,9 @@ This function can be called only in an update callback Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_set (struct t_hdata *hdata, void *pointer, const char *name, const char *value); ----------------------------------------- +---- Arguments: @@ -14348,15 +14048,14 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_hdata_set (hdata, pointer, "message", "test"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. -weechat_hdata_update -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_update _WeeChat ≥ 0.3.9._ @@ -14365,9 +14064,9 @@ Update data in a hdata. Prototype: [source,C] ----------------------------------------- +---- int weechat_hdata_update (struct t_hdata *hdata, void *pointer, struct t_hashtable *hashtable); ----------------------------------------- +---- Arguments: @@ -14391,7 +14090,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- /* subtract one hour on last message displayed in current buffer */ struct t_gui_lines *own_lines; @@ -14423,12 +14122,12 @@ if (own_lines) } } } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype count = weechat.hdata_update(hdata, pointer, hashtable) @@ -14440,10 +14139,9 @@ if own_lines: line_data = weechat.hdata_pointer(weechat.hdata_get('line'), line, 'data') hdata = weechat.hdata_get('line_data') weechat.hdata_update(hdata, line_data, { 'date': str(weechat.hdata_time(hdata, line_data, 'date') - 3600) }) ----------------------------------------- +---- -weechat_hdata_get_string -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_string _WeeChat ≥ 0.3.6._ @@ -14452,9 +14150,9 @@ Return string value of a hdata property. Prototype: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_string (struct t_hdata *hdata, const char *property); ----------------------------------------- +---- Arguments: @@ -14484,40 +14182,38 @@ Return value: C example: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "variables in hdata: %s", weechat_hdata_get_string (hdata, "var_keys")); weechat_printf (NULL, "lists in hdata: %s", weechat_hdata_get_string (hdata, "list_keys")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_get_string(hdata, property) # example weechat.prnt("", "variables in hdata: %s" % weechat.hdata_get_string(hdata, "var_keys")) weechat.prnt("", "lists in hdata: %s" % weechat.hdata_get_string(hdata, "list_keys")) ----------------------------------------- +---- [[upgrade]] -Upgrade -~~~~~~~ +=== Upgrade Functions for upgrading WeeChat (command "/upgrade"). -weechat_upgrade_new -^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_new Create or read a file for upgrade. Prototype: [source,C] ----------------------------------------- +---- struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write); ----------------------------------------- +---- Arguments: @@ -14534,34 +14230,33 @@ Return value: C example: [source,C] ----------------------------------------- +---- struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype upgrade_file = weechat.upgrade_new(filename, write) # example upgrade_file = weechat.upgrade_new("my_file", 1) ----------------------------------------- +---- -weechat_upgrade_write_object -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_write_object Write an object in upgrade file. Prototype: [source,C] ----------------------------------------- +---- int weechat_upgrade_write_object (struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist); ----------------------------------------- +---- Arguments: @@ -14576,7 +14271,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- if (weechat_upgrade_write_object (upgrade_file, 1, &infolist)) { /* ok */ @@ -14585,35 +14280,34 @@ else { /* error */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist) # example weechat.upgrade_write_object(upgrade_file, 1, infolist) ----------------------------------------- +---- -weechat_upgrade_read -^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_read Read an upgrade file. Prototype: [source,C] ----------------------------------------- +---- int weechat_upgrade_read (struct t_upgrade_file *upgrade_file, int (*callback_read)(void *data, struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist), void *callback_read_data); ----------------------------------------- +---- Arguments: @@ -14637,7 +14331,7 @@ Return value: C example: [source,C] ----------------------------------------- +---- int my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, int object_id, @@ -14648,12 +14342,12 @@ my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, } weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data) @@ -14663,19 +14357,18 @@ def my_upgrade_read_cb(upgrade_file, object_id, infolist): return weechat.WEECHAT_RC_OK weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", "")) ----------------------------------------- +---- -weechat_upgrade_close -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_close Close an upgrade file. Prototype: [source,C] ----------------------------------------- +---- void weechat_upgrade_close (struct t_upgrade_file *upgrade_file); ----------------------------------------- +---- Arguments: @@ -14684,17 +14377,17 @@ Arguments: C example: [source,C] ----------------------------------------- +---- weechat_upgrade_close (upgrade_file); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype weechat.upgrade_close(upgrade_file) # example weechat.upgrade_close(upgrade_file) ----------------------------------------- +---- diff --git a/doc/en/weechat_quickstart.en.txt b/doc/en/weechat_quickstart.en.txt index d556d3c8e..fb8a37ced 100644 --- a/doc/en/weechat_quickstart.en.txt +++ b/doc/en/weechat_quickstart.en.txt @@ -1,43 +1,40 @@ -WeeChat Quick Start Guide -========================= += WeeChat Quick Start Guide Sébastien Helleu <flashcode@flashtux.org> [[start]] -Start WeeChat -------------- +== Start WeeChat A recommended terminal emulator for X (but not mandatory) is rxvt-unicode (it has good UTF-8 support, and no problem with default keyboard bindings). Run from your shell: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Online help / options ---------------------- +== Online help / options WeeChat has help for all commands, just issue: ----------------------------------------- +---- /help ----------------------------------------- +---- To get help on a specific command, issue: ----------------------------------------- +---- /help command ----------------------------------------- +---- To set options, issue: ----------------------------------------- +---- /set config.section.option value ----------------------------------------- +---- (where `config` is configuration name (`weechat` for core, or a plugin name), `section` the section of this configuration and `option` the @@ -52,27 +49,27 @@ For example: * display all options (WeeChat and plugins): ----------------------------------------- +---- /set ----------------------------------------- +---- * display WeeChat options: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * display IRC plugin options: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- You can display help for an option with `/help`, for example: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- All settings are saved when WeeChat ends (or with `/save` command to force a write of the options). @@ -82,8 +79,7 @@ You can edit configuration files (*.conf) by hand and reload them by [[core_vs_plugins]] -Core vs plugins ---------------- +== Core vs plugins WeeChat "core" is only used to display data on screen and interact with the user, that means weechat core without plugins is useless @@ -96,25 +92,23 @@ other plugins in the list. [[create_irc_server]] -Create an IRC server --------------------- +== Create an IRC server You can add an IRC server with `/server` command, for example: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- As usual, help is available if you're lost: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Set custom IRC server options ------------------------------ +== Set custom IRC server options WeeChat uses default values for all servers ("fall backs"), if you don't specify a specific value for a server option. @@ -126,70 +120,69 @@ For each server option, WeeChat uses its value if it is defined (not For example there's default nicks (based on your un*x login), and you can override them for oftc server with following command: ----------------------------------------- +---- /set irc.server.oftc.nicks "mynick,mynick2,mynick3,mynick4,mynick5" ----------------------------------------- +---- To set username and realname: ----------------------------------------- +---- /set irc.server.oftc.username "My user name" /set irc.server.oftc.realname "My real name" ----------------------------------------- +---- To enable auto-connect to server at startup: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- If SASL is available on server, you can use it for authentication (you will be identified before you join channels): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mynick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- To run a command after connection to server, for example to authenticate with nickserv (only if you don't use SASL for authentication): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Many commands can be separated by ';' (semi-colon). To auto-join some channels when connecting to server: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#channel1,#channel2" ----------------------------------------- +---- To remove a value of a server option, and use the default value instead, for example to use default nicks (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Other options: you can setup other options with following command ("xxx" is option name): ----------------------------------------- +---- /set irc.server.oftc.xxx value ----------------------------------------- +---- [[connect_to_irc_server]] -Connect to IRC server and auto-join channels --------------------------------------------- +== Connect to IRC server and auto-join channels ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] This command can be used to create and connect to a new server without using @@ -202,37 +195,35 @@ between 'core' buffer and server buffers, you can use ctrl-X. It is possible to disable auto merge of server buffers to have independent server buffers: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Join/part IRC channels ----------------------- +== Join/part IRC channels Join a channel: ----------------------------------------- +---- /join #channel ----------------------------------------- +---- Part a channel (keeping buffer open): ----------------------------------------- +---- /part [quit message] ----------------------------------------- +---- Close server or channel buffer (`/close` is an alias for `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Buffer/window management ------------------------- +== Buffer/window management A buffer is a component linked to a plugin with a number, a category, and a name. A buffer contains the data displayed on the screen. @@ -243,24 +234,23 @@ with many buffers at same time. Commands to manage buffers and windows: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (I'll not repeat here that you can get help with /help on these commands) For example, to vertically split your screen into a small window (1/3 width), and a large window (2/3), use command: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Key bindings ------------- +== Key bindings WeeChat uses many keys by default. All these keys are in the documentation, but you should know at least some vital keys: @@ -279,26 +269,25 @@ A useful key is meta-k (alt-k) to find key codes. For example, to bind meta-y (alt-y) to command `/buffer close`: ----------------------------------------- +---- /key bind (press meta-k) (press meta-y) /buffer close ----------------------------------------- +---- You'll have a command line like: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- To remove key: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Plugins/scripts ---------------- +== Plugins/scripts On some distros like Debian, plugins are available via a separate package (like weechat-plugins). @@ -313,8 +302,7 @@ for more info). [[more_doc]] -More documentation ------------------- +== More documentation You can now use WeeChat and read FAQ/documentation for any other questions: http://weechat.org/doc diff --git a/doc/en/weechat_relay_protocol.en.txt b/doc/en/weechat_relay_protocol.en.txt index 31d2b38d9..24a27a4ca 100644 --- a/doc/en/weechat_relay_protocol.en.txt +++ b/doc/en/weechat_relay_protocol.en.txt @@ -1,5 +1,4 @@ -WeeChat Relay Protocol -====================== += WeeChat Relay Protocol Sébastien Helleu <flashcode@flashtux.org> @@ -8,12 +7,10 @@ to relay WeeChat data to clients, which are mostly remote interfaces. [[introduction]] -Introduction ------------- +== Introduction [[terminology]] -Terminology -~~~~~~~~~~~ +=== Terminology The following terms are used in this document: @@ -23,12 +20,11 @@ The following terms are used in this document: connection; in most cases, this 'client' is a remote interface [[network_diagram]] -Network diagram -~~~~~~~~~~~~~~~ +=== Network diagram The 'clients' are connected to 'relay' like shown in this diagram: -....................................... +.... ┌──────────┐ Workstation ┌────────┐ ┌───┤ client 1 │ (Linux, Windows, │ irc │◄──┐ ╔═══════════╤═══════╗ │ └──────────┘ BSD, Mac OS X ...) @@ -44,7 +40,7 @@ The 'clients' are connected to 'relay' like shown in this diagram: └────────────┘ └───────────────────┘╘══════╛└────────────────────────────────┘ network servers ncurses interface relay remote interfaces protocol -........................................ +.... [NOTE] All clients here are clients using 'weechat' protocol in 'relay' plugin. The @@ -52,8 +48,7 @@ All clients here are clients using 'weechat' protocol in 'relay' plugin. The 'irc proxy' (not described in this document). [[protocol_generalities]] -Protocol generalities ---------------------- +== Protocol generalities * Connections from 'client' to 'relay' are made using TCP sockets on IP/port used by 'relay' plugin to listen to new connections @@ -66,8 +61,7 @@ Protocol generalities binary data. [[commands]] -Commands (client → relay) -------------------------- +== Commands (client → relay) Commands have format: "(id) command arguments\n". @@ -83,7 +77,7 @@ Fields are: List of available commands (detail in next chapters): [width="80%",cols="^3m,14",options="header"] -|===================================================== +|=== | Command | Description | init | Initialize connection with 'relay' | hdata | Request hdata @@ -94,11 +88,10 @@ List of available commands (detail in next chapters): | sync | Synchronize buffer(s) (get updates for buffer(s)) | desync | Desynchronize buffer(s) (stop updates for buffer(s)) | quit | Disconnect from 'relay' -|===================================================== +|=== [[command_init]] -init -~~~~ +=== init Initialize connection with 'relay'. This must be first command sent to 'relay'. If not sent, 'relay' will close connection on first command received, without @@ -106,9 +99,9 @@ warning. Syntax: ----------------------------------------- +---- init [<option>=<value>,[<option>=<value>,...]] ----------------------------------------- +---- Arguments: @@ -124,25 +117,24 @@ Compression 'zlib' is enabled by default if 'relay' supports zlib compression. Examples: ----------------------------------------- +---- # initialize and use zlib compression by default (if WeeChat supports it) init password=mypass # initialize and disable compression init password=mypass,compression=off ----------------------------------------- +---- [[command_hdata]] -hdata -~~~~~ +=== hdata Request hdata. Syntax: ----------------------------------------- +---- (id) hdata <path> [<keys>] ----------------------------------------- +---- Arguments: @@ -166,7 +158,7 @@ values are: Examples: ----------------------------------------- +---- # request all buffers, hdata of type "buffer" is returned # keys number and name are returned for each buffer hdata buffer:gui_buffers(*) number,name @@ -177,19 +169,18 @@ hdata buffer:gui_buffers(*)/lines/first_line(*)/data # request full_name of first buffer hdata buffer:gui_buffers full_name ----------------------------------------- +---- [[command_info]] -info -~~~~ +=== info Request info. Syntax: ----------------------------------------- +---- (id) info <name> ----------------------------------------- +---- Arguments: @@ -197,13 +188,12 @@ Arguments: Example: ----------------------------------------- +---- info version ----------------------------------------- +---- [[command_infolist]] -infolist -~~~~~~~~ +=== infolist Request infolist. @@ -214,9 +204,9 @@ faster, uses less memory and returns smaller objects in message). Syntax: ----------------------------------------- +---- (id) infolist <name> <arguments> ----------------------------------------- +---- Arguments: @@ -225,21 +215,20 @@ Arguments: Example: ----------------------------------------- +---- infolist buffer ----------------------------------------- +---- [[command_nicklist]] -nicklist -~~~~~~~~ +=== nicklist Request nicklist, for one or all buffers. Syntax: ----------------------------------------- +---- (id) nicklist [<buffer>] ----------------------------------------- +---- Arguments: @@ -248,25 +237,24 @@ Arguments: Examples: ----------------------------------------- +---- # request nicklist for all buffers nicklist # request nicklist for irc.freenode.#weechat nicklist irc.freenode.#weechat ----------------------------------------- +---- [[command_input]] -input -~~~~~ +=== input Send data to a buffer. Syntax: ----------------------------------------- +---- input <buffer> <data> ----------------------------------------- +---- Arguments: @@ -277,14 +265,13 @@ Arguments: Examples: ----------------------------------------- +---- input core.weechat /help filter input irc.freenode.#weechat hello guys! ----------------------------------------- +---- [[command_sync]] -sync -~~~~ +=== sync _Updated in version 0.4.1._ @@ -297,9 +284,9 @@ line). Syntax: ----------------------------------------- +---- sync [<buffer>[,<buffer>...] <option>[,<option>...]] ----------------------------------------- +---- Arguments: @@ -321,7 +308,7 @@ Arguments: Examples: ----------------------------------------- +---- # synchronize all buffers with nicklist # (the 3 commands are equivalent, but the first one is recommended # for compatibility with future versions) @@ -338,11 +325,10 @@ sync irc.freenode.#weechat buffer # get general signals + all signals for #weechat channel sync * buffers,upgrade sync irc.freenode.#weechat ----------------------------------------- +---- [[command_desync]] -desync -~~~~~~ +=== desync _Updated in version 0.4.1._ @@ -354,9 +340,9 @@ buffers, the client will still receive updates for buffers. Syntax: ----------------------------------------- +---- desync [<buffer>[,<buffer>...] <option>[,<option>...]] ----------------------------------------- +---- Arguments: @@ -375,7 +361,7 @@ it explicitly to stop updates). Examples: ----------------------------------------- +---- # desynchronize all buffers # (the 3 commands are equivalent, but the first one is recommended # for compatibility with future versions) @@ -388,11 +374,10 @@ desync irc.freenode.#weechat nicklist # desynchronize #weechat channel desync irc.freenode.#weechat ----------------------------------------- +---- [[command_test]] -test -~~~~ +=== test Test command: WeeChat will reply with various different objects. @@ -405,20 +390,20 @@ WeeChat. Syntax: ----------------------------------------- +---- test ----------------------------------------- +---- Example: ----------------------------------------- +---- test ----------------------------------------- +---- Returned objects (in this order): [width="80%",cols="^3,3m,5m",options="header"] -|===================================================== +|=== | Type | Type (in message) | Value | char | chr | 65 ("A") | integer | int | 123456 @@ -435,11 +420,10 @@ Returned objects (in this order): | time | tim | 1321993456 | array of strings | arr str | { "abc", "de" } | array of integers | arr int | { 123, 456, 789 } -|===================================================== +|=== [[command_ping]] -ping -~~~~ +=== ping _Added in version 0.4.2._ @@ -450,41 +434,39 @@ measure the network lag. Syntax: ----------------------------------------- +---- ping [<arguments>] ----------------------------------------- +---- Example: ----------------------------------------- +---- ping 1370802127000 ----------------------------------------- +---- [[command_quit]] -quit -~~~~ +=== quit Disconnect from 'relay'. Syntax: ----------------------------------------- +---- quit ----------------------------------------- +---- Example: ----------------------------------------- +---- quit ----------------------------------------- +---- [[messages]] -Messages (relay → client) -------------------------- +== Messages (relay → client) Messages are sent as binary data, using following format (with size in bytes): -....................................... +.... ┌────────╥─────────────╥────╥────────┬──────────╥───────╥────────┬──────────┐ │ length ║ compression ║ id ║ type 1 │ object 1 ║ ... ║ type N │ object N │ └────────╨─────────────╨────╨────────┴──────────╨───────╨────────┴──────────┘ @@ -494,7 +476,7 @@ Messages are sent as binary data, using following format (with size in bytes): header (5) compressed data (??) └─────────────────────────────────────────────────────────────────────────┘ 'length' bytes -....................................... +.... * 'length' (unsigned integer): number of bytes of whole message (including this length) @@ -508,15 +490,13 @@ Messages are sent as binary data, using following format (with size in bytes): * 'object': an object (see table below) [[message_compression]] -Compression -~~~~~~~~~~~ +=== Compression If flag 'compression' is equal to 0x01, then *all* data after is compressed with zlib, and therefore must be uncompressed before being processed. [[message_identifier]] -Identifier -~~~~~~~~~~ +=== Identifier There are two different identifiers ('id'): @@ -527,7 +507,7 @@ There are two different identifiers ('id'): WeeChat reserved identifiers: [width="100%",cols="5,5,3,4,7",options="header"] -|===================================================== +|=== | Identifier | Description | Received with sync | Data sent | Recommended action in client | _buffer_opened | Buffer opened | buffers / buffer | hdata: buffer | Open buffer | _buffer_moved | Buffer moved | buffers / buffer | hdata: buffer | Move buffer @@ -546,18 +526,17 @@ WeeChat reserved identifiers: | _pong | Answer to a "ping" | (always) | string: ping arguments | Measure network lag | _upgrade | WeeChat is upgrading | upgrade | (empty) | Desync from WeeChat (or disconnect) | _upgrade_ended | Upgrade of WeeChat done | upgrade | (empty) | Sync/resync with WeeChat -|===================================================== +|=== [[message_buffer_opened]] -_buffer_opened -^^^^^^^^^^^^^^ +==== _buffer_opened It is sent to the client when the signal "buffer_opened" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') @@ -567,13 +546,13 @@ Data sent as hdata: | local_variables | hashtable | Local variables | prev_buffer | pointer | Pointer to previous buffer | next_buffer | pointer | Pointer to next buffer -|===================================================== +|=== Example: join of channel '#weechat' on freenode, new buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id: '_buffer_opened' hda: keys: {'number': 'int', 'full_name': 'str', 'short_name': 'str', 'nicklist': 'int', @@ -589,29 +568,28 @@ hda: local_variables: {'plugin': 'irc', 'name': 'freenode.#weechat'} prev_buffer: '0x34e7400' next_buffer: '0x0' ----------------------------------------- +---- [[message_buffer_moved]] -_buffer_moved -^^^^^^^^^^^^^ +==== _buffer_moved It is sent to the client when the signal "buffer_moved" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | prev_buffer | pointer | Pointer to previous buffer | next_buffer | pointer | Pointer to next buffer -|===================================================== +|=== Example: buffer 'irc.freenode.#weechat' moved to number 2: [source,python] ----------------------------------------- +---- id: '_buffer_moved' hda: keys: {'number': 'int', 'full_name': 'str', 'prev_buffer': 'ptr', 'next_buffer': 'ptr'} @@ -622,29 +600,28 @@ hda: full_name: 'irc.freenode.#weechat' prev_buffer: '0x347b9f0' next_buffer: '0x3471bc0' ----------------------------------------- +---- [[message_buffer_merged]] -_buffer_merged -^^^^^^^^^^^^^^ +==== _buffer_merged It is sent to the client when the signal "buffer_merged" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | prev_buffer | pointer | Pointer to previous buffer | next_buffer | pointer | Pointer to next buffer -|===================================================== +|=== Example: buffer 'irc.freenode.#weechat' merged with buffer #2: [source,python] ----------------------------------------- +---- id: '_buffer_merged' hda: keys: {'number': 'int', 'full_name': 'str', 'prev_buffer': 'ptr', 'next_buffer': 'ptr'} @@ -655,29 +632,28 @@ hda: full_name: 'irc.freenode.#weechat' prev_buffer: '0x4cef9b0' next_buffer: '0x0' ----------------------------------------- +---- [[message_buffer_unmerged]] -_buffer_unmerged -^^^^^^^^^^^^^^^^ +==== _buffer_unmerged It is sent to the client when the signal "buffer_unmerged" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | prev_buffer | pointer | Pointer to previous buffer | next_buffer | pointer | Pointer to next buffer -|===================================================== +|=== Example: buffer 'irc.freenode.#weechat' unmerged: [source,python] ----------------------------------------- +---- id: '_buffer_unmerged' hda: keys: {'number': 'int', 'full_name': 'str', 'prev_buffer': 'ptr', 'next_buffer': 'ptr'} @@ -688,29 +664,28 @@ hda: full_name: 'irc.freenode.#weechat' prev_buffer: '0x4cef9b0' next_buffer: '0x0' ----------------------------------------- +---- [[message_buffer_renamed]] -_buffer_renamed -^^^^^^^^^^^^^^^ +==== _buffer_renamed It is sent to the client when the signal "buffer_renamed" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | short_name | string | Short name (example: '#weechat') | local_variables | hashtable | Local variables -|===================================================== +|=== Example: private buffer renamed from 'FlashCode' to 'Flash2': [source,python] ----------------------------------------- +---- id: '_buffer_renamed' hda: keys: {'number': 'int', 'full_name': 'str', 'short_name': 'str', 'local_variables': 'htb'} @@ -722,11 +697,10 @@ hda: short_name: 'Flash2' local_variables: {'server': 'freenode', 'plugin': 'irc', 'type': 'private', 'channel': 'FlashCode', 'nick': 'test', 'name': 'local.Flash2'} ----------------------------------------- +---- [[message_buffer_title_changed]] -_buffer_title_changed -^^^^^^^^^^^^^^^^^^^^^ +==== _buffer_title_changed It is sent to the client when the signal "buffer_title_changed" is sent by WeeChat. @@ -734,17 +708,17 @@ WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | title | string | Buffer title -|===================================================== +|=== Example: topic changed on channel '#weechat': [source,python] ----------------------------------------- +---- id: '_buffer_title_changed' hda: keys: {'number': 'int', 'full_name': 'str', 'title': 'str'} @@ -754,29 +728,28 @@ hda: number: 3 full_name: 'irc.freenode.#weechat' title: 'Welcome on #weechat! http://weechat.org/' ----------------------------------------- +---- [[message_buffer_type_changed]] -_buffer_type_changed -^^^^^^^^^^^^^^^^^^^^ +==== _buffer_type_changed It is sent to the client when the signal "buffer_type_changed" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | type | integer | Buffer type: 0 = formatted (default), 1 = free content -|===================================================== +|=== Example: type of buffer 'script.scripts' changed from 'formatted' (0) to free content (1): [source,python] ----------------------------------------- +---- id: '_buffer_type_changed' hda: keys: {'number': 'int', 'full_name': 'str', 'type': 'int'} @@ -786,11 +759,10 @@ hda: number: 4 full_name: 'script.scripts' type: 1 ----------------------------------------- +---- [[message_buffer_localvar_added]] -_buffer_localvar_added -^^^^^^^^^^^^^^^^^^^^^^ +==== _buffer_localvar_added It is sent to the client when the signal "buffer_localvar_added" is sent by WeeChat. @@ -798,17 +770,17 @@ WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | local_variables | hashtable | Local variables -|===================================================== +|=== Example: local variable 'test' added in buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id='_buffer_localvar_added', objects: hda: keys: {'number': 'int', 'full_name': 'str', 'local_variables': 'htb'} @@ -820,11 +792,10 @@ hda: local_variables: {'server': 'freenode', 'test': 'value', 'plugin': 'irc', 'type': 'channel', 'channel': '#weechat', 'nick': 'test', 'name': 'freenode.#weechat'} ----------------------------------------- +---- [[message_buffer_localvar_changed]] -_buffer_localvar_changed -^^^^^^^^^^^^^^^^^^^^^^^^ +==== _buffer_localvar_changed It is sent to the client when the signal "buffer_localvar_changed" is sent by WeeChat. @@ -832,17 +803,17 @@ WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | local_variables | hashtable | Local variables -|===================================================== +|=== Example: local variable 'test' updated in buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id='_buffer_localvar_changed', objects: hda: keys: {'number': 'int', 'full_name': 'str', 'local_variables': 'htb'} @@ -854,11 +825,10 @@ hda: local_variables: {'server': 'local', 'test': 'value2', 'plugin': 'irc', 'type': 'channel', 'channel': '#weechat', 'nick': 'test', 'name': 'freenode.#weechat'} ----------------------------------------- +---- [[message_buffer_localvar_removed]] -_buffer_localvar_removed -^^^^^^^^^^^^^^^^^^^^^^^^ +==== _buffer_localvar_removed It is sent to the client when the signal "buffer_localvar_removed" is sent by WeeChat. @@ -866,17 +836,17 @@ WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') | local_variables | hashtable | Local variables -|===================================================== +|=== Example: local variable 'test' removed from buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id: '_buffer_localvar_removed' hda: keys: {'number': 'int', 'full_name': 'str', 'local_variables': 'htb'} @@ -887,18 +857,17 @@ hda: full_name: 'irc.freenode.#prout' local_variables: {'server': 'local', 'plugin': 'irc', 'type': 'channel', 'channel': '#weechat', 'nick': 'test', 'name': 'freenode.#weechat'} ----------------------------------------- +---- [[message_buffer_line_added]] -_buffer_line_added -^^^^^^^^^^^^^^^^^^ +==== _buffer_line_added It is sent to the client when the signal "buffer_line_added" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | buffer | pointer | Buffer pointer | date | time | Date of message @@ -908,12 +877,12 @@ Data sent as hdata: | tags_array | array of strings | List of tags for line | prefix | string | Prefix | message | string | Message -|===================================================== +|=== Example: new message 'hello!' from nick 'FlashCode' in buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id: '_buffer_line_added' hda: keys: {'buffer': 'ptr', 'date': 'tim', 'date_printed': 'tim', 'displayed': 'chr', @@ -929,27 +898,26 @@ hda: tags_array: ['irc_privmsg', 'notify_message', 'prefix_nick_142', 'nick_FlashCode', 'log1'] prefix: 'F06@F@00142FlashCode' message: 'hello!' ----------------------------------------- +---- [[message_buffer_closing]] -_buffer_closing -^^^^^^^^^^^^^^^ +==== _buffer_closing It is sent to the client when the signal "buffer_closing" is sent by WeeChat. Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | number | integer | Buffer number (≥ 1) | full_name | string | Full name (example: 'irc.freenode.#weechat') -|===================================================== +|=== Example: buffer 'irc.freenode.#weechat' is being closed by WeeChat: [source,python] ----------------------------------------- +---- id: '_buffer_closing' hda: keys: {'number': 'int', 'full_name': 'str'} @@ -958,11 +926,10 @@ hda: __path: ['0x4a715d0'] number: 3 full_name: 'irc.freenode.#weechat' ----------------------------------------- +---- [[message_nicklist]] -_nicklist -^^^^^^^^^ +==== _nicklist It is sent to the client when large updates are made on a nicklist (groups/nicks added/removed/changed). The message contains full nicklist. @@ -973,7 +940,7 @@ another message with identifier '_nicklist_diff' is sent (see below). Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | group | char | 1 for a group, 0 for a nick | visible | char | 1 if group/nick is displayed, otherwise 0 @@ -982,12 +949,12 @@ Data sent as hdata: | color | string | Name color | prefix | string | Prefix (only for a nick) | prefix_color | string | Prefix color (only for a nick) -|===================================================== +|=== Example: nicklist for buffer 'irc.freenode.#weechat': [source,python] ----------------------------------------- +---- id: '_nicklist' hda: keys: {'group': 'chr', 'visible': 'chr', 'level': 'int', 'name': 'str', 'color': 'str', @@ -1047,11 +1014,10 @@ hda: color: 'weechat.color.chat_nick_self' prefix: ' ' prefix_color: '' ----------------------------------------- +---- [[message_nicklist_diff]] -_nicklist_diff -^^^^^^^^^^^^^^ +==== _nicklist_diff _New in version 0.4.1._ @@ -1062,7 +1028,7 @@ nicklist and current one). Data sent as hdata: [width="100%",cols="3m,2,10",options="header"] -|===================================================== +|=== | Name | Type | Description | _diff | char | Type of diff (see below) | group | char | 1 for a group, 0 for a nick @@ -1072,7 +1038,7 @@ Data sent as hdata: | color | string | Name color | prefix | string | Prefix (only for a nick) | prefix_color | string | Prefix color (only for a nick) -|===================================================== +|=== The value of '_diff' can be: @@ -1087,7 +1053,7 @@ nicks 'nick1' and 'nick2' added in group '999|...' (standard users on an IRC channel): [source,python] ----------------------------------------- +---- id: '_nicklist_diff' hda: keys: {'_diff': 'chr', 'group': 'chr', 'visible': 'chr', 'level': 'int', 'name': 'str', @@ -1143,11 +1109,10 @@ hda: color: 'lightblue' prefix: ' ' prefix_color: '' ----------------------------------------- +---- [[message_pong]] -_pong -^^^^^ +==== _pong _New in version 0.4.2._ @@ -1159,8 +1124,7 @@ The recommended action in client is to measure network lag and disconnect if network lag is high. [[message_upgrade]] -_upgrade -^^^^^^^^ +==== _upgrade _New in version 0.3.8._ @@ -1177,8 +1141,7 @@ During WeeChat upgrade, the socket remains opened (except if connection was made with SSL). [[message_upgrade_ended]] -_upgrade_ended -^^^^^^^^^^^^^^ +==== _upgrade_ended _New in version 0.3.8._ @@ -1190,14 +1153,13 @@ The recommended action in client is to resynchronize with WeeChat: resend all commands sent on startup after the 'init'. [[objects]] -Objects -~~~~~~~ +=== Objects Objects are identified by 3 letters, called 'type'. Following types are available: [width="100%",cols="^2m,5,10",options="header"] -|===================================================== +|=== | Type | Value | Length | chr | Signed char | 1 byte | int | Signed integer | 4 bytes @@ -1211,25 +1173,23 @@ available: | inf | Info: name + content | Variable | inl | Infolist content | Variable | arr | Array of values | 3 bytes (type) + number of items + data -|===================================================== +|=== [[object_char]] -Char -^^^^ +==== Char A signed char is 1 byte. Example: -....................................... +.... ┌────┐ │ 41 │ ────► 65 (0x41: "A") └────┘ -....................................... +.... [[object_integer]] -Integer -^^^^^^^ +==== Integer A signed integer is 4 bytes, encoded as big-endian format (most significant byte first). @@ -1238,7 +1198,7 @@ Range: -2147483648 to 2147483647. Examples: -....................................... +.... ┌────┬────┬────┬────┐ │ 00 │ 01 │ E2 │ 40 │ ────► 123456 └────┴────┴────┴────┘ @@ -1246,11 +1206,10 @@ Examples: ┌────┬────┬────┬────┐ │ FF │ FE │ 1D │ C0 │ ────► -123456 └────┴────┴────┴────┘ -....................................... +.... [[object_long_integer]] -Long integer -^^^^^^^^^^^^ +==== Long integer A signed long integer is encoded as a string, with length on one byte. @@ -1258,7 +1217,7 @@ Range: -9223372036854775808 to 9223372036854775807. Examples: -....................................... +.... ┌────╥────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ │ 0A ║ 31 │ 32 │ 33 │ 34 │ 35 │ 36 │ 37 │ 38 │ 39 │ 30 │ ────► 1234567890 └────╨────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘ @@ -1270,132 +1229,126 @@ length '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' └────╨────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘ └──┘ └────────────────────────────────────────────────────┘ length '-' '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' -....................................... +.... [[object_string]] -String -^^^^^^ +==== String A string is a length (integer on 4 bytes) + content of string (without final '\0'). Example: -....................................... +.... ┌────┬────┬────┬────╥────┬────┬────┬────┬────┐ │ 00 │ 00 │ 00 │ 05 ║ 68 │ 65 │ 6C │ 6C │ 6F │ ────► "hello" └────┴────┴────┴────╨────┴────┴────┴────┴────┘ └─────────────────┘ └──────────────────────┘ length 'h' 'e' 'l' 'l' 'o' -....................................... +.... An empty string has a length of zero: -....................................... +.... ┌────┬────┬────┬────┐ │ 00 │ 00 │ 00 │ 00 │ ────► "" └────┴────┴────┴────┘ └─────────────────┘ length -....................................... +.... A 'NULL' string (NULL pointer in C) has a length of -1: -....................................... +.... ┌────┬────┬────┬────┐ │ FF │ FF │ FF │ FF │ ────► NULL └────┴────┴────┴────┘ └─────────────────┘ length -....................................... +.... [[object_buffer]] -Buffer -^^^^^^ +==== Buffer Same format as <<object_string,string>>; content is just an array of bytes. [[object_pointer]] -Pointer -^^^^^^^ +==== Pointer A pointer is encoded as string (hex), with length on one byte. Example: -....................................... +.... ┌────╥────┬────┬────┬────┬────┬────┬────┬────┬────┐ │ 09 ║ 31 │ 61 │ 32 │ 62 │ 33 │ 63 │ 34 │ 64 │ 35 │ ────► 0x1a2b3c4d5 └────╨────┴────┴────┴────┴────┴────┴────┴────┴────┘ └──┘ └──────────────────────────────────────────┘ length '1' 'a' '2' 'b' '3' 'c' '4' 'd' '5' -....................................... +.... A 'NULL' pointer has a length of 1 with value 0: -....................................... +.... ┌────╥────┐ │ 01 ║ 00 │ ────► NULL (0x0) └────╨────┘ └──┘ └──┘ length 0 -....................................... +.... [[object_time]] -Time -^^^^ +==== Time A time (number of seconds) is encoded as a string, with length on one byte. Example: -....................................... +.... ┌────╥────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐ │ 0A ║ 31 │ 33 │ 32 │ 31 │ 39 │ 39 │ 33 │ 34 │ 35 │ 36 │ ────► 1321993456 └────╨────┴────┴────┴────┴────┴────┴────┴────┴────┴────┘ └──┘ └───────────────────────────────────────────────┘ length '1' '3' '2' '1' '9' '9' '3' '4' '5' '6' -....................................... +.... [[object_hashtable]] -Hashtable -^^^^^^^^^ +==== Hashtable A hashtable contains type for keys, type for values, number of items in hashtable (integer on 4 bytes), and then keys and values of items. -....................................... +.... ┌───────────┬─────────────┬───────╥───────┬─────────╥─────╥───────┬─────────┐ │ type_keys │ type_values │ count ║ key 1 │ value 1 ║ ... ║ key N │ value N │ └───────────┴─────────────┴───────╨───────┴─────────╨─────╨───────┴─────────┘ -....................................... +.... Example: -....................................... +.... ┌─────┬─────┬───╥──────┬─────╥──────┬─────┐ │ str │ str │ 2 ║ key1 │ abc ║ key2 │ def │ ────► { 'key1' => 'abc', └─────┴─────┴───╨──────┴─────╨──────┴─────┘ 'key2' => 'def' } └───┘ └───┘ └─┘ └──────────┘ └──────────┘ type type count item 1 item 2 keys values -....................................... +.... [[object_hdata]] -Hdata -^^^^^ +==== Hdata A 'hdata' contains a path with hdata names, list of keys, number of set of objects, and then set of objects (path with pointers, then objects). -....................................... +.... ┌────────┬──────┬───────╥────────┬─────────────────────╥── │ h-path │ keys │ count ║ p-path │ value 1 ... value N ║ ... └────────┴──────┴───────╨────────┴─────────────────────╨── - ──╥────────┬─────────────────────╥─────┐ -... ║ p-path │ value 1 ... value N ║ ... │ - ──╨────────┴─────────────────────╨─────┘ -....................................... + ──╥────────┬─────────────────────╥─────┐ + ... ║ p-path │ value 1 ... value N ║ ... │ + ──╨────────┴─────────────────────╨─────┘ +.... * 'h-path' (string): path used to reach hdata (example: 'buffer/lines/line/line_data'); the last element in path is the hdata returned @@ -1410,7 +1363,7 @@ objects, and then set of objects (path with pointers, then objects). Example of hdata with 2 buffers (weechat core and freenode server) and two keys ('number' and 'full_name'): -....................................... +.... # command hdata buffer:gui_buffers(*) number,full_name @@ -1421,16 +1374,16 @@ hdata buffer:gui_buffers(*) number,full_name └──────┘ └────────────────────────┘ └─┘ h-path keys count - ──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐ -... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │ - ──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘ - └──────────────────────────┘ └────────────────────────────────┘ - buffer 1 buffer 2 -....................................... + ──╥─────────┬───┬──────────────╥─────────┬───┬────────────────────┐ + ... ║ 0x12345 │ 1 │ core.weechat ║ 0x6789a │ 2 │irc.server.freenode │ + ──╨─────────┴───┴──────────────╨─────────┴───┴────────────────────┘ + └──────────────────────────┘ └────────────────────────────────┘ + buffer 1 buffer 2 +.... Example of hdata with lines of core buffer: -....................................... +.... # command hdata buffer:gui_buffers(*)/lines/first_line(*)/data @@ -1441,26 +1394,26 @@ hdata buffer:gui_buffers(*)/lines/first_line(*)/data └───────────────────────────┘ └───┘ └──┘ h-path (hdata names) keys count - ──╥───────────┬───────────┬───────────┬───────╥── -... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ ..... ║ ... - ──╨───────────┴───────────┴───────────┴───────╨── - └─────────────────────────────────┘ └─────┘ - p-path (pointers) objects - └─────────────────────────────────────────┘ - line 1 - - ──╥───────────┬───────────┬───────────┬───────╥──────────────┐ -... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d6110 │ ..... ║ ............ │ - ──╨───────────┴───────────┴───────────┴───────╨──────────────┘ - └─────────────────────────────────┘ └─────┘ - p-path (pointers) objects - └─────────────────────────────────────────┘ └────────────┘ - line 2 lines 3-50 -....................................... + ──╥───────────┬───────────┬───────────┬───────╥── + ... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d5f40 │ ..... ║ ... + ──╨───────────┴───────────┴───────────┴───────╨── + └─────────────────────────────────┘ └─────┘ + p-path (pointers) objects + └─────────────────────────────────────────┘ + line 1 + + ──╥───────────┬───────────┬───────────┬───────╥──────────────┐ + ... ║ 0x23cf970 │ 0x23cfb60 │ 0x23d6110 │ ..... ║ ............ │ + ──╨───────────┴───────────┴───────────┴───────╨──────────────┘ + └─────────────────────────────────┘ └─────┘ + p-path (pointers) objects + └─────────────────────────────────────────┘ └────────────┘ + line 2 lines 3-50 +.... Example of hdata with nicklist: -....................................... +.... # command nicklist @@ -1471,80 +1424,78 @@ nicklist └─────────────────┘ h-path - ──╥───────────────────────────────────────────────────────────┬────╥── -... ║ group:chr,visible:chr,name:str,color:str,prefix:str,(...) │ 12 ║ ... - ──╨───────────────────────────────────────────────────────────┴────╨── - └─────────────────────────────────────────────────────────┘ └──┘ - keys count - - ──╥─────────┬─────────┬───┬───┬──────┬─┬─┬─┬───╥── -... ║ 0x12345 │ 0x6789a │ 1 │ 0 │ root │ │ │ │ 0 ║ ... - ──╨─────────┴─────────┴───┴───┴──────┴─┴─┴─┴───╨── - └─────────────────┘ └──────────────────────┘ - p-path objects - └──────────────────────────────────────────┘ - group (nicklist root) - - ──╥─────────┬─────────┬───┬───┬───────┬─┬─┬─┬───╥── -... ║ 0x123cf │ 0x678d4 │ 1 │ 0 │ 000|o │ │ │ │ 1 ║ ... - ──╨─────────┴─────────┴───┴───┴───────┴─┴─┴─┴───╨── - └─────────────────┘ └───────────────────────┘ - p-path objects - └───────────────────────────────────────────┘ - group (channel ops) - - ──╥─────────┬─────────┬───┬───┬──────────┬──────┬───┬────────────┬───╥── -... ║ 0x128a7 │ 0x67ab2 │ 0 │ 1 │ ChanServ │ blue │ @ │ lightgreen │ 0 ║ ... - ──╨─────────┴─────────┴───┴───┴──────────┴──────┴───┴────────────┴───╨── - └─────────────────┘ └────────────────────────────────────────────┘ - p-path objects - └────────────────────────────────────────────────────────────────┘ - nick (@ChanServ) -....................................... + ──╥───────────────────────────────────────────────────────────┬────╥── + ... ║ group:chr,visible:chr,name:str,color:str,prefix:str,(...) │ 12 ║ ... + ──╨───────────────────────────────────────────────────────────┴────╨── + └─────────────────────────────────────────────────────────┘ └──┘ + keys count + + ──╥─────────┬─────────┬───┬───┬──────┬─┬─┬─┬───╥── + ... ║ 0x12345 │ 0x6789a │ 1 │ 0 │ root │ │ │ │ 0 ║ ... + ──╨─────────┴─────────┴───┴───┴──────┴─┴─┴─┴───╨── + └─────────────────┘ └──────────────────────┘ + p-path objects + └──────────────────────────────────────────┘ + group (nicklist root) + + ──╥─────────┬─────────┬───┬───┬───────┬─┬─┬─┬───╥── + ... ║ 0x123cf │ 0x678d4 │ 1 │ 0 │ 000|o │ │ │ │ 1 ║ ... + ──╨─────────┴─────────┴───┴───┴───────┴─┴─┴─┴───╨── + └─────────────────┘ └───────────────────────┘ + p-path objects + └───────────────────────────────────────────┘ + group (channel ops) + + ──╥─────────┬─────────┬───┬───┬──────────┬──────┬───┬────────────┬───╥── + ... ║ 0x128a7 │ 0x67ab2 │ 0 │ 1 │ ChanServ │ blue │ @ │ lightgreen │ 0 ║ ... + ──╨─────────┴─────────┴───┴───┴──────────┴──────┴───┴────────────┴───╨── + └─────────────────┘ └────────────────────────────────────────────┘ + p-path objects + └────────────────────────────────────────────────────────────────┘ + nick (@ChanServ) +.... [[object_info]] -Info -^^^^ +==== Info A 'info' contains a name and a value (both are strings). -....................................... +.... ┌──────┬───────┐ │ name │ value │ └──────┴───────┘ -....................................... +.... * 'name' (string): name of info * 'value' (string): value Example of info 'version': -....................................... +.... ┌─────────┬───────────────────┐ │ version │ WeeChat 0.3.7-dev │ └─────────┴───────────────────┘ -....................................... +.... [[object_infolist]] -Infolist -^^^^^^^^ +==== Infolist A 'infolist' contains a name, number of items, and then items (set of variables). -....................................... +.... ┌──────┬───────╥────────╥─────╥────────┐ │ name │ count ║ item 1 ║ ... ║ item N │ └──────┴───────╨────────╨─────╨────────┘ -....................................... +.... An item is: -....................................... +.... ┌───────╥────────┬────────┬─────────╥─────╥────────┬────────┬─────────┐ │ count ║ name 1 │ type 1 │ value 1 ║ ... ║ name N │ type N │ value N │ └───────╨────────┴────────┴─────────╨─────╨────────┴────────┴─────────┘ -....................................... +.... * 'name' (string): name of infolist ('buffer', 'window', 'bar', ...) * 'count' (integer): number of items @@ -1556,7 +1507,7 @@ An item is: Example of infolist with 2 buffers (weechat core and freenode server): -....................................... +.... # command infolist buffer @@ -1567,66 +1518,64 @@ infolist buffer └──────┘ └─┘ └──────────────────────────────────┘ name count item 1 - ──╥────┬─────────┬─────┬─────────┬─────┐ -... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │ - ──╨────┴─────────┴─────┴─────────┴─────┘ - └──────────────────────────────────┘ - item 2 -....................................... + ──╥────┬─────────┬─────┬─────────┬─────┐ + ... ║ 42 │ pointer │ ptr │ 0x6789a │ ... │ + ──╨────┴─────────┴─────┴─────────┴─────┘ + └──────────────────────────────────┘ + item 2 +.... [[object_array]] -Array -^^^^^ +==== Array An array is a type (3 bytes) + number of items (integer on 4 bytes) + data. Example of array with 2 strings: -....................................... +.... ┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥── │ str ║ 00 │ 00 │ 00 │ 02 ║ 00 │ 00 │ 00 │ 03 ║ ... └─────╨────┴────┴────┴────╨────┴────┴────┴────╨── └───┘ └─────────────────┘ └─────────────────┘ type number of strings length - ──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐ -... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► { "abc", "de" } - ──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘ - └────────────┘ └─────────────────┘ └───────┘ - 'a' 'b' 'c' length 'd' 'e' -....................................... + ──╥────┬────┬────╥────┬────┬────┬────╥────┬────┐ + ... ║ 61 │ 62 │ 63 ║ 00 │ 00 │ 00 │ 02 ║ 64 │ 65 │ ────► { "abc", "de" } + ──╨────┴────┴────╨────┴────┴────┴────╨────┴────┘ + └────────────┘ └─────────────────┘ └───────┘ + 'a' 'b' 'c' length 'd' 'e' +.... Example of array with 3 integers: -....................................... +.... ┌─────╥────┬────┬────┬────╥────┬────┬────┬────╥── │ int ║ 00 │ 00 │ 00 │ 03 ║ 00 │ 00 │ 00 │ 7B ║ ... └─────╨────┴────┴────┴────╨────┴────┴────┴────╨── └───┘ └─────────────────┘ └─────────────────┘ type number of integers 123 (0x7B) - ──╥────┬────┬────┬────╥────┬────┬────┬────┐ -... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► { 123, 456, 789 } - ──╨────┴────┴────┴────╨────┴────┴────┴────┘ - └─────────────────┘ └─────────────────┘ - 456 (0x1C8) 789 (0x315) -....................................... + ──╥────┬────┬────┬────╥────┬────┬────┬────┐ + ... ║ 00 │ 00 │ 01 │ C8 ║ 00 │ 00 │ 03 │ 15 │ ────► { 123, 456, 789 } + ──╨────┴────┴────┴────╨────┴────┴────┴────┘ + └─────────────────┘ └─────────────────┘ + 456 (0x1C8) 789 (0x315) +.... A 'NULL' array: -....................................... +.... ┌─────╥────┬────┬────┬────┐ │ str ║ 00 │ 00 │ 00 │ 00 │ ────► NULL └─────╨────┴────┴────┴────┘ └───┘ └─────────────────┘ type number of strings -....................................... +.... [[typical_session]] -Typical session ---------------- +== Typical session -....................................... +.... ┌────────┐ ┌───────┐ ┌─────────┐ │ Client ├ ─ ─ ─ ─(network)─ ─ ─ ─ ┤ Relay ├────────────────┤ WeeChat │ └────────┘ └───────┘ └─────────┘ @@ -1670,4 +1619,4 @@ Typical session ╟───────────────────────────────► ║ ║ ║ cmd: quit ║ disconnect client ║ ║ ║ ║ -....................................... +.... diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt index 124a87b3d..df58bc1cd 100644 --- a/doc/en/weechat_scripting.en.txt +++ b/doc/en/weechat_scripting.en.txt @@ -1,5 +1,4 @@ -WeeChat Scripting Guide -======================= += WeeChat Scripting Guide Sébastien Helleu <flashcode@flashtux.org> @@ -10,8 +9,7 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and light, designed for many operating systems. @@ -31,28 +29,23 @@ Almost all examples in this doc are written in Python, but API is the same for other languages. [[scripts_in_weechat]] -Scripts in WeeChat ------------------- +== Scripts in WeeChat [[languages_specifities]] -Languages specificities -~~~~~~~~~~~~~~~~~~~~~~~ +=== Languages specificities -Python -^^^^^^ +==== Python * You have to `import weechat` * Functions `print*` are called `prnt*` in python (because 'print' is reserved keyword) * Functions are called with `weechat.xxx(arg1, arg2, ...)` -Perl -^^^^ +==== Perl * Functions are called with `weechat::xxx(arg1, arg2, ...);` -Ruby -^^^^ +==== Ruby * You have to define 'weechat_init' and call 'register' inside * Functions are called with `Weechat.xxx(arg1, arg2, ...)` @@ -61,23 +54,20 @@ Ruby (3 callbacks + 3 data strings), so a call to this function looks like: [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -Lua -^^^ +==== Lua * Functions are called with `weechat.xxx(arg1, arg2, ...)` -Tcl -^^^ +==== Tcl * Functions are called with `weechat::xxx arg1 arg2 ...` -Guile (scheme) -^^^^^^^^^^^^^^ +==== Guile (scheme) * Functions are called with `(weechat:xxx arg1 arg2 ...)` * Following functions take one list of arguments (instead of many arguments @@ -88,8 +78,7 @@ Guile (scheme) ** bar_new [[register_function]] -Register function -~~~~~~~~~~~~~~~~~ +=== Register function All WeeChat scripts must "register" themselves to WeeChat, and this must be first WeeChat function called in script. @@ -97,9 +86,9 @@ first WeeChat function called in script. Prototype: [source,python] ----------------------------------------- +---- weechat.register(name, author, version, license, description, shutdown_function, charset) ----------------------------------------- +---- Arguments: @@ -118,99 +107,97 @@ Example of script, for each language: * python: [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.prnt("", "Hello, from python script!") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Test script", "", ""); weechat::print("", "Hello, from perl script!"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Test script", "", "") Weechat.print("", "Hello, from ruby script!") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.print("", "Hello, from lua script!") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Test script" "" "" weechat::print "" "Hello, from tcl script!" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Test script" "" "") (weechat:print "" "Hello, from scheme script!") ----------------------------------------- +---- [[load_script]] -Load script -~~~~~~~~~~~ +=== Load script It is recommended to use the "script" plugin to load scripts, for example: ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- Each language has also its own command: ----------------------------------------- +---- /python load python/script.py /perl load perl/script.pl /ruby load ruby/script.rb /lua load lua/script.lua /tcl load tcl/script.tcl /guile load guile/script.scm ----------------------------------------- +---- You can make link in directory 'language/autoload' to autoload script when WeeChat is starting. For example with Python: ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../script.py ----------------------------------------- +---- [NOTE] When installing a script with command `/script install` the link in 'autoload' directory is automatically created. [[differences_with_c_api]] -Differences with C API ----------------------- +== Differences with C API Script API is almost the same as C plugin API. You can look at 'WeeChat Plugin API Reference' for detail about each function @@ -223,28 +210,27 @@ a 'script' is a text file loaded with a plugin like 'python' with command When your script 'test.py' calls a WeeChat API function, path is like that: -........................................ +.... ┌──────────────────────┐ ╔══════════════════╗ │ python plugin │ ║ WeeChat "core" ║ ├────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║ └────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... When WeeChat calls a callback in your script 'test.py', it's reverse of previous path: -........................................ +.... ╔══════════════════╗ ┌──────────────────────┐ ║ WeeChat "core" ║ │ python plugin │ ║ ┌─────────╢ ├─────────┬────────────┤ ║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py ╚════════╧═════════╝ └─────────┴────────────┘ -........................................ +.... [[pointers]] -Pointers -~~~~~~~~ +=== Pointers As you probably know, there is not really "pointers" in scripts. So when API functions return pointer, it is converted to string for script. @@ -260,9 +246,9 @@ Empty string or "0x0" are allowed, they means NULL in C. For example, to print data on core buffer (WeeChat main buffer), you can do: [source,python] ----------------------------------------- +---- weechat.prnt("", "hi!") ----------------------------------------- +---- [WARNING] In many functions, for speed reasons, WeeChat does not check if your pointer @@ -270,8 +256,7 @@ is correct or not. It's your job to check you're giving a valid pointer, otherwise you may see a nice crash report ;) [[callbacks]] -Callbacks -~~~~~~~~~ +=== Callbacks Almost all WeeChat callbacks must return WEECHAT_RC_OK or WEECHAT_RC_ERROR (exception is modifier callback, which returns a string). @@ -284,18 +269,18 @@ Example of callback, for each language: * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -303,71 +288,69 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -Script API ----------- +== Script API For more information about functions in API, please read 'WeeChat Plugin API Reference'. [[script_api_functions]] -Functions -~~~~~~~~~ +=== Functions List of functions in script API: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Category | Functions | general | register @@ -444,16 +427,15 @@ List of functions in script API: hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | upgrade | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -Constants -~~~~~~~~~ +=== Constants List of constants in script API: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Category | Constants | return codes | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -481,23 +463,20 @@ List of constants in script API: WEECHAT_HOOK_CONNECT_SOCKET_ERROR | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -Common tasks ------------- +== Common tasks This chapter shows some common tasks, with examples. Only partial things in API are used here, for full reference, see 'WeeChat Plugin API Reference'. [[buffers]] -Buffers -~~~~~~~ +=== Buffers [[buffers_display_messages]] -Display messages -^^^^^^^^^^^^^^^^ +==== Display messages An empty string is often used to work with WeeChat core buffer. For other buffers, you must give pointer (as string, see <<pointers,pointers>>). @@ -505,7 +484,7 @@ buffers, you must give pointer (as string, see <<pointers,pointers>>). Examples: [source,python] ----------------------------------------- +---- # display "hello" on core buffer weechat.prnt("", "hello") @@ -532,14 +511,13 @@ weechat.prnt(buffer, "message on #weechat channel") # (note that server and channel are separated by a comma) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "message on #weechat channel") ----------------------------------------- +---- [NOTE] Print function is called `print` in Perl/Ruby/Lua/Tcl and `prnt` in Python. [[buffers_send_text]] -Send text to buffer -^^^^^^^^^^^^^^^^^^^ +==== Send text to buffer You can send text or command to a buffer. This is exactly like if you type text on command line and press [Enter]. @@ -547,18 +525,17 @@ on command line and press [Enter]. Examples: [source,python] ----------------------------------------- +---- # execute command "/help" on current buffer (result is on core buffer) weechat.command("", "/help") # send "hello" to #weechat IRC channel (users on channel will see message) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "hello") ----------------------------------------- +---- [[buffers_new]] -Create new buffer -^^^^^^^^^^^^^^^^^ +==== Create new buffer You can create a new buffer in your script, then use it for displaying messages. @@ -569,7 +546,7 @@ closed (for example by `/buffer close`). Example: [source,python] ----------------------------------------- +---- # callback for data received in input def buffer_input_cb(data, buffer, input_data): # ... @@ -588,29 +565,28 @@ weechat.buffer_set(buffer, "title", "This is title for my buffer.") # disable logging, by setting local variable "no_log" to "1" weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -Buffer properties -^^^^^^^^^^^^^^^^^ +==== Buffer properties You can read buffer properties, as string, integer or pointer. Examples: [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() number = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") short_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- It is possible to add, read or delete local variables in buffer: [source,python] ----------------------------------------- +---- # add local variable weechat.buffer_set(buffer, "localvar_set_myvar", "my_value") @@ -619,21 +595,19 @@ myvar = weechat.buffer_get_string(buffer, "localvar_myvar") # delete local variable weechat.buffer_set(buffer, "localvar_del_myvar", "") ----------------------------------------- +---- To see local variables of a buffer, do this command in WeeChat: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_command]] -Add new command -^^^^^^^^^^^^^^^ +==== Add new command Add a custom command with `hook_command`. You can use a custom completion template to complete arguments of your command. @@ -641,7 +615,7 @@ template to complete arguments of your command. Example: [source,python] ----------------------------------------- +---- def my_command_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -656,37 +630,35 @@ hook = weechat.hook_command("myfilter", "description of myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- And then in WeeChat: ----------------------------------------- +---- /help myfilter /myfilter arguments... ----------------------------------------- +---- [[hook_timer]] -Add a timer -^^^^^^^^^^^ +==== Add a timer Add a timer with `hook_timer`. Example: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # timer called each minute when second is 00 weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -Run a background process -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Run a background process You can run a background process with `hook_process`. Your callback will be called when data is ready. It may be called many times. @@ -697,7 +669,7 @@ return code of command. Example: [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -709,11 +681,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -URL transfer -^^^^^^^^^^^^ +==== URL transfer _New in version 0.3.7._ @@ -724,7 +695,7 @@ Example of URL transfer without option: the HTML page will be received as "out" in callback (standard output of process): [source,python] ----------------------------------------- +---- # Display current stable version of WeeChat. weechat_version = "" @@ -738,7 +709,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] All infos available about WeeChat are on page http://weechat.org/dev/info @@ -747,7 +718,7 @@ Example of URL transfer with an option: download latest WeeChat development package in file '/tmp/weechat-devel.tar.gz': [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "End of transfer (rc=%s)" % rc) @@ -756,18 +727,16 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- For more information about URL transfer and available options, see functions `hook_process` and `hook_process_hashtable` in 'WeeChat Plugin API Reference'. [[config_options]] -Config / options -~~~~~~~~~~~~~~~~ +=== Config / options [[config_options_set_script]] -Set options for script -^^^^^^^^^^^^^^^^^^^^^^ +==== Set options for script Function `config_is_set_plugin` is used to check if an option is set or not, and `config_set_plugin` to set option. @@ -775,7 +744,7 @@ and `config_set_plugin` to set option. Example: [source,python] ----------------------------------------- +---- script_options = { "option1" : "value1", "option2" : "value2", @@ -784,18 +753,17 @@ script_options = { for option, default_value in script_options.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, default_value) ----------------------------------------- +---- [[config_options_detect_changes]] -Detect changes -^^^^^^^^^^^^^^ +==== Detect changes You must use `hook_config` to be notified if user changes some script options. Example: [source,python] ----------------------------------------- +---- SCRIPT_NAME = "myscript" # ... @@ -810,18 +778,17 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_cb", "") # for other languages, change "python" with your language ("perl", "ruby", "lua" or "tcl") ----------------------------------------- +---- [[config_options_weechat]] -Read WeeChat options -^^^^^^^^^^^^^^^^^^^^ +==== Read WeeChat options Function `config_get` returns pointer to option. Then, depending on option type, you must call `config_string`, `config_boolean`, `config_integer` or `config_color`. [source,python] ----------------------------------------- +---- # string weechat.prnt("", "value of option weechat.look.item_time_format is: %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -837,15 +804,13 @@ weechat.prnt("", "value of option weechat.look.scroll_page_percent is: %d" # color weechat.prnt("", "value of option weechat.color.chat_delimiters is: %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -IRC -~~~ +=== IRC [[irc_catch_messages]] -Catch messages -^^^^^^^^^^^^^^ +==== Catch messages IRC plugin sends two signals for a message received (`xxx` is IRC internal server name, `yyy` is IRC command name like JOIN, QUIT, PRIVMSG, 301, ..): @@ -857,7 +822,7 @@ xxx,irc_in2_yyy:: signal sent after processing message [source,python] ----------------------------------------- +---- def join_cb(data, signal, signal_data): # signal is for example: "freenode,irc_in2_join" # signal_data is IRC message, for example: ":nick!user@host JOIN :#channel" @@ -872,53 +837,49 @@ def join_cb(data, signal, signal_data): # it is useful here to use "*" as server, to catch JOIN messages on all IRC # servers weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -Modify messages -^^^^^^^^^^^^^^^ +==== Modify messages IRC plugin sends a "modifier" called "irc_in_xxx" ("xxx" is IRC command) for a message received, so that you can modify it. [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # add server name to all messages received # (OK that's not very useful, but that's just an example!) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] A malformed message could crash WeeChat or cause severe problems! [[irc_message_parse]] -Parse message -^^^^^^^^^^^^^ +==== Parse message _New in version 0.3.4._ You can parse an IRC message with info_hashtable called "irc_message_parse". [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message here" }) weechat.prnt("", "dict: %s" % dict) # output: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -Infos -~~~~~ +=== Infos [[infos_weechat_version]] -WeeChat version -^^^^^^^^^^^^^^^ +==== WeeChat version The best way to check version is to ask "version_number" and make integer comparison with hexadecimal version number. @@ -926,13 +887,13 @@ comparison with hexadecimal version number. Example: [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "This is WeeChat 0.3.2 or newer") else: weechat.prnt("", "This is WeeChat 0.3.1 or older") ----------------------------------------- +---- [NOTE] Versions ≤ 0.3.1.1 return empty string for 'info_get("version_number")' so you @@ -941,38 +902,35 @@ must check that value returned is *not* empty. To get version as string: [source,python] ----------------------------------------- +---- # this will display for example "Version 0.3.2" weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -Other infos -^^^^^^^^^^^ +==== Other infos [source,python] ----------------------------------------- +---- # WeeChat home directory, for example: "/home/xxxx/.weechat" weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) # keyboard inactivity weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -Infolists -~~~~~~~~~ +=== Infolists [[infolists_read]] -Read an infolist -^^^^^^^^^^^^^^^^ +==== Read an infolist You can read infolist built by WeeChat or other plugins. Example: [source,python] ----------------------------------------- +---- # read infolist "buffer", to get list of buffers infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -980,7 +938,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] Don't forget to call `infolist_free` to free memory used by infolist, because diff --git a/doc/en/weechat_tester.en.txt b/doc/en/weechat_tester.en.txt index fff8f2377..34ac26f76 100644 --- a/doc/en/weechat_tester.en.txt +++ b/doc/en/weechat_tester.en.txt @@ -1,11 +1,9 @@ -WeeChat Tester's Guide -====================== += WeeChat Tester's Guide Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -Purpose -------- +== Purpose Many thankful users ask us how can they help developing WeeChat. The easiest (and also most tricky) way to help developing WeeChat is @@ -27,8 +25,7 @@ implementing new stuff (and fixing old bugs) all the time. [[prepare_system]] -Prepare your system -------------------- +== Prepare your system It would help us a lot if you enable Linux 'core' files: if WeeChat crashes, Linux will write a file called 'core'. This file contains very useful debug @@ -36,14 +33,13 @@ info, to know exactly where is problem in WeeChat. If you're using the 'bash' shell, add following line to your `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -Download devel version ----------------------- +== Download devel version Fresh code (with latest bugs and features) is stored in a GIT repository. @@ -54,57 +50,55 @@ You may decide to build it manually (recommended way): version of WeeChat. [[get_sources]] -Get and build sources -~~~~~~~~~~~~~~~~~~~~~ +=== Get and build sources First create a directory, for example 'weechat-git': ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- If you have git installed, you can just clone the git repository (recommended way): ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- NOTE: Later, you can run "`git pull`" in this directory, to get deltas with the latest updates. Otherwise you can download and unpack 'devel' package: ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- To build sources, cmake is recommended: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- If you don't have cmake, it's still possible to use autotools: ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -Install binary package -~~~~~~~~~~~~~~~~~~~~~~ +=== Install binary package According to your Linux distribution: @@ -115,17 +109,16 @@ According to your Linux distribution: [[run]] -Run WeeChat ------------ +== Run WeeChat It's recommended to run WeeChat with another directory (different from stable version), with option `--dir`. Command is: ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- If you're still awake you should see the familiar interface and brag about having the newest possible version of WeeChat. ;) @@ -137,8 +130,7 @@ If it doesn't crash - tell us too, we need your feedback! [[links]] -Useful links ------------- +== Useful links * GIT repository: http://git.savannah.gnu.org/gitweb/?p=weechat.git * Bug tracker: https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt index d0a742521..1cac08094 100644 --- a/doc/en/weechat_user.en.txt +++ b/doc/en/weechat_user.en.txt @@ -1,5 +1,4 @@ -WeeChat User's Guide -==================== += WeeChat User's Guide Sébastien Helleu <flashcode@flashtux.org> @@ -10,15 +9,13 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and light, designed for many operating systems. [[features]] -Features -~~~~~~~~ +=== Features Main features are: @@ -37,8 +34,7 @@ Main features are: WeeChat homepage is here: http://weechat.org/ [[pre-requisites]] -Pre-requisites -~~~~~~~~~~~~~~ +=== Pre-requisites In order to install WeeChat, you need: @@ -48,12 +44,10 @@ In order to install WeeChat, you need: * ncurses library [[install]] -Installation ------------- +== Installation [[binary_packages]] -Binary packages -~~~~~~~~~~~~~~~ +=== Binary packages Binary packages are available for many distributions, including: @@ -72,20 +66,18 @@ For other distributions, please look at your manual for installation instructions. [[source_package]] -Source package -~~~~~~~~~~~~~~ +=== Source package WeeChat can be compiled with cmake or autotools (cmake is recommended way). [[dependencies]] -Dependencies -^^^^^^^^^^^^ +==== Dependencies Following table shows list of packages that are required or optional to compile WeeChat. [width="100%",cols="5,^3,^3,13",options="header"] -|======================================== +|=== | Package ^(1)^ | Version | Required | Feature | cmake | | *yes* | Build (autotools still possible, but cmake is recommended) | libncursesw5-dev ^(2)^ | | *yes* | Ncurses interface @@ -106,7 +98,7 @@ compile WeeChat. | source-highlight | | | Syntax highlight for sources in documentation | xsltproc, docbook-xml, docbook-xsl | | | Build of man page -|======================================== +|=== [NOTE] ^(1)^ Name comes from the Debian GNU/Linux distribution, versions and package @@ -117,35 +109,34 @@ will have display bugs with wide chars). + but not with versions ≤ 2.6 or ≥ 3.0). [[compile_with_cmake]] -Compile with cmake -^^^^^^^^^^^^^^^^^^ +==== Compile with cmake * Installation in system directories (requires 'root' privileges): ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. $ make % make install (as root) ----------------------------------------- +---- * Installation in custom directory: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=/path/to/directory $ make $ make install ----------------------------------------- +---- Options can be used for cmake, with format: "-DOPTION=VALUE". List of commonly used options: [width="100%",cols="2m,2,5m,12",options="header"] -|======================================== +|=== | Option | Values | Default value | Description | CMAKE_BUILD_TYPE | `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel` | | @@ -241,23 +232,22 @@ List of commonly used options: | ENABLE_XFER | `ON`, `OFF` | ON | Compile <<xfer_plugin,Xfer plugin>>. -|======================================== +|=== The other options can be displayed with this command: ----------------------------------------- +---- $ cmake -LA ----------------------------------------- +---- Or with Curses interface: ----------------------------------------- +---- $ ccmake .. ----------------------------------------- +---- [[compile_with_autotools]] -Compile with autotools -^^^^^^^^^^^^^^^^^^^^^^ +==== Compile with autotools [WARNING] Only cmake is officially supported to build WeeChat. You should use autotools @@ -266,52 +256,50 @@ Build with autotools requires more dependencies and is slower than with cmake. * Installation in system directories (requires 'root' privileges): ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure $ make % make install (as root) ----------------------------------------- +---- * Installation in custom directory: ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure --prefix=/path/to/directory $ make $ make install ----------------------------------------- +---- Options can be used for 'configure' script, they can be displayed with this command: ----------------------------------------- +---- $ ./configure --help ----------------------------------------- +---- [[git_sources]] -Git sources -~~~~~~~~~~~ +=== Git sources Warning: git sources are for advanced users: it may not compile or not be stable. You're warned! To get git sources, issue this command: ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git ----------------------------------------- +---- Then follow instructions for source package (see <<source_package,source package>>). [[report_crashes]] -Report crashes -~~~~~~~~~~~~~~ +=== Report crashes If you experienced crashes, or if you want to report any future WeeChat crash, you have to: @@ -321,48 +309,45 @@ you have to: * install gdb [[debug_info]] -Debug info -^^^^^^^^^^ +==== Debug info If you're compiling with cmake: ----------------------------------------- +---- $ cmake .. -DCMAKE_BUILD_TYPE=Debug ----------------------------------------- +---- If you're compiling with autotools, debug is default (`--with-debug=1`). If you installed a binary package, then install package 'weechat-dbg'. [[core_files]] -Core files -^^^^^^^^^^ +==== Core files To enable 'core' files, you can use option <<option_weechat.startup.sys_rlimit,weechat.startup.sys_rlimit>>: ----------------------------------------- +---- /set weechat.startup.sys_rlimit "core:-1" ----------------------------------------- +---- For WeeChat ≤ 0.3.8 or if you want to enable core files even before WeeChat starts, you can use `ulimit` command. For example under Linux with 'bash' shell, add this line to your `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- Or max size: ----------------------------------------- +---- ulimit -c 200000 ----------------------------------------- +---- [[gdb_backtrace]] -Get backtrace with gdb -^^^^^^^^^^^^^^^^^^^^^^ +==== Get backtrace with gdb When WeeChat crashes, your system will create a file 'core' or 'core.12345' ('12345' is process id). @@ -372,9 +357,9 @@ directory where WeeChat is installed!). For example if 'weechat' is installed in '/usr/bin/' and 'core' file is in '/home/xxx/', then run gdb with this command: ----------------------------------------- +---- gdb /usr/bin/weechat /home/xxx/core ----------------------------------------- +---- [NOTE] If you installed binary package 'weechat-dbg' (for example under Debian), then @@ -383,7 +368,7 @@ you can use this path for WeeChat binary: '/usr/lib/debug/usr/bin/weechat' Then under gdb, use command `bt full` to display backtrace. You will see something like that: ----------------------------------------- +---- (gdb) set logging file /tmp/crash.txt (gdb) set logging on Copying output to /tmp/crash.txt. @@ -410,7 +395,7 @@ Copying output to /tmp/crash.txt. write_fds = {fds_bits = {0 <repeats 16 times>}} except_fds = {fds_bits = {0 <repeats 16 times>}} max_fd = <value optimized out> ----------------------------------------- +---- You must report this trace to developers, and tell them what action caused this crash. @@ -418,29 +403,26 @@ crash. Thank you for your help! [[debug_running_weechat]] -Debug a running WeeChat -^^^^^^^^^^^^^^^^^^^^^^^ +==== Debug a running WeeChat To debug a running WeeChat (for example if WeeChat seems blocked), you can use gdb with process id (replace '12345' with PID of weechat process): ----------------------------------------- +---- gdb /usr/bin/weechat 12345 ----------------------------------------- +---- Then like for a crash, use command `bt full`: ----------------------------------------- +---- (gdb) bt full ----------------------------------------- +---- [[usage]] -Usage ------ +== Usage [[running_weechat]] -Running WeeChat -~~~~~~~~~~~~~~~ +=== Running WeeChat Command line arguments: @@ -448,9 +430,9 @@ include::cmdline_options.en.txt[] To start WeeChat, issue this command: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- When you run WeeChat for the first time, a default configuration file is created, with default options. The default configuration file is: @@ -461,12 +443,11 @@ parameters with `/set` command in WeeChat (see <<weechat_commands,WeeChat commands>>). [[screen_layout]] -Screen layout -~~~~~~~~~~~~~ +=== Screen layout Example of terminal with WeeChat: -........................................ +.... ▼ bar "title" ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ @@ -491,7 +472,7 @@ Example of terminal with WeeChat: │[@Flashy(i)] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ bars "status" and "input" bar "nicklist" ▲ -........................................ +.... Screen is composed by following areas: @@ -508,7 +489,7 @@ Screen is composed by following areas: Bar 'status' has following default items: [width="100%",cols="^3,^3,10",options="header"] -|======================================== +|=== | Item | Example | Description | time | `[12:55]` | Time | buffer_count | `[6]` | Number of opened buffers @@ -522,23 +503,22 @@ Bar 'status' has following default items: | hotlist | `[H: 4:#abc(2,5), 6]` | List of buffers with activity (unread messages) (in example, 2 highlights and 5 unread messages on '#abc', one unread message on buffer #6) | completion | `abc(2) def(5)` | List of words for completion, with number of possible completions for each word | scroll | `-MORE(50)-` | Scroll indicator, with number of lines below last line displayed -|======================================== +|=== Bar 'input' has following default items: [width="100%",cols="^3,^6,8",options="header"] -|======================================== +|=== | Item | Example | Description | input_paste | `[Paste 7 lines ? [ctrl-Y] Yes [ctrl-N] No]` | Question to user for pasting lines | input_prompt | `[@Flashy(i)]` | Input prompt, for irc: nick and modes (mode "+i" means invisible on freenode) | away | `(away)` | Away indicator | input_search | `[Search (~ str,msg)]` | Search indicator ("`~`": case insensitive, "`==`": case sensitive, "`str`": search string, "`regex`": search regular expression, "`msg`": search in messages, "`pre`": search in prefixes, "`pre\|msg`": search in prefixes and messages) | input_text | `hi peter!` | Input text -|======================================== +|=== [[buffers_and_windows]] -Buffers and windows -~~~~~~~~~~~~~~~~~~~ +=== Buffers and windows A 'buffer' is composed by a number, a name, lines displayed (and some other data). @@ -558,7 +538,7 @@ window) or displayed by one or more windows. Example of horizontal split (`/window splith`): -........................................ +.... ▼ window #2 (buffer #4) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #abc │ @@ -586,11 +566,11 @@ Example of horizontal split (`/window splith`): │[@Flashy] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) -........................................ +.... Example of vertical split (`/window splitv`): -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #abc │ │12:54:15 peter | hey! │@Flashy│12:55:12 Max | hi │@Flashy│ @@ -614,11 +594,11 @@ Example of vertical split (`/window splitv`): │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... Example of vertical + horizontal splits: -........................................ +.... ▼ window #3 (buffer #5) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #def │ @@ -646,11 +626,10 @@ Example of vertical + horizontal splits: │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... [[bars]] -Bars -~~~~ +=== Bars A 'bar' is an area beside the chat that can contain any type of text. @@ -660,7 +639,7 @@ is the name of the bar and `option` the option for this bar. List of bar options: [width="100%",cols="2m,2,10",options="header"] -|======================================== +|=== | Option | Values | Description | type | `root`, `window` | @@ -724,11 +703,10 @@ List of bar options: | conditions | string | The conditions to display the bar (see <<bar_conditions,conditions>> for more info). -|======================================== +|=== [[bar_items]] -Items -^^^^^ +==== Items The option 'items' is a string with a list of bar items, separated by a comma (space between items on screen) or "+" (glued items). @@ -741,11 +719,11 @@ defined in bar (option 'color_delim'). Example of bar with items "[time],buffer_number+:+buffer_plugin+.+buffer_name": -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │[12:55] 3:irc/freenode.#weechat │ └───────────────────────────────────────────────────────────────────────────┘ -........................................ +.... A special syntax can be used to force the buffer used when displaying the bar item: "@buffer:item" (where "buffer" is the full name of buffer and "item" is @@ -757,13 +735,12 @@ not displayed in the current window (or even not displayed at all). Example: nicklist of bitlbee in a root bar (if the bar is called 'bitlist' and if bitlbee server is called 'bitlbee'): ----------------------------------------- +---- /set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist" ----------------------------------------- +---- [[bar_filling]] -Filling -^^^^^^^ +==== Filling There are four types of filling: @@ -782,7 +759,7 @@ default bar 'nicklist' has 'vertical' filling. Some examples of filling for bar 'nicklist': -........................................ +.... ┌──────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ │12:54:15 peter | hey! │@carl │ @@ -836,11 +813,10 @@ Some examples of filling for bar 'nicklist': │───────────────────────────────────────────────────────────────────────│ │ │ filling_top_bottom = columns_horizontal ▲ -........................................ +.... [[bar_conditions]] -Conditions -^^^^^^^^^^ +==== Conditions The option 'conditions' is a string evaluated to know if the bar is displayed or not in the window (it is used only for bars with type 'window'). @@ -867,20 +843,19 @@ Following pointers are available: Example to display nicklist bar in all buffers with a nicklist, and only if width of window is > 100 : ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && ${window.win_width} > 100" ----------------------------------------- +---- Same condition, but always display nicklist on buffer '&bitlbee' (even if window is small): ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)" ----------------------------------------- +---- [[notify_levels]] -Notify levels -~~~~~~~~~~~~~ +=== Notify levels Four levels are possible in messages displayed in buffers, from lower to higher: @@ -897,45 +872,43 @@ The default notify level can be set using option default is 'all'. [width="50%",cols="3m,10",options="header"] -|======================================== +|=== | Notify level | Level of messages added to hotlist | none | (none) | highlight | 'highlight' + 'private' | message | 'highlight' + 'private' + 'message' | all | 'highlight' + 'private' + 'message' + 'low' -|======================================== +|=== Notify level can be defined for a set of buffers, for example all buffers of irc server "freenode": ----------------------------------------- +---- /set weechat.notify.irc.freenode message ----------------------------------------- +---- Set notify level 'highlight' on channel "#weechat" only: ----------------------------------------- +---- /set weechat.notify.irc.freenode.#weechat highlight ----------------------------------------- +---- The notify level for a buffer can be set with command `/buffer`: ----------------------------------------- +---- /buffer notify highlight ----------------------------------------- +---- [[key_bindings]] -Default key bindings -~~~~~~~~~~~~~~~~~~~~ +=== Default key bindings // 'C-' = ctrl, 'A-' = alt, 'S-' = shift [[key_bindings_command_line]] -Keys for command line -^^^^^^^^^^^^^^^^^^^^^ +==== Keys for command line [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Key | Description | Command | @k(←) .2+| Go to previous char in command line .2+| `/input move_previous_char` | @k(C-)@k(b) @@ -980,14 +953,13 @@ Keys for command line | @k(A-)@k(k) | Grab a key and insert its code (and command bound if key exists) in command line | `/input grab_key_command` | @k(A-)@k(r) | Delete entire command line | `/input delete_line` | @k(A-)@k(s) | Toggle aspell | `/mute aspell toggle` -|======================================== +|=== [[key_bindings_buffers_windows]] -Keys for buffers / windows -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Keys for buffers / windows [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Key | Description | Command | @k(C-)@k(l) | Redraw whole window | `/window refresh` | @k(C-)@k(s) , @k(C-)@k(u) | Set unread marker on all buffers | `/input set_unread` @@ -1037,17 +1009,16 @@ Keys for buffers / windows | @k(A-)@k(>) | Switch to next buffer in list of visited buffers | `/input jump_next_visited_buffer` | @k(A-)@k(/) | Switch to last buffer displayed (before last jump to a buffer) | `/input jump_last_buffer_displayed` | @k(A-)@k(=) | Toggle filters on/off | `/filter toggle` -|======================================== +|=== [[key_bindings_search_context]] -Keys for "search" context -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Keys for "search" context These keys are used in context "search" (when @k(C-)@k(r) is pressed to search text in buffer). [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Key | Description | Command | @k(C-)@k(r) | Switch search type: string (default), regular expression | `/input search_switch_regex` | @k(A-)@k(c) | Switch exact case for search | `/input search_switch_case` @@ -1057,16 +1028,15 @@ text in buffer). | @k(Enter) .3+| Stop search .3+| `/input search_stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_cursor_context]] -Keys for "cursor" context -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Keys for "cursor" context These keys are used in context "cursor" (free movement of cursor on screen). [width="100%",cols="^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Key | Area | Description | Command | @k(↑) | - | Move cursor one line up | `/cursor move up` | @k(↓) | - | Move cursor one line down | `/cursor move down` @@ -1087,16 +1057,15 @@ These keys are used in context "cursor" (free movement of cursor on screen). | @k(Enter) .3+| - .3+| Stop cursor mode .3+| `/cursor stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_mouse_context]] -Keys for "mouse" context -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Keys for "mouse" context These keys are used in context "mouse", namely when a mouse event occurs. [width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Button ^(1)^ | Gesture | Area | Description | Command | ◾◽◽ | - | chat | Switch to window | `/window ${_window_number}` | ◾◽◽ | left | chat | Switch to previous buffer | `/window ${_window_number};/buffer +1` @@ -1124,40 +1093,38 @@ These keys are used in context "mouse", namely when a mouse event occurs. | ⇑ | - | any bar | Scroll bar by -20% | `/bar scroll ${_bar_name} ${_window_number} -20%` | ⇓ | - | any bar | Scroll bar by +20% | `/bar scroll ${_bar_name} ${_window_number} +20%` | ◽◾◽ | - | anywhere | Start cursor mode at this point | `/cursor go ${_x},${_y}` -|======================================== +|=== [NOTE] ^(1)^ "⇑" and "⇓" are wheel up and down. [[mouse]] -Mouse support -~~~~~~~~~~~~~ +=== Mouse support WeeChat supports mouse clicks and gestures. It is working with local terminal, and remotely via ssh connection with or without screen/tmux. [[mouse_enable]] -Enable mouse -^^^^^^^^^^^^ +==== Enable mouse To enable mouse at startup: ----------------------------------------- +---- /set weechat.look.mouse on ----------------------------------------- +---- To enable mouse now, press @k(A-)@k(m) or do following command: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- It is possible to temporarily disable mouse, and bind that on a key. For example key @k(A-)@k(x) to disable mouse for 10 seconds: ----------------------------------------- +---- /key bind meta-x /mouse toggle 10 ----------------------------------------- +---- When mouse is enabled in WeeChat, you can use @k(-S-) modifier to select or click in terminal, as if the mouse was disabled (on some terminals like iTerm, @@ -1167,8 +1134,7 @@ you have to use @k(-A-) instead of @k(-S-)). For any problem with mouse, please look at 'WeeChat FAQ'. [[mouse_bind_events]] -Bind mouse events to commands -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Bind mouse events to commands Many default mouse events are already defined by WeeChat (see <<key_bindings_mouse_context,keys for "mouse" context>>). @@ -1182,17 +1148,17 @@ Event name consists of a modifier (optional), a button/wheel name and a gesture List of modifiers: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Modifier | Description | ctrl | Key @k(-C-) | alt | Key @k(-A-) | ctrl-alt | Keys @k(-C-) and @k(-A-) -|======================================== +|=== List of buttons/wheel: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Button/wheel | Description | button1 | Click on left button | button2 | Click on right button @@ -1200,12 +1166,12 @@ List of buttons/wheel: | button4 ... button9 | Click on extra buttons | wheelup | Wheel (up) | wheeldown | Wheel (down) -|======================================== +|=== List of gestures (only for buttons, not wheel): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Gesture | Distance | gesture-up | 3 ... 19 | gesture-up-long | ≥ 20 @@ -1215,16 +1181,16 @@ List of gestures (only for buttons, not wheel): | gesture-left-long | ≥ 40 | gesture-right | 3 ... 39 | gesture-right-long | ≥ 40 -|======================================== +|=== List of incomplete events (only for buttons, useful for plugins/scripts): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Event | Description | event-down | Button was pressed but not released yet | event-drag | Mouse was moved with button pressed down -|======================================== +|=== Example of events: @@ -1248,40 +1214,37 @@ You can find an event name with command `/input grab_mouse` then doing event with mouse. This will insert event name on command line. [[command_line]] -Command line -~~~~~~~~~~~~ +=== Command line WeeChat command line (at the bottom of window) lets you execute commands or send text to buffer. [[command_line_syntax]] -Syntax -^^^^^^ +==== Syntax Commands begin with "/" char, followed by name of command. For example, to see list of all options: ----------------------------------------- +---- /set ----------------------------------------- +---- Text sent to a buffer is any text that does not begin with "/" char. For example, to send text 'hello' on current buffer: ----------------------------------------- +---- hello ----------------------------------------- +---- However, it is possible to start with "/" char, by adding another. For example, to send text '/set' on current buffer: ----------------------------------------- +---- //set ----------------------------------------- +---- [[command_line_colors]] -Color codes -^^^^^^^^^^^ +==== Color codes For some plugins like IRC, you can use color codes and attributes, as follow (press @k(C-)@k(c) then following letter, with optional value): @@ -1314,7 +1277,7 @@ attribute. Color codes for @k(C-)@k(c) , @k(c) are: [width="50%",cols="^1m,3,3",options="header"] -|======================================== +|=== | Code | IRC | WeeChat (curses) | 00 | white | white | 01 | black | black @@ -1332,22 +1295,21 @@ Color codes for @k(C-)@k(c) , @k(c) are: | 13 | light magenta | lightmagenta | 14 | gray | gray | 15 | light gray | white -|======================================== +|=== Example: display of "hello everybody!" with "hello" in light blue bold and "everybody" in light red underlined: ----------------------------------------- +---- ^Cc12^Cbhello ^Cb^Cc04^Cueverybody^Cu^Cc! ----------------------------------------- +---- [NOTE] In irc plugin, you can remap these colors using option <<option_irc.color.mirc_remap,irc.color.mirc_remap>>. [[colors]] -Colors -~~~~~~ +=== Colors WeeChat can use up to 256 color pairs to display text in bars and chat area (your terminal must support 256 colors to use them in WeeChat). @@ -1356,13 +1318,13 @@ According to value of 'TERM' environment variable, you may have following limits for colors in WeeChat: [width="50%",cols="8,>2,>2",options="header"] -|======================================== +|=== | $TERM | Colors | Pairs ^(1)^ | "rxvt-unicode", "xterm",... | 88 | 256 | "rxvt-256color", "xterm-256color",... | 256 | 32767 | "screen" | 8 | 64 | "screen-256color" | 256 | 32767 -|======================================== +|=== [NOTE] ^(1)^ Even if your terminal supports more than 256 pairs, only 256 pairs can be @@ -1382,26 +1344,25 @@ variable. If you are using screen, you can add this line to your '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- If your 'TERM' variable has wrong value and that WeeChat is already running, don't panic! You can change it without restarting, thanks to script 'shell.py': ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- [[colors_basic]] -Basic colors -^^^^^^^^^^^^ +==== Basic colors Basic colors in WeeChat are: [width="50%",cols="^3m,8",options="header"] -|======================================== +|=== | Name | Color | default | Default terminal color (transparent for background) | black | Black @@ -1420,11 +1381,10 @@ Basic colors in WeeChat are: | lightcyan | Light cyan | gray | Gray | white | White -|======================================== +|=== [[colors_extended]] -Extended colors -^^^^^^^^^^^^^^^ +==== Extended colors WeeChat dynamically allocates color pairs when colors are used on screen (to display buffers and bars). @@ -1437,33 +1397,31 @@ temporarily switch to terminal colors to choose a color. For example if you want to display time in orange in buffer, do: ----------------------------------------- +---- /set weechat.color.chat_time 214 ----------------------------------------- +---- Or if you want a very dark green background for status bar: ----------------------------------------- +---- /set weechat.bar.status.color_bg 22 ----------------------------------------- +---- [[colors_aliases]] -Aliases -^^^^^^^ +==== Aliases You can add color aliases with command `/color alias` and then use this alias in any color option. For example: ----------------------------------------- +---- /color alias 214 orange /set weechat.color.chat_delimiters orange ----------------------------------------- +---- [[colors_attributes]] -Attributes -^^^^^^^^^^ +==== Attributes It is possible to use some attributes for colors. One or more attributes can be added before color name or number: @@ -1477,54 +1435,51 @@ added before color name or number: For example if you want self nick as white underlined, do: ----------------------------------------- +---- /set weechat.color.chat_nick_self _white ----------------------------------------- +---- Or if you want time in status bar as orange underlined with bold: ----------------------------------------- +---- /set weechat.color.status_time *_214 ----------------------------------------- +---- To use an attribute with default terminal color (-1), you must use a number greater than last terminal color, for example max color in WeeChat: 99999. Example of bold with terminal foreground color: ----------------------------------------- +---- /set weechat.color.status_time *99999 ----------------------------------------- +---- [[options_and_commands]] -Options and commands -~~~~~~~~~~~~~~~~~~~~ +=== Options and commands [[sec_options]] -Secured data options (sec.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Secured data options (sec.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | crypt | /set sec.crypt.* | Options for encryption | data | <<command_weechat_secure,/secure>> | Secured data -|======================================== +|=== Options: include::autogen/user/sec_options.txt[] [[weechat_options]] -WeeChat options (weechat.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== WeeChat options (weechat.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | debug | <<command_weechat_debug,/debug set>> + /set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section) @@ -1547,21 +1502,19 @@ Sections: | key_search | <<command_weechat_key,/key>> | Keys in search context | key_cursor | <<command_weechat_key,/key>> | Keys in cursor context | key_mouse | <<command_weechat_key,/key>> | Keys in mouse context -|======================================== +|=== Options: include::autogen/user/weechat_options.txt[] [[weechat_commands]] -WeeChat commands -^^^^^^^^^^^^^^^^ +==== WeeChat commands include::autogen/user/weechat_commands.txt[] [[plugins]] -Plugins -------- +== Plugins A plugin is a dynamic library, written in C and compiled, which is loaded by WeeChat. @@ -1582,16 +1535,16 @@ automatically closed. Examples to load, unload or list plugins: ----------------------------------------- +---- /plugin load irc /plugin unload irc /plugin list ----------------------------------------- +---- Default plugins are: [width="50%",cols="^1,5",options="header"] -|======================================== +|=== | Plugin | Description | alias | Define alias for commands | aspell | Spell checking for command line @@ -1609,60 +1562,54 @@ Default plugins are: | tcl | Tcl scripting API | guile | Guile (scheme) scripting API | xfer | File transfer and direct chat -|======================================== +|=== To learn more about plugin or script development (through API), please read 'WeeChat Plugin API Reference' or 'WeeChat Scripting Guide'. [[alias_plugin]] -Alias plugin -~~~~~~~~~~~~ +=== Alias plugin Alias plugin lets you create alias for commands (from WeeChat or other plugins). [[alias_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/alias_commands.txt[] [[aspell_plugin]] -Aspell plugin -~~~~~~~~~~~~ +=== Aspell plugin Aspell plugin lets you check spelling in command line. It is possible to use many languages by buffer. [[aspell_options]] -Options (aspell.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Options (aspell.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | color | /set aspell.color.* | Colors | check | /set aspell.check.* | Options to control spell checking | dict | <<command_aspell_aspell,/aspell setdict>> + /set aspell.dict.* | Dictionaries used by buffer (options can be added/removed in section) | option | /set aspell.option.* | <<aspell_speller_options,Speller options>> (options can be added/removed in section) -|======================================== +|=== Options: include::autogen/user/aspell_options.txt[] [[aspell_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/aspell_commands.txt[] [[aspell_speller_options]] -Speller options -^^^^^^^^^^^^^^^ +==== Speller options Speller options can be defined by adding options in section "option" of aspell configuration. @@ -1670,19 +1617,18 @@ configuration. The option name is an aspell configuration option. List of options can be found in a shell with following command: ----------------------------------------- +---- $ aspell config ----------------------------------------- +---- For example, to enable option "ignore-case": ----------------------------------------- +---- /set aspell.option.ignore-case "true" ----------------------------------------- +---- [[aspell_suggestions]] -Suggestions -^^^^^^^^^^^ +==== Suggestions Suggestions are displayed in a bar item called "aspell_suggest". The number of suggestions is set in option 'aspell.check.suggestions'. @@ -1692,23 +1638,22 @@ integer ≥ 0 and add the bar item "aspell_suggest" to a bar, like 'status'. Example of suggestions with English dictionary (`en`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Example of suggestions with English and French dictionaries (`en,fr`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune/prime,primer,primé] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... [[charset_plugin]] -Charset plugin -~~~~~~~~~~~~~~ +=== Charset plugin Charset plugin lets you decode or encode data using charsets. @@ -1721,15 +1666,15 @@ can only read/write UTF-8 data. Charset plugin should be autoloaded by WeeChat. To be sure plugin is loaded, try: ----------------------------------------- +---- /charset ----------------------------------------- +---- If command is not found, then load plugin with command: ----------------------------------------- +---- /plugin load charset ----------------------------------------- +---- If plugin is not found, then you should compile again WeeChat with plugins and Charset support. @@ -1739,48 +1684,45 @@ Terminal charset depends on your locale, and internal is UTF-8. For example: -........................................ +.... charset: terminal: ISO-8859-15, internal: UTF-8 -........................................ +.... [[charset_options]] -Options (charset.conf) -^^^^^^^^^^^^^^^^^^^^^^ +==== Options (charset.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | default | /set charset.default.* | Default decoding/encoding charset | decode | <<command_charset_charset,/charset decode>> + /set charset.decode.* | Decoding charset by buffer (options can be added/removed in section) | encode | <<command_charset_charset,/charset encode>> + /set charset.encode.* | Encoding charset by buffer (options can be added/removed in section) -|======================================== +|=== Options: include::autogen/user/charset_options.txt[] [[charset_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/charset_commands.txt[] [[charset_set]] -Set charset -^^^^^^^^^^^ +==== Set charset To set global decode and encode charsets, use command `/set`. For example: ----------------------------------------- +---- /set charset.default.decode ISO-8859-15 /set charset.default.encode ISO-8859-15 ----------------------------------------- +---- If global decode charset is not set (for example during first load of Charset plugin), it will be automatically set to terminal @@ -1794,35 +1736,33 @@ If you give only charset, then it will set decoding and encoding values. For example: ----------------------------------------- +---- /charset ISO-8859-15 ----------------------------------------- +---- It's equivalent to: ----------------------------------------- +---- /charset decode ISO-8859-15 /charset encode ISO-8859-15 ----------------------------------------- +---- To set IRC channel (or private) charset, use same commands as server, but on channel (or private) buffer. To see all charsets used, use following command: ----------------------------------------- +---- /set charset.* ----------------------------------------- +---- [[charset_troubleshooting]] -Troubleshooting -^^^^^^^^^^^^^^^ +==== Troubleshooting For any problem with charsets, please look at 'WeeChat FAQ'. [[fifo_plugin]] -Fifo plugin -~~~~~~~~~~~ +=== Fifo plugin You can remote control WeeChat, by sending commands or text to a FIFO pipe (if option "plugins.var.fifo.fifo" is enabled, it is by default). @@ -1832,43 +1772,43 @@ The FIFO pipe is located in '~/.weechat/' and is called 'weechat_fifo_xxxx' Syntax for the FIFO pipe commands/text is one of following: -........................................ +.... plugin.buffer *text or command here *text or command here -........................................ +.... Some examples: * nick change on IRC server freenode to "newnick": ----------------------------------------- +---- $ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * display text on IRC #weechat channel: ----------------------------------------- +---- $ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * display text on current buffer: ----------------------------------------- +---- $ echo '*hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * send two commands to unload/reload Python scripts (you have to separate them with "\n"): ----------------------------------------- +---- $ echo -e '*/python unload\n*/python autoload' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- You can write a script to send command to all running WeeChat at same time, for example: [source,shell] ----------------------------------------- +---- #!/bin/sh if [ $# -eq 1 ]; then for fifo in ~/.weechat/weechat_fifo_* @@ -1876,17 +1816,16 @@ if [ $# -eq 1 ]; then echo -e "$1" >$fifo done fi ----------------------------------------- +---- If the script is called "auto_weechat_command", you can run it with: ----------------------------------------- +---- $ ./auto_weechat_command 'irc.freenode.#weechat *hello' ----------------------------------------- +---- [[irc_plugin]] -IRC plugin -~~~~~~~~~~ +=== IRC plugin The IRC plugin is designed to chat through IRC protocol with other people. @@ -1894,30 +1833,28 @@ It is multi-servers, and offers all supported IRC commands including DCC chat and file transfer (via xfer plugin, see <<xfer_plugin,Xfer plugin>>). [[irc_command_line_options]] -Command line options -^^^^^^^^^^^^^^^^^^^^ +==== Command line options It is possible to give URL for one or many IRC servers, as follow: ----------------------------------------- +---- irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] ----------------------------------------- +---- Example to join '#weechat' and '#toto' on server 'irc.freenode.net' server, default port (6667), with nick 'nono': ----------------------------------------- +---- $ weechat irc://nono@irc.freenode.net/#weechat,#toto ----------------------------------------- +---- [[irc_options]] -Options (irc.conf) -^^^^^^^^^^^^^^^^^^ +==== Options (irc.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set irc.look.* | Look and feel | color | /set irc.color.* | Colors @@ -1928,21 +1865,19 @@ Sections: | server_default | /set irc.server_default.* | Default values for servers (used when options in server are not defined) | server | <<command_irc_server,/server>> + /set irc.server.* | Servers -|======================================== +|=== Options: include::autogen/user/irc_options.txt[] [[irc_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/irc_commands.txt[] [[irc_ssl_certificates]] -SSL certificates -^^^^^^^^^^^^^^^^ +==== SSL certificates When connecting to IRC server with SSL, WeeChat checks by default that the connection is fully trusted. @@ -1968,49 +1903,46 @@ Option "ssl_verify" is on by default, so verification is strict and may fail, even if it was OK with versions prior to 0.3.1. [[irc_connect_oftc_with_certificate]] -First example: connect to oftc and check certificate -++++++++++++++++++++++++++++++++++++++++++++++++++++ +===== First example: connect to oftc and check certificate * Import certificate in shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt ----------------------------------------- +---- Note: it is possible to concatenate many certificates in file CAs.pem. * In WeeChat, with "oftc" server already created: ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [[irc_connect_oftc_with_certfp]] -Second example: connect to oftc using CertFP -++++++++++++++++++++++++++++++++++++++++++++ +===== Second example: connect to oftc using CertFP * Create certificate in shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ----------------------------------------- +---- * In WeeChat, with "oftc" server already created: ----------------------------------------- +---- /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem" /connect oftc /msg nickserv cert add ----------------------------------------- +---- For more information, look at http://www.oftc.net/oftc/NickServ/CertFP [[irc_sasl_authentication]] -SASL authentication -^^^^^^^^^^^^^^^^^^^ +==== SASL authentication WeeChat supports SASL authentication, using different mechanisms: @@ -2028,17 +1960,16 @@ Options in servers are: If you want to use "dh-blowfish" by default for all servers: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish ----------------------------------------- +---- [NOTE] The "gcrypt" library is required when compiling WeeChat in order to use "dh-blowfish" and "dh-aes" mechanisms (see <<dependencies,dependencies>>). [[irc_tor_freenode]] -Connect to Freenode with TOR/SASL -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Connect to Freenode with TOR/SASL In addition to SSL, Freenode servers support connections with TOR (https://www.torproject.org/), a network of virtual tunnels that allows people @@ -2050,48 +1981,47 @@ security compared to "plain" authentication system with SASL. In first place, install TOR. For Debian (and derived): ----------------------------------------- +---- $ sudo apt-get install tor ----------------------------------------- +---- In WeeChat you need to create a socks5 proxy for TOR service (hostname/IP and port depend on your TOR configuration): ----------------------------------------- +---- /proxy add tor socks5 127.0.0.1 9050 ----------------------------------------- +---- Now, create a new server, for example: ----------------------------------------- +---- /server add freenode-tor p4fsi4ockecnea7l.onion ----------------------------------------- +---- Set proxy for TOR: ----------------------------------------- +---- /set irc.server.freenode-tor.proxy "tor" ----------------------------------------- +---- Set SASL authentication: ----------------------------------------- +---- /set irc.server.freenode-tor.sasl_mechanism dh-blowfish /set irc.server.freenode-tor.sasl_username "your_nickname" /set irc.server.freenode-tor.sasl_password "your_password" ----------------------------------------- +---- And finally, connection to server: ----------------------------------------- +---- /connect freenode-tor ----------------------------------------- +---- For more info about Freenode and TOR: http://freenode.net/irc_servers.shtml#tor [[irc_smart_filter_join_part_quit]] -Smart filter for join/part/quit messages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Smart filter for join/part/quit messages A smart filter is available to filter join/part/quit messages when nick did not say something during past X minutes on channel. @@ -2099,79 +2029,78 @@ say something during past X minutes on channel. Smart filter is enabled by default, but you must add a filter to hide lines on buffers, for example: ----------------------------------------- +---- /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- It is possible to create filter for one channel only or channels beginning with same name (see `/help filter`): ----------------------------------------- +---- /filter add irc_smart_weechat irc.freenode.#weechat irc_smart_filter * /filter add irc_smart_weechats irc.freenode.#weechat* irc_smart_filter * ----------------------------------------- +---- You can hide only join or part/quit with following options: ----------------------------------------- +---- /set irc.look.smart_filter_join on /set irc.look.smart_filter_quit on ----------------------------------------- +---- You can setup delay (in minutes): ----------------------------------------- +---- /set irc.look.smart_filter_delay 5 ----------------------------------------- +---- If a nick did not speak during last 5 minutes, its join and/or part/quit will be hidden on channel. [[irc_ctcp_replies]] -CTCP replies -^^^^^^^^^^^^ +==== CTCP replies It is possible to customize CTCP replies, or block some CTCP queries (do not reply). For example, to customize reply to CTCP "VERSION", use following command: ----------------------------------------- +---- /set irc.ctcp.version "I'm running WeeChat $version, it rocks!" ----------------------------------------- +---- If you want to block CTCP "VERSION" (do not reply to a query), then set empty string: ----------------------------------------- +---- /set irc.ctcp.version "" ----------------------------------------- +---- Even unknown CTCP can be customized, for example you can reply to CTCP "BLABLA": ----------------------------------------- +---- /set irc.ctcp.blabla "This is my answer to CTCP BLABLA" ----------------------------------------- +---- It is possible to customize CTCP for one server only, using its internal name before CTCP name: ----------------------------------------- +---- /set irc.ctcp.freenode.version "WeeChat $version (for freenode)" ----------------------------------------- +---- If you want to restore standard CTCP reply, then remove option: ----------------------------------------- +---- /unset irc.ctcp.version ----------------------------------------- +---- Following codes can be used in strings and are automatically expanded by WeeChat when replying to CTCP: [width="100%",cols="^2l,4,8",options="header"] -|======================================== +|=== | Code | Description | Value/example | $clientinfo | List of supported CTCP | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | $version | WeeChat version | `0.4.0-dev` @@ -2184,7 +2113,7 @@ when replying to CTCP: | $time | Current date/time | `Sun, 16 Dec 2012 10:40:48 +0100` | $username | User name on IRC server | `name` | $realname | Real name on IRC server | `John Doe` -|======================================== +|=== [NOTE] ^(1)^ The git version is the output of command `git describe`. It is known only @@ -2193,7 +2122,7 @@ if WeeChat has been compiled inside the git repository and if git was installed. If CTCP options are not defined (by default), CTCP replies are: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | CTCP | Reply format | Example | CLIENTINFO | `$clientinfo` | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | FINGER | `WeeChat $versiongit` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)` @@ -2201,11 +2130,10 @@ If CTCP options are not defined (by default), CTCP replies are: | TIME | `$time` | `Sun, 16 Dec 2012 10:40:48 +0100` | USERINFO | `$username ($realname)` | `name (John Doe)` | VERSION | `WeeChat $versiongit ($compilation)` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)` -|======================================== +|=== [[irc_target_buffer]] -Target buffer for IRC messages -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Target buffer for IRC messages It is possible to customize target buffer for IRC messages (buffer used to display message) with options `irc.msgbuffer.*`. @@ -2231,7 +2159,7 @@ server or channel buffer. Non-comprehensive list of IRC messages or alias that you can customize: [width="60%",cols="^1m,^3m,8",options="header"] -|======================================== +|=== | message | alias | description | error | | error | invite | | invited on a channel @@ -2299,7 +2227,7 @@ Non-comprehensive list of IRC messages or alias that you can customize: | 728 | quietlist | quiet list | 729 | quietlist | end of quiet list | 901 | | you are now logged in -|======================================== +|=== Other numeric commands can be customized as well. @@ -2310,64 +2238,60 @@ Some examples: * display result of `/whois` on private buffer: ----------------------------------------- +---- /set irc.msgbuffer.whois private ----------------------------------------- +---- * restore default buffer for whois (server buffer): ----------------------------------------- +---- /unset irc.msgbuffer.whois ----------------------------------------- +---- * display invitation on current buffer, only for "freenode" server: ----------------------------------------- +---- /set irc.msgbuffer.freenode.invite current ----------------------------------------- +---- * display message "303" (ison) on WeeChat "core" buffer: ----------------------------------------- +---- /set irc.msgbuffer.303 weechat ----------------------------------------- +---- [[logger_plugin]] -Logger plugin -~~~~~~~~~~~~~ +=== Logger plugin The Logger plugin lets you save content of buffers to files, with options about what and how it is saved. [[logger_options]] -Options (logger.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Options (logger.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set logger.look.* | Look and feel | color | /set logger.color.* | Colors | file | /set logger.file.* | Options for log files | level | /set logger.level.* | Log level by buffer (options can be added/removed in section) | mask | /set logger.mask.* | Filename mask by buffer (options can be added/removed in section) -|======================================== +|=== Options: include::autogen/user/logger_options.txt[] [[logger_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/logger_commands.txt[] [[logger_log_levels]] -Log levels -^^^^^^^^^^ +==== Log levels Logging is made with a level for each buffer. Default level is 9 (log all messages displayed on buffer). @@ -2391,66 +2315,64 @@ Some examples: * set level 3 for IRC channel #weechat: ----------------------------------------- +---- /set logger.level.irc.freenode.#weechat 3 ----------------------------------------- +---- * set level 3 for freenode server buffer: ----------------------------------------- +---- /set logger.level.irc.server.freenode 3 ----------------------------------------- +---- * set level 3 for all channels on server freenode: ----------------------------------------- +---- /set logger.level.irc.freenode 3 ----------------------------------------- +---- * set level 2 for all IRC buffers: ----------------------------------------- +---- /set logger.level.irc 2 ----------------------------------------- +---- [[logger_filenames_masks]] -Filenames masks -^^^^^^^^^^^^^^^ +==== Filenames masks It is possible to define a filename mask for each buffer, and use local buffer variables to build filename. To see local variables for current buffer: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- For example, on buffer "irc.freenode.#weechat", WeeChat will search a mask with option name, in this order: ----------------------------------------- +---- logger.mask.irc.freenode.#weechat logger.mask.irc.freenode logger.mask.irc logger.file.mask ----------------------------------------- +---- That means you can have masks specific for some IRC servers ("logger.mask.irc.freenode") or for a plugin ("logger.mask.irc"). [[logger_files_by_date]] -Log files by date -+++++++++++++++++ +===== Log files by date To have log files by date, you can use date/time specifiers in mask (see `man strftime` for formats), for example: ----------------------------------------- +---- /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" ----------------------------------------- +---- You'll have following files: -........................................ +.... ~/.weechat/ |--- logs/ |--- 2010/ @@ -2461,21 +2383,20 @@ You'll have following files: |--- 12/ | irc.server.freenode.weechatlog | irc.freenode.#weechat.weechatlog -........................................ +.... [[logger_irc_files_by_server_channel]] -IRC log files by server and channel -+++++++++++++++++++++++++++++++++++ +===== IRC log files by server and channel If you want one directory by IRC server and one file by channel inside: ----------------------------------------- +---- /set logger.mask.irc "irc/$server/$channel.weechatlog" ----------------------------------------- +---- You'll have following files: -........................................ +.... ~/.weechat/ |--- logs/ |--- irc/ @@ -2487,11 +2408,10 @@ You'll have following files: | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog -........................................ +.... [[relay_plugin]] -Relay plugin -~~~~~~~~~~~~ +=== Relay plugin The Relay plugin is used to relay data via network, using different protocols: @@ -2501,13 +2421,12 @@ The Relay plugin is used to relay data via network, using different protocols: WeeChat (for example QWeeChat or weechat-android) [[relay_options]] -Options (relay.conf) -^^^^^^^^^^^^^^^^^^^^ +==== Options (relay.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set relay.look.* | Look and feel | color | /set relay.color.* | Colors @@ -2515,33 +2434,30 @@ Sections: | 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) -|======================================== +|=== Options: include::autogen/user/relay_options.txt[] [[relay_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/relay_commands.txt[] [[relay_password]] -Password -^^^^^^^^ +==== Password It is highly recommended to set a password for relay, with command: ----------------------------------------- +---- /set relay.network.password "mypass" ----------------------------------------- +---- This password is used for 'irc' and 'weechat' protocols. [[relay_ssl]] -SSL -^^^ +==== SSL You can use SSL by creating a certificate and private key, and by using prefix "ssl." in the name of protocol. @@ -2551,22 +2467,21 @@ The default file for certificate/key is '~/.weechat/ssl/relay.pem' You can create a certificate and private key with following commands: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----------------------------------------- +---- If WeeChat is already running, you can reload the certificate and private key with command: ----------------------------------------- +---- /relay sslcertkey ----------------------------------------- +---- [[relay_irc_proxy]] -IRC proxy -^^^^^^^^^ +==== IRC proxy The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and you can connect to WeeChat with any other IRC client (including WeeChat itself). @@ -2576,43 +2491,41 @@ You can define one port by IRC server, or one generic port for all servers. When using one port for all servers, the client must send the internal name of server in the IRC "PASS" command, with this format: ----------------------------------------- +---- PASS server:password ----------------------------------------- +---- Example: IRC proxy with SSL for any server (client will choose): ----------------------------------------- +---- /relay add ssl.irc 8000 ----------------------------------------- +---- Example: IRC proxy without SSL only for server "freenode": ----------------------------------------- +---- /relay add irc.freenode 8000 ----------------------------------------- +---- Now you can connect on port 8000 with any IRC client using server password "mypass" (or "freenode:mypass" if no server was specified in the relay). [[relay_weechat_protocol]] -WeeChat protocol -^^^^^^^^^^^^^^^^ +==== WeeChat protocol The Relay plugin can send data to remote interface using WeeChat protocol. For example: ----------------------------------------- +---- /relay add weechat 9000 ----------------------------------------- +---- Now you can connect on port 9000 with a remote interface using password "mypass". [[relay_websocket]] -WebSocket -^^^^^^^^^ +==== WebSocket WebSocket protocol (http://tools.ietf.org/html/rfc6455[RFC 6455]) is supported in Relay plugin for all protocols. @@ -2625,16 +2538,15 @@ WebSocket if required headers are found in handshake and if origin is allowed A WebSocket can be opened in a HTML5 with a single line of JavaScript: [source,js] ----------------------------------------- +---- 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). [[rmodifier_plugin]] -Rmodifier plugin -~~~~~~~~~~~~~~~~ +=== Rmodifier plugin The Rmodifier plugin lets you alter modifier strings using regular expressions. Typical use is to hide password when you type them, or when WeeChat saves @@ -2642,32 +2554,29 @@ them in command history. For example, it is possible to replace each char in these passwords by `*`. [[rmodifier_options]] -Options (rmodifier.conf) -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options (rmodifier.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set rmodifier.look.* | Look and feel | modifier | <<command_rmodifier_rmodifier,/rmodifier add>> + /set rmodifier.modifier.* | Rmodifiers -|======================================== +|=== Options: include::autogen/user/rmodifier_options.txt[] [[rmodifier_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/rmodifier_commands.txt[] [[rmodifier_creation]] -Rmodifier creation -^^^^^^^^^^^^^^^^^^ +==== Rmodifier creation A rmodifier consists of three elements: @@ -2705,8 +2614,7 @@ If command line contains: `/oper nick password` then display becomes: `/oper nick ********`. [[scripts_plugins]] -Scripts plugins -~~~~~~~~~~~~~~~ +=== Scripts plugins WeeChat provides 6 scripting plugins: Python, Perl, Ruby, Lua, Tcl and Guile (scheme). @@ -2720,68 +2628,59 @@ For more information about how to write scripts, or WeeChat API for scripts, please read 'WeeChat Scripting Guide'. [[script_options]] -Script options (script.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Script options (script.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set script.look.* | Look and feel | color | /set script.color.* | Colors | scripts | /set script.scripts.* | Options for download of scripts -|======================================== +|=== Options: include::autogen/user/script_options.txt[] [[script_commands]] -Script commands -^^^^^^^^^^^^^^^ +==== Script commands include::autogen/user/script_commands.txt[] [[python_commands]] -Python commands -^^^^^^^^^^^^^^^ +==== Python commands include::autogen/user/python_commands.txt[] [[perl_commands]] -Perl commands -^^^^^^^^^^^^^ +==== Perl commands include::autogen/user/perl_commands.txt[] [[ruby_commands]] -Ruby commands -^^^^^^^^^^^^^ +==== Ruby commands include::autogen/user/ruby_commands.txt[] [[lua_commands]] -Lua commands -^^^^^^^^^^^^ +==== Lua commands include::autogen/user/lua_commands.txt[] [[tcl_commands]] -Tcl commands -^^^^^^^^^^^^ +==== Tcl commands include::autogen/user/tcl_commands.txt[] [[guile_commands]] -Guile commands -^^^^^^^^^^^^^^ +==== Guile commands include::autogen/user/guile_commands.txt[] [[xfer_plugin]] -Xfer plugin -~~~~~~~~~~~ +=== Xfer plugin Xfer plugin brings: @@ -2790,33 +2689,30 @@ Xfer plugin brings: * file transfer, for example "DCC" via IRC plugin [[xfer_options]] -Options (xfer.conf) -^^^^^^^^^^^^^^^^^^^ +==== Options (xfer.conf) Sections: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set xfer.look.* | Look and feel | color | /set xfer.color.* | Colors | network | /set xfer.network.* | Network options | file | /set xfer.file.* | Options for files sent/received -|======================================== +|=== Options: include::autogen/user/xfer_options.txt[] [[xfer_commands]] -Commands -^^^^^^^^ +==== Commands include::autogen/user/xfer_commands.txt[] [[support]] -Support -------- +== Support Before asking for support, be sure you've read documentation and FAQ provided with WeeChat (documentation is this document, if you don't read all lines diff --git a/doc/es/weechat_quickstart.es.txt b/doc/es/weechat_quickstart.es.txt index b5dde3980..549526403 100644 --- a/doc/es/weechat_quickstart.es.txt +++ b/doc/es/weechat_quickstart.es.txt @@ -1,11 +1,9 @@ -WeeChat Quick Start Guide -========================= += WeeChat Quick Start Guide Sébastien Helleu <flashcode@flashtux.org> [[start]] -Iniciar WeeChat ---------------- +== Iniciar WeeChat Es recomendable una terminal emulada para X (pero no indispensable) rxvt-unicode (tiene un buen soporte para UTF-8, y no da problemas con @@ -14,32 +12,31 @@ los atajas de teclados predeterminados). // TRANSLATION MISSING Run from your shell: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Ayuda en linea / Opciones -------------------------- +== Ayuda en linea / Opciones WeeChat tiene ayuda para todos los comandos, solo teclee: ----------------------------------------- +---- /help ----------------------------------------- +---- Para obtener ayuda específicamente de un comando, teclee: ----------------------------------------- +---- /help comando ----------------------------------------- +---- Para configurar una opción, use: ----------------------------------------- +---- /set config.section.option valor ----------------------------------------- +---- (donde `config` es el nombre de la configuración del núcleo o del plugin que desea configurar, `section`, la sección de esa configuración @@ -54,28 +51,28 @@ opciones que contienen esas letras. Por ejemplo: * mostrará todas las opciones de WeeChat y sus plugins: ----------------------------------------- +---- /set ----------------------------------------- +---- * mostrará solo las opciones de WeeChat: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * mostrará las opciones del plugin IRC: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- Puede mostrar la ayuda de una opción en especifico con `/help`, por ejemplo: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Todas las opciones se salvarán de manera automática cuando cierre WeeChat o usando el comando `/save` para forzar la forzar a WeeChat a @@ -87,8 +84,7 @@ comando `/set`. [[core_vs_plugins]] -Núcleo vs Plugins ------------------ +== Núcleo vs Plugins Llamaremos "Núcleo de WeeChat" a la aplicación que solo se usa para mostrar información en pantalla e interactuar con el usuario, eso es lo @@ -103,25 +99,23 @@ seguramente vera irc y otros. [[create_irc_server]] -Crear un servidor IRC ---------------------- +== Crear un servidor IRC Puede agregar un servidor IRC usando el comando `/server`, por ejemplo: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- La ayuda está disponible; si te pierdes: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Personalizar las opciones de un servidor IRC --------------------------------------------- +== Personalizar las opciones de un servidor IRC WeeChat usa las opciones por defecto para todos los servidores ("predeterminado") si no le especifica un valor individual a un servidor @@ -136,73 +130,72 @@ Por ejemplo, tenemos el nick por defecto (que se basa en su login) pero usted puedes sobreescribirlo para el servidor identificado como oftc de la siguiente manera: ----------------------------------------- +---- /set irc.server.oftc.nicks "nick,nick2,nick3,nick4,nick5" ----------------------------------------- +---- También para configurar el nombre de usuario y el nombre real: ----------------------------------------- +---- /set irc.server.oftc.username "Mi nombre de usuario" /set irc.server.oftc.realname "Mi nombre real" ----------------------------------------- +---- Para que el servidor se conecte cuando WeeChat inicie: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- // TRANSLATION MISSING If SASL is available on server, you can use it for authentication (you will be identified before you join channels): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "nick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- // TRANSLATION MISSING To run a command after connection to server, for example to authenticate with nickserv (only if you don't use SASL for authentication): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Varios comandos pueden ser escritos separados por ';' (punto y coma). Para unirse automáticamente a canales cuando el servidor se conecte: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#uncanal,#otrocanal" ----------------------------------------- +---- Para eliminar un valor asignado a una opción de servidor y usar los valores por defecto en su lugar, por ejemplo, usar el nick por defecto (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Otras opciones: pude configurar otras opciones con el siguiente comando, donde "xxx" es el nombre de la opción. ----------------------------------------- +---- /set irc.server.oftc.xxx valor ----------------------------------------- +---- [[connect_to_irc_server]] -Conectarse a un servidor IRC ----------------------------- +== Conectarse a un servidor IRC ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Este comando también puede usarse para crear y conectarse a un nuevo @@ -216,38 +209,36 @@ servidores use ctrl+X. Es posible deshabilitar esta manera de tener todos los buffer de servidores juntos para tenerlos de manera independiente: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -join/part y canales IRC ------------------------ +== join/part y canales IRC Se une a un canal llamado "#canal": ----------------------------------------- +---- /join #canal ----------------------------------------- +---- Sale de un canal (mantiene el buffer abierto): ----------------------------------------- +---- /part [mensaje de partida] ----------------------------------------- +---- Cierra un servidor o el buffer de un canal (`/close` es un alias de `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Manipulando buffer/ventana --------------------------- +== Manipulando buffer/ventana Un buffer, es un componente vinculado a un plugin con un número, una categoría y un nombre. El buffer contiene los datos que se muestran en @@ -259,10 +250,10 @@ ventanas conteniendo varios buffer al mismo tiempo. Comandos para manipular buffer y ventana: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (le reitero que puede obtener ayuda de los comandos con /help buffer y /help ventana respectivamente) @@ -270,14 +261,13 @@ Comandos para manipular buffer y ventana: Por ejemplo, para dividir la pantalla una pequeña ventana (1/3) junto a otras mas grande (2/3) use el comando ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Atajos de teclado ------------------ +== Atajos de teclado WeeChat usa muchas teclas por defecto. Las mismas, están bien explicadas en la documentación pero debe conocer al menos la mas @@ -299,26 +289,25 @@ alguna tecla. Por ejemplo, para asignar la combinación meta-y (alt-y) al comando `/buffer close`: ----------------------------------------- +---- /key bind (presionamos meta-k) (presionamos meta-y) /buffer close ----------------------------------------- +---- El comando se vera mas o menos así: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Para eliminar una combinación: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Plugins/scripts ---------------- +== Plugins/scripts En algunas distribuciones como Debian, los plugins están disponibles en un paquete separado (como weechat-plugin). @@ -335,8 +324,7 @@ for more info). [[more_doc]] -Más documentación ------------------ +== Más documentación Ahora puede usar WeeChat y leer las FAQ/documentación para cada pregunta en: http://weechat.org/doc diff --git a/doc/fr/autogen/plugin_api/completions.txt b/doc/fr/autogen/plugin_api/completions.txt index bcfbca0a2..cd5b602d0 100644 --- a/doc/fr/autogen/plugin_api/completions.txt +++ b/doc/fr/autogen/plugin_api/completions.txt @@ -1,5 +1,5 @@ [width="65%",cols="^1,^2,8",options="header"] -|======================================== +|=== | Extension | Nom | Description | alias | alias | liste des alias @@ -130,4 +130,4 @@ | xfer | nick | pseudos de la discussion DCC -|======================================== +|=== diff --git a/doc/fr/autogen/plugin_api/infolists.txt b/doc/fr/autogen/plugin_api/infolists.txt index ed220a15a..0115a5902 100644 --- a/doc/fr/autogen/plugin_api/infolists.txt +++ b/doc/fr/autogen/plugin_api/infolists.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,5,5,5",options="header"] -|======================================== +|=== | Extension | Nom | Description | Pointeur | Paramètres | alias | alias | liste des alias | pointeur vers l'alias (optionnel) | nom d'alias (peut démarrer ou se terminer par "*" comme joker) (optionnel) @@ -70,4 +70,4 @@ | xfer | xfer | liste des xfer | pointeur vers le xfer (optionnel) | - -|======================================== +|=== diff --git a/doc/fr/autogen/plugin_api/infos.txt b/doc/fr/autogen/plugin_api/infos.txt index 8c72cab34..a377bb2a5 100644 --- a/doc/fr/autogen/plugin_api/infos.txt +++ b/doc/fr/autogen/plugin_api/infos.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,6,6",options="header"] -|======================================== +|=== | Extension | Nom | Description | Paramètres | aspell | aspell_dict | liste de dictionnaires (séparés par des virgules) utilisés sur le tampon | pointeur vers un tampon ("0x12345678") ou nom complet de tampon ("irc.freenode.#weechat") @@ -62,4 +62,4 @@ | weechat | weechat_upgrading | 1 si WeeChat est en cours de mise à jour (commande `/upgrade`) | - -|======================================== +|=== diff --git a/doc/fr/autogen/plugin_api/infos_hashtable.txt b/doc/fr/autogen/plugin_api/infos_hashtable.txt index 0f3d1061d..a0c817620 100644 --- a/doc/fr/autogen/plugin_api/infos_hashtable.txt +++ b/doc/fr/autogen/plugin_api/infos_hashtable.txt @@ -1,9 +1,9 @@ [width="100%",cols="^1,^2,6,6,6",options="header"] -|======================================== +|=== | Extension | Nom | Description | Hashtable (entrée) | Hashtable (sortie) | irc | irc_message_parse | analyse un message IRC | "message": message IRC, "server": nom du serveur (optionnel) | "tags": étiquettes, "message_without_tags": message sans les étiquettes, "nick": pseudo, "host": nom d'hôte, "command": commande, "channel": canal, "arguments": paramètres (inclut le canal) | irc | irc_message_split | découper un message IRC (pour tenir dans les 512 octets) | "message": message IRC, "server": nom du serveur (optionnel) | "msg1" ... "msgN": messages à envoyer (sans le "\r\n" final), "args1" ... "argsN": paramètres des messages, "count": nombre de messages -|======================================== +|=== diff --git a/doc/fr/autogen/plugin_api/url_options.txt b/doc/fr/autogen/plugin_api/url_options.txt index c92a2ded9..4e38d55f0 100644 --- a/doc/fr/autogen/plugin_api/url_options.txt +++ b/doc/fr/autogen/plugin_api/url_options.txt @@ -1,5 +1,5 @@ [width="100%",cols="2,^1,7",options="header"] -|======================================== +|=== | Option | Type | Constantes ^(1)^ | verbose | long | @@ -298,4 +298,4 @@ | new_directory_perms | long | -|======================================== +|=== diff --git a/doc/fr/autogen/user/alias_commands.txt b/doc/fr/autogen/user/alias_commands.txt index 5c1387bb8..c61e01240 100644 --- a/doc/fr/autogen/user/alias_commands.txt +++ b/doc/fr/autogen/user/alias_commands.txt @@ -1,7 +1,7 @@ [[command_alias_alias]] [command]*`alias`* créer un alias pour une commande:: ----------------------------------------- +---- /alias [-completion <complétion>] alias [<commande> [;<commande>...]] complétion: complétion pour l'alias (optionnel, par défaut la complétion se fait avec la commande cible) @@ -30,5 +30,5 @@ Exemples: /alias hello /allchan -exclude=#weechat msg * hello alias /forcejoin pour envoyer la commande IRC "forcejoin" avec la complétion de /sajoin : /alias -completion %%sajoin forcejoin /quote forcejoin ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/aspell_commands.txt b/doc/fr/autogen/user/aspell_commands.txt index ab43f1e9f..903fde0ce 100644 --- a/doc/fr/autogen/user/aspell_commands.txt +++ b/doc/fr/autogen/user/aspell_commands.txt @@ -1,7 +1,7 @@ [[command_aspell_aspell]] [command]*`aspell`* configuration de l'extension aspell:: ----------------------------------------- +---- /aspell enable|disable|toggle listdict setdict <dict>[,<dict>...] @@ -23,5 +23,5 @@ Pour activer aspell sur tous les tampons, utilisez l'option "default_dict", par /aspell enable La touche par défaut pour activer/désactiver aspell est alt-s. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/charset_commands.txt b/doc/fr/autogen/user/charset_commands.txt index 5b87f2132..3859a1aa3 100644 --- a/doc/fr/autogen/user/charset_commands.txt +++ b/doc/fr/autogen/user/charset_commands.txt @@ -1,7 +1,7 @@ [[command_charset_charset]] [command]*`charset`* changer le charset pour le tampon courant:: ----------------------------------------- +---- /charset decode|encode <charset> reset @@ -9,5 +9,5 @@ encode: changer le charset d'encodage charset: nouveau charset pour le tampon courant reset: réinitialiser les charsets pour le tampon courant ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/guile_commands.txt b/doc/fr/autogen/user/guile_commands.txt index 57b2bc065..706b0981d 100644 --- a/doc/fr/autogen/user/guile_commands.txt +++ b/doc/fr/autogen/user/guile_commands.txt @@ -1,7 +1,7 @@ [[command_guile_guile]] [command]*`guile`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /guile list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt index 2e5f746b4..13768489a 100644 --- a/doc/fr/autogen/user/irc_commands.txt +++ b/doc/fr/autogen/user/irc_commands.txt @@ -1,16 +1,16 @@ [[command_irc_admin]] [command]*`admin`* trouver les informations sur l'administrateur du serveur:: ----------------------------------------- +---- /admin [<cible>] cible: serveur ----------------------------------------- +---- [[command_irc_allchan]] [command]*`allchan`* exécuter une commande sur tous les canaux de tous les serveurs connectés:: ----------------------------------------- +---- /allchan [-current] [-exclude=<canal>[,<canal>...]] <commande> [<paramètres>] -current: exécuter la commande pour les canaux du serveur courant seulement @@ -25,12 +25,12 @@ Exemples: /allchan -exclude=#weechat msg * bonjour dire 'bonjour' partout sauf sur #weechat et les canaux commençant par #linux: /allchan -exclude=#weechat,#linux* msg * bonjour ----------------------------------------- +---- [[command_irc_allserv]] [command]*`allserv`* exécuter une commande sur tous les serveurs connectés:: ----------------------------------------- +---- /allserv [-exclude=<serveur>[,<serveur>...]] <commande> [<paramètres>] -exclude: exclude certains serveurs ('*' est autorisé en début ou fin du nom du serveur, pour exclure plusieurs serveurs) @@ -44,24 +44,24 @@ Exemples: /allserv away Je suis absent faire un whois sur mon pseudo sur tous les serveurs: /allserv whois $nick ----------------------------------------- +---- [[command_irc_ban]] [command]*`ban`* bannir des pseudos ou hôtes:: ----------------------------------------- +---- /ban [<canal>] [<pseudo> [<pseudo>...]] canal: nom du canal pour supprimer le bannissement pseudo: pseudo ou hôte pour supprimer le bannissement Sans paramètre, cette commande affiche la liste des bans pour le canal courant. ----------------------------------------- +---- [[command_irc_connect]] [command]*`connect`* se connecter à un/plusieurs serveur(s) IRC:: ----------------------------------------- +---- /connect [<serveur> [<serveur>...] [-<option>[=<valeur>]] [-no<option>] [-nojoin] [-switch] -all|-auto|-open [-nojoin] [-switch] @@ -85,33 +85,33 @@ Exemples: /connect my.server.org/6697 -ssl -password=test /connect irc://nick@irc.oftc.net/#channel /connect -switch ----------------------------------------- +---- [[command_irc_ctcp]] [command]*`ctcp`* envoyer un message CTCP (Client-To-Client Protocol):: ----------------------------------------- +---- /ctcp <cible> <type> [<arguments>] cible: pseudo ou canal à qui envoyer le CTCP type: type de CTCP (exemples: "version", "ping", etc...) arguments: paramètres pour le CTCP ----------------------------------------- +---- [[command_irc_cycle]] [command]*`cycle`* quitter et rejoindre un canal:: ----------------------------------------- +---- /cycle [<canal>[,<canal>...]] [message] canal: canal à quitter message: message de fin (affiché aux autres utilisateurs) ----------------------------------------- +---- [[command_irc_dcc]] [command]*`dcc`* démarrer un DCC (transfert de fichier ou discussion directe):: ----------------------------------------- +---- /dcc chat <pseudo> send <pseudo> <fichier> @@ -123,76 +123,76 @@ Exemples: /dcc chat toto envoyer le fichier "/home/foo/bar.txt" au pseudo "toto": /dcc send toto /home/foo/bar.txt ----------------------------------------- +---- [[command_irc_dehalfop]] [command]*`dehalfop`* retirer le statut de demi-opérateur du canal à/aux pseudo(s):: ----------------------------------------- +---- /dehalfop <pseudo> [<pseudo>...] pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: retirer le statut de demi-opérateur de tout le monde sur le canal excepté vous-même ----------------------------------------- +---- [[command_irc_deop]] [command]*`deop`* retirer le statut d'opérateur du canal à/aux pseudo(s):: ----------------------------------------- +---- /deop <pseudo> [<pseudo>...] * -yes pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: retirer le statut d'opérateur de tout le monde sur le canal excepté vous-même ----------------------------------------- +---- [[command_irc_devoice]] [command]*`devoice`* retirer la voix du/des pseudo(s):: ----------------------------------------- +---- /devoice <pseudo> [<pseudo>...] * -yes pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: retirer la voix de tout le monde sur le canal ----------------------------------------- +---- [[command_irc_die]] [command]*`die`* arrêter le serveur:: ----------------------------------------- +---- /die [<cible>] cible: nom du serveur ----------------------------------------- +---- [[command_irc_disconnect]] [command]*`disconnect`* se déconnecter d'un ou de tous les serveurs IRC:: ----------------------------------------- +---- /disconnect [<serveur>|-all|-pending [<raison>]] serveur: nom du serveur pour se déconnecter -all: se déconnecter de tous les serveurs -pending: annuler la reconnexion automatique sur les serveurs en cours de reconnexion raison: raison pour le quit ----------------------------------------- +---- [[command_irc_halfop]] [command]*`halfop`* donner le statut de demi-opérateur à un/des pseudo(s):: ----------------------------------------- +---- /halfop <pseudo> [<pseudo>...] * -yes pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: donner le statut de demi-opérateur à tout le monde sur le canal ----------------------------------------- +---- [[command_irc_ignore]] [command]*`ignore`* ignorer des pseudos/hôtes de serveurs ou canaux:: ----------------------------------------- +---- /ignore list add [re:]<pseudo> [<serveur> [<canal>]] del <numéro>|-all @@ -215,40 +215,40 @@ Exemples: /ignore add toto@domain.com freenode ignorer le hôte "toto*@*.domain.com" sur freenode/#weechat: /ignore add toto*@*.domain.com freenode #weechat ----------------------------------------- +---- [[command_irc_info]] [command]*`info`* voir les informations décrivant le serveur:: ----------------------------------------- +---- /info [<cible>] cible: nom du serveur ----------------------------------------- +---- [[command_irc_invite]] [command]*`invite`* inviter un pseudo sur un canal:: ----------------------------------------- +---- /invite <pseudo> [<pseudo>...] [<canal>] pseudo: pseudo à inviter canal: canal pour l'invitation ----------------------------------------- +---- [[command_irc_ison]] [command]*`ison`* vérifier si un pseudo est actuellement sur IRC:: ----------------------------------------- +---- /ison <pseudo> [<pseudo>...] pseudo: pseudo ----------------------------------------- +---- [[command_irc_join]] [command]*`join`* rejoindre un canal:: ----------------------------------------- +---- /join [-noswitch] [-server <serveur>] [<canal1>[,<canal2>...]] [<clé1>[,<clé2>...]] -noswitch: ne pas basculer sur le nouveau tampon @@ -261,23 +261,23 @@ Exemples: /join #protectedchan,#weechat key /join -server freenode #weechat /join -noswitch #weechat ----------------------------------------- +---- [[command_irc_kick]] [command]*`kick`* retirer par la force un utilisateur d'un canal:: ----------------------------------------- +---- /kick [<canal>] <pseudo> [<raison>] canal: canal où l'utilisateur se trouve pseudo: pseudo à éliminer raison: raison pour l'élimination (les variables spéciales $nick, $channel et $server sont remplacées par leur valeur) ----------------------------------------- +---- [[command_irc_kickban]] [command]*`kickban`* retirer par la force un pseudo d'un canal et le bannir:: ----------------------------------------- +---- /kickban [<canal>] <pseudo> [<raison>] canal: canal où l'utilisateur se trouve @@ -289,32 +289,32 @@ Il est possible d'éliminer/bannir avec un masque, le pseudo sera extrait du mas Exemple: bannir "*!*@host.com" puis éliminer "toto": /kickban toto!*@host.com ----------------------------------------- +---- [[command_irc_kill]] [command]*`kill`* fermer la connexion client-serveur:: ----------------------------------------- +---- /kill <pseudo> <raison> pseudo: pseudo raison: raison ----------------------------------------- +---- [[command_irc_links]] [command]*`links`* lister tous les noms de serveurs connus du serveur qui répondent à la requête:: ----------------------------------------- +---- /links [[<serveur>] <masque_serveur>] serveur: ce serveur doit répondre à la requête masque_serveur: liste des serveurs correspondant au masque ----------------------------------------- +---- [[command_irc_list]] [command]*`list`* lister les canaux et leur titre:: ----------------------------------------- +---- /list [<canal>[,<canal>...]] [<serveur>] [-re <regex>] canal: canal à lister @@ -328,37 +328,37 @@ Exemples: /list #weechat lister tous les canaux commençant par "#weechat" (peut être très lent pour les grands réseaux): /list -re #weechat.* ----------------------------------------- +---- [[command_irc_lusers]] [command]*`lusers`* obtenir des statistiques sur la taille du réseau IRC:: ----------------------------------------- +---- /lusers [<masque> [<cible>]] masque: serveurs qui correspondent au masque seulement cible: serveur pour faire suivre la requête ----------------------------------------- +---- [[command_irc_map]] [command]*`map`* afficher une carte graphique du réseau IRC:: ----------------------------------------- ----------------------------------------- +---- +---- [[command_irc_me]] [command]*`me`* envoyer une action CTCP au canal courant:: ----------------------------------------- +---- /me <message> message: message à envoyer ----------------------------------------- +---- [[command_irc_mode]] [command]*`mode`* changer le mode du canal ou de l'utilisateur:: ----------------------------------------- +---- /mode [<canal>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<paramètres>] <pseudo> [+|-]i|s|w|o @@ -390,62 +390,62 @@ Exemples: /mode #weechat +t devenir invisible sur le serveur: /mode nick +i ----------------------------------------- +---- [[command_irc_motd]] [command]*`motd`* obtenir le message du jour:: ----------------------------------------- +---- /motd [<cible>] cible: nom du serveur ----------------------------------------- +---- [[command_irc_msg]] [command]*`msg`* envoyer un message à un pseudo ou canal:: ----------------------------------------- +---- /msg [-server <serveur>] <cible>[,<cible>...] <texte> serveur: envoyer à ce serveur (nom interne) cible: pseudo ou canal (peut-être un masque, '*' = canal courant) texte: texte à envoyer ----------------------------------------- +---- [[command_irc_names]] [command]*`names`* lister les pseudos sur des canaux:: ----------------------------------------- +---- /names [<canal>[,<canal>...]] canal: nom du canal ----------------------------------------- +---- [[command_irc_nick]] [command]*`nick`* changer le pseudo courant:: ----------------------------------------- +---- /nick [-all] <pseudo> -all: définir le nouveau pseudo sur tous les serveurs connectés pseudo: nouveau pseudo ----------------------------------------- +---- [[command_irc_notice]] [command]*`notice`* envoyer un message notice à un utilisateur:: ----------------------------------------- +---- /notice [-server <serveur>] <cible> <texte> serveur: envoyer à ce serveur (nom interne) cible: pseudo ou canal texte: texte à envoyer ----------------------------------------- +---- [[command_irc_notify]] [command]*`notify`* ajouter une notification de présence ou de statut d'absence pour des pseudos sur les serveurs:: ----------------------------------------- +---- /notify add <pseudo> [<serveur> [-away]] del <pseudo>|-all [<serveur>] @@ -465,96 +465,96 @@ Exemples: /notify add toto freenode notifier quand "toto" est absent ou de retour sur le serveur freenode: /notify add toto freenode -away ----------------------------------------- +---- [[command_irc_op]] [command]*`op`* donner le statut d'opérateur à un/des pseudo(s):: ----------------------------------------- +---- /op <pseudo> [<pseudo>...] * -yes pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: donner le statut d'opérateur à tout le monde sur le canal ----------------------------------------- +---- [[command_irc_oper]] [command]*`oper`* obtenir le statut d'opérateur:: ----------------------------------------- +---- /oper <utilisateur> <mot_de_passe> utilisateur: utilisateur mot_de_passe: mot de passe ----------------------------------------- +---- [[command_irc_part]] [command]*`part`* quitter un canal:: ----------------------------------------- +---- /part [<canal>[,<canal>...]] [message] canal: canal à quitter message: message de fin (affiché aux autres utilisateurs) ----------------------------------------- +---- [[command_irc_ping]] [command]*`ping`* envoyer un ping au serveur:: ----------------------------------------- +---- /ping <serveur1> [<serveur2>] serveur1: serveur serveur2: faire suivre le ping à ce serveur ----------------------------------------- +---- [[command_irc_pong]] [command]*`pong`* répondre à un message ping:: ----------------------------------------- +---- /pong <démon> [<démon2>] démon: démon qui a répondu au message Ping démon2: faire suivre le message à ce démon ----------------------------------------- +---- [[command_irc_query]] [command]*`query`* envoyer un message privé à un pseudo:: ----------------------------------------- +---- /query [-server <serveur>] <pseudo>[,<pseudo>...] [<texte>] serveur: envoyer à ce serveur (nom interne) pseudo: pseudo pour la conversation privée texte: texte à envoyer ----------------------------------------- +---- [[command_irc_quiet]] [command]*`quiet`* faire taire des pseudos ou hôtes:: ----------------------------------------- +---- /quiet [<canal>] [<pseudo> [<pseudo>...]] canal: nom du canal pour faire taire pseudo: pseudo ou hôte à faire taire Sans paramètre, cette commande affiche la liste des "quiet" pour le canal courant. ----------------------------------------- +---- [[command_irc_quote]] [command]*`quote`* envoyer des données brutes au serveur sans analyse:: ----------------------------------------- +---- /quote [-server <serveur>] <données> serveur: envoyer à ce serveur (nom interne) données: données brutes à envoyer ----------------------------------------- +---- [[command_irc_reconnect]] [command]*`reconnect`* se reconnecter à un/plusieurs serveur(s):: ----------------------------------------- +---- /reconnect <serveur> [<serveur>...] [-nojoin] [-switch] -all [-nojoin] [-switch] @@ -562,80 +562,80 @@ serveur: nom du serveur pour se reconnecter -all: se reconnecter à tous les serveurs -nojoin: ne rejoindre aucun canal (même si l'autojoin est activé pour le serveur) -switch: basculer vers l'adresse suivante du serveur ----------------------------------------- +---- [[command_irc_rehash]] [command]*`rehash`* demander au serveur de recharger son fichier de configuration:: ----------------------------------------- +---- /rehash [<option>] option: option supplémentaire, pour certains serveurs ----------------------------------------- +---- [[command_irc_restart]] [command]*`restart`* demander au serveur de redémarrer:: ----------------------------------------- +---- /restart [<cible>] cible: nom du serveur ----------------------------------------- +---- [[command_irc_sajoin]] [command]*`sajoin`* forcer un utilisateur à rejoindre un ou plusieurs canaux:: ----------------------------------------- +---- /sajoin <pseudo> <canal>[,<canal>...] pseudo: pseudo canal: canal ----------------------------------------- +---- [[command_irc_samode]] [command]*`samode`* changer le mode du canal, sans avoir le statut d'opérateur:: ----------------------------------------- +---- /samode <canal> <mode> canal: nom du canal mode: mode pour le canal ----------------------------------------- +---- [[command_irc_sanick]] [command]*`sanick`* forcer un utilisateur à utiliser un autre pseudo:: ----------------------------------------- +---- /sanick <pseudo> <nouveau_pseudo> pseudo: pseudo nouveau_pseudo: nouveau pseudo ----------------------------------------- +---- [[command_irc_sapart]] [command]*`sapart`* forcer un utilisateur à quitter un ou plusieurs canaux:: ----------------------------------------- +---- /sapart <pseudo> <canal>[,<canal>...] pseudo: pseudo canal: canal ----------------------------------------- +---- [[command_irc_saquit]] [command]*`saquit`* forcer un utilisateur à quitter le serveur avec une raison:: ----------------------------------------- +---- /saquit <pseudo> <raison> pseudo: pseudo raison: raison ----------------------------------------- +---- [[command_irc_server]] [command]*`server`* lister, ajouter ou retirer des serveurs IRC:: ----------------------------------------- +---- /server list|listfull [<serveur>] add <serveur> <nom>[/<port>] [-temp] [-<option>[=<valeur>]] [-no<option>] copy|rename <serveur> <nouveau_nom> @@ -668,179 +668,179 @@ Exemples: /server rename oftc newoftc /server del freenode /server deloutq ----------------------------------------- +---- [[command_irc_service]] [command]*`service`* enregistrer un nouveau service:: ----------------------------------------- +---- /service <pseudo> <réservé> <distribution> <type> <réservé> <info> distribution: visibilité du service type: réservé pour une utilisation future ----------------------------------------- +---- [[command_irc_servlist]] [command]*`servlist`* lister les services actuellement connectés au réseau:: ----------------------------------------- +---- /servlist [<masque> [<type>]] masque: lister seulement les services qui correspondent à ce masque type: lister seulement les services de ce type ----------------------------------------- +---- [[command_irc_squery]] [command]*`squery`* envoyer un message à un service:: ----------------------------------------- +---- /squery <service> <texte> service: nom du service texte: texte à envoyer ----------------------------------------- +---- [[command_irc_squit]] [command]*`squit`* déconnecter les liens vers un serveur:: ----------------------------------------- +---- /squit <serveur> <commentaire> serveur: nom du serveur commentaire: commentaire pour quitter ----------------------------------------- +---- [[command_irc_stats]] [command]*`stats`* demander des statistiques sur le serveur:: ----------------------------------------- +---- /stats [<requête> [<serveur>]] requête: c/h/i/k/l/m/o/y/u (voir la RFC1459) serveur: nom du serveur ----------------------------------------- +---- [[command_irc_summon]] [command]*`summon`* envoyer aux utilisateurs d'un serveur IRC un message leur demandant de rejoindre IRC:: ----------------------------------------- +---- /summon <utilisateur> [<cible> [<canal>]] utilisateur: nom d'utilisateur cible: nom du serveur canal: nom du canal ----------------------------------------- +---- [[command_irc_time]] [command]*`time`* demander l'heure locale de serveur:: ----------------------------------------- +---- /time [<cible>] cible: demander l'heure de ce serveur ----------------------------------------- +---- [[command_irc_topic]] [command]*`topic`* recevoir/définir le titre du canal:: ----------------------------------------- +---- /topic [<canal>] [<titre>|-delete] canal: nom du canal titre: nouveau titre pour le canal -delete: supprime le titre du canal ----------------------------------------- +---- [[command_irc_trace]] [command]*`trace`* trouver le chemin jusqu'à un serveur spécifique:: ----------------------------------------- +---- /trace [<cible>] cible: serveur ----------------------------------------- +---- [[command_irc_unban]] [command]*`unban`* supprimer le bannissement sur des pseudos ou hôtes:: ----------------------------------------- +---- /unban [<canal>] <pseudo> [<pseudo>...] canal: nom du canal pour supprimer le bannissement pseudo: pseudo ou hôte pour supprimer le bannissement ----------------------------------------- +---- [[command_irc_userhost]] [command]*`userhost`* retourner une liste d'informations sur des pseudos:: ----------------------------------------- +---- /userhost <pseudo> [<pseudo>...] pseudo: pseudo ----------------------------------------- +---- [[command_irc_users]] [command]*`users`* liste des utilisateurs connectés au serveur:: ----------------------------------------- +---- /users [<cible>] cible: serveur ----------------------------------------- +---- [[command_irc_version]] [command]*`version`* retourner la version du pseudo ou du serveur (courant ou spécifié):: ----------------------------------------- +---- /version [<serveur>|<pseudo>] serveur: nom du serveur pseudo: pseudo ----------------------------------------- +---- [[command_irc_voice]] [command]*`voice`* donner la voix à/aux pseudo(s):: ----------------------------------------- +---- /voice <pseudo> [<pseudo>...] pseudo: pseudo ou masque (peut démarrer ou se terminer par "*" comme joker) *: donner la voix à tout le monde sur le canal ----------------------------------------- +---- [[command_irc_wallchops]] [command]*`wallchops`* envoyer une notice aux opérateurs du canal:: ----------------------------------------- +---- /wallchops [<canal>] <texte> canal: nom du canal texte: texte à envoyer ----------------------------------------- +---- [[command_irc_wallops]] [command]*`wallops`* envoyer un message à tous les utilisateurs connectés qui ont activé le mode utilisateur 'w' pour eux-mêmes:: ----------------------------------------- +---- /wallops <texte> texte: texte à envoyer ----------------------------------------- +---- [[command_irc_who]] [command]*`who`* générer une requête qui retourne une liste d'information:: ----------------------------------------- +---- /who [<masque> [o]] masque: information qui correspond à ce masque uniquement o: seul les opérateurs sont retournés correspondant au masque fourni ----------------------------------------- +---- [[command_irc_whois]] [command]*`whois`* demander les informations sur le(s) utilisateur(s):: ----------------------------------------- +---- /whois [<serveur>] [<pseudo>[,<pseudo>...]] serveur: nom de serveur @@ -849,16 +849,16 @@ serveur: nom de serveur Sans paramètre, cette commande effectuera un whois sur : - votre propre pseudo si le tampon est un serveur/canal - le pseudo distant si le tampon est un privé. ----------------------------------------- +---- [[command_irc_whowas]] [command]*`whowas`* demander de l'information sur un pseudo qui n'existe plus:: ----------------------------------------- +---- /whowas <pseudo>[,<pseudo>...] [<nombre> [<cible>]] pseudo: pseudo à chercher nombre: nombre de réponses à retourner (recherche complète si nombre négatif) cible: la réponse doit correspondre à ce masque ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/logger_commands.txt b/doc/fr/autogen/user/logger_commands.txt index 4eca477a6..13b5c1465 100644 --- a/doc/fr/autogen/user/logger_commands.txt +++ b/doc/fr/autogen/user/logger_commands.txt @@ -1,7 +1,7 @@ [[command_logger_logger]] [command]*`logger`* configuration de l'extension logger:: ----------------------------------------- +---- /logger list set <niveau> flush @@ -33,5 +33,5 @@ Exemples: /set logger.level.core.weechat 0 utiliser un répertoire par serveur IRC et un fichier par canal dedans: /set logger.mask.irc "$server/$channel.weechatlog" ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/lua_commands.txt b/doc/fr/autogen/user/lua_commands.txt index 6bd3248f0..4d0ca455f 100644 --- a/doc/fr/autogen/user/lua_commands.txt +++ b/doc/fr/autogen/user/lua_commands.txt @@ -1,7 +1,7 @@ [[command_lua_lua]] [command]*`lua`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /lua list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/perl_commands.txt b/doc/fr/autogen/user/perl_commands.txt index f22fbcbf4..441730ec6 100644 --- a/doc/fr/autogen/user/perl_commands.txt +++ b/doc/fr/autogen/user/perl_commands.txt @@ -1,7 +1,7 @@ [[command_perl_perl]] [command]*`perl`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /perl list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/python_commands.txt b/doc/fr/autogen/user/python_commands.txt index 1a41e1efb..22333b387 100644 --- a/doc/fr/autogen/user/python_commands.txt +++ b/doc/fr/autogen/user/python_commands.txt @@ -1,7 +1,7 @@ [[command_python_python]] [command]*`python`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /python list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/relay_commands.txt b/doc/fr/autogen/user/relay_commands.txt index 9ee27725c..d86c1ce9f 100644 --- a/doc/fr/autogen/user/relay_commands.txt +++ b/doc/fr/autogen/user/relay_commands.txt @@ -1,7 +1,7 @@ [[command_relay_relay]] [command]*`relay`* contrôle du relai:: ----------------------------------------- +---- /relay list|listfull|listrelay add [ipv4.][ipv6.][ssl.]<protocole.nom> <port> del [ipv4.][ipv6.][ssl.]<protocole.nom> @@ -42,5 +42,5 @@ Exemples: /relay add ipv6.ssl.weechat 9001 protocole weechat avec SSL, en utilisant IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/rmodifier_commands.txt b/doc/fr/autogen/user/rmodifier_commands.txt index affab9061..36dd40b5f 100644 --- a/doc/fr/autogen/user/rmodifier_commands.txt +++ b/doc/fr/autogen/user/rmodifier_commands.txt @@ -1,7 +1,7 @@ [[command_rmodifier_rmodifier]] [command]*`rmodifier`* modifier des chaînes de "modifier" avec des expressions régulières:: ----------------------------------------- +---- /rmodifier list|listdefault add <nom> <modifiers> <groupes> <regex> del <nom>|-all [<nom>...] @@ -27,5 +27,5 @@ Exemples: /rmodifier del password supprimer tous les rmodifiers: /rmodifier del -all ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/ruby_commands.txt b/doc/fr/autogen/user/ruby_commands.txt index 5a3f7ff3b..bc2788abd 100644 --- a/doc/fr/autogen/user/ruby_commands.txt +++ b/doc/fr/autogen/user/ruby_commands.txt @@ -1,7 +1,7 @@ [[command_ruby_ruby]] [command]*`ruby`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /ruby list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/script_commands.txt b/doc/fr/autogen/user/script_commands.txt index e5c99dd82..e4804de52 100644 --- a/doc/fr/autogen/user/script_commands.txt +++ b/doc/fr/autogen/user/script_commands.txt @@ -1,7 +1,7 @@ [[command_script_script]] [command]*`script`* Gestionnaire de scripts WeeChat:: ----------------------------------------- +---- /script list [-o|-i] search <texte> show <script> @@ -73,5 +73,5 @@ Exemples: /script hold urlserver.py /script reload urlserver /script upgrade ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/tcl_commands.txt b/doc/fr/autogen/user/tcl_commands.txt index a56bf427c..ba9226145 100644 --- a/doc/fr/autogen/user/tcl_commands.txt +++ b/doc/fr/autogen/user/tcl_commands.txt @@ -1,7 +1,7 @@ [[command_tcl_tcl]] [command]*`tcl`* lister/charger/décharger des scripts:: ----------------------------------------- +---- /tcl list|listfull [<nom>] load [-q] <fichier> autoload @@ -18,5 +18,5 @@ autoload: charger tous les scripts dans le répertoire "autoload" -q: mode silencieux: ne pas afficher de messages Sans paramètre, cette commande liste les scripts chargés. ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index dc40833ab..aa96dcd27 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -1,17 +1,17 @@ [[command_weechat_away]] [command]*`away`* définir ou supprimer le statut d'absence:: ----------------------------------------- +---- /away [-all] [<message>] -all: définir ou supprimer le statut d'absence sur tous les serveurs connectés message: message pour l'absence (si pas de message donné, le statut d'absence est supprimé) ----------------------------------------- +---- [[command_weechat_bar]] [command]*`bar`* gestion des barres:: ----------------------------------------- +---- /bar list|listfull|listitems add <nom> <type>[,<conditions>] <position> <taille> <séparateur> <objet1>[,<objet2>...] default [input|title|status|nicklist] @@ -58,12 +58,12 @@ Exemples: /bar scroll nicklist * y+10 faire défiler la liste des pseudos à la fin sur le tampon courant: /bar scroll nicklist * ye ----------------------------------------- +---- [[command_weechat_buffer]] [command]*`buffer`* gestion des tampons:: ----------------------------------------- +---- /buffer list clear [<nombre>|<nom>|-merged|-all] move|merge <nombre> @@ -120,12 +120,12 @@ Exemples: /buffer #weechat aller au tampon suivant: /buffer +1 ----------------------------------------- +---- [[command_weechat_color]] [command]*`color`* définir des alias de couleurs et afficher la palette des couleurs:: ----------------------------------------- +---- /color alias <couleur> <nom> unalias <couleur> reset @@ -145,22 +145,22 @@ Exemples: /color alias 214 orange supprimer la couleur 214: /color unalias 214 ----------------------------------------- +---- [[command_weechat_command]] [command]*`command`* lancer explicitement une commande WeeChat ou d'une extension:: ----------------------------------------- +---- /command <extension> <commande> extension: nom de l'extension ('weechat' pour une commande interne WeeChat) commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est pas trouvé au début de la commande) ----------------------------------------- +---- [[command_weechat_cursor]] [command]*`cursor`* mouvement libre du curseur sur l'écran pour exécuter des actions sur des zones spécifiques de l'écran:: ----------------------------------------- +---- /cursor go chat|<barre>|<x>,<y> move up|down|left|right|area_up|area_down|area_left|area_right stop @@ -178,12 +178,12 @@ Exemples: /cursor go nicklist aller aux coordonnées x=10, y=5: /cursor go 10,5 ----------------------------------------- +---- [[command_weechat_debug]] [command]*`debug`* contrôle du debug pour le cœur/les extensions:: ----------------------------------------- +---- /debug list set <extension> <niveau> dump [<extension>] @@ -208,12 +208,12 @@ infolists: afficher des infos sur les infolists tags: afficher les étiquettes pour les lignes term: afficher des infos sur le terminal windows: afficher l'arbre des fenêtres ----------------------------------------- +---- [[command_weechat_eval]] [command]*`eval`* évaluer une expression et envoyer le résultat au tampon:: ----------------------------------------- +---- /eval [-n] <expression> [-n] -c <expression1> <opérateur> <expression2> @@ -266,12 +266,12 @@ Exemples: /eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd !~ abc ==> 0 ----------------------------------------- +---- [[command_weechat_filter]] [command]*`filter`* filtrer les messages dans les tampons, pour les cacher/afficher selon des tags ou expressions régulières:: ----------------------------------------- +---- /filter list enable|disable|toggle [<nom>] add <nom> <tampon>[,<tampon>...] <tags> <regex> @@ -320,12 +320,12 @@ Exemples: /filter add toto irc.freenode.#weechat nick_toto * filtrer les lignes contenant "weechat sucks" sur le canal IRC #weechat: /filter add sucks irc.freenode.#weechat * weechat sucks ----------------------------------------- +---- [[command_weechat_help]] [command]*`help`* afficher l'aide sur les commandes et les options:: ----------------------------------------- +---- /help -list|-listfull [<extension> [<extension>...]] <commande> <option> @@ -335,23 +335,23 @@ Exemples: extension: lister les commandes de cette extension commande: un nom de commande option: un nom d'option (utilisez /set pour voir la liste) ----------------------------------------- +---- [[command_weechat_history]] [command]*`history`* afficher l'historique des commandes du tampon:: ----------------------------------------- +---- /history clear <valeur> clear: effacer l'historique valeur: nombre d'entrées dans l'historique à afficher ----------------------------------------- +---- [[command_weechat_input]] [command]*`input`* fonctions pour la ligne de commande:: ----------------------------------------- +---- /input <action> [<paramètres>] liste des actions: @@ -406,12 +406,12 @@ liste des actions: paste_stop: fin de collage (mode "bracketed paste") Cette commande est utilisé par les associations de touches ou les extensions. ----------------------------------------- +---- [[command_weechat_key]] [command]*`key`* associer/libérer des touches:: ----------------------------------------- +---- /key list|listdefault|listdiff [<contexte>] bind <touche> [<commande> [<args>]] bindctxt <contexte> <touche> [<commande> [<args>]] @@ -461,12 +461,12 @@ Exemples: /key bindctxt search ctrl-I /input search_stop bouton du milieu de la souris sur un pseudo pour récupérer les infos sur le pseudo: /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick} ----------------------------------------- +---- [[command_weechat_layout]] [command]*`layout`* sauver/appliquer/réinitialiser la disposition des tampons et fenêtres:: ----------------------------------------- +---- /layout save [<nom>] [buffers|windows] apply [<nom>] [buffers|windows] leave @@ -484,12 +484,12 @@ buffers: sauver/appliquer seulement pour les tampons (ordre des tampons) windows: sauver/appliquer seulement pour les fenêtres (le tampon affiché par chaque fenêtre) Sans paramètre, cette commande affiche les dispositions sauvegardées. ----------------------------------------- +---- [[command_weechat_mouse]] [command]*`mouse`* contrôle de la souris:: ----------------------------------------- +---- /mouse enable|disable|toggle [<délai>] enable: activer la souris @@ -504,12 +504,12 @@ Exemples: /mouse enable activer/désactiver la souris pendant 5 secondes: /mouse toggle 5 ----------------------------------------- +---- [[command_weechat_mute]] [command]*`mute`* exécuter une commande silencieusement:: ----------------------------------------- +---- /mute [-current | -buffer <nom> | -all] commande -current: pas d'affichage sur le tampon courant @@ -527,12 +527,12 @@ Exemples: /mute -current msg * bonjour ! message au canal #weechat: /mute -buffer irc.freenode.#weechat msg #weechat bonjour ! ----------------------------------------- +---- [[command_weechat_plugin]] [command]*`plugin`* lister/charger/décharger des extensions:: ----------------------------------------- +---- /plugin list|listfull [<nom>] load <fichier> [<paramètres>] autoload [<paramètres>] @@ -550,12 +550,12 @@ Exemples: paramètres: paramètres donnés à l'extension lors de son chargement Sans paramètre, cette commande liste les extensions chargées. ----------------------------------------- +---- [[command_weechat_proxy]] [command]*`proxy`* gestion des proxies:: ----------------------------------------- +---- /proxy list add <nom> <type> <adresse> <port> [<utilisateur> [<mot_de_passe>]] del <nom>|-all @@ -584,34 +584,34 @@ Exemples: /proxy add myproxy socks5 sample.host.org 3128 myuser mypass supprimer un proxy: /proxy del myproxy ----------------------------------------- +---- [[command_weechat_quit]] [command]*`quit`* quitter WeeChat:: ----------------------------------------- +---- /quit [-yes] [<paramètres>] -yes: requis si l'option weechat.look.confirm_quit est activée paramètres: texte envoyé avec le signal "quit" (par exemple l'extension irc utilise ce texte pour envoyer le message de quit au serveur) ----------------------------------------- +---- [[command_weechat_reload]] [command]*`reload`* recharger les fichiers de configuration depuis le disque:: ----------------------------------------- +---- /reload [<fichier> [<fichier>...]] fichier: fichier de configuration à recharger (sans l'extension ".conf") Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés. ----------------------------------------- +---- [[command_weechat_repeat]] [command]*`repeat`* exécuter une commande plusieurs fois:: ----------------------------------------- +---- /repeat [-interval <délai>] <nombre> <commande> délai: délai entre l'exécution des commandes (en millisecondes) @@ -623,23 +623,23 @@ Toutes les commandes sont exécutées sur le tampon où la commande a été lanc Exemple: faire défiler de 2 pages vers le haut: /repeat 2 /window page_up ----------------------------------------- +---- [[command_weechat_save]] [command]*`save`* sauvegarder les fichiers de configuration sur disque:: ----------------------------------------- +---- /save [<fichier> [<fichier>...]] fichier: fichier de configuration à sauvegarder (sans l'extension ".conf") Sans paramètre, tous les fichiers (WeeChat et extensions) sont sauvegardés. ----------------------------------------- +---- [[command_weechat_secure]] [command]*`secure`* gestion des données sécurisées (mots de passe ou données privées chiffrés dans le fichier sec.conf):: ----------------------------------------- +---- /secure passphrase <phrase de chiffrement>|-delete decrypt <phrase de chiffrement>|-discard set <nom> <valeur> @@ -676,12 +676,12 @@ Exemples : /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}" alias pour ghost du pseudo "pseudo" : /alias ghost /eval /msg -server freenode nickserv ghost pseudo ${sec.data.freenode} ----------------------------------------- +---- [[command_weechat_set]] [command]*`set`* modifier des options de configuration:: ----------------------------------------- +---- /set [<option> [<valeur>]] diff [<option> [<option>...]] @@ -706,12 +706,12 @@ Exemples: /set diff afficher les options modifiées dans l'extension irc: /set diff irc.* ----------------------------------------- +---- [[command_weechat_unset]] [command]*`unset`* supprimer/réinitialiser des options de configuration:: ----------------------------------------- +---- /unset <option> option: nom d'une option (peut commencer ou se terminer par "*" pour réinitialiser plusieurs options, à utiliser avec prudence !) @@ -723,12 +723,12 @@ Exemples: /unset weechat.look.item_time_format réinitialiser toutes les options de couleur: /unset weechat.color.* ----------------------------------------- +---- [[command_weechat_upgrade]] [command]*`upgrade`* mettre à jour WeeChat sans se déconnecter des serveurs:: ----------------------------------------- +---- /upgrade [<chemin_vers_binaire>|-quit] chemin_vers_binaire: chemin vers le binaire WeeChat (par défaut le binaire courant) @@ -754,32 +754,32 @@ Avec l'option "-quit", le processus est légèrement différent : Et plus tard vous pouvez restaurer la session avec la commande: weechat --upgrade IMPORTANT: vous devez restaurer la session avec exactement la même configuration (fichiers *.conf). Il est également possible de restaurer la session WeeChat sur une autre machine si vous y copiez le contenu du répertoire "~/.weechat". ----------------------------------------- +---- [[command_weechat_uptime]] [command]*`uptime`* montrer l'uptime de WeeChat:: ----------------------------------------- +---- /uptime [-o | -ol] -o: envoyer l'uptime sur le tampon courant comme entrée (chaîne en anglais) -ol: envoyer l'uptime sur le tampon courant comme entrée (chaîne traduite) ----------------------------------------- +---- [[command_weechat_version]] [command]*`version`* afficher la version de WeeChat et la date de compilation:: ----------------------------------------- +---- /version [-o | -ol] -o: envoyer la version sur le tampon courant comme entrée (chaîne en anglais) -ol: envoyer la version sur le tampon courant comme entrée (chaîne traduite) ----------------------------------------- +---- [[command_weechat_wait]] [command]*`wait`* planifier l'exécution d'une commande dans le futur:: ----------------------------------------- +---- /wait <nombre>[<unité>] <commande> nombre: temps à attendre (nombre entier) @@ -799,12 +799,12 @@ Exemples: /wait 15m /away -all I'm away dire 'bonjour' dans 2 minutes: /wait 2m bonjour ----------------------------------------- +---- [[command_weechat_window]] [command]*`window`* gestion des fenêtres:: ----------------------------------------- +---- /window list -1|+1|b#|up|down|left|right [-window <numéro>] <numéro> @@ -863,5 +863,5 @@ Exemples: /window scroll -d zoom sur la fenêtre numéro 2: /window zoom -window 2 ----------------------------------------- +---- diff --git a/doc/fr/autogen/user/xfer_commands.txt b/doc/fr/autogen/user/xfer_commands.txt index ae67f444e..11cf06b3e 100644 --- a/doc/fr/autogen/user/xfer_commands.txt +++ b/doc/fr/autogen/user/xfer_commands.txt @@ -1,21 +1,21 @@ [[command_xfer_me]] [command]*`me`* envoyer une action CTCP à l'hôte distant:: ----------------------------------------- +---- /me <message> message: message à envoyer ----------------------------------------- +---- [[command_xfer_xfer]] [command]*`xfer`* contrôle xfer:: ----------------------------------------- +---- /xfer [list|listfull] list: lister les xfer listfull: lister les xfer (verbeux) Sans paramètre, cette commande ouvre le tampon avec la liste des xfer. ----------------------------------------- +---- diff --git a/doc/fr/weechat.1.fr.txt b/doc/fr/weechat.1.fr.txt index 1006f0f83..984af25e9 100644 --- a/doc/fr/weechat.1.fr.txt +++ b/doc/fr/weechat.1.fr.txt @@ -1,14 +1,11 @@ -WEECHAT(1) -========== += WEECHAT(1) :doctype: manpage -NOM ---- +== NOM weechat - le client de discussion extensible -SYNOPSIS --------- +== SYNOPSIS [verse] 'weechat' [-a|--no-connect] [-d|--dir <répertoire>] [-p|--no-plugin] [-r|--run-command <commande>] [-s|--no-script] [--upgrade] [extension:option...] @@ -18,21 +15,18 @@ SYNOPSIS 'weechat' [-l|--license] 'weechat' [-v|--version] -DESCRIPTION ------------ +== DESCRIPTION WeeChat est un client de discussion rapide, léger et extensible. Il est modulaire (cœur léger avec des extensions), multi-protocoles (IRC et Jabber), extensible avec du C et des scripts écrits en différents langages. -OPTIONS -------- +== OPTIONS include::cmdline_options.fr.txt[] -OPTIONS D'EXTENSION -------------------- +== OPTIONS D'EXTENSION Pour une documentation complète sur les options des extensions, merci de consulter la documentation des extensions dans le @@ -52,8 +46,7 @@ après, par exemple : irc://monpseudo@[2001:db8:0:85a3::ac1f:8001]:6668/#test -FICHIERS --------- +== FICHIERS $HOME/.weechat/weechat.conf:: fichier de configuration principal de WeeChat @@ -91,8 +84,7 @@ $HOME/.weechat/xfer.conf:: $HOME/.weechat/weechat.log:: fichier de log de WeeChat -AUTEURS -------- +== AUTEURS WeeChat est écrit par Sébastien Helleu et des contributeurs (la liste complète est dans le fichier AUTHORS). @@ -108,8 +100,7 @@ Merci de consulter le fichier COPYING pour plus d'informations. Site web : <http://weechat.org/> -SIGNALER DES BUGS ------------------ +== SIGNALER DES BUGS Merci de signaler les bugs ou demandes de nouvelles fonctionnalités sur le site Savannah : diff --git a/doc/fr/weechat_faq.fr.txt b/doc/fr/weechat_faq.fr.txt index 2cf3848bc..137565660 100644 --- a/doc/fr/weechat_faq.fr.txt +++ b/doc/fr/weechat_faq.fr.txt @@ -1,5 +1,4 @@ -WeeChat FAQ (Questions Fréquemment Posées) -========================================== += WeeChat FAQ (Questions Fréquemment Posées) Sébastien Helleu <flashcode@flashtux.org> @@ -8,12 +7,10 @@ Ce document est écrit pour les versions de WeeChat ≥ 0.3.0 mais devrait être utilisé de préférence avec la dernière version stable de WeeChat. -Général -------- +== Général [[weechat_name]] -D'où vient le nom "WeeChat" ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== D'où vient le nom "WeeChat" ? "Wee" est un acronyme récursif qui signifie "Wee Enhanced Environment". Donc le nom complet est "Wee Enhanced Environment for Chat". @@ -22,20 +19,17 @@ Donc le nom complet est "Wee Enhanced Environment for Chat". mais elle ne s'applique pas à WeeChat !). [[why_choose_weechat]] -Pourquoi choisir WeeChat ? X-Chat et Irssi sont si bien... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Pourquoi choisir WeeChat ? X-Chat et Irssi sont si bien... Parce que WeeChat est très léger et apporte des fonctionnalités innovantes. Plus d'infos sur cette page : http://weechat.org/about/features [[compilation_install]] -Compilation / installation --------------------------- +== Compilation / installation [[gui]] -J'ai entendu parler de plusieurs interfaces pour WeeChat. Comment puis-je les compiler/utiliser ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'ai entendu parler de plusieurs interfaces pour WeeChat. Comment puis-je les compiler/utiliser ? Des interfaces distantes sont disponibles : @@ -45,8 +39,7 @@ Des interfaces distantes sont disponibles : * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -Je ne peux pas compiler WeeChat après avoir cloné la base git, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Je ne peux pas compiler WeeChat après avoir cloné la base git, pourquoi ? La méthode recommandée pour compiler WeeChat est d'utiliser cmake. @@ -60,8 +53,7 @@ git et qu'il est moins pratique que de cloner la base git pour installer des mises à jour. [[lost]] -J'ai lancé WeeChat, mais je suis perdu, que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'ai lancé WeeChat, mais je suis perdu, que puis-je faire ? Pour obtenir de l'aide tapez `/help`. Pour de l'aide sur une commande, tapez `/help commande`. Les touches et commandes sont listées dans la documentation. @@ -70,12 +62,10 @@ Il est recommandé pour les nouveaux utilisateurs de lire le guide de démarrage rapide (voir la page de doc sur le site). [[display]] -Affichage ---------- +== Affichage [[charset]] -Je ne vois pas bien certains accents dans WeeChat, que faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Je ne vois pas bien certains accents dans WeeChat, que faire ? C'est un problème courant, merci de lire attentivement et vérifier *TOUS* les points ci-dessous : @@ -106,8 +96,7 @@ locale, assurez-vous que *tout* soit configuré en ISO (terminal, screen, ...) et *pas* en UTF-8. [[bars_background]] -Des barres telles que le titre et le statut ne sont pas remplies, la couleur de fond s'arrête après le texte, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Des barres telles que le titre et le statut ne sont pas remplies, la couleur de fond s'arrête après le texte, pourquoi ? Cela peut être du à la variable TERM qui n'a pas la bonne valeur (regardez la sortie de `echo $TERM` dans votre terminal). @@ -122,8 +111,7 @@ Selon la façon de lancer WeeChat, vous devriez avoir : Si besoin, corrigez la variable TERM : `export TERM="xxx"`. [[screen_weird_chars]] -Quand j'utilise weechat sous screen/tmux, j'ai des caractères bizarres et aléatoires, comment corriger ça ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quand j'utilise weechat sous screen/tmux, j'ai des caractères bizarres et aléatoires, comment corriger ça ? Cela peut être du à la variable TERM qui n'a pas la bonne valeur (regardez la sortie de `echo $TERM` dans votre terminal, *en dehors de screen/tmux*). @@ -134,8 +122,7 @@ Par exemple 'xterm-color' provoque ce genre de problèmes, utilisez Si besoin, corrigez la variable TERM : `export TERM="xxx"`. [[osx_display_broken]] -J'ai compilé WeeChat sous OS X, et je vois des "(null)" partout sur l'écran, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'ai compilé WeeChat sous OS X, et je vois des "(null)" partout sur l'écran, pourquoi ? Si vous avez compilé ncursesw vous-même, essayez avec le ncurses standard (celui fourni avec le système). @@ -144,8 +131,7 @@ De plus, sous OS X, il est recommandé d'installer WeeChat avec le gestionnaire de paquets Homebrew. [[buffer_vs_window]] -J'ai entendu parler de "buffer" et "window", quelle est la différence ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'ai entendu parler de "buffer" et "window", quelle est la différence ? Un tampon ('buffer') est composé d'un numéro, un nom, des lignes affichées (ainsi que d'autres données). @@ -158,42 +144,39 @@ Chaque fenêtre affiche un tampon. Un tampon peut être caché (affiché par aucune fenêtre) ou affiché par une ou plusieurs fenêtres. [[buffers_list]] -Comment afficher la liste des tampons sur la gauche ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment afficher la liste des tampons sur la gauche ? Utilisez le script 'buffers.pl'. Pour limiter la taille de la barre : ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- Pour déplacer la barre en bas : ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -Comment puis-je réduire la longueur des pseudos ou supprimer l'alignement des pseudos dans la zone de discussion ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je réduire la longueur des pseudos ou supprimer l'alignement des pseudos dans la zone de discussion ? Pour réduire la longueur maximum des pseudos dans la zone de discussion : ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- Pour supprimer l'alignement sur les pseudos : ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -Comment utiliser une ligne de commande sur plusieurs lignes ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment utiliser une ligne de commande sur plusieurs lignes ? L'option 'size' dans la barre input peut être définie à une valeur supérieure à 1 (pour une taille fixe, la taille par défaut est 1) ou 0 pour une taille @@ -202,41 +185,39 @@ limite). Exemple avec une taille dynamique : ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- Taille maximum de 2 : ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -Est-il possible d'avoir une seule bar input pour toutes les fenêtres (après un découpage) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Est-il possible d'avoir une seule bar input pour toutes les fenêtres (après un découpage) ? Oui, vous devez créer une barre de type "root" (avec un objet pour savoir dans quelle fenêtre vous êtes), puis supprimer la barre input courante. Par exemple : ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- Si jamais vous n'étiez pas satisfait avec ça, supprimez simplement la nouvelle barre, WeeChat recréera automatiquement la barre par défaut "input" si l'objet "input_text" n'est utilisé dans aucune barre : ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -Comment puis-je copier/coller du texte sans coller la liste des pseudos ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je copier/coller du texte sans coller la liste des pseudos ? Vous pouvez utiliser un terminal qui propose la sélection rectangulaire (comme rxvt-unicode, konsole, gnome-terminal, etc...). La touche est habituellement @@ -245,32 +226,31 @@ rxvt-unicode, konsole, gnome-terminal, etc...). La touche est habituellement Une autre solution est de déplacer la liste des pseudos en haut ou en bas, par exemple : ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -Comment puis-je cliquer sur les longs URLs (plus d'une ligne) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je cliquer sur les longs URLs (plus d'une ligne) ? Par défaut, WeeChat affiche l'heure et un préfixe pour chaque ligne avec des barres optionnelles autour de la zone de discussion. Pour rendre la le clic d'URL plus facile, vous pouvez déplacer la liste des pseudos en haut et supprimer l'alignement sur les pseudos : ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- Avec WeeChat ≥ 0.3.6, vous pouvez activer l'option "eat_newline_glitch", pour éviter qu'un caractère de nouvelle ligne soit affiché après chaque ligne (donc cela ne cassera pas la sélection d'une URL) : ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] Cette option peut causer des problèmes d'affichage. Si vous rencontrez de tels @@ -280,23 +260,21 @@ Une autre solution est d'utiliser un script : http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -Je souhaite changer la langue des messages affichés par WeeChat, mais sans quitter WeeChat, est-ce possible ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Je souhaite changer la langue des messages affichés par WeeChat, mais sans quitter WeeChat, est-ce possible ? Oui, il faut utiliser le script python 'shell.py' (disponible sur le site de WeeChat) et taper ces commandes une fois le script chargé : ----------------------------------------- +---- /shell setenv LANG=fr_FR.UTF-8 /upgrade ----------------------------------------- +---- Pour avoir des messages anglais avec encodage UTF-8 pour le terminal, pour les utilisateurs en ISO, vous pouvez taper : `/shell setenv LANG=fr_FR`. [[use_256_colors]] -Comment puis-je utiliser 256 couleurs sous WeeChat ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je utiliser 256 couleurs sous WeeChat ? Les 256 couleurs sont supportées avec WeeChat ≥ 0.3.4. @@ -312,18 +290,18 @@ valeurs dans la variable 'TERM'. Si vous utilisez screen, vous pouvez ajouter cette ligne dans votre '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Si votre variable 'TERM' a une valeur erronée et que WeeChat est déjà lancé, ne paniquez pas ! Vous pouvez la changer sans redémarrer, grâce au script 'shell.py' : ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- Pour la version 0.3.4, vous devez utiliser la commande `/color` pour ajouter des nouvelles couleurs. @@ -336,8 +314,7 @@ Merci de lire le guide utilisateur pour plus d'information sur la gestion des couleurs. [[search_text]] -Comment puis-je chercher du texte dans le tampon (comme /lastlog dans irssi) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je chercher du texte dans le tampon (comme /lastlog dans irssi) ? La touche par défaut est @k(C-)@k(r) (la commande est : `/input search_text`). Et sauter aux highlights : @k(A-)@k(p)/@k(n). @@ -346,31 +323,28 @@ Voir le guide utilisateur pour plus d'information sur cette fonctionnalité (raccourcis clavier par défaut). [[key_bindings]] -Raccourcis clavier ------------------- +== Raccourcis clavier [[meta_keys]] -Quelques touches meta (alt + touche) ne fonctionnent pas, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quelques touches meta (alt + touche) ne fonctionnent pas, pourquoi ? Si vous utilisez certains terminaux comme xterm ou uxterm, quelques touches meta ne fonctionnent pas par défaut. Vous pouvez ajouter cette ligne dans le fichier '~/.Xresources': * pour xterm: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * pour uxterm: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- Puis recharger les ressources (`xrdb -override ~/.Xresources`) ou redémarrez X. [[customize_key_bindings]] -Comment puis-je configurer les raccourcis clavier ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je configurer les raccourcis clavier ? Les raccourcis clavier sont modifiables avec la commande `/key`. @@ -378,33 +352,31 @@ La touche par défaut @k(A-)@k(k) permet de capturer le code d'une touche et de l'inclure dans la ligne de commande. [[jump_to_buffer_11_or_higher]] -Quelle est la touche pour sauter vers le tampon 11 (ou numéro plus élevé) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quelle est la touche pour sauter vers le tampon 11 (ou numéro plus élevé) ? La touche est @k(A-)@k(j) puis 2 chiffres, par exemple @k(A-)@k(j) puis @k(1), @k(1) pour sauter au tampon 11. Vous pouvez définir une touche, par exemple : ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- La liste des touches par défaut est dans le Guide utilisateur. [[global_history]] -Comment utiliser l'historique global (au lieu de l'historique du tampon) avec les touches haut et bas ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment utiliser l'historique global (au lieu de l'historique du tampon) avec les touches haut et bas ? Vous pouvez assigner les touches haut et bas sur l'historique global (les touches par défaut pour l'historique global sont @k(C-)@k(↑) et @k(C-)@k(↓)). Exemple : ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] Les touches "meta2-A" et "meta2-B" peuvent être différentes dans votre terminal. @@ -412,20 +384,18 @@ Pour trouver le code de la touche appuyez sur @k(A-)@k(k) puis la touche (haut ou bas). [[mouse]] -Souris ------- +== Souris [[mouse_not_working]] -La souris ne fonctionne pas du tout, que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== La souris ne fonctionne pas du tout, que puis-je faire ? La souris est supportée avec WeeChat ≥ 0.3.6. Premièrement essayez d'activer la souris : ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Si la souris ne fonctionne toujours pas, vérifiez la variable TERM dans votre shell (regardez la sortie de `echo $TERM` dans votre terminal). @@ -433,22 +403,21 @@ Selon le terminfo utilisé, la souris peut ne pas être supportée. Vous pouvez tester le support de la souris dans le terminal : ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- Et cliquez sur le premier caractère du terminal (en haut à gauche). Vous devriez voir " !!#!!". Pour désactiver la souris dans le terminal : ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -La souris ne fait rien pour un X ou Y supérieur à 94, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== La souris ne fait rien pour un X ou Y supérieur à 94, pourquoi ? Certains terminaux envoient seulement des caractères ISO pour les coordonnées de la souris, donc cela ne fonctionne pas avec un X/Y supérieur à 94. @@ -457,8 +426,7 @@ Vous devriez utiliser un terminal qui supporte les coordonnées UTF-8 pour la souris, comme rxvt-unicode. [[mouse_select_paste]] -Comment puis-je sélectionner ou coller du texte quand la souris est activée dans WeeChat ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je sélectionner ou coller du texte quand la souris est activée dans WeeChat ? Lorsque la souris est activée dans WeeChat, vous pouvez utiliser la touche @k(-S-) pour sélectionner ou cliquer dans le terminal, comme si la souris était @@ -466,49 +434,45 @@ désactivée (sous certains terminaux comme iTerm, vous devez utiliser @k(-A-) a lieu de @k(-S-)). [[irc]] -IRC ---- +== IRC [[irc_ssl_connection]] -J'ai des problèmes pour me connecter au serveur avec SSL, que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'ai des problèmes pour me connecter au serveur avec SSL, que puis-je faire ? Si vous voyez des erreurs à propos de la poignée de main gnutls ("handshake"), vous pouvez utiliser une valeur plus petite pour la clé Diffie-Hellman (par défaut 2048) : ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- Si vous voyez des erreurs à propos du certificat, vous pouvez désactiver "ssl_verify" (attention, la connexion sera moins sûre en faisant cela) : ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -Lors de la connexion SSL à un serveur, je vois juste une erreur "TLS handshake failed", que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Lors de la connexion SSL à un serveur, je vois juste une erreur "TLS handshake failed", que puis-je faire ? Vous pouvez essayer une chaîne de priorité différente (WeeChat ≥ 0.3.5 seulement), remplacez "xxx" par le nom de votre serveur : ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -Comment puis-je me connecter à freenode avec SSL ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je me connecter à freenode avec SSL ? Positionnez l'option 'weechat.network.gnutls_ca_file' avec le fichier des certificats : ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] Vérifiez que vous avez bien ce fichier (fourni généralement par le paquet @@ -516,16 +480,15 @@ Vérifiez que vous avez bien ce fichier (fourni généralement par le paquet Configurez le port du serveur, SSL, dhkey_size, puis connectez-vous : ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- [[irc_oauth]] -Comment se connecter à un serveur qui requiert "oauth" ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment se connecter à un serveur qui requiert "oauth" ? Des serveurs tels que 'twitch' requièrent oauth pour se connecter. @@ -534,34 +497,32 @@ L'oauth est simplement un mot de passe avec la valeur "oauth:XXXX". Vous pouvez créer un tel serveur et vous y connecter avec les commandes suivantes (remplacez le nom et l'adresse par les valeurs appropriées) : ----------------------------------------- +---- /server add nom irc.server.org -password="oauth:XXXX" /connect nom ----------------------------------------- +---- [[irc_sasl]] -Comment puis-je être identifié avant de rejoindre les canaux ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je être identifié avant de rejoindre les canaux ? Si le serveur supporte SASL, vous devriez l'utiliser au lieu d'envoyer une commande pour l'authentification avec nickserv, par exemple : ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "mynick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- Si le serveur ne supporte pas SASL, vous pouvez ajouter un délai (entre la commande et le join des canaux) : ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -Quelle est la différence entre les commandes /ignore et /filter ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quelle est la différence entre les commandes /ignore et /filter ? La commande `/ignore` est une commande IRC, donc elle s'applique uniquement aux tampons IRC (serveurs et canaux). @@ -579,38 +540,36 @@ de les voir en désactivant les filtres (par défaut, la touche @k(A-)@k(=) active/désactive les filtres). [[filter_irc_join_part_quit]] -Comment puis-je filtrer les messages join/part/quit sur les canaux IRC ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je filtrer les messages join/part/quit sur les canaux IRC ? Avec le filtre intelligent (pour garder les join/part/quit des utilisateurs qui ont parlé récemment) : ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- Avec un filtre global (pour cacher *tous* les join/part/quit) : ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] Pour l'aide : `/help filter` et `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -Comment puis-je filtrer certains messages affichés quand je rejoins un canal IRC ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je filtrer certains messages affichés quand je rejoins un canal IRC ? Avec WeeChat ≥ 0.4.1, vous pouvez désactiver des messages avec l'option 'irc.look.display_join_message'. Par exemple, pour désactiver les noms (qui est le message IRC '366') : ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] Pour l'aide : `/help irc.look.display_join_message` @@ -627,17 +586,16 @@ tampon des données brutes IRC (`/server raw`). Exemples : * filtrer les noms : ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * filtrer le titre (et la date): ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -Comment puis-je filtrer les messages voice (par exemple sur le serveur Bitlbee) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je filtrer les messages voice (par exemple sur le serveur Bitlbee) ? Il n'est pas facile de filtrer les messages voice, car le mode voice peut être positionné avec d'autres modes dans le même message IRC. @@ -649,15 +607,15 @@ couleur spéciale pour les pseudos absents dans la liste des pseudos. Pour Bitlbee ≥ 3, faites ceci sur le canal '&bitlbee' : ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- Pour une version plus ancienne de Bitlbee, faites ceci sur le canal '&bitlbee': ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- Pour vérifier les pseudos absents dans WeeChat, voir la question à propos des <<color_away_nicks,pseudos absents>>. @@ -666,13 +624,12 @@ Si vous voulez vraiment filtrer les messages voice, vous pouvez utiliser cette commande, mais elle n'est pas parfaite (elle fonctionne seulement si le premier mode changé est voice) : ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -Comment puis-je voir les pseudos absents dans la liste des pseudos ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je voir les pseudos absents dans la liste des pseudos ? Vous devez positionner l'option 'irc.server_default.away_check' avec une valeur positive (minutes entre chaque vérification des pseudos absents). @@ -683,56 +640,51 @@ pour limiter la vérification d'absence sur les petits canaux seulement. Par exemple, pour vérifier les pseudos absents toutes les 5 minutes, pour les canaux avec maximum 25 pseudos : ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] Pour WeeChat ≤ 0.3.3, les options sont 'irc.network.away_check' et 'irc.network.away_check_max_nicks'. [[highlight_notification]] -Comment être averti lorsque quelqu'un prononce mon pseudo sur un canal ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment être averti lorsque quelqu'un prononce mon pseudo sur un canal ? Vous pouvez utiliser un script comme 'beep.pl' ou 'launcher.pl'. Pour 'launcher.pl', vous devez configurer la commande : ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/chemin/vers/commande paramètres" ----------------------------------------- +---- Autres scripts sur ce sujet : http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -Comment puis-je changer le serveur cible pour les commandes avec des tampons mélangés (comme le tampon avec les serveurs) ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je changer le serveur cible pour les commandes avec des tampons mélangés (comme le tampon avec les serveurs) ? La touche par défaut est @k(C-)@k(x) (la commande est : `/input switch_active_buffer`). [[plugins_scripts]] -Extensions / scripts --------------------- +== Extensions / scripts [[openbsd_plugins]] -J'utilise OpenBSD et WeeChat ne charge aucune extension, pourquoi ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== J'utilise OpenBSD et WeeChat ne charge aucune extension, pourquoi ? Sous OpenBSD, le nom des extensions se termine par ".so.0.0" (".so" sous Linux). Vous devez configurer ça : ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -Comment puis-je charger des scripts Perl/Python/Ruby/Lua/Tcl ? Les scripts sont-ils compatibles avec d'autres clients IRC ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je charger des scripts Perl/Python/Ruby/Lua/Tcl ? Les scripts sont-ils compatibles avec d'autres clients IRC ? Les commandes `/perl`, `/python`, `/ruby`, `/lua` et `/tcl` permettent de charger les scripts (le chemin par défaut est '~/.weechat/<langage>/'). @@ -746,12 +698,10 @@ Notes : * l'extension 'tcl' est disponible à partir de la version 0.3.0. [[settings]] -Réglages --------- +== Réglages [[memory_usage]] -Comment configurer WeeChat pour consommer moins de mémoire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment configurer WeeChat pour consommer moins de mémoire ? Vous pouvez essayer les astuces suivantes pour consommer moins de mémoire : @@ -768,12 +718,10 @@ Vous pouvez essayer les astuces suivantes pour consommer moins de mémoire : * réduire la valeur de l'option 'weechat.history.max_commands' [[development]] -Développement -------------- +== Développement [[bug_task_patch]] -Comment puis-je reporter un bug, demander une nouvelle fonctionnalité ou envoyer un patch ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Comment puis-je reporter un bug, demander une nouvelle fonctionnalité ou envoyer un patch ? Il y a 3 possibilités : @@ -787,29 +735,27 @@ Il y a 3 possibilités : (vous pouvez souscrire et envoyer à la liste de diffusion nommée "support") [[gdb_error_threads]] -Quand je lance WeeChat sous gdb, il y a une erreur à propos des threads, que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quand je lance WeeChat sous gdb, il y a une erreur à propos des threads, que puis-je faire ? Quand vous lancez WeeChat sous gdb, vous pouvez avoir cette erreur : ----------------------------------------- +---- $ gdb /path/to/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- Pour corriger ça, vous pouvez lancer gdb avec cette commande (remplacez le chemin vers libpthread et WeeChat avec les chemins sur votre système) : ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -Quelle est la liste des plates-formes supportées par WeeChat ? Sera-t-il porté sur d'autres systèmes d'exploitation ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quelle est la liste des plates-formes supportées par WeeChat ? Sera-t-il porté sur d'autres systèmes d'exploitation ? La liste complète est sur cette page : http://weechat.org/download @@ -818,8 +764,7 @@ Toute aide est la bienvenue pour les systèmes que nous n'avons pas, pour y tester WeeChat. [[help_developers]] -Je souhaiterais aider les développeurs WeeChat. Que puis-je faire ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Je souhaiterais aider les développeurs WeeChat. Que puis-je faire ? Il y a plusieurs choses à faire (test, code, documentation, etc...) @@ -827,8 +772,7 @@ Merci de prendre contact avec nous par IRC ou mail, consultez la page support : http://weechat.org/dev/support [[donate]] -Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Puis-je donner de l'argent ou d'autres choses aux développeurs WeeChat ? Vous pouvez donner de l'argent pour aider le développement. Plus de détails sur http://weechat.org/about/donate diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 91359fa0a..75ba9e0d4 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -1,5 +1,4 @@ -Référence API Extension WeeChat -=============================== += Référence API Extension WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -11,8 +10,7 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre, rapide et léger, conçu pour différents systèmes d'exploitation. @@ -21,8 +19,7 @@ Ce manuel documente l'API WeeChat des extensions, utilisée par les extensions en C pour interagir avec le cœur de WeeChat. [[plugins_in_weechat]] -Extensions dans WeeChat ------------------------ +== Extensions dans WeeChat Une extension est un programme C qui peut appeler des fonctions WeeChat définies dans une interface. @@ -40,8 +37,7 @@ Ce fichier définit les structures et types utilisés pour communiquer avec WeeChat. [[macros]] -Macros -~~~~~~ +=== Macros L'extension doit utiliser des macros (pour définir quelques variables) : @@ -58,26 +54,24 @@ WEECHAT_PLUGIN_LICENSE("GPL3"):: licence de l'extension [[main_functions]] -Fonctions principales -~~~~~~~~~~~~~~~~~~~~~ +=== Fonctions principales L'extension doit utiliser deux fonctions : * weechat_plugin_init * weechat_plugin_end -weechat_plugin_init -^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_init Cette fonction est appelée quand l'extension est chargée par WeeChat. Prototype : [source,C] ----------------------------------------- +---- int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]); ----------------------------------------- +---- Paramètres : @@ -91,17 +85,16 @@ Valeur de retour : * 'WEECHAT_RC_OK' si ok (l'extension sera chargée) * 'WEECHAT_RC_ERROR' si erreur (l'extension ne sera PAS chargée) -weechat_plugin_end -^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_end Cette fonction est appelée quand l'extension est déchargée par WeeChat. Prototype : [source,C] ----------------------------------------- +---- int weechat_plugin_end (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Paramètres : @@ -113,22 +106,20 @@ Valeur de retour : * 'WEECHAT_RC_ERROR' si erreur [[compile_plugin]] -Compilation de l'extension -~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Compilation de l'extension La compilation ne nécessite pas les sources de WeeChat, seul le fichier 'weechat-plugin.h' est requis. Pour compiler l'extension qui n'a qu'un fichier "toto.c" (sous GNU/Linux) : ----------------------------------------- +---- $ gcc -fPIC -Wall -c toto.c $ gcc -shared -fPIC -o libtoto.so toto.o ----------------------------------------- +---- [[load_plugin]] -Chargement de l'extension -~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Chargement de l'extension Copiez le fichier 'libtoto.so' dans le répertoire système des extensions (par exemple '/usr/local/lib/weechat/plugins') ou dans le répertoire utilisateur des @@ -136,20 +127,19 @@ extensions (par exemple '/home/xxx/.weechat/plugins'). Sous WeeChat : ----------------------------------------- +---- /plugin load toto ----------------------------------------- +---- [[plugin_example]] -Exemple d'extension -~~~~~~~~~~~~~~~~~~~ +=== Exemple d'extension Exemple complet d'extension, qui ajoute une commande '/double' : affiche deux fois les paramètres sur le tampon courant, ou exécute deux fois une commande (ok ce n'est pas très utile, mais c'est juste un exemple !) : [source,C] ----------------------------------------- +---- #include <stdlib.h> #include "weechat-plugin.h" @@ -209,11 +199,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) return WEECHAT_RC_OK; } ----------------------------------------- +---- [[plugin_api]] -API extension -------------- +== API extension Les chapîtres ci-dessous décrivent les fonctions de l'API, classées par catégorie. @@ -229,22 +218,20 @@ Pour chaque fonction, on donne : similaire). [[plugins]] -Extensions -~~~~~~~~~~ +=== Extensions Fonctions pour obtenir des informations sur les extensions. -weechat_plugin_get_name -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_get_name Retourne le nom d'une extension. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_plugin_get_name (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Paramètres : @@ -258,32 +245,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *name = weechat_plugin_get_name (plugin); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype name = weechat.plugin_get_name(plugin) # exemple plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin") name = weechat.plugin_get_name(plugin) ----------------------------------------- +---- [[strings]] -Chaînes de caractères -~~~~~~~~~~~~~~~~~~~~~ +=== Chaînes de caractères Plusieurs fonctions sur les chaînes de caractères sont déjà disponibles via les fonctions standard du C, mais il est recommandé d'utiliser celles de l'API car elles sont ok avec UTF-8 et la locale. -weechat_charset_set -^^^^^^^^^^^^^^^^^^^ +==== weechat_charset_set Définit le nouveau jeu de caractères (le jeu de caractères par défaut est 'UTF-8', donc si votre extension utilise 'UTF-8', vous n'avez pas besoin @@ -292,9 +277,9 @@ d'appeler cette fonction). Prototype : [source,C] ----------------------------------------- +---- void weechat_charset_set (const char *charset); ----------------------------------------- +---- Paramètres : @@ -303,32 +288,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_charset_set ("iso-8859-1"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.charset_set(charset) # exemple weechat.charset_set("iso-8859-1") ----------------------------------------- +---- -weechat_iconv_to_internal -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_to_internal Convertit une chaîne vers le jeu de caractères interne (UTF-8). Prototype : [source,C] ----------------------------------------- +---- char *weechat_iconv_to_internal (const char *charset, const char *string); ----------------------------------------- +---- Paramètres : @@ -342,34 +326,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_iconv_to_internal ("iso-8859-1", "chaîne iso : é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.iconv_to_internal(charset, string) # exemple str = weechat.iconv_to_internal("iso-8859-1", "chaîne iso : é à") ----------------------------------------- +---- -weechat_iconv_from_internal -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_from_internal Convertie une chaîne du jeu de caractères interne (UTF-8) vers un autre. Prototype : [source,C] ----------------------------------------- +---- char *weechat_iconv_from_internal (const char *charset, const char *string); ----------------------------------------- +---- Paramètres : @@ -383,34 +366,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_iconv_from_internal ("iso-8859-1", "chaîne utf-8 : é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.iconv_from_internal(charset, string) # exemple str = weechat.iconv_from_internal("iso-8859-1", "chaîne utf-8 : é à") ----------------------------------------- +---- -weechat_gettext -^^^^^^^^^^^^^^^ +==== weechat_gettext Retourne la chaîne traduite (dépend de la langue locale). Prototype : [source,C] ----------------------------------------- +---- const char *weechat_gettext (const char *string); ----------------------------------------- +---- Paramètres : @@ -423,23 +405,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_gettext ("hello"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.gettext(string) # exemple str = weechat.gettext("hello") ----------------------------------------- +---- -weechat_ngettext -^^^^^^^^^^^^^^^^ +==== weechat_ngettext Retourne la chaîne traduite, en utilisant le singulier ou le pluriel, selon le paramètre 'count'. @@ -447,10 +428,10 @@ le paramètre 'count'. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_ngettext (const char *string, const char *plural, int count); ----------------------------------------- +---- Paramètres : @@ -466,33 +447,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_ngettext ("file", "files", num_files); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.ngettext(string, plural, count) # exemple num_files = 2 str = weechat.ngettext("file", "files", num_files) ----------------------------------------- +---- -weechat_strndup -^^^^^^^^^^^^^^^ +==== weechat_strndup Retourne la chaîne dupliquée, avec au plus 'length' caractères. Prototype : [source,C] ----------------------------------------- +---- char *weechat_strndup (const char *string, int length); ----------------------------------------- +---- Paramètres : @@ -506,26 +486,25 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_strndup ("abcdef", 3); /* résultat : "abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_tolower -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_tolower Convertit une chaîne UTF-8 en minuscules. Prototype : [source,C] ----------------------------------------- +---- void weechat_string_tolower (const char *string); ----------------------------------------- +---- Paramètres : @@ -534,25 +513,24 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_tolower (str); /* str vaut maintenant : "abcdé" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_toupper -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_toupper Convertir une chaîne UTF-8 en majuscules. Prototype : [source,C] ----------------------------------------- +---- void weechat_string_toupper (const char *string); ----------------------------------------- +---- Paramètres : @@ -561,25 +539,24 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_toupper (str); /* str vaut maintenant : "ABCDé" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strcasecmp -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp Comparaison de chaînes indépendante de la locale et de la casse. Prototype : [source,C] ----------------------------------------- +---- int weechat_strcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Paramètres : @@ -596,15 +573,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strcasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp_range _WeeChat ≥ 0.3.7._ @@ -614,9 +590,9 @@ intervalle pour comparer la casse. Prototype : [source,C] ----------------------------------------- +---- int weechat_strcasecmp_range (const char *string1, const char *string2, int range); ----------------------------------------- +---- Paramètres : @@ -640,15 +616,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp_range ("nick{away}", "NICK[away]", 29); /* == 0 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strncasecmp -^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp Comparaison de chaînes indépendante de la locale et de la casse, pour 'max' caractères. @@ -656,9 +631,9 @@ caractères. Prototype : [source,C] ----------------------------------------- +---- int weechat_strncasecmp (const char *string1, const char *string2, int max); ----------------------------------------- +---- Paramètres : @@ -676,15 +651,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp ("aabb", "aacc", 2); /* == 0 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strncasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp_range _WeeChat ≥ 0.3.7._ @@ -694,9 +668,9 @@ caractères, avec un intervalle pour comparer la casse. Prototype : [source,C] ----------------------------------------- +---- int weechat_strncasecmp_range (const char *string1, const char *string2, int max, int range); ----------------------------------------- +---- Paramètres : @@ -721,15 +695,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* == 0 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strcmp_ignore_chars -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcmp_ignore_chars Comparaison de chaînes indépendante de la locale (et en option de la casse), en ignorant des caractères. @@ -737,11 +710,11 @@ ignorant des caractères. Prototype : [source,C] ----------------------------------------- +---- int weechat_strcmp_ignore_chars (const char *string1, const char *string2, const char *chars_ignored, int case_sensitive); ----------------------------------------- +---- Paramètres : @@ -760,24 +733,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strcasestr -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasestr Recherche de chaîne indépendante de la locale et de la casse. Prototype : [source,C] ----------------------------------------- +---- char *weechat_strcasestr (const char *string, const char *search); ----------------------------------------- +---- Paramètres : @@ -791,15 +763,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *pos = weechat_strcasestr ("aBcDeF", "de"); /* résultat : pointeur vers "DeF" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_strlen_screen -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strlen_screen _WeeChat ≥ 0.4.2._ @@ -811,9 +782,9 @@ la fonction <<_weechat_utf8_strlen_screen,weechat_utf8_strlen_screen>>). Prototype : [source,C] ----------------------------------------- +---- int weechat_strlen_screen (const char *string); ----------------------------------------- +---- Paramètres : @@ -826,33 +797,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int length_on_screen = weechat_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype length = weechat.strlen_screen(string) # exemple length = weechat.strlen_screen("é") # 1 ----------------------------------------- +---- -weechat_string_match -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_match Vérifie si une chaîne correspond à un masque. Prototype : [source,C] ----------------------------------------- +---- int weechat_string_match (const char *string, const char *mask, int case_sensitive); ----------------------------------------- +---- Paramètres : @@ -868,17 +838,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int match1 = weechat_string_match ("abcdef", "abc*", 0); /* == 1 */ int match2 = weechat_string_match ("abcdef", "*dd*", 0); /* == 0 */ int match3 = weechat_string_match ("abcdef", "*def", 0); /* == 1 */ int match4 = weechat_string_match ("abcdef", "*de*", 0); /* == 1 */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype match = weechat.string_match(string, mask, case_sensitive) @@ -887,20 +857,19 @@ match1 = weechat.string_match("abcdef", "abc*", 0) # 1 match2 = weechat.string_match("abcdef", "*dd*", 0) # 0 match3 = weechat.string_match("abcdef", "*def", 0) # 1 match4 = weechat.string_match("abcdef", "*de*", 0) # 1 ----------------------------------------- +---- -weechat_string_replace -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_replace Remplace toutes les occurrences d'une chaîne par une autre chaîne. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_replace (const char *string, const char *search, const char *replace); ----------------------------------------- +---- Paramètres : @@ -916,17 +885,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_string_replace ("test, test", "s", "x"); /* résultat : "text" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_expand_home -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_expand_home _WeeChat ≥ 0.3.3._ @@ -936,9 +904,9 @@ débute pas par `~`, alors une chaîne identique est retournée. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_expand_home (const char *path); ----------------------------------------- +---- Paramètres : @@ -952,18 +920,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_string_expand_home ("~/fichier.txt"); /* résultat: "/home/xxx/fichier.txt" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_remove_quotes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_quotes Supprime les apostrophes/guillemets au début et à la fin d'une chaîne (ignore les blancs s'ils sont avant la première apostrophe ou après la dernière). @@ -971,9 +938,9 @@ les blancs s'ils sont avant la première apostrophe ou après la dernière). Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_remove_quotes (const char *string, const char *quotes); ----------------------------------------- +---- Paramètres : @@ -988,28 +955,27 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_string_remove_quotes (string, " 'aujourd'hui' ", "'"); /* résultat : "aujourd'hui" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_strip -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_strip Supprime des caractères au début et/ou à la fin d'une chaîne. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_strip (const char *string, int left, int right, const char *chars); ----------------------------------------- +---- Paramètres : @@ -1026,17 +992,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = weechat_string_strip (".abc -", 0, 1, "- ."); /* résultat : ".abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_mask_to_regex -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_mask_to_regex Retourne une expression régulière ("regex"), construite avec un masque où le seul caractère spécial est "`*`". Tous les autres caractères spéciaux @@ -1045,9 +1010,9 @@ d'expression régulière sont échappés. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_mask_to_regex (const char *mask); ----------------------------------------- +---- Paramètres : @@ -1061,26 +1026,25 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str_regex = weechat_string_mask_to_regex ("test*mask"); /* résultat : "test.*mask" */ /* ... */ free (str_regex); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype regex = weechat.string_mask_to_regex(mask) # exemple regex = weechat.string_mask_to_regex("test*mask") # "test.*mask" ----------------------------------------- +---- -weechat_string_regex_flags -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regex_flags _WeeChat ≥ 0.3.7._ @@ -1090,9 +1054,9 @@ les "flags" pour compiler l'expression régulière. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags) ----------------------------------------- +---- Paramètres : @@ -1125,18 +1089,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *regex = "(?i)test"; int flags; const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags); /* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_regcomp -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regcomp _WeeChat ≥ 0.3.7._ @@ -1147,9 +1110,9 @@ Compile une expression régulière avec des "flags" optionnels en début de cha Prototype : [source,C] ----------------------------------------- +---- int weechat_string_regcomp (void *preg, const char *regex, int default_flags) ----------------------------------------- +---- Paramètres : @@ -1169,19 +1132,18 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- regex_t my_regex; if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0) { /* erreur */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_has_highlight -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_has_highlight Vérifie si une chaîne a un ou plusieurs "highlights", en utilisant une liste de mots "highlight". @@ -1189,10 +1151,10 @@ de mots "highlight". Prototype : [source,C] ----------------------------------------- +---- int weechat_string_has_highlight (const char *string, const char highlight_words); ----------------------------------------- +---- Paramètres : @@ -1206,23 +1168,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype highlight = weechat.string_has_highlight(string, highlight_words) # exemple highlight = weechat.string_has_highlight("my test string", "test,word2") # 1 ----------------------------------------- +---- -weechat_string_has_highlight_regex -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_has_highlight_regex _WeeChat ≥ 0.3.4._ @@ -1234,9 +1195,9 @@ caractères de mot (caractère alphanumérique, "-", "_" ou "|"). Prototype : [source,C] ----------------------------------------- +---- int weechat_string_has_highlight_regex (const char *string, const char *regex); ----------------------------------------- +---- Paramètres : @@ -1250,34 +1211,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype highlight = weechat.string_has_highlight_regex(string, regex) # exemple highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1 ----------------------------------------- +---- -weechat_string_split -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split Découpe une chaîne à l'aide de délimiteur(s). Prototype : [source,C] ----------------------------------------- +---- char **weechat_string_split (const char *string, const char *separators, int keep_eol, int num_items_max, int *num_items); ----------------------------------------- +---- Paramètres : @@ -1302,7 +1262,7 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc); @@ -1322,22 +1282,21 @@ argv = weechat_string_split ("abc de fghi", " ", 1, 0, &argc); argc == 3 */ weechat_string_free_split (argv); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_free_split -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split Libère la mémoire utilisée pour le découpage d'une chaîne. Prototype : [source,C] ----------------------------------------- +---- void weechat_string_free_split (char **split_string); ----------------------------------------- +---- Paramètres : @@ -1347,29 +1306,28 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- char *argv; int argc; argv = weechat_string_split (string, " ", 0, 0, &argc); /* ... */ weechat_string_free_split (argv); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_build_with_split_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_build_with_split_string Construit une chaîne à partir d'une chaîne découpée. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_build_with_split_string (char **split_string const char *separator); ----------------------------------------- +---- Paramètres : @@ -1385,7 +1343,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); @@ -1393,13 +1351,12 @@ char *str = weechat_string_build_with_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split_command Éclate une liste de commandes séparées par 'separator' (qui peut être échappé par "\" dans la chaîne). @@ -1407,9 +1364,9 @@ par "\" dans la chaîne). Prototype : [source,C] ----------------------------------------- +---- char **weechat_string_split_command (const char *command, char separator); ----------------------------------------- +---- Paramètres : @@ -1424,28 +1381,27 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/commande1 arg;/commande2", ';'); /* résultat : argv[0] == "/commande1 arg" argv[1] == "/commande2" */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_free_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split_command Libère la mémoire utilisée par une commande éclatée. Prototype : [source,C] ----------------------------------------- +---- void weechat_string_free_split_command (char **split_command); ----------------------------------------- +---- Paramètres : @@ -1455,17 +1411,16 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/commande1 arg;/commande2", ';'); /* ... */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_format_size -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_format_size Construit une chaîne avec une taille de fichier formatée et une unité traduite dans la langue locale. @@ -1473,9 +1428,9 @@ dans la langue locale. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_format_size (unsigned long long size); ----------------------------------------- +---- Paramètres : @@ -1488,7 +1443,7 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- /* exemples avec la langue française */ char *str = weechat_string_format_size (0); /* str == "0 octet" */ @@ -1506,23 +1461,22 @@ free (str); char *str = weechat_string_format_size (2097152); /* str == "2 Mo" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_remove_color -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_color Supprime les couleurs WeeChat dans une chaîne. Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_remove_color (const char *string, const char *replacement); ----------------------------------------- +---- Paramètres : @@ -1539,7 +1493,7 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- /* supprime les codes couleur */ char *str = weechat_string_remove_color (ma_chaine1, NULL); /* ... */ @@ -1549,21 +1503,20 @@ free (str); char *str = weechat_string_remove_color (ma_chaine2, "?"); /* ... */ free (str); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.string_remove_color(string, replacement) # exemple str = weechat.string_remove_color(ma_chaine, "?") ----------------------------------------- +---- -weechat_string_encode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_encode_base64 _WeeChat ≥ 0.3.2._ @@ -1572,9 +1525,9 @@ Encode une chaîne en base64. Prototype : [source,C] ----------------------------------------- +---- void weechat_string_encode_base64 (const char *from, int length, char *to); ----------------------------------------- +---- Paramètres : @@ -1586,17 +1539,16 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- char *string = "abcdefgh", result[128]; weechat_string_encode_base64 (string, strlen (string), result); /* result == "YWJjZGVmZ2g=" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_decode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_decode_base64 _WeeChat ≥ 0.3.2._ @@ -1605,9 +1557,9 @@ Décode une chaîne base64. Prototype : [source,C] ----------------------------------------- +---- int weechat_string_decode_base64 (const char *from, char *to); ----------------------------------------- +---- Paramètres : @@ -1622,18 +1574,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *string = "YWJjZGVmZ2g=", result[128]; int length; length = weechat_string_decode_base64 (string, result); /* length == 8, result == "abcdefgh" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_string_is_command_char -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_is_command_char _WeeChat ≥ 0.3.2._ @@ -1643,9 +1594,9 @@ caractère par défaut de commande est '/'). Prototype : [source,C] ----------------------------------------- +---- int weechat_string_is_command_char (const char *string); ----------------------------------------- +---- Paramètres : @@ -1658,25 +1609,24 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- int command_char1 = weechat_string_is_command_char ("/test"); /* == 1 */ int command_char2 = weechat_string_is_command_char ("test"); /* == 0 */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype is_cmdchar = weechat.string_is_command_char(string) # exemples command_char1 = weechat.string_is_command_char("/test") # == 1 command_char2 = weechat.string_is_command_char("test") # == 0 ----------------------------------------- +---- -weechat_string_input_for_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_input_for_buffer _WeeChat ≥ 0.3.2._ @@ -1686,9 +1636,9 @@ l'intérieur du paramètre "string"), ou NULL si c'est une commande. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_string_input_for_buffer (const char *string); ----------------------------------------- +---- Paramètres : @@ -1701,16 +1651,16 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- const char *str1 = weechat_string_input_for_buffer ("test"); /* "test" */ const char *str2 = weechat_string_input_for_buffer ("/test"); /* NULL */ const char *str3 = weechat_string_input_for_buffer ("//test"); /* "/test" */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.string_input_for_buffer(string) @@ -1718,10 +1668,9 @@ str = weechat.string_input_for_buffer(string) str1 = weechat.string_input_for_buffer("test") # "test" str2 = weechat.string_input_for_buffer("/test") # "" str3 = weechat.string_input_for_buffer("//test") # "/test" ----------------------------------------- +---- -weechat_string_eval_expression -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_eval_expression _WeeChat ≥ 0.4.0, mis à jour dans la 0.4.2._ @@ -1732,12 +1681,12 @@ commande `/eval` dans le 'Guide utilisateur WeeChat'). Prototype : [source,C] ----------------------------------------- +---- char *weechat_string_eval_expression (const char *expr, struct t_hashtable *pointers, struct t_hashtable *extra_vars, struct t_hashtable *options); ----------------------------------------- +---- Paramètres : @@ -1765,7 +1714,7 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- struct t_hashtable *options = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -1776,12 +1725,12 @@ if (options) char *str1 = weechat_string_eval_expression ("${buffer.full_name}", NULL, NULL, NULL); /* "core.weechat" */ char *str2 = weechat_string_eval_expression ("${window.win_width} > 100", NULL, NULL, options); /* "1" */ char *str3 = weechat_string_eval_expression ("abc =~ def", NULL, NULL, options); /* "0" */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype str = weechat.string_eval_expression(expr, pointers, extra_vars, options) @@ -1789,25 +1738,23 @@ str = weechat.string_eval_expression(expr, pointers, extra_vars, options) str1 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core.weechat" str2 = weechat.string_eval_expression("${window.win_width} > 100", {}, {}, {"type": "condition"}) # "1" str3 = weechat.string_eval_expression("abc =~ def", {}, {}, {"type": "condition"}) # "0" ----------------------------------------- +---- [[utf-8]] -UTF-8 -~~~~~ +=== UTF-8 Fonctions pour les chaînes UTF-8. -weechat_utf8_has_8bits -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_has_8bits Vérifie si une chaîne a des caractères 8-bits. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_has_8bits (const char *string); ----------------------------------------- +---- Paramètres : @@ -1821,27 +1768,26 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_utf8_has_8bits (string)) { /* ... */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_is_valid -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_is_valid Vérifie si une chaîne est valide UTF-8. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_is_valid (const char *string, char **error); ----------------------------------------- +---- Paramètres : @@ -1856,7 +1802,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *error; if (weechat_utf8_is_valid (string, &error)) { @@ -1866,13 +1812,12 @@ else { /* "error" pointe vers le premier caractère invalide */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_normalize -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_normalize Normalise une chaîne UTF-8 : supprime tous les caractères non valides UTF-8 en les remplaçant par un caractère. @@ -1880,9 +1825,9 @@ en les remplaçant par un caractère. Prototype : [source,C] ----------------------------------------- +---- void weechat_utf8_normalize (char *string, char replacement); ----------------------------------------- +---- Paramètres : @@ -1892,24 +1837,23 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_utf8_normalize (string, '?'); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_prev_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_prev_char Retourne un pointeur vers le caractère UTF-8 précédent dans une chaîne. Prototype : [source,C] ----------------------------------------- +---- char *weechat_utf8_prev_char (const char *string_start, const char *string); ----------------------------------------- +---- Paramètres : @@ -1925,24 +1869,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *prev_char = weechat_utf8_prev_char (string, ptr_in_string); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_next_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_next_char Retourne un pointeur vers le caractère UTF-8 suivant dans une chaîne. Prototype : [source,C] ----------------------------------------- +---- char *weechat_utf8_next_char (const char *string); ----------------------------------------- +---- Paramètres : @@ -1956,24 +1899,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *next_char = weechat_utf8_next_char (string); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_char_int -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_int Retourne un caractère UTF-8 sous forme d'entier. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_char_int (const char *string); ----------------------------------------- +---- Paramètres : @@ -1986,24 +1928,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int char_int = weechat_utf8_char_int ("être"); /* "ê" comme entier */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_char_size -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size Retourne la taille d'un caractère UTF-8 (en octets). Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_char_size (const char *string); ----------------------------------------- +---- Paramètres : @@ -2016,24 +1957,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int char_size = weechat_utf8_char_size ("être"); /* == 2 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_strlen -^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen Retourne la taille d'une chaîne UTF-8 (en nombre de caractères UTF-8). Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_strlen (const char *string); ----------------------------------------- +---- Paramètres : @@ -2046,15 +1986,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int length = weechat_utf8_strlen ("chêne"); /* == 5 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_strnlen -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strnlen Retourne la taille d'une chaîne UTF-8 (en nombre de caractères UTF-8), pour au maximum 'bytes' octets dans la chaîne. @@ -2062,9 +2001,9 @@ maximum 'bytes' octets dans la chaîne. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_strnlen (const char *string, int bytes); ----------------------------------------- +---- Paramètres : @@ -2078,15 +2017,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int length = weechat_utf8_strnlen ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_strlen_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen_screen Retourne le nombre de caractères nécessaires pour afficher la chaîne UTF-8 sur l'écran. @@ -2094,9 +2032,9 @@ sur l'écran. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_strlen_screen (const char *string); ----------------------------------------- +---- Paramètres : @@ -2109,24 +2047,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_charcmp -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcmp Compare deux caractères UTF-8. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_charcmp (const char *string1, const char *string2); ----------------------------------------- +---- Paramètres : @@ -2143,24 +2080,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcmp ("aaa", "ccc"); /* == -2 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_charcasecmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcasecmp Compare deux caractères UTF-8 en ignorant la casse. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_charcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Paramètres : @@ -2177,15 +2113,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_char_size_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size_screen Retourne le nombre de caractères nécessaires pour afficher le caractère UTF-8 sur l'écran. @@ -2193,9 +2128,9 @@ sur l'écran. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_char_size_screen (const char *string); ----------------------------------------- +---- Paramètres : @@ -2208,24 +2143,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_char_size_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_add_offset -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_add_offset Avancer de N caractères dans une chaîne UTF-8. Prototype : [source,C] ----------------------------------------- +---- char *weechat_utf8_add_offset (const char *string, int offset); ----------------------------------------- +---- Paramètres : @@ -2240,25 +2174,24 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *str = "chêne"; char *str2 = weechat_utf8_add_offset (str, 3); /* pointe vers "ne" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_real_pos -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_real_pos Retourne la position réelle dans une chaîne UTF-8. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_real_pos (const char *string, int pos); ----------------------------------------- +---- Paramètres : @@ -2272,24 +2205,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int pos = weechat_utf8_real_pos ("chêne", 3); /* == 4 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_pos -^^^^^^^^^^^^^^^^ +==== weechat_utf8_pos Retourne la position dans une chaîne UTF-8. Prototype : [source,C] ----------------------------------------- +---- int weechat_utf8_pos (const char *string, int real_pos); ----------------------------------------- +---- Paramètres : @@ -2303,24 +2235,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int pos = weechat_utf8_pos ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_utf8_strndup -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strndup Retourne une chaîne dupliquée, avec au plus 'length' caractères. Prototype : [source,C] ----------------------------------------- +---- char *weechat_utf8_strndup (const char *string, int length); ----------------------------------------- +---- Paramètres : @@ -2334,32 +2265,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *string = weechat_utf8_strndup ("chêne", 3); /* retourne "chê" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. [[directories]] -Répertoires -~~~~~~~~~~~ +=== Répertoires Fonctions liées aux répertoires. -weechat_mkdir_home -^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_home Crée un répertoire dans le répertoire de WeeChat. Prototype : [source,C] ----------------------------------------- +---- int weechat_mkdir_home (char *directory, int mode); ----------------------------------------- +---- Paramètres : @@ -2373,35 +2302,34 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (!weechat_mkdir_home ("temp", 0755)) { /* erreur */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.mkdir_home(directory, mode) # exemple weechat.mkdir_home("temp", 0755) ----------------------------------------- +---- -weechat_mkdir -^^^^^^^^^^^^^ +==== weechat_mkdir Crée un répertoire. Prototype : [source,C] ----------------------------------------- +---- int weechat_mkdir (char *directory, int mode); ----------------------------------------- +---- Paramètres : @@ -2415,35 +2343,34 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (!weechat_mkdir ("/tmp/mydir", 0755)) { /* erreur */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.mkdir(directory, mode) # exemple weechat.mkdir("/tmp/mydir", 0755) ----------------------------------------- +---- -weechat_mkdir_parents -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_parents Crée un répertoire et ses parents si besoin. Prototype : [source,C] ----------------------------------------- +---- int weechat_mkdir_parents (char *directory, int mode); ----------------------------------------- +---- Paramètres : @@ -2457,26 +2384,25 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (!weechat_mkdir_parents ("/tmp/my/dir", 0755)) { /* erreur */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.mkdir_parents(directory, mode) # exemple weechat.mkdir_parents("/tmp/my/dir", 0755) ----------------------------------------- +---- -weechat_exec_on_files -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_exec_on_files Balaye les fichiers dans un répertoire et exécute un "callback" pour chaque fichier. @@ -2484,13 +2410,13 @@ fichier. Prototype : [source,C] ----------------------------------------- +---- void weechat_exec_on_files (const char *directory, int hidden_files, void *data, void (*callback)(void *data, const char *filename)); ----------------------------------------- +---- Paramètres : @@ -2504,20 +2430,19 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- void callback (void *data, const char *filename) { /* ... */ } ... weechat_exec_on_files ("/tmp", 0, NULL, &callback); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_file_get_content -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_file_get_content _WeeChat ≥ 0.3.1._ @@ -2526,9 +2451,9 @@ Lit le contenu d'un fichier texte dans une chaîne de caractères. Prototype : [source,C] ----------------------------------------- +---- char *weechat_file_get_content (const char *filename); ----------------------------------------- +---- Paramètres : @@ -2542,34 +2467,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *contenu; contenu = weechat_file_get_content ("/tmp/test.txt"); /* ... */ free (contenu); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. [[util]] -Util -~~~~ +=== Util Quelques fonctions utiles. -weechat_util_timeval_cmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_cmp Compare deux structures "timeval". Prototype : [source,C] ----------------------------------------- +---- int weechat_util_timeval_cmp (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Paramètres : @@ -2585,27 +2508,26 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_util_timeval_cmp (&tv1, &tv2) > 0) { /* tv1 > tv2 */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_util_timeval_diff -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_diff Retourne la différence (en millisecondes) entre deux structures "timeval". Prototype : [source,C] ----------------------------------------- +---- long weechat_util_timeval_diff (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Paramètres : @@ -2619,24 +2541,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- long diff = weechat_util_timeval_diff (&tv1, &tv2); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_util_timeval_add -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_add Ajoute un intervalle (en millisecondes) à une structure "timeval". Prototype : [source,C] ----------------------------------------- +---- void weechat_util_timeval_add (struct timeval *tv, long interval); ----------------------------------------- +---- Paramètres : @@ -2646,15 +2567,14 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_util_timeval_add (&tv, 2000); /* ajoute 2 secondes */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_util_get_time_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_get_time_string _WeeChat ≥ 0.3.2._ @@ -2663,9 +2583,9 @@ Retourne la date/heure sous forme de chaîne construite avec "strftime". Prototype : [source,C] ----------------------------------------- +---- char *weechat_util_get_time_string (const time_t *date); ----------------------------------------- +---- Paramètres : @@ -2674,17 +2594,16 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- time_t date = time (NULL); weechat_printf (NULL, "date: %s", weechat_util_get_time_string (&date)); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_util_version_number -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_version_number _WeeChat ≥ 0.3.9._ @@ -2693,9 +2612,9 @@ Convertit une chaîne avec la version WeeChat en nombre. Prototype : [source,C] ----------------------------------------- +---- int weechat_util_version_number (const char *version); ----------------------------------------- +---- Paramètres : @@ -2705,33 +2624,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- version_number = weechat_util_version_number ("0.3.8"); /* == 0x00030800 */ version_number = weechat_util_version_number ("0.3.9-dev"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9-rc1"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9"); /* == 0x00030900 */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. [[sorted_lists]] -Listes triées -~~~~~~~~~~~~~ +=== Listes triées Fonctions pour les listes triées. -weechat_list_new -^^^^^^^^^^^^^^^^ +==== weechat_list_new Crée une nouvelle liste. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist *weechat_list_new (); ----------------------------------------- +---- Valeur de retour : @@ -2740,35 +2657,34 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist *list = weechat_list_new (); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype list = weechat.list_new() # exemple list = weechat.list_new() ----------------------------------------- +---- -weechat_list_add -^^^^^^^^^^^^^^^^ +==== weechat_list_add Ajoute un élément dans une liste. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_add (struct t_weelist *weelist, const char *data, const char *where, void *user_data); ----------------------------------------- +---- Paramètres : @@ -2787,34 +2703,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *my_item = weechat_list_add (list, "ma donnée", WEECHAT_LIST_POS_SORT, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_add(list, data, where, user_data) # exemple item = weechat.list_add(list, "ma donnée", weechat.WEECHAT_LIST_POS_SORT, "") ----------------------------------------- +---- -weechat_list_search -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search Recherche un élément dans une liste. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_search (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Paramètres : @@ -2828,23 +2743,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_search (list, "ma donnée"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_search(list, data) # exemple item = weechat.list_search(list, "ma donnée") ----------------------------------------- +---- -weechat_list_search_pos -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search_pos _WeeChat ≥ 0.3.4._ @@ -2853,10 +2767,10 @@ Recherche la position d'un élément dans une liste. Prototype : [source,C] ----------------------------------------- +---- int weechat_list_search_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Paramètres : @@ -2870,33 +2784,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int pos_item = weechat_list_search_pos (list, "ma donnée"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype pos_item = weechat.list_search_pos(list, data) # exemple pos_item = weechat.list_search_pos(list, "ma donnée") ----------------------------------------- +---- -weechat_list_casesearch -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch Recherche un élément dans la liste, sans tenir compte de la casse. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_casesearch (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Paramètres : @@ -2910,23 +2823,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_casesearch (list, "ma donnée"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_casesearch(list, data) # exemple item = weechat.list_casesearch(list, "ma donnée") ----------------------------------------- +---- -weechat_list_casesearch_pos -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch_pos _WeeChat ≥ 0.3.4._ @@ -2935,10 +2847,10 @@ Recherche la position d'un élément dans la liste, sans tenir compte de la cass Prototype : [source,C] ----------------------------------------- +---- int weechat_list_casesearch_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Paramètres : @@ -2952,33 +2864,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int pos_item = weechat_list_casesearch_pos (list, "ma donnée"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype pos_item = weechat.list_casesearch_pos(list, data) # exemple pos_item = weechat.list_casesearch_pos(list, "ma donnée") ----------------------------------------- +---- -weechat_list_get -^^^^^^^^^^^^^^^^ +==== weechat_list_get Retourne un élément de la liste par sa position. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_get (struct t_weelist *weelist, int position); ----------------------------------------- +---- Paramètres : @@ -2992,32 +2903,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_get (list, 0); /* premier élément */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_get(list, position) # exemple item = weechat.list_get(list, 0) ----------------------------------------- +---- -weechat_list_set -^^^^^^^^^^^^^^^^ +==== weechat_list_set Affecte une nouvelle valeur pour un élément. Prototype : [source,C] ----------------------------------------- +---- void weechat_list_set (struct t_weelist_item *item, const char *value); ----------------------------------------- +---- Paramètres : @@ -3027,32 +2937,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_list_set (item, "nouvelle donnée"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.list_set(item, value) # exemple weechat.list_set(item, "nouvelle donnée") ----------------------------------------- +---- -weechat_list_next -^^^^^^^^^^^^^^^^^ +==== weechat_list_next Retourne l'éléement suivant dans la liste. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_next (struct t_weelist_item *item); ----------------------------------------- +---- Paramètres : @@ -3066,32 +2975,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *next_item = weechat_list_next (item); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_next(item) # exemple item = weechat.list_next(item) ----------------------------------------- +---- -weechat_list_prev -^^^^^^^^^^^^^^^^^ +==== weechat_list_prev Retourne l'élément précédent dans la liste. Prototype : [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_prev (struct t_weelist_item *item); ----------------------------------------- +---- Paramètres : @@ -3105,32 +3013,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_weelist_item *prev_item = weechat_list_prev (item); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.list_prev(item) # exemple item = weechat.list_prev(item) ----------------------------------------- +---- -weechat_list_string -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_string Retourne la valeur de l'élément sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_list_string (struct t_weelist_item *item); ----------------------------------------- +---- Paramètres : @@ -3143,32 +3050,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "valeur de l'item : %s", weechat_list_string (item)); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.list_string(item) # exemple weechat.prnt("", "valeur de l'item : %s" % weechat.list_string(item)) ----------------------------------------- +---- -weechat_list_size -^^^^^^^^^^^^^^^^^ +==== weechat_list_size Retourne la taille de la liste (nombre d'éléments). Prototype : [source,C] ----------------------------------------- +---- char *weechat_list_size (struct t_weelist *weelist); ----------------------------------------- +---- Paramètres : @@ -3181,33 +3087,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "taille de la liste : %d", weechat_list_size (list)); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype size = weechat.list_size(list) # exemple weechat.prnt("", "taille de la liste : %d" % weechat.list_size(list)) ----------------------------------------- +---- -weechat_list_remove -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove Supprime un élément de la liste. Prototype : [source,C] ----------------------------------------- +---- void weechat_list_remove (struct t_weelist *weelist, struct t_weelist_item *item); ----------------------------------------- +---- Paramètres : @@ -3217,32 +3122,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_list_remove (list, item); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.list_remove(list, item) # exemple weechat.list_remove(list, item) ----------------------------------------- +---- -weechat_list_remove_all -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove_all Supprime tous les éléments de la liste. Prototype : [source,C] ----------------------------------------- +---- void weechat_list_remove_all (struct t_weelist *weelist); ----------------------------------------- +---- Paramètres : @@ -3251,32 +3155,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_list_remove_all (list); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.list_remove_all(list) # exemple weechat.list_remove_all(list) ----------------------------------------- +---- -weechat_list_free -^^^^^^^^^^^^^^^^^ +==== weechat_list_free Supprime une liste. Prototype : [source,C] ----------------------------------------- +---- void weechat_list_free (struct t_weelist *weelist); ----------------------------------------- +---- Paramètres : @@ -3285,29 +3188,27 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_list_free (list); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.list_free(list) # exemple weechat.list_free(list) ----------------------------------------- +---- [[hashtables]] -Hashtables -~~~~~~~~~~ +=== Hashtables Fonctions pour les hashtables. -weechat_hashtable_new -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_new _WeeChat ≥ 0.3.3._ @@ -3316,7 +3217,7 @@ Crée une nouvelle hashtable. Prototype : [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hashtable_new (int size, const char *type_keys, const char *type_values, @@ -3325,7 +3226,7 @@ struct t_hashtable *weechat_hashtable_new (int size, int (*callback_keycmp)(struct t_hashtable *hashtable, const void *key1, const void *key2)); ----------------------------------------- +---- Paramètres : @@ -3370,19 +3271,18 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, NULL, NULL); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_set_with_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_with_size _WeeChat ≥ 0.3.3, mis à jour dans la 0.4.2._ @@ -3392,11 +3292,11 @@ et la valeur. Prototype : [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set_with_size (struct t_hashtable *hashtable, const void *key, int key_size, const void *value, int value_size); ----------------------------------------- +---- Paramètres : @@ -3415,16 +3315,15 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_set_with_size (hashtable, "ma_cle", 0, my_buffer, sizeof (my_buffer_struct)); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_set -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set _WeeChat ≥ 0.3.3, mis à jour dans la 0.4.2._ @@ -3433,10 +3332,10 @@ Ajoute ou met à jour une entrée dans la hashtable. Prototype : [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set (struct t_hashtable *hashtable, const void *key, const void *value); ----------------------------------------- +---- Paramètres : @@ -3451,15 +3350,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_set (hashtable, "ma_cle", "ma_valeur"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_get -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get _WeeChat ≥ 0.3.3._ @@ -3468,9 +3366,9 @@ Retourne la valeur associée à une clé dans une hashtable. Prototype : [source,C] ----------------------------------------- +---- void *weechat_hashtable_get (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Paramètres : @@ -3484,15 +3382,14 @@ Valeur en retour : Exemple en C : [source,C] ----------------------------------------- +---- void *value = weechat_hashtable_get (hashtable, "ma_cle"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_has_key -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_has_key _WeeChat ≥ 0.3.4._ @@ -3501,9 +3398,9 @@ Retourne 1 si la clé est dans la hashtable, sinon 0. Prototype : [source,C] ----------------------------------------- +---- int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Paramètres : @@ -3517,19 +3414,18 @@ Valeur en retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_hashtable_has_key (hashtable, "ma_cle")) { /* la clé est dans la hashtable */ /* ... */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_map -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map _WeeChat ≥ 0.3.3._ @@ -3538,14 +3434,14 @@ Appelle une fonction pour chaque entrée d'une hashtable. Prototype : [source,C] ----------------------------------------- +---- void hashtable_map (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const void *key, const void *value), void *callback_map_data); ----------------------------------------- +---- Paramètres : @@ -3556,7 +3452,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const void *key, const void *value) @@ -3568,13 +3464,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_map_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map_string _WeeChat ≥ 0.3.7._ @@ -3584,14 +3479,14 @@ et valeurs sous forme de chaînes. Prototype : [source,C] ----------------------------------------- +---- void hashtable_map_string (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const char *key, const char *value), void *callback_map_data); ----------------------------------------- +---- Paramètres : @@ -3606,7 +3501,7 @@ temporaires, elles sont supprimées après l'appel au "callback". Exemple en C : [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const char *key, const char *value) @@ -3617,13 +3512,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map_string (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_integer _WeeChat ≥ 0.3.3._ @@ -3632,10 +3526,10 @@ Retourne une valeur entière pour une propriété d'une hashtable. Prototype : [source,C] ----------------------------------------- +---- int weechat_hashtable_get_integer (struct t_hashtable *hashtable, void *property); ----------------------------------------- +---- Paramètres : @@ -3651,15 +3545,14 @@ Valeur en retour : Exemple en C : [source,C] ----------------------------------------- +---- int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_string _WeeChat ≥ 0.3.4._ @@ -3668,10 +3561,10 @@ Retourne une valeur pour une propriété d'une hashtable sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hashtable_get_string (struct t_hashtable *hashtable, const char *property); ----------------------------------------- +---- Paramètres : @@ -3705,18 +3598,17 @@ Valeur en retour : Exemples en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "les clés sont de type: %s", weechat_hashtable_get_string (hashtable, "type_keys")); weechat_printf (NULL, "liste des clés: %s", weechat_hashtable_get_string (hashtable, "keys")); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_pointer _WeeChat ≥ 0.3.4._ @@ -3725,10 +3617,10 @@ Affecte un pointeur à une propriété d'une hashtable. Prototype : [source,C] ----------------------------------------- +---- void weechat_hashtable_set_pointer (struct t_hashtable *hashtable, const char *property, void *pointer); ----------------------------------------- +---- Paramètres : @@ -3742,7 +3634,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- void my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) { @@ -3750,13 +3642,12 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) } weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_add_to_infolist -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_add_to_infolist _WeeChat ≥ 0.3.3._ @@ -3765,11 +3656,11 @@ Ajoute les éléments d'une hashtable dans un objet infolist. Prototype : [source,C] ----------------------------------------- +---- int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, struct t_infolist_item *infolist_item, const char *prefix); ----------------------------------------- +---- Paramètres : @@ -3784,7 +3675,7 @@ Valeur en retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); /* si la hashtable contient : @@ -3796,13 +3687,12 @@ weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); "testhash_name_00001" = "cle2" "testhash_value_00001" = "valeur 2" */ ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_remove -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove _WeeChat ≥ 0.3.3._ @@ -3811,9 +3701,9 @@ Supprime un élément d'une hashtable. Prototype : [source,C] ----------------------------------------- +---- void weechat_hashtable_remove (struct t_hashtable *hashtable, const void *key); ----------------------------------------- +---- Paramètres : @@ -3823,15 +3713,14 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_remove (hashtable, "ma_cle"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove_all _WeeChat ≥ 0.3.3._ @@ -3840,9 +3729,9 @@ Supprime tous les éléments d'une hashtable. Prototype : [source,C] ----------------------------------------- +---- void weechat_hashtable_remove_all (struct t_hashtable *hashtable); ----------------------------------------- +---- Paramètres : @@ -3851,15 +3740,14 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_remove_all (hashtable); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hashtable_free -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_free _WeeChat ≥ 0.3.3._ @@ -3868,9 +3756,9 @@ Supprime une hashtable. Prototype : [source,C] ----------------------------------------- +---- void weechat_hashtable_free (struct t_hashtable *hashtable); ----------------------------------------- +---- Paramètres : @@ -3879,33 +3767,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hashtable_free (hashtable); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. [[configuration_files]] -Fichiers de configuration -~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Fichiers de configuration Fonctions pour les fichiers de configuration. -weechat_config_new -^^^^^^^^^^^^^^^^^^ +==== weechat_config_new Crée un nouveau fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_config_file *weechat_config_new (const char *name, int (*callback_reload)(void *data, struct t_config_file *config_file), void *callback_reload_data); ----------------------------------------- +---- Paramètres : @@ -3937,7 +3823,7 @@ Vous ne devriez appeler cette fonction qu'après avoir créé les sections (avec Exemple en C : [source,C] ----------------------------------------- +---- int my_config_reload_cb (void *data, struct t_config_file *config_file) { @@ -3949,12 +3835,12 @@ my_config_reload_cb (void *data, struct t_config_file *config_file) struct t_config_file *config_file = weechat_config_new ("test", &my_config_reload_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype config_file = weechat.config_new(name, calback_reload, callback_reload_data) @@ -3964,17 +3850,16 @@ def my_config_reload_cb(data, config_file): return weechat.WEECHAT_RC_OK config_file = weechat.config_new("test", "my_config_reload_cb", "") ----------------------------------------- +---- -weechat_config_new_section -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_section Crée une nouvelle section dans un fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_new_section ( struct t_config_file *config_file, const char *name, @@ -4005,7 +3890,7 @@ struct t_config_section *weechat_config_new_section ( struct t_config_section *section, struct t_config_option *option), void *callback_delete_option_data); ----------------------------------------- +---- Paramètres : @@ -4093,7 +3978,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_section_read_cb (void *data, struct t_config_file *config_file, struct t_config_section *section, const char *option_name, @@ -4167,12 +4052,12 @@ struct t_config_section *new_section2 = &my_section_write_default_cb, NULL, &my_section_create_option_cb, NULL, &my_section_delete_option_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype section = weechat.config_new_section(config_file, name, user_can_add_options, user_can_delete_options, @@ -4211,21 +4096,20 @@ section = weechat.config_new_section(config_file, "section1", 1, 1, "my_section_write_default_cb", "", "my_section_create_option_cb", "", "my_section_delete_option_cb", "") ----------------------------------------- +---- -weechat_config_search_section -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section Recherche une section dans un fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_search_section ( struct t_config_file *config_file, const char *section_name); ----------------------------------------- +---- Paramètres : @@ -4239,31 +4123,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_section *section = weechat_config_search_section (config_file, "section"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype section = weechat.config_search_section(config_file, section_name) # exemple section = weechat.config_search_section(config_file, "section") ----------------------------------------- +---- -weechat_config_new_option -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_option Crée une nouvelle option dans une section d'un fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_new_option ( struct t_config_file *config_file, struct t_config_section *section, @@ -4286,7 +4169,7 @@ struct t_config_option *weechat_config_new_option ( void (*callback_delete)(void *data, struct t_config_option *option), void *callback_delete_data); ----------------------------------------- +---- Paramètres : @@ -4338,7 +4221,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- /* booléen */ struct t_config_option *option1 = weechat_config_new_option (config_file, section, "option1", "boolean", @@ -4404,12 +4287,12 @@ struct t_config_option *option5 = NULL, NULL, /* callback de vérification */ NULL, NULL, /* callback de changement de valeur */ NULL, NULL); /* callback de suppression de l'option */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype option = weechat.config_new_option(config_file, section, name, type, description, string_values, min, max, default_value, value, null_value_allowed, @@ -4464,7 +4347,7 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color", "", "", "", "", "", "") ----------------------------------------- +---- [NOTE] En Ruby, les 3 "callbacks" + "data" (6 chaînes) doivent être données dans un @@ -4472,20 +4355,19 @@ tableau de 6 chaînes de caractères (en raison d'une limitation de Ruby à 15 paramètres par fonction), voir le 'Guide pour Scripts WeeChat' pour plus d'infos _(corrigé dans la version 0.4.1)_. -weechat_config_search_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_option Recherche une option dans une section d'un fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_search_option ( struct t_config_file *config_file, struct t_config_section *section, const char *option_name); ----------------------------------------- +---- Paramètres : @@ -4500,24 +4382,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_search_option (config_file, section, "option"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype option = weechat.config_search_option(config_file, section, option_name) # exemple option = weechat.config_search_option(config_file, section, "option") ----------------------------------------- +---- -weechat_config_search_section_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section_option Recherche une section et une option dans un fichier de configuration ou une section. @@ -4525,13 +4406,13 @@ section. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_search_section_option (struct t_config_file *config_file, struct t_config_section *section, const char *option_name, struct t_config_section **section_found, struct t_config_option **option_found); ----------------------------------------- +---- Paramètres : @@ -4546,7 +4427,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4563,26 +4444,25 @@ else { /* option non trouvée */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_config_search_with_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_with_string Recherche une option avec le nom complet. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_search_with_string (const char *option_name, struct t_config_file **config_file, struct t_config_section **section, struct t_config_option **option, char **pos_option_name); ----------------------------------------- +---- Paramètres : @@ -4600,7 +4480,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_file *ptr_config_file; struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4619,22 +4499,21 @@ else { /* option non trouvée */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_config_string_to_boolean -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_to_boolean Vérifie si un texte est "vrai" ou "faux", au sens booléen. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_string_to_boolean (const char *text); ----------------------------------------- +---- Paramètres : @@ -4648,7 +4527,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_config_string_to_boolean (option_value)) { /* la valeur est "vrai" */ @@ -4657,32 +4536,31 @@ else { /* la valeur est "faux" */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string_to_boolean(text) # exemple if weechat.config_string_to_boolean(text): # ... ----------------------------------------- +---- -weechat_config_option_reset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_reset Réinitialise une option à sa valeur par défaut. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_reset (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Paramètres : @@ -4700,7 +4578,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_option_reset (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4713,12 +4591,12 @@ switch (weechat_config_option_reset (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_reset(option, run_callback) @@ -4730,20 +4608,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set Affecter une nouvelle valeur pour une option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_set (struct t_config_option *option, const char *value, int run_callback); ----------------------------------------- +---- Paramètres : @@ -4761,7 +4638,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_option_set (option, "nouvelle_valeur", 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4774,12 +4651,12 @@ switch (weechat_config_option_set (option, "nouvelle_valeur", 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_set(option, value, run_callback) @@ -4791,20 +4668,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set_null Affecter "null" (valeur indéfinie) à une option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_set_null (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Paramètres : @@ -4825,7 +4701,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_option_set_null (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4838,12 +4714,12 @@ switch (weechat_config_option_set_null (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_set_null(option, run_callback) @@ -4855,19 +4731,18 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_unset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_unset Réinitialiser ou supprimer une option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_unset (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -4885,7 +4760,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_option_unset (option)) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -4901,12 +4776,12 @@ switch (weechat_config_option_unset (option)) /* .... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_option_unset(option) @@ -4920,20 +4795,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_rename -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_rename Renomme une option. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_option_rename (struct t_config_option *option, const char *new_name); ----------------------------------------- +---- Paramètres : @@ -4943,33 +4817,32 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_option_rename (option, "nouveau_nom"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_option_rename(option, new_name) # exemple weechat.config_option_rename(option, "nouveau_nom") ----------------------------------------- +---- -weechat_config_option_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_get_pointer Retourne un pointeur vers une propriété de l'option. Prototype : [source,C] ----------------------------------------- +---- void *weechat_config_option_get_pointer (struct t_config_option *option, const char *property); ----------------------------------------- +---- Paramètres : @@ -4998,24 +4871,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *description = weechat_config_option_get_pointer (option, "description"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_config_option_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_is_null Vérifie si une option est "null" (valeur non définie). Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_is_null (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5029,7 +4901,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_config_option_is_null (option)) { /* la valeur est "null" */ @@ -5038,31 +4910,30 @@ else { /* la valeur n'est pas "null" */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype is_null = weechat.config_option_is_null(option) # exemple if weechat.config_option_is_null(option): # ... ----------------------------------------- +---- -weechat_config_option_default_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_default_is_null Vérifie si la valeur par défaut d'une option est "null" (valeur non définie). Prototype : [source,C] ----------------------------------------- +---- int weechat_config_option_default_is_null (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5076,7 +4947,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_config_option_default_is_null (option)) { /* la valeur par défaut est "null" */ @@ -5085,31 +4956,30 @@ else { /* la valeur par défaut n'est pas "null" */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype is_null = weechat.config_option_default_is_null(option) # exemple if weechat.config_option_default_is_null(option): # ... ----------------------------------------- +---- -weechat_config_boolean -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean Retourne la valeur booléenne de l'option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_boolean (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5122,7 +4992,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean (option)) { @@ -5132,12 +5002,12 @@ else { /* la valeur est "faux" */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_boolean(option) @@ -5145,19 +5015,18 @@ value = weechat.config_boolean(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean(option): # ... ----------------------------------------- +---- -weechat_config_boolean_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean_default Retourne la valeur booléenne par défaut de l'option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_boolean_default (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5170,7 +5039,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean_default (option)) { @@ -5180,12 +5049,12 @@ else { /* la valeur est "faux" */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_boolean_default(option) @@ -5193,19 +5062,18 @@ value = weechat.config_boolean_default(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean_default(option): # ... ----------------------------------------- +---- -weechat_config_integer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer Retourne la valeur entière de l'option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_integer (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5218,34 +5086,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_integer(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_integer(option) ----------------------------------------- +---- -weechat_config_integer_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer_default Retourne la valeur entière par défaut de l'option. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_integer_default (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5258,34 +5125,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer_default (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_integer_default(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_integer_default(option) ----------------------------------------- +---- -weechat_config_string -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string Retourne la valeur de l'option, sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_config_string (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5298,34 +5164,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_string(option) ----------------------------------------- +---- -weechat_config_string_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_default Retourne la valeur par défaut de l'option, sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_config_string_default (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5338,34 +5203,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string_default (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_string_default(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_string_default(option) ----------------------------------------- +---- -weechat_config_color -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color Retourne la valeur de l'option, sous forme de couleur. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_config_color (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5378,34 +5242,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_color(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_color(option) ----------------------------------------- +---- -weechat_config_color_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color_default Retourne la valeur par défaut de l'option, sous forme de couleur. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_config_color_default (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5419,25 +5282,24 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color_default (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_color_default(option) # exemple option = weechat.config_get("plugin.section.option") value = weechat.config_color_default(option) ----------------------------------------- +---- -weechat_config_write_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_option Écrit une ligne dans le fichier de configuration avec l'option et sa valeur (cette fonction doit être appelée uniquement dans un "callback" "write" ou @@ -5446,10 +5308,10 @@ weechat_config_write_option Prototype : [source,C] ----------------------------------------- +---- void weechat_config_write_option (struct t_config_file *config_file, struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5459,7 +5321,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5470,12 +5332,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_write_option(config_file, option) @@ -5484,10 +5346,9 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "ma_section", "") weechat.config_write_option(config_file, option) return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write_line -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_line Écrit une ligne dans un fichier de configuration (cette fonction doit être appelée uniquement dans un "callback" "write" ou "write_default" pour une @@ -5496,11 +5357,11 @@ section). Prototype : [source,C] ----------------------------------------- +---- void weechat_config_write_line (struct t_config_file *config_file, const char *option_name, const char *value, ...); ----------------------------------------- +---- Paramètres : @@ -5512,7 +5373,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5524,12 +5385,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_write_line(config_file, option_name, value) @@ -5538,19 +5399,18 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "ma_section", "") weechat.config_write_line(config_file, "option", "valeur") return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write Écrit un fichier de configuration sur le disque. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_write (struct t_config_file *config_file); ----------------------------------------- +---- Paramètres : @@ -5565,7 +5425,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_write (config_file)) { case WEECHAT_CONFIG_WRITE_OK: @@ -5578,12 +5438,12 @@ switch (weechat_config_write (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_write(config_file) @@ -5595,19 +5455,18 @@ elif rc == weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_WRITE_ERROR: # ... ----------------------------------------- +---- -weechat_config_read -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_read Lit un fichier de configuration depuis le disque. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_read (struct t_config_file *config_file); ----------------------------------------- +---- Paramètres : @@ -5622,7 +5481,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_read (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5635,12 +5494,12 @@ switch (weechat_config_read (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_read(config_file) @@ -5652,19 +5511,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_reload -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_reload Relit un fichier de configuration depuis le disque. Prototype : [source,C] ----------------------------------------- +---- int weechat_config_reload (struct t_config_file *config_file); ----------------------------------------- +---- Paramètres : @@ -5679,7 +5537,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_reload (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5692,12 +5550,12 @@ switch (weechat_config_reload (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_reload(config_file) @@ -5709,19 +5567,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_option_free -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_free Libère une option. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_option_free (struct t_config_option *option); ----------------------------------------- +---- Paramètres : @@ -5730,32 +5587,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_option_free (option); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_option_free(option) # exemple weechat.config_option_free(option) ----------------------------------------- +---- -weechat_config_section_free_options -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free_options Libère toutes les options dans une section. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_section_free_options (struct t_config_section *section); ----------------------------------------- +---- Paramètres : @@ -5764,32 +5620,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_section_free_options (section); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_section_free_options(section) # exemple weechat.config_section_free_options(section) ----------------------------------------- +---- -weechat_config_section_free -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free Libère une section. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_section_free (struct t_config_section *section); ----------------------------------------- +---- Paramètres : @@ -5798,32 +5653,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_section_free (section); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_section_free(section) # exemple weechat.config_section_free(section) ----------------------------------------- +---- -weechat_config_free -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_free Libère un fichier de configuration. Prototype : [source,C] ----------------------------------------- +---- void weechat_config_free (struct t_config_file *config_file); ----------------------------------------- +---- Paramètres : @@ -5832,32 +5686,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_free (config_file); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_free(config_file) # exemple weechat.config_free(config_file) ----------------------------------------- +---- -weechat_config_get -^^^^^^^^^^^^^^^^^^ +==== weechat_config_get Recherche une option avec le nom complet. Prototype : [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_get (const char *option_name); ----------------------------------------- +---- Paramètres : @@ -5870,23 +5723,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("weechat.look.item_time_format"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype option = weechat.config_get(option_name) # exemple option = weechat.config_get("weechat.look.item_time_format") ----------------------------------------- +---- -weechat_config_get_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_get_plugin Recherche une option dans le fichier de configuration des extensions (plugins.conf). @@ -5894,9 +5746,9 @@ Recherche une option dans le fichier de configuration des extensions Prototype : [source,C] ----------------------------------------- +---- const char *weechat_config_get_plugin (const char *option_name); ----------------------------------------- +---- Paramètres : @@ -5910,25 +5762,24 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- /* si l'extension courante est "test", alors on cherche la valeur de l'option "plugins.var.test.option" dans le fichier plugins.conf */ char *value = weechat_config_get_plugin ("option"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_get_plugin(option_name) # exemple value = weechat.config_get_plugin("option") ----------------------------------------- +---- -weechat_config_is_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_is_set_plugin Vérifie si une option existe dans le fichier de configuration des extensions (plugins.conf). @@ -5936,9 +5787,9 @@ Vérifie si une option existe dans le fichier de configuration des extensions Prototype : [source,C] ----------------------------------------- +---- int weechat_config_is_set_plugin (const char *option_name); ----------------------------------------- +---- Paramètres : @@ -5952,7 +5803,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_config_is_set_plugin ("option")) { /* l'option existe */ @@ -5961,12 +5812,12 @@ else { /* l'option n'existe pas */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.config_is_set_plugin(option_name) @@ -5977,10 +5828,9 @@ if weechat.config_is_set_plugin("option"): else: # l'option n'existe pas # ... ----------------------------------------- +---- -weechat_config_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_plugin Affecter une nouvelle valeur pour une option dans le fichier de configuration des extensions (plugins.conf). @@ -5988,9 +5838,9 @@ des extensions (plugins.conf). Prototype : [source,C] ----------------------------------------- +---- int weechat_config_set_plugin (const char *option_name, const char *value); ----------------------------------------- +---- Paramètres : @@ -6008,7 +5858,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_set_plugin ("option", "valeur_test")) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -6024,12 +5874,12 @@ switch (weechat_config_set_plugin ("option", "valeur_test")) /* ... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_set_plugin(option_name, value) @@ -6043,10 +5893,9 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_set_desc_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_desc_plugin _WeeChat ≥ 0.3.5._ @@ -6056,10 +5905,10 @@ extensions (plugins.conf). Prototype : [source,C] ----------------------------------------- +---- void weechat_config_set_desc_plugin (const char *option_name, const char *description); ----------------------------------------- +---- Paramètres : @@ -6074,14 +5923,14 @@ Une création future de cette option utilisera cette description. Exemple en C : [source,C] ----------------------------------------- +---- weechat_config_set_desc_plugin ("option", "description de l'option"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.config_set_desc_plugin(option_name, description) @@ -6089,19 +5938,18 @@ weechat.config_set_desc_plugin(option_name, description) version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030500: weechat.config_set_desc_plugin("option", "description de l'option") ----------------------------------------- +---- -weechat_config_unset_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_unset_plugin Supprime une option du fichier de configuration des extensions (plugins.conf). Prototype : [source,C] ----------------------------------------- +---- int weechat_config_unset_plugin (const char *option_name); ----------------------------------------- +---- Paramètres : @@ -6120,7 +5968,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- switch (weechat_config_unset_plugin ("option")) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -6136,12 +5984,12 @@ switch (weechat_config_unset_plugin ("option")) /* ... */ break; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.config_unset_plugin(option_name) @@ -6155,16 +6003,14 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- [[key_bindings]] -Associations de touches -~~~~~~~~~~~~~~~~~~~~~~~ +=== Associations de touches Fonctions pour les associations de touches. -weechat_key_bind -^^^^^^^^^^^^^^^^ +==== weechat_key_bind _WeeChat ≥ 0.3.6._ @@ -6179,9 +6025,9 @@ créées. Pour supprimer une association de touche, utilisez Prototype : [source,C] ----------------------------------------- +---- int weechat_key_bind (const char *context, struct t_hashtable *keys); ----------------------------------------- +---- Paramètres : @@ -6200,7 +6046,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable *keys = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -6214,12 +6060,12 @@ if (keys) weechat_key_bind ("mouse", keys); weechat_hashtable_free (keys); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype num_keys = weechat.key_bind(context, keys) @@ -6228,10 +6074,9 @@ keys = { "@chat(python.test):button1": "hsignal:test_mouse", "@chat(python.test):wheelup": "/mycommand up", "@chat(python.test):wheeldown": "/mycommand down" } weechat.key_bind("mouse", keys) ----------------------------------------- +---- -weechat_key_unbind -^^^^^^^^^^^^^^^^^^ +==== weechat_key_unbind _WeeChat ≥ 0.3.6._ @@ -6243,9 +6088,9 @@ When calling this function, ensure that you will not remove a user key binding. Prototype : [source,C] ----------------------------------------- +---- int weechat_key_unbind (const char *context, const char *key); ----------------------------------------- +---- Paramètres : @@ -6261,18 +6106,18 @@ Valeur de retour : Exemples en C : [source,C] ----------------------------------------- +---- /* supprimer une seule touche */ weechat_key_unbind ("mouse", "@chat(plugin.buffer):button1"); /* supprimer toutes les touches avec la zone "chat(plugin.buffer)" */ weechat_key_unbind ("mouse", "area:chat(plugin.buffer)"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype num_keys = weechat.key_unbind(context, key) @@ -6283,39 +6128,37 @@ weechat.key_unbind("mouse", "@chat(plugin.buffer):button1") # supprimer toutes les touches avec la zone "chat(python.test)" weechat.key_unbind("mouse", "area:chat(python.test)") ----------------------------------------- +---- [[display]] -Affichage -~~~~~~~~~ +=== Affichage Fonctions pour afficher du texte dans les tampons. -weechat_prefix -^^^^^^^^^^^^^^ +==== weechat_prefix Retourne un préfixe. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_prefix (const char *prefix); ----------------------------------------- +---- Paramètres : * 'prefix' : nom du préfixe : [width="70%",cols="^2e,^1,^3,5",options="header"] -|======================================== +|=== | Préfixe | Valeur | Couleur | Description | error | `=!=` | jaune ("yellow") | Message d'erreur | network | `--` | violet ("magenta") | Message du réseau | action | `*` | blanc ("white") | Action personnelle | join | `-->` | vert clair ("lightgreen") | Quelqu'un a rejoint la discussion | quit | `<--` | rouge clair ("lightred") | Quelqu'un a quitté la discussion -|======================================== +|=== [NOTE] Les valeurs et couleurs peuvent être configurées avec la commande `/set`. @@ -6328,32 +6171,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "%sCeci est une erreur...", weechat_prefix ("error")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.prefix(prefix) # exemple weechat.prnt("", "%sCeci est une erreur..." % weechat.prefix("error")) ----------------------------------------- +---- -weechat_color -^^^^^^^^^^^^^ +==== weechat_color Retourne une chaîne avec un code couleur pour affichage. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_color (const char *color_name); ----------------------------------------- +---- Paramètres : @@ -6409,36 +6251,35 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Couleur : %sbleu %scouleur par défaut %sjaune sur rouge", weechat_color ("blue"), weechat_color ("chat"), weechat_color ("yellow,red")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.color(color_name) # exemple weechat.prnt("", "%sCouleur : %sbleu %scouleur par défaut %sjaune sur rouge" % (weechat.color("blue"), weechat.color("chat"), weechat.color("yellow,red"))) ----------------------------------------- +---- -weechat_printf -^^^^^^^^^^^^^^ +==== weechat_printf Affiche un message sur un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_printf (struct t_gui_buffer *buffer, const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6461,19 +6302,19 @@ positionnée à 0. Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Bonjour sur le tampon WeeChat"); weechat_printf (buffer, "Bonjour sur ce tampon"); weechat_printf (buffer, "%sCeci est une erreur !", weechat_prefix ("error")); weechat_printf (buffer, " \tMessage sans préfixe mais avec \t quelques \t tabulations"); weechat_printf (buffer, "\t\tMessage sans heure/alignement"); weechat_printf (buffer, "\t\t"); /* ligne vide (sans heure) */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.prnt(buffer, message) @@ -6484,23 +6325,22 @@ weechat.prnt(buffer, "%sCeci est une erreur !" % weechat.prefix("error")) weechat.prnt(buffer, " \tMessage sans préfixe mais avec \t quelques \t tabulations") weechat.prnt(buffer, "\t\tMessage sans heure/alignement") weechat.prnt(buffer, "\t\t") # ligne vide (sans heure) ----------------------------------------- +---- [NOTE] La fonction s'appelle "print" dans les scripts ("prnt" en Python). -weechat_printf_date -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date Affiche un message sur un tampon, en utilisant une date personnalisée. Prototype : [source,C] ----------------------------------------- +---- void weechat_printf_date (struct t_gui_buffer *buffer, time_t date, const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6512,25 +6352,24 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf_date (NULL, time (NULL) - 120, "Bonjour, il y a 2 minutes"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_printf_tags -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_tags Affiche un message sur un tampon, avec des étiquettes ("tags") personnalisées. Prototype : [source,C] ----------------------------------------- +---- void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags, const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6542,16 +6381,15 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf_tags (NULL, "notify_message", "Message avec une étiquette 'notify_message'"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_printf_date_tags -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date_tags Affiche un message sur un tampon, en utilisant une date et des étiquettes ("tags") personnalisées. @@ -6559,10 +6397,10 @@ Affiche un message sur un tampon, en utilisant une date et des étiquettes Prototype : [source,C] ----------------------------------------- +---- void weechat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, const char *tags, const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6575,7 +6413,7 @@ Paramètres : Tags couramment utilisés (liste non exhaustive) : [width="70%",cols="1m,4",options="header"] -|======================================== +|=== | Tag | Description | no_filter | La ligne ne peut pas être filtrée | no_highlight | Aucun highlight n'est possible sur cette ligne @@ -6595,20 +6433,20 @@ Tags couramment utilisés (liste non exhaustive) : | irc_ctcp_reply | Réponse à un message CTCP | irc_smart_filter | Message IRC qui peut être filtré avec le "smart filter" (filtre intelligent) | away_info | Message avec une info d'absence -|======================================== +|=== Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf_date_tags (NULL, time (NULL) - 120, "notify_message", "Message il y a 2 minutes avec une étiquette 'notify_message'"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.prnt_date_tags(buffer, date, tags, message) @@ -6616,24 +6454,23 @@ weechat.prnt_date_tags(buffer, date, tags, message) time = int(time.time()) weechat.prnt_date_tags("", time - 120, "notify_message", "Message il y a 2 minutes avec une étiquette 'notify_message'") ----------------------------------------- +---- [NOTE] La fonction s'appelle "print_date_tags" dans les scripts ("prnt_date_tags" en Python). -weechat_printf_y -^^^^^^^^^^^^^^^^ +==== weechat_printf_y Affiche un message sur une ligne d'un tampon avec contenu libre. Prototype : [source,C] ----------------------------------------- +---- void weechat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6644,35 +6481,34 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf_y (buffer, 2, "Mon message sur la 3ème ligne"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.prnt_y(buffer, y, message) # exemple weechat.prnt_y("", 2, "Mon message sur la 3ème ligne") ----------------------------------------- +---- [NOTE] La fonction s'appelle "print_y" dans les scripts ("prnt_y" en Python). -weechat_log_printf -^^^^^^^^^^^^^^^^^^ +==== weechat_log_printf Écrit un message dans le fichier de log WeeChat (weechat.log). Prototype : [source,C] ----------------------------------------- +---- void weechat_log_printf (const char *message, ...); ----------------------------------------- +---- Paramètres : @@ -6681,32 +6517,30 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_log_printf ("Mon message dans le fichier log"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.log_print(message) # exemple weechat.log_print("Mon message dans le fichier log") ----------------------------------------- +---- [NOTE] La fonction s'appelle "log_print" dans les scripts. [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_priority]] [float] -Hook priority -^^^^^^^^^^^^^ +==== Hook priority _WeeChat ≥ 0.3.4._ @@ -6725,24 +6559,23 @@ La priorité par défaut est 1000. Exemple en C : [source,C] ----------------------------------------- +---- /* accroche un modifieur avec priorité = 2000 */ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL); ----------------------------------------- +---- Les types de "hooks" suivants autorisent une priorité : command, command_run, signal, hsignal, config, completion, modifier, info, info_hashtable, infolist, hdata, focus. -weechat_hook_command -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command Accroche une commande. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command (const char *command, const char *description, const char *args, @@ -6754,7 +6587,7 @@ struct t_hook *weechat_hook_command (const char *command, char **argv, char **argv_eol), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -6799,7 +6632,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -6831,7 +6664,7 @@ struct t_hook *my_command_hook = &my_command_cb, /* callback_data */ NULL); ----------------------------------------- +---- Par exemple, si la commande appelée est `/command abc def ghi`, alors 'argv' et 'argv_eol' ont les valeurs suivantes : @@ -6852,7 +6685,7 @@ Pour les scripts, 'args' a la valeur "abc def ghi". Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_command(command, description, args, args_description, completion, callback, callback_data) @@ -6872,23 +6705,22 @@ hook = weechat.hook_command("monfiltre", "description de monfiltre", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- -weechat_hook_command_run -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command_run Intercepter une commande lorsqu'elle est exécutée par WeeChat. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command_run (const char *command, int (*callback)(void *data, struct t_gui_buffer *buffer, const char *command), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -6918,7 +6750,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) { @@ -6930,12 +6762,12 @@ my_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) struct t_hook *my_command_run_hook = weechat_hook_command_run ("/input complete*", &my_command_run_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_command_run(command, callback, callback_data) @@ -6945,24 +6777,23 @@ def my_command_run_cb(data, buffer, command): return weechat.WEECHAT_RC_OK_EAT hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "") ----------------------------------------- +---- -weechat_hook_timer -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_timer Accroche un "timer" (fonction appelée à intervalles réguliers). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_timer (long interval, int align_second, int max_calls, int (*callback)(void *data, int remaining_calls), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -6991,7 +6822,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_timer_cb (void *data, int remaining_calls) { @@ -7002,12 +6833,12 @@ my_timer_cb (void *data, int remaining_calls) /* timer appelé toutes les 20 secondes */ struct t_hook *my_timer_hook = weechat_hook_timer (20 * 1000, 0, 0, &my_timer_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data) @@ -7018,17 +6849,16 @@ def my_timer_cb(data, remaining_calls): # timer appelé toutes les 20 secondes hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "") ----------------------------------------- +---- -weechat_hook_fd -^^^^^^^^^^^^^^^ +==== weechat_hook_fd Accroche un descripteur de fichier (fichier ou socket). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_fd (int fd, int flag_read, int flag_write, @@ -7036,7 +6866,7 @@ struct t_hook *weechat_hook_fd (int fd, int (*callback)(void *data, int fd), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -7061,7 +6891,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_fd_cb (void *data, int fd) { @@ -7073,12 +6903,12 @@ int sock = socket (AF_INET, SOCK_STREAM, 0); /* définir les options du socket */ /* ... */ struct t_hook *my_fd_hook = weechat_hook_fd (sock, 1, 0, 0, &my_fd_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data) @@ -7089,10 +6919,9 @@ def my_fd_cb(data, fd): sock = ... hook = weechat.hook_fd(sock, 1, 0, 0, "my_fd_cb", "") ----------------------------------------- +---- -weechat_hook_process -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process Accroche un processus (lancé par un fork), et intercepter sa sortie. @@ -7108,7 +6937,7 @@ les paramètres dans la hashtable 'options' _(WeeChat ≥ 0.4.0)_. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process (const char *command, int timeout, int (*callback)(void *data, @@ -7117,7 +6946,7 @@ struct t_hook *weechat_hook_process (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -7182,7 +7011,7 @@ données que lorsque le code retour est positif ou nul. Exemple en C : [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7213,12 +7042,12 @@ my_process_cb (void *data, const char *command, int return_code, struct t_hook *my_process_hook = weechat_hook_process ("ls", 5000, &my_process_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_process(command, timeout, callback, callback_data) @@ -7236,10 +7065,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK hook = weechat.hook_process("ls", 5000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_process_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process_hashtable _WeeChat ≥ 0.3.7._ @@ -7249,7 +7077,7 @@ hashtable, et intercepter sa sortie. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process_hashtable (const char *command, struct t_hashtable *options, int timeout, @@ -7259,7 +7087,7 @@ struct t_hook *weechat_hook_process_hashtable (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Les paramètres sont les mêmes que ceux de la fonction <<_weechat_hook_process,weechat_hook_process>>, avec un paramètre @@ -7298,7 +7126,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7378,12 +7206,12 @@ if (options_cmd2) &my_process_cb, NULL); weechat_hashtable_free (options_cmd2); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data) @@ -7418,17 +7246,16 @@ hook3 = weechat.hook_process_hashtable("sh", { "arg1": "-c", "arg2": "ls -l /tmp | grep something" }, 20000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_connect -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_connect Accroche une connexion (connexion à une machine distante en tâche de fond). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_connect (const char *proxy, const char *address, int port, @@ -7446,7 +7273,7 @@ struct t_hook *weechat_hook_connect (const char *proxy, const char *error, const char *ip_address), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -7506,7 +7333,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, const char *ip_address) @@ -7556,12 +7383,12 @@ struct t_hook *my_connect_hook = weechat_hook_connect (NULL, NULL, NULL, 0, /* GnuTLS */ NULL, &my_connect_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname, callback, callback_data) @@ -7594,17 +7421,16 @@ def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address): hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "", "my_connect_cb", "") ----------------------------------------- +---- -weechat_hook_print -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_print Intercepte un message affiché. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *tags, const char *message, @@ -7619,7 +7445,7 @@ struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *prefix, const char *message), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -7655,7 +7481,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, int tags_count, const char **tags, @@ -7669,12 +7495,12 @@ my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, /* intercepter tous les messages, de tous les tampons, sans couleur */ struct t_hook *my_print_hook = weechat_hook_print (NULL, NULL, NULL, 1, &my_print_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data) @@ -7685,24 +7511,23 @@ def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message) # intercepter tous les messages, de tous les tampons, sans couleur hook = weechat.hook_print("", "", "", 1, "my_print_cb", "") ----------------------------------------- +---- -weechat_hook_signal -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal S'accroche à un signal. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_signal (const char *signal, int (*callback)(void *data, const char *signal, const char *type_data, void *signal_data), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -7710,7 +7535,7 @@ Paramètres : (priorité autorisée, voir la note sur la <<hook_priority,priorité>>) : [width="100%",cols="^1,^3,^4,5",options="header"] -|======================================== +|=== | Extension | Signal | Paramètres | Description | aspell | aspell_suggest + @@ -8221,7 +8046,7 @@ Paramètres : _(WeeChat ≥ 0.3.2)_ | Pointer : infolist avec l'info xfer | Le xfer s'est terminé -|======================================== +|=== [NOTE] ^(1)^ 'xxx' est le nom du serveur IRC, 'yyy' est le nom d'une commande IRC. @@ -8250,7 +8075,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -8262,12 +8087,12 @@ my_signal_cb (void *data, const char *signal, const char *type_data, /* intercepter le signal "quit" */ struct t_hook *my_signal_hook = weechat_hook_signal ("quit", &my_signal_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_signal(signal, callback, callback_data) @@ -8278,20 +8103,19 @@ def my_signal_cb(data, signal, signal_data): # intercepter le signal "quit" hook = weechat.hook_signal("quit", "my_signal_cb", "") ----------------------------------------- +---- -weechat_hook_signal_send -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal_send Envoie un signal. Prototype : [source,C] ----------------------------------------- +---- void weechat_hook_signal_send (const char *signal, const char *type_data, void *signal_data); ----------------------------------------- +---- Paramètres : @@ -8303,24 +8127,23 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("mon_signal", WEECHAT_HOOK_SIGNAL_STRING, ma_chaine); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.hook_signal_send(signal, type_data, signal_data) # exemple weechat.hook_signal_send("mon_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, ma_chaine) ----------------------------------------- +---- [[signal_logger_backlog]] -Signal logger_backlog -+++++++++++++++++++++ +===== Signal logger_backlog Le signal "logger_backlog" peut être envoyé pour afficher l'historique de discussion dans le tampon (par exemple si vous ouvrez votre propre tampon dans @@ -8331,20 +8154,19 @@ Le paramètre est un pointeur vers le tampon. Exemple en C : [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("logger_backlog", WEECHAT_HOOK_SIGNAL_POINTER, buffer); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- weechat.hook_signal_send("logger_backlog", weechat.WEECHAT_HOOK_SIGNAL_POINTER, buffer) ----------------------------------------- +---- [[signals_xxx_script_install]] -Signaux xxx_script_install -++++++++++++++++++++++++++ +===== Signaux xxx_script_install Cinq signaux peuvent être envoyés pour installer un script, selon le langage : @@ -8370,22 +8192,21 @@ Le paramètre est une chaîne avec le chemin vers le script à installer. Exemple en C : [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py") ----------------------------------------- +---- [[signals_xxx_script_remove]] -Signaux xxx_script_remove -+++++++++++++++++++++++++ +===== Signaux xxx_script_remove Cinq signaux peuvent être envoyés pour supprimer une liste de scripts, selon le langage : @@ -8407,24 +8228,23 @@ des virgules, nom du script sans le chemin, par exemple 'script.py'). Exemple en C : [source,C] ----------------------------------------- +---- /* décharge et supprime les scripts test.py et script.py */ weechat_hook_signal_send ("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # décharge et supprime les scripts test.py et script.py weechat.hook_signal_send("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py") ----------------------------------------- +---- [[signal_irc_input_send]] -Signal irc_input_send -+++++++++++++++++++++ +===== Signal irc_input_send _WeeChat ≥ 0.3.4._ @@ -8451,7 +8271,7 @@ Le paramètre est une chaîne avec le format suivant : Exemples en C : [source,C] ----------------------------------------- +---- /* dis "Bonjour !" sur le serveur freenode, canal #weechat */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Bonjour !"); @@ -8459,12 +8279,12 @@ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, /* envoie la commande "/whois FlashCode" sur le canal freenode, en basse priorité */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # dis "Bonjour !" sur le serveur freenode, canal #weechat weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Bonjour !") @@ -8472,10 +8292,9 @@ weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, # envoie la commande "/whois FlashCode" sur le canal freenode, en basse priorité weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- -weechat_hook_hsignal -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal _WeeChat ≥ 0.3.4._ @@ -8484,13 +8303,13 @@ S'accroche à un hsignal (signal avec une hashtable). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hsignal (const char *signal, int (*callback)(void *data, const char *signal, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -8498,7 +8317,7 @@ Paramètres : (priorité autorisée, voir la note sur la <<hook_priority,priorité>>) : [width="100%",cols="^1,^3,5,5",options="header"] -|======================================== +|=== | Extension | Signal | Paramètres | Description | irc | irc_redirection_xxx_yyy ^(1)^ + @@ -8547,7 +8366,7 @@ Paramètres : 'parent_group' ('struct t_gui_nick_group *') : parent + 'nick' ('struct t_gui_nick *') : pseudo | Pseudo changé dans la liste de pseudos -|======================================== +|=== [NOTE] ^(1)^ 'xxx' est l'argument "signal" utilisé dans la redirection, 'yyy' est le @@ -8573,7 +8392,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8583,12 +8402,12 @@ my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) struct t_hook *my_hsignal_hook = weechat_hook_hsignal ("test", &my_hsignal_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_hsignal(signal, callback, callback_data) @@ -8598,10 +8417,9 @@ def my_hsignal_cb(data, signal, hashtable): return weechat.WEECHAT_RC_OK hook = weechat.hook_hsignal("test", "my_hsignal_cb", "") ----------------------------------------- +---- -weechat_hook_hsignal_send -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal_send _WeeChat ≥ 0.3.4._ @@ -8610,9 +8428,9 @@ Envoie un hsignal (signal avec hashtable). Prototype : [source,C] ----------------------------------------- +---- void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable); ----------------------------------------- +---- Paramètres : @@ -8622,7 +8440,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8634,22 +8452,21 @@ if (hashtable) weechat_hook_hsignal_send ("my_hsignal", hashtable); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.hook_hsignal_send(signal, hashtable) # exemple weechat.hook_hsignal_send("my_hsignal", { "clé": "valeur" }) ----------------------------------------- +---- [[hsignal_irc_redirect_command]] -Hsignal irc_redirect_command -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_command _WeeChat ≥ 0.3.4._ @@ -8711,7 +8528,7 @@ sont des chaînes) : Exemple en C : [source,C] ----------------------------------------- +---- int test_whois_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8737,12 +8554,12 @@ if (hashtable) "freenode;;2;;/whois FlashCode"); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- def test_whois_cb(data, signal, hashtable): weechat.prnt("", "erreur = %s" % hashtable["error"]) weechat.prnt("", "sortie = %s" % hashtable["output"]) @@ -8754,11 +8571,10 @@ weechat.hook_hsignal_send("irc_redirect_command", "string": "FlashCode" }) weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- [[hsignal_irc_redirect_pattern]] -Hsignal irc_redirect_pattern -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_pattern _WeeChat ≥ 0.3.4._ @@ -8782,9 +8598,9 @@ Pour chaque commande dans 'cmd_start', 'cmd_stop' et 'cmd_extra', il est possible de donner un entier avec la position de la chaîne "string" qui doit être trouvée dans le message reçu, par exemple : ----------------------------------------- +---- 352:1,354,401:1 ----------------------------------------- +---- Pour les commandes 352 et 401, la chaîne "string" doit être trouvée dans le message reçu, comme premier paramètre. @@ -8797,7 +8613,7 @@ chaque redirection. Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8818,12 +8634,12 @@ if (hashtable) /* ... */ weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- weechat.hook_hsignal_send("irc_redirect_pattern", { "pattern": "my_whois", "timeout": "30", "cmd_start": "311:1", @@ -8832,23 +8648,22 @@ weechat.hook_hsignal_send("irc_redirect_pattern", # rediriger maintenant la commande irc whois avec le hsignal irc_redirect_command, # en utilisant le modèle "my_whois" # ... ----------------------------------------- +---- -weechat_hook_config -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_config S'accroche à une option de configuration. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_config (const char *option, int (*callback)(void *data, const char *option, const char *value), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -8873,7 +8688,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_config_cb (void *data, const char *option, const char *value) { @@ -8884,12 +8699,12 @@ my_config_cb (void *data, const char *option, const char *value) /* intercepter les changements de l'option "weechat.look.item_time_format" */ struct t_hook *my_config_hook = weechat_hook_config ("weechat.look.item_time_format", &my_config_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_config(option, callback, callback_data) @@ -8900,17 +8715,16 @@ def my_config_cb(data, option, value): # intercepter les changements de l'option "weechat.look.item_time_format" hook = weechat.hook_config("weechat.look.item_time_format", "my_config_cb", "") ----------------------------------------- +---- -weechat_hook_completion -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion Accroche une complétion. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_completion (const char *completion_item, const char *description, int (*callback)(void *data, @@ -8918,7 +8732,7 @@ struct t_hook *weechat_hook_completion (const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -8953,7 +8767,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -8969,12 +8783,12 @@ my_completion_cb (void *data, const char *completion_item, struct t_hook *my_completion_hook = weechat_hook_completion ("extension_item", "ma complétion !", &my_completion_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_completion(completion_item, description, callback, callback_data) @@ -8986,10 +8800,9 @@ def my_completion_cb(data, completion_item, buffer, completion): hook = weechat.hook_completion("extension_item", "ma complétion !", "my_completion_cb", "") ----------------------------------------- +---- -weechat_hook_completion_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_get_string _WeeChat ≥ 0.3.4._ @@ -8998,10 +8811,10 @@ Retourne la valeur d'une propriété de la complétion sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hook_completion_get_string (struct t_gui_completion *completion, const char *property); ----------------------------------------- +---- Paramètres : @@ -9014,7 +8827,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -9028,12 +8841,12 @@ my_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hook_completion_get_string(completion, property) @@ -9044,22 +8857,21 @@ def my_completion_cb(data, completion_item, buffer, completion): # complétion selon les paramètres # ... return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_hook_completion_list_add -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_list_add Ajoute un mot pour une complétion. Prototype : [source,C] ----------------------------------------- +---- void weechat_hook_completion_list_add (struct t_gui_completion *completion, const char *word, int nick_completion, const char *where); ----------------------------------------- +---- Paramètres : @@ -9076,29 +8888,28 @@ Exemple en C : voir <<_weechat_hook_completion,weechat_hook_completion>>. Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.hook_completion_list_add(completion, word, nick_completion, where) # exemple : voir la fonction hook_completion ci-dessus ----------------------------------------- +---- -weechat_hook_modifier -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier Accroche un "modifieur". Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_modifier (const char *modifier, char *(*callback)(void *data, const char *modifier, const char *modifier_data, const char *string), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9107,7 +8918,7 @@ Paramètres : (priorité autorisée, voir la note sur la <<hook_priority,priorité>>) : [width="100%",cols="^2,3,4,4",options="header"] -|======================================== +|=== | "Modifieur" | Données du "modifieur" | Chaîne | Sortie | charset_decode | @@ -9205,7 +9016,7 @@ Paramètres : extension + ";" + nom_tampon + ";" + étiquettes | Message affiché | Nouveau message affiché -|======================================== +|=== [NOTE] ^(1)^ 'xxx' est un nom de commande IRC. + @@ -9228,7 +9039,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char * my_modifier_cb (void *data, const char *modifier, const char *modifier_data, @@ -9253,12 +9064,12 @@ my_modifier_cb (void *data, const char *modifier, struct t_hook *my_modifier_hook = weechat_hook_modifier ("weechat_print", &my_modifier_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_modifier(modifier, callback, callback_data) @@ -9267,21 +9078,20 @@ def my_modifier_cb(data, modifier, modifier_data, string): return "%s xxx" % string hook = weechat.hook_modifier("weechat_print", "my_modifier_cb", "") ----------------------------------------- +---- -weechat_hook_modifier_exec -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier_exec Exécute un ou plusieurs "modifieurs". Prototype : [source,C] ----------------------------------------- +---- char *weechat_hook_modifier_exec (const char *modifier, const char *modifier_data, const char *string); ----------------------------------------- +---- Paramètres : @@ -9296,31 +9106,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char *new_string = weechat_hook_modifier_exec ("mon_modifier", mes_donnees, ma_chaine); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.hook_modifier_exec(modifier, modifier_data, string) # exemple weechat.hook_modifier_exec("mon_modifier", mes_donnees, ma_chaine) ----------------------------------------- +---- -weechat_hook_info -^^^^^^^^^^^^^^^^^ +==== weechat_hook_info Accroche une information (le "callback" prend et retourne une chaîne). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info (const char *info_name, const char *description, const char *args_description, @@ -9328,7 +9137,7 @@ struct t_hook *weechat_hook_info (const char *info_name, const char *info_name, const char *arguments), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9353,7 +9162,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char * my_info_cb (void *data, const char *info_name, const char *arguments) { @@ -9366,12 +9175,12 @@ struct t_hook *my_info_hook = weechat_hook_info ("mon_info", "Une information", "Info sur les paramètres", &my_info_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_info(info_name, description, args_description, callback, callback_data) @@ -9382,10 +9191,9 @@ def my_info_cb(data, info_name, arguments): hook = weechat.hook_info("mon_info", "Une information", "Info sur les paramètres", "my_info_cb", "") ----------------------------------------- +---- -weechat_hook_info_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_info_hashtable _WeeChat ≥ 0.3.4._ @@ -9394,7 +9202,7 @@ Accroche une information (le "callback" prend et retourne une hashtable). Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *description, const char *args_description, @@ -9403,7 +9211,7 @@ struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *info_name, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9430,7 +9238,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable * my_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) { @@ -9444,12 +9252,12 @@ struct t_hook *my_info_hook = weechat_hook_info_hashtable ("mon_info_hashtable", "Info sur la hashtable en entrée", "Info sur la hashtable en sortie", &my_info_hashtable_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_info_hashtable(info_name, description, args_description, output_description, callback, callback_data) @@ -9462,10 +9270,9 @@ hook = weechat.hook_info_hashtable("mon_info_hashtable", "Une information", "Info sur la hashtable en entrée", "Info sur la hashtable en sortie", "my_info_hashtable_cb", "") ----------------------------------------- +---- -weechat_hook_infolist -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_infolist Accroche une infolist : le "callback" retournera un pointeur vers l'infolist demandée. @@ -9473,7 +9280,7 @@ demandée. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_infolist (const char *infolist_name, const char *description, const char *pointer_description, @@ -9483,7 +9290,7 @@ struct t_hook *weechat_hook_infolist (const char *infolist_name, void *pointer, const char *arguments), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9510,7 +9317,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist * my_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -9529,12 +9336,12 @@ struct t_hook *my_infolist = weechat_hook_infolist ("mon_infolist", "Info sur le pointeur", "Info sur les paramètres", &my_infolist_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_infolist(infolist_name, description, pointer_description, args_description, callback, callback_data) @@ -9548,23 +9355,22 @@ def my_infolist_cb(data, infolist_name, pointer, arguments): hook = weechat.hook_infolist("mon_infolist", "Mon infolist", "Info sur le pointeur", "Info sur les paramètres", "my_infolist_cb", "") ----------------------------------------- +---- -weechat_hook_hdata -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hdata Accroche un hdata : le "callback" retournera un pointeur vers le hdata demandé. Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hdata (const char *hdata_name, const char *description, struct t_hdata *(*callback)(void *data, const char *hdata_name), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9586,7 +9392,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata * my_hdata_cb (void *data, const char *hdata_name) { @@ -9602,13 +9408,12 @@ my_hdata_cb (void *data, const char *hdata_name) struct t_hook *my_hdata = weechat_hook_hdata ("mon_hdata", "Hdata pour ma structure", &my_hdata_cb, NULL); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hook_focus -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_focus Accroche un focus : évènement souris ou touche du clavier pressée dans le mode "curseur" (mouvement libre du curseur). @@ -9616,12 +9421,12 @@ Accroche un focus : évènement souris ou touche du clavier pressée dans le mod Prototype : [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_focus (const char *area, struct t_hashtable *(*callback)(void *data, struct t_hashtable *info), void *callback_data); ----------------------------------------- +---- Paramètres : @@ -9652,7 +9457,7 @@ Contenu de la hashtable envoyée au "callback" (les clés et valeurs sont de typ "string) : [width="100%",cols="5m,5,8,3",options="header"] -|======================================== +|=== | Clé ^(1)^ | Description | Exemples de valeur | Valeur si non applicable | _x | Colonne sur l'écran 2+| "0" ... "n" | _y | Ligne sur l'écran 2+| "0" ... "n" @@ -9683,7 +9488,7 @@ Contenu de la hashtable envoyée au "callback" (les clés et valeurs sont de typ | _bar_item_name | Nom de l'objet de barre | "buffer_nicklist", "hotlist", ... | "" | _bar_item_line | Ligne dans l'objet de barre | "0" ... "n" | "-1" | _bar_item_col | Colonne dans l'objet de barre | "0" ... "n" | "-1" -|======================================== +|=== [NOTE] ^(1)^ Il y a les mêmes clés suffixées par "2" (c'est-à-dire : "_x2", "_y2", @@ -9698,13 +9503,13 @@ relâché). + Informations additionnelles pour l'objet de barre "buffer_nicklist" : [width="70%",cols="3m,3,8",options="header"] -|======================================== +|=== | Clé | Extension ^(1)^ | Description | nick | core | Pseudonyme | prefix | core | Préfixe du pseudonyme | group | core | Nom du groupe | irc_host | irc | Nom d'hôte pour le pseudonyme (si connu) -|======================================== +|=== [NOTE] ^(1)^ Le nom de l'extension qui définit un hook_focus pour retourner des infos @@ -9718,7 +9523,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable * my_focus_nicklist_cb (void *data, struct t_hashtable *info) { @@ -9731,12 +9536,12 @@ my_focus_nicklist_cb (void *data, struct t_hashtable *info) /* ajoute le focus sur la liste des pseudos */ struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist", &my_focus_nicklist_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hook = weechat.hook_focus(area, callback, callback_data) @@ -9747,10 +9552,9 @@ def my_focus_nicklist_cb(data, info): return my_dict hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "") ----------------------------------------- +---- -weechat_hook_set -^^^^^^^^^^^^^^^^ +==== weechat_hook_set _WeeChat ≥ 0.3.9._ @@ -9759,10 +9563,10 @@ Affecte une valeur à une propriété d'un hook. Prototype : [source,C] ----------------------------------------- +---- void weechat_hook_set (struct t_hook *hook, const char *property, const char *value); ----------------------------------------- +---- Paramètres : @@ -9770,39 +9574,38 @@ Paramètres : * 'property' et 'value' : nom de la propriété, avec sa valeur : [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nom | Valeur | Description | subplugin | toute chaîne | Nom de la sous-extension (couramment un nom de script, qui est affiché dans `/help commande` pour un hook de type 'command') -|======================================== +|=== Exemple en C : [source,C] ----------------------------------------- +---- struct t_hook *my_command_hook = weechat_hook_command ("abcd", "description", "args", "description args", "", &my_command_cb, NULL); weechat_hook_set (my_command_hook, "subplugin", "test"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_unhook -^^^^^^^^^^^^^^ +==== weechat_unhook Décroche quelque chose qui est a été accroché. Prototype : [source,C] ----------------------------------------- +---- void weechat_unhook (struct t_hook *hook); ----------------------------------------- +---- Paramètres : @@ -9811,68 +9614,65 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hook *my_hook = weechat_hook_command ( /* ... */ ); /* ... */ weechat_unhook (my_hook); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.unhook(hook) # exemple weechat.unhook(my_hook) ----------------------------------------- +---- -weechat_unhook_all -^^^^^^^^^^^^^^^^^^ +==== weechat_unhook_all Décroche tout ce qui a été accroché par l'extension courante. Prototype : [source,C] ----------------------------------------- +---- void weechat_unhook_all (); ----------------------------------------- +---- Exemple en C : [source,C] ----------------------------------------- +---- weechat_unhook_all (); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.unhook_all() # exemple weechat.unhook_all() ----------------------------------------- +---- [[buffers]] -Buffers -~~~~~~~ +=== Buffers Fonctions pour créer/interroger/fermer les tampons. -weechat_buffer_new -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_new Ouvre un nouveau tampon. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_new (const char *name, int (*input_callback)(void *data, struct t_gui_buffer *buffer, @@ -9881,7 +9681,7 @@ struct t_gui_buffer *weechat_buffer_new (const char *name, int (*close_callback)(void *data, struct t_gui_buffer *buffer), void *close_callback_data); ----------------------------------------- +---- Paramètres : @@ -9913,7 +9713,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_input_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) { @@ -9932,12 +9732,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) struct t_gui_buffer *my_buffer = weechat_buffer_new ("mon_buffer", &my_input_cb, NULL, &my_close_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_new(name, input_callback, input_callback_data, close_callback, close_callback_data) @@ -9952,10 +9752,9 @@ def my_close_cb(data, buffer): return weechat.WEECHAT_RC_OK buffer = weechat.buffer_new("mon_buffer", "my_input_cb", "", "my_close_cb", "") ----------------------------------------- +---- -weechat_current_buffer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_buffer Retourne un pointeur vers le tampon courant (le tampon affiché par la fenêtre courante). @@ -9963,9 +9762,9 @@ courante). Prototype : [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_current_buffer (); ----------------------------------------- +---- Valeur de retour : @@ -9974,33 +9773,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (weechat_current_buffer (), "Texte sur le tampon courant"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype buffer = weechat.current_buffer() # exemple weechat.prnt(weechat.current_buffer(), "Texte sur le tampon courant") ----------------------------------------- +---- -weechat_buffer_search -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search Recherche un tampon par l'extension et/ou le nom. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search (const char *plugin, const char *name); ----------------------------------------- +---- Paramètres : @@ -10015,24 +9813,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("mon_extension", "mon_tampon"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_search(plugin, name) # exemple buffer = weechat.buffer_search("mon_extension", "mon_tampon") ----------------------------------------- +---- -weechat_buffer_search_main -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search_main Recherche le tampon principal de WeeChat (tampon 'core', premier tampon affiché lorsque WeeChat démarre). @@ -10040,9 +9837,9 @@ affiché lorsque WeeChat démarre). Prototype : [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search_main (); ----------------------------------------- +---- Valeur de retour : @@ -10051,32 +9848,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer = weechat_buffer_search_main (); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype buffer = weechat.buffer_search_main() # exemple buffer = weechat.buffer_search_main() ----------------------------------------- +---- -weechat_buffer_clear -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_clear Efface le contenu d'un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_clear (struct t_gui_buffer *buffer); ----------------------------------------- +---- Paramètres : @@ -10085,19 +9881,19 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("mon_extension", "mon_tampon"); if (my_buffer) { weechat_buffer_clear (my_buffer); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.buffer_clear(buffer) @@ -10105,19 +9901,18 @@ weechat.buffer_clear(buffer) buffer = weechat.buffer_search("mon_extension", "mon_tampon") if buffer != "": weechat.buffer_clear(buffer) ----------------------------------------- +---- -weechat_buffer_close -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_close Ferme un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_close (struct t_gui_buffer *buffer); ----------------------------------------- +---- Paramètres : @@ -10126,18 +9921,18 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_new ("mon_tampon", &my_input_cb, NULL, &my_close_cb, NULL); /* ... */ weechat_buffer_close (my_buffer); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.buffer_close(buffer) @@ -10145,10 +9940,9 @@ weechat.buffer_close(buffer) buffer = weechat.buffer_new("mon_tampon", "my_input_cb", "", "my_close_cb", "") # ... weechat.buffer_close(buffer) ----------------------------------------- +---- -weechat_buffer_merge -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_merge Mélange le tampon avec un autre tampon : les deux tampons continueront d'exister chacun de leur côté, mais avec le même numéro, et WeeChat affichera @@ -10157,10 +9951,10 @@ les lignes des deux tampons (lignes mélangées). Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_merge (struct t_gui_buffer *buffer, struct t_gui_buffer *target_buffer); ----------------------------------------- +---- Paramètres : @@ -10170,36 +9964,35 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- /* mélanger le tampon courant avec le tampon "core" */ weechat_buffer_merge (weechat_current_buffer (), weechat_buffer_search_main ()); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.buffer_merge(buffer, target_buffer) # exemple # mélanger le tampon courant avec le tampon "core" weechat.buffer_merge(weechat.current_buffer(), weechat.buffer_search_main()) ----------------------------------------- +---- -weechat_buffer_unmerge -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_unmerge Supprime le mélange d'un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_unmerge (struct t_gui_buffer *buffer, int number); ----------------------------------------- +---- Paramètres : @@ -10210,33 +10003,32 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_buffer_unmerge (weechat_current_buffer (), 1); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.buffer_unmerge(buffer, number) # exemple weechat.buffer_unmerge(weechat.current_buffer(), 1) ----------------------------------------- +---- -weechat_buffer_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_integer Retourne une valeur entière pour une propriété du tampon. Prototype : [source,C] ----------------------------------------- +---- int weechat_buffer_get_integer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Paramètres : @@ -10288,34 +10080,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "mon numéro de tampon est : %d", weechat_buffer_get_integer (mon_tampon, "number")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_integer(buffer, property) # exemple weechat.prnt("", "mon numéro de tampon est : %d" % weechat.buffer_get_integer(my_buffer, "number")) ----------------------------------------- +---- -weechat_buffer_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_string Retourne la valeur d'une propriété du tampon sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_buffer_get_string (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Paramètres : @@ -10347,16 +10138,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "nom / nom court du tampon sont : %s / %s", weechat_buffer_get_string (my_buffer, "name"), weechat_buffer_get_string (my_buffer, "short_name")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_string(buffer, property) @@ -10364,20 +10155,19 @@ value = weechat.buffer_get_string(buffer, property) weechat.prnt("", "nom / nom court du tampon sont : %s / %s" % (weechat.buffer_get_string(my_buffer, "name"), weechat.buffer_get_string(my_buffer, "short_name"))) ----------------------------------------- +---- -weechat_buffer_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_pointer Retourne la valeur d'une propriété sous forme d'un pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_buffer_pointer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Paramètres : @@ -10394,34 +10184,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "pointeur vers l'extension de mon tampon : %lx", weechat_buffer_get_pointer (mon_tampon, "plugin")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_get_pointer(buffer, property) # exemple weechat.prnt("", "pointeur vers l'extension de mon tampon : %s" % weechat.buffer_get_pointer(my_buffer, "plugin")) ----------------------------------------- +---- -weechat_buffer_set -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set Affecte une valeur à une propriété d'un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property, const char *value); ----------------------------------------- +---- Paramètres : @@ -10429,7 +10218,7 @@ Paramètres : * 'property' et 'value' : nom de la propriété, avec sa valeur : [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nom | Valeur | Description | hotlist | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE, @@ -10549,12 +10338,12 @@ Paramètres : | localvar_del_xxx | - | Supprime la variable locale 'xxx' -|======================================== +|=== Exemple en C : [source,C] ----------------------------------------- +---- /* désactiver la hotlist (pour tous les tampons) */ weechat_buffer_set (NULL, "hotlist", "-"); @@ -10569,12 +10358,12 @@ weechat_buffer_set (mon_tampon, "localvar_set_toto", "abc"); /* supprimer la variable locale "toto" */ weechat_buffer_set (mon_tampon, "localvar_del_toto", NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.buffer_set(buffer, property, value) @@ -10594,20 +10383,19 @@ weechat.buffer_set(my_buffer, "localvar_set_toto", "abc") # supprimer la variable locale "toto" weechat.buffer_set(my_buffer, "localvar_del_toto", "") ----------------------------------------- +---- -weechat_buffer_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set_pointer Affecte un pointeur à une propriété d'un tampon. Prototype : [source,C] ----------------------------------------- +---- void weechat_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property, void *pointer); ----------------------------------------- +---- Paramètres : @@ -10629,18 +10417,18 @@ Paramètres : Prototypes pour les "callbacks" : [source,C] ----------------------------------------- +---- int close_callback (void *data, struct t_gui_buffer *buffer); int input_callback (void *data, struct t_gui_buffer *buffer, const char *input_data); int nickcmp_callback (void *data, struct t_gui_buffer *buffer, const char *nick1, const char *nick2); ----------------------------------------- +---- Exemple en C : [source,C] ----------------------------------------- +---- int my_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -10649,13 +10437,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) } weechat_buffer_set_pointer (mon_tampon, "close_callback", &my_close_cb); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_buffer_string_replace_local_var -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_string_replace_local_var Remplace les variables locales dans une chaîne par leurs valeurs, en utilisant les variables locales du tampon. @@ -10663,10 +10450,10 @@ les variables locales du tampon. Prototype : [source,C] ----------------------------------------- +---- char *weechat_buffer_string_replace_local_var (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Paramètres : @@ -10680,18 +10467,18 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_buffer_set (mon_tampon, "localvar_set_toto", "abc"); char *str = weechat_buffer_string_replace_local_var (mon_tampon, "test avec $toto"); /* str contient "test avec abc" */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.buffer_string_replace_local_var(buffer, string) @@ -10699,10 +10486,9 @@ value = weechat.buffer_string_replace_local_var(buffer, string) weechat.buffer_set(my_buffer, "localvar_set_toto", "abc") str = weechat.buffer_string_replace_local_var(my_buffer, "test avec $toto") # str contient "test avec abc" ----------------------------------------- +---- -weechat_buffer_match_list -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_match_list _WeeChat ≥ 0.3.5._ @@ -10711,9 +10497,9 @@ Vérifie si le tampon correspond à la liste de tampons. Prototype : [source,C] ----------------------------------------- +---- int weechat_buffer_match_list (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Paramètres : @@ -10731,7 +10517,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_buffer *buffer = weechat_buffer_search ("irc", "freenode.#weechat"); if (buffer) { @@ -10740,12 +10526,12 @@ if (buffer) weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.freenode.*")); /* 1 */ weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.oftc.*,python.*")); /* 0 */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype match = weechat.buffer_match_list(buffer, string) @@ -10756,25 +10542,23 @@ if buffer: weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "*,!*#weechat*")) # 0 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.freenode.*")) # 1 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.oftc.*,python.*")) # 0 ----------------------------------------- +---- [[windows]] -Fenêtres -~~~~~~~~ +=== Fenêtres Fonctions pour interroger les fenêtres. -weechat_current_window -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_window Retourne le pointeur vers la fenêtre courante. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_current_window (); ----------------------------------------- +---- Valeur de retour : @@ -10783,23 +10567,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_window *current_window = weechat_current_window (); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype window = weechat.current_window() # exemple current_window = weechat.current_window() ----------------------------------------- +---- -weechat_window_search_with_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_search_with_buffer _WeeChat ≥ 0.3.5._ @@ -10808,9 +10591,9 @@ Retourne le pointeur vers la fenêtre affichant un tampon. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer); ----------------------------------------- +---- Paramètre : @@ -10824,36 +10607,35 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "fenêtre affichant le tampon core: %lx", weechat_window_search_with_buffer (weechat_buffer_search_main ())); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype window = weechat.window_search_with_buffer(buffer) # exemple weechat.prnt("", "fenêtre affichant le tampon core: %s" % weechat.window_search_with_buffer(weechat.buffer_search_main())) ----------------------------------------- +---- -weechat_window_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_integer Retourne la valeur entière d'une propriété de la fenêtre. Prototype : [source,C] ----------------------------------------- +---- int weechat_window_get_integer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Paramètres : @@ -10892,16 +10674,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "la fenêtre courante est en position (x,y) : (%d,%d)", weechat_window_get_integer (weechat_current_window (), "win_x"), weechat_window_get_integer (weechat_current_window (), "win_y")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.window_get_integer(window, property) @@ -10909,10 +10691,9 @@ value = weechat.window_get_integer(window, property) weechat.prnt("", "la fenêtre courante est en position (x,y) : (%d,%d)" % (weechat.window_get_integer(weechat.current_window(), "win_x"), weechat.window_get_integer(weechat.current_window(), "win_y"))) ----------------------------------------- +---- -weechat_window_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_string Retourne la valeur d'une propriété de la fenêtre sous forme d'une chaîne. @@ -10923,10 +10704,10 @@ version future. Prototype : [source,C] ----------------------------------------- +---- int weechat_window_get_string (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Paramètres : @@ -10937,18 +10718,17 @@ Valeur de retour : * valeur de la propriété, sous forme de chaîne -weechat_window_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_pointer Retourne la valeur d'une propriété, sous forme d'un pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_window_get_pointer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Paramètres : @@ -10964,35 +10744,34 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "tampon affiché dans la fenêtre courante : %lx", weechat_window_get_pointer (weechat_current_window (), "buffer")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.window_get_pointer(window, property) # exemple weechat.prnt("", "tampon affiché dans la fenêtre courante : %s" % weechat.window_get_pointer(weechat.current_window(), "buffer")) ----------------------------------------- +---- -weechat_window_set_title -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_set_title Définit le titre du terminal. Prototype : [source,C] ----------------------------------------- +---- void weechat_window_set_title (const char *title); ----------------------------------------- +---- Paramètres : @@ -11001,42 +10780,40 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_window_set_title ("nouveau titre ici"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.window_set_title(window, title) # exemple weechat.window_set_title("nouveau titre ici") ----------------------------------------- +---- [[nicklist]] -Nicklist -~~~~~~~~ +=== Nicklist Fonctions pour la liste des pseudos. -weechat_nicklist_add_group -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_group Ajoute un groupe dans la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_add_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *parent_group, const char *name, const char *color, int visible); ----------------------------------------- +---- Paramètres : @@ -11069,40 +10846,39 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *my_group = weechat_nicklist_add_group (my_buffer, my_parent_group, "groupe_test", "weechat.color.nicklist_group", 1); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible) # exemple group = weechat.nicklist_add_group(my_buffer, my_parent_group, "groupe_test", "weechat.color.nicklist_group", 1) ----------------------------------------- +---- -weechat_nicklist_search_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_group Recherche un groupe dans la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_search_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Paramètres : @@ -11118,31 +10894,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer, NULL, "groupe_test"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype group = weechat.nicklist_search_group(buffer, from_group, name) # exemple group = weechat.nicklist_search_group(my_buffer, "", "groupe_test") ----------------------------------------- +---- -weechat_nicklist_add_nick -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_nick Ajoute un pseudo dans un groupe. 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, @@ -11150,7 +10925,7 @@ struct t_gui_nick_group *weechat_nicklist_add_nick (struct t_gui_buffer *buffer, const char *prefix, const char *prefix_color, int visible); ----------------------------------------- +---- Paramètres : @@ -11183,19 +10958,19 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick *my_nick = weechat_nicklist_add_nick (my_buffer, my_group, "test_nick", (nick_away) ? "weechat.color.nicklist_away" : "bar_fg", "@", "lightgreen", 1); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible) @@ -11205,21 +10980,20 @@ if nick_away: else: color = "bar_fg" nick = weechat.nicklist_add_nick(my_buffer, my_group, "test_nick", color, "@", "lightgreen", 1) ----------------------------------------- +---- -weechat_nicklist_search_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_nick Recherche un pseudo dans la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_nick *weechat_nicklist_search_nick (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Paramètres : @@ -11235,34 +11009,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer, NULL, "test_nick"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype nick = weechat.nicklist_search_nick(buffer, from_group, name) # exemple nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick") ----------------------------------------- +---- -weechat_nicklist_remove_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_group Supprime un groupe de la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *group); ----------------------------------------- +---- Paramètres : @@ -11273,33 +11046,32 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_nicklist_remove_group (my_buffer, my_group); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_group(buffer, group) # exemple weechat.nicklist_remove_group(my_buffer, my_group) ----------------------------------------- +---- -weechat_nicklist_remove_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_nick Supprime un pseudo de la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_nick (struct t_gui_buffer *buffer, struct t_gui_nick *nick); ----------------------------------------- +---- Paramètres : @@ -11309,32 +11081,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_nicklist_remove_nick (my_buffer, my_nick); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_nick(buffer, nick) # exemple weechat.nicklist_remove_nick(my_buffer, my_nick) ----------------------------------------- +---- -weechat_nicklist_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_all Supprime tous les groupes/pseudos de la liste des pseudos. Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_all (struct t_gui_buffer *buffer); ----------------------------------------- +---- Paramètres : @@ -11343,23 +11114,22 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_nicklist_remove_all (my_buffer); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_remove_all(buffer) # exemple weechat.nicklist_remove_all(my_buffer) ----------------------------------------- +---- -weechat_nicklist_get_next_item -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_get_next_item _WeeChat ≥ 0.3.7._ @@ -11369,11 +11139,11 @@ principalement pour afficher la liste des pseudos). Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_get_next_item (struct t_gui_buffer *buffer, struct t_gui_nick_group **group, struct t_gui_nick **nick); ----------------------------------------- +---- Paramètres : @@ -11384,7 +11154,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group; struct t_gui_nick *ptr_nick; @@ -11405,13 +11175,12 @@ while (ptr_group || ptr_nick) } weechat_nicklist_get_next_item (buffer, &ptr_group, &ptr_nick); } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_nicklist_group_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_integer _WeeChat ≥ 0.3.4._ @@ -11420,11 +11189,11 @@ Retourne une valeur entière pour une propriété du groupe. Prototype : [source,C] ----------------------------------------- +---- int weechat_nicklist_group_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Paramètres : @@ -11441,23 +11210,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_group_get_integer (buffer, group, "visible"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_integer(buffer, group, property) # exemple visible = weechat.nicklist_group_get_integer(buffer, group, "visible") ----------------------------------------- +---- -weechat_nicklist_group_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_string _WeeChat ≥ 0.3.4._ @@ -11466,11 +11234,11 @@ Retourne la valeur d'une propriété du groupe sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_nicklist_group_get_string (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Paramètres : @@ -11487,23 +11255,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_group_get_string (buffer, group, "color"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_string(buffer, group, property) # exemple color = weechat.nicklist_group_get_string(buffer, group, "color") ----------------------------------------- +---- -weechat_nicklist_group_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_pointer _WeeChat ≥ 0.3.4._ @@ -11512,11 +11279,11 @@ Retourne la valeur d'une propriété du groupe sous forme d'un pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_nicklist_group_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Paramètres : @@ -11532,23 +11299,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *parent = weechat_nicklist_group_get_pointer (buffer, group, "parent"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_group_get_pointer(buffer, group, property) # exemple parent = weechat.nicklist_group_get_pointer(buffer, group, "parent") ----------------------------------------- +---- -weechat_nicklist_group_set -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_set _WeeChat ≥ 0.3.4._ @@ -11557,12 +11323,12 @@ Affecte une valeur à une propriété d'un groupe. Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_group_set (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property, const char *value); ----------------------------------------- +---- Paramètres : @@ -11571,7 +11337,7 @@ Paramètres : * 'property' et 'value' : nom de la propriété, avec sa valeur : [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nom | Valeur | Description | color | nom d'option de couleur WeeChat | @@ -11580,12 +11346,12 @@ Paramètres : | visible | "0", "1" | "0" = groupe caché, "1" = groupe visible -|======================================== +|=== Exemples en C : [source,C] ----------------------------------------- +---- /* changer la couleur du groupe en "bar_fg" */ weechat_nicklist_group_set (buffer, group, "color", "bar_fg"); @@ -11594,12 +11360,12 @@ weechat_nicklist_group_set (buffer, group, "color", "yellow"); /* cacher le groupe dans la liste des pseudos */ weechat_nicklist_group_set (buffer, group, "visible", "0"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_group_set(buffer, group, property, value) @@ -11613,10 +11379,9 @@ weechat.nicklist_group_set(buffer, group, "color", "yellow") # cacher le groupe dans la liste des pseudos weechat.nicklist_group_set(buffer, group, "visible", "0") ----------------------------------------- +---- -weechat_nicklist_nick_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_integer _WeeChat ≥ 0.3.4._ @@ -11625,11 +11390,11 @@ Retourne une valeur entière pour une propriété du pseudo. Prototype : [source,C] ----------------------------------------- +---- int weechat_nicklist_nick_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Paramètres : @@ -11645,23 +11410,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_nick_get_integer (buffer, nick, "visible"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_integer(buffer, nick, property) # exemple visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible") ----------------------------------------- +---- -weechat_nicklist_nick_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_string _WeeChat ≥ 0.3.4._ @@ -11670,11 +11434,11 @@ Retourne la valeur d'une propriété du pseudo sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_nicklist_nick_get_string (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Paramètres : @@ -11693,23 +11457,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_nick_get_string (buffer, nick, "color"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_string(buffer, nick, property) # exemple color = weechat.nicklist_nick_get_string(buffer, nick, "color") ----------------------------------------- +---- -weechat_nicklist_nick_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_pointer _WeeChat ≥ 0.3.4._ @@ -11718,11 +11481,11 @@ Retourne la valeur d'une propriété du pseudo sous forme d'un pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_nicklist_nick_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Paramètres : @@ -11738,23 +11501,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_nick_group *group = weechat_nicklist_nick_get_pointer (buffer, nick, "group"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.nicklist_nick_get_pointer(buffer, nick, property) # exemple group = weechat.nicklist_nick_get_pointer(buffer, nick, "group") ----------------------------------------- +---- -weechat_nicklist_nick_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_set _WeeChat ≥ 0.3.4._ @@ -11763,12 +11525,12 @@ Affecte une valeur à une propriété d'un pseudo. Prototype : [source,C] ----------------------------------------- +---- void weechat_nicklist_nick_set (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property, const char *value); ----------------------------------------- +---- Paramètres : @@ -11777,7 +11539,7 @@ Paramètres : * 'property' et 'value' : nom de la propriété, avec sa valeur : [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nom | Valeur | Description | color | nom d'option de couleur WeeChat | @@ -11793,12 +11555,12 @@ Paramètres : | visible | "0", "1" | "0" = pseudo caché, "1" = pseudo visible -|======================================== +|=== Exemples en C : [source,C] ----------------------------------------- +---- /* changer la couleur du pseudo en cyan */ weechat_nicklist_nick_set (buffer, nick, "color", "cyan"); @@ -11810,12 +11572,12 @@ weechat_nicklist_nick_set (buffer, nick, "prefix_color", "yellow"); /* cacher le pseudo dans la liste des pseudos */ weechat_nicklist_nick_set (buffer, nick, "visible", "0"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.nicklist_nick_set(buffer, nick, property, value) @@ -11832,25 +11594,23 @@ weechat.nicklist_nick_set(buffer, nick, "prefix_color", "yellow") # cacher le pseudo dans la liste des pseudos weechat.nicklist_nick_set(buffer, nick, "visible", "0") ----------------------------------------- +---- [[bars]] -Barres -~~~~~~ +=== Barres Fonctions pour les barres. -weechat_bar_item_search -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_search Recherche un objet de barre. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_search (const char *name); ----------------------------------------- +---- Paramètres : @@ -11863,23 +11623,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_bar_item *bar_item = weechat_bar_item_search ("myitem"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype bar_item = weechat.bar_item_search(name) # exemple bar_item = weechat.bar_item_search("myitem") ----------------------------------------- +---- -weechat_bar_item_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_new _Mis à jour dans la version 0.4.2._ @@ -11888,7 +11647,7 @@ Créé un nouvel objet de barre. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_new (const char *name, char *(*build_callback)(void *data, struct t_gui_bar_item *item, @@ -11896,7 +11655,7 @@ struct t_gui_bar_item *weechat_bar_item_new (const char *name, struct t_gui_buffer *buffer, struct t_hashtable *extra_info), void *build_callback_data); ----------------------------------------- +---- Paramètres : @@ -11923,7 +11682,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char * my_build_callback (void *data, struct t_gui_bar_item *item, @@ -11937,7 +11696,7 @@ my_build_callback (void *data, struct t_gui_bar_item *my_item = weechat_bar_item_new ("myitem", &my_build_callback, NULL); ----------------------------------------- +---- Script (Python) : @@ -11950,7 +11709,7 @@ avant le nom, voir l'exemple ci-dessous (supporté seulement dans WeeChat ≥ 0.4.2). [source,python] ----------------------------------------- +---- # prototype bar_item = weechat.bar_item_new(name, build_callback, build_callback_data) @@ -11965,10 +11724,9 @@ def my_build_callback2(data, item, window, buffer, extra_info): return "mon contenu" bar_item2 = weechat.bar_item_new("(extra)myitem2", "my_build_callback2", "") # WeeChat ≥ 0.4.2 ----------------------------------------- +---- -weechat_bar_item_update -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_update Met à jour le contenu d'un objet de barre, en appelant son "callback" de construction. @@ -11976,9 +11734,9 @@ construction. Prototype : [source,C] ----------------------------------------- +---- void weechat_bar_item_update (const char *name); ----------------------------------------- +---- Paramètres : @@ -11987,32 +11745,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_bar_item_update ("myobjet"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.bar_item_update(name) # exemple weechat.bar_item_update("myitem") ----------------------------------------- +---- -weechat_bar_item_remove -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_remove Supprime un objet de barre. Prototype : [source,C] ----------------------------------------- +---- void weechat_bar_item_remove (struct t_gui_bar_item *item); ----------------------------------------- +---- Paramètres : @@ -12021,32 +11778,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_bar_item_remove (&my_item); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.bar_item_remove(item) # exemple weechat.bar_item_remove(myitem) ----------------------------------------- +---- -weechat_bar_search -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_search Recherche une barre. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_search (const char *name); ----------------------------------------- +---- Paramètres : @@ -12059,30 +11815,29 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_bar *bar = weechat_bar_search ("my_barre"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype bar = weechat.bar_search(name) # exemple bar = weechat.bar_search("mybar") ----------------------------------------- +---- -weechat_bar_new -^^^^^^^^^^^^^^^ +==== weechat_bar_new Créé une nouvelle barre. Prototype : [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_new (const char *name, const char *hidden, const char *priority, @@ -12098,7 +11853,7 @@ struct t_gui_bar *weechat_bar_new (const char *name, const char *color_bg, const char *separator, const char *items); ----------------------------------------- +---- Paramètres : @@ -12153,7 +11908,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "off", "100", @@ -12169,12 +11924,12 @@ struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "blue", "off", "time,buffer_number+buffer_name"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype bar = weechat.bar_new(name, hidden, priority, type, condition, position, filling_top_bottom, filling_left_right, size, size_max, @@ -12183,20 +11938,19 @@ bar = weechat.bar_new(name, hidden, priority, type, condition, position, # exemple bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical", "0", "5", "default", "cyan", "blue", "off", "time,buffer_number+buffer_name") ----------------------------------------- +---- -weechat_bar_set -^^^^^^^^^^^^^^^ +==== weechat_bar_set Affecte une nouvelle valeur pour une propriété de la barre. Prototype : [source,C] ----------------------------------------- +---- int weechat_bar_set (struct t_gui_bar *bar, const char *property, const char *value); ----------------------------------------- +---- Paramètres : @@ -12213,32 +11967,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_bar_set (my_bar, "position", "bottom"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.bar_set(bar, property, value) # exemple weechat.bar_set(my_bar, "position", "bottom") ----------------------------------------- +---- -weechat_bar_update -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_update Met à jour le contenu d'une barre à l'écran. Prototype : [source,C] ----------------------------------------- +---- void weechat_bar_update (const char *name); ----------------------------------------- +---- Paramètres : @@ -12247,32 +12000,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_bar_update ("mybar"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.bar_update(name) # exemple weechat.bar_update("mybar") ----------------------------------------- +---- -weechat_bar_remove -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_remove Supprime une barre. Prototype : [source,C] ----------------------------------------- +---- void weechat_bar_remove (struct t_gui_bar *bar); ----------------------------------------- +---- Paramètres : @@ -12281,38 +12033,36 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_bar_remove (my_bar); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.bar_remove(bar) # exemple weechat.bar_remove(my_bar) ----------------------------------------- +---- [[commands]] -Commandes -~~~~~~~~~ +=== Commandes Fonctions pour exécuter des commandes WeeChat. -weechat_command -^^^^^^^^^^^^^^^ +==== weechat_command Exécute une commande. Prototype : [source,C] ----------------------------------------- +---- void weechat_command (struct t_gui_buffer *buffer, const char *command); ----------------------------------------- +---- Paramètres : @@ -12324,30 +12074,28 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"), "/whois FlashCode"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.command(buffer, command) # exemple weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode") ----------------------------------------- +---- [[network]] -Réseau -~~~~~~ +=== Réseau Fonctions pour le réseau. -weechat_network_pass_proxy -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_pass_proxy Établit une connexion/authentification avec un proxy. @@ -12358,12 +12106,12 @@ appelée sans un processus issu d'un "fork", pour ne pas bloquer WeeChat. Prototype : [source,C] ----------------------------------------- +---- int weechat_network_pass_proxy (const char *proxy, int sock, const char *address, int port); ----------------------------------------- +---- Paramètres : @@ -12379,7 +12127,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_network_pass_proxy ("mon_proxy", sock, "irc.freenode.net", 6667)) { /* OK */ @@ -12388,13 +12136,12 @@ else { /* erreur */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_network_connect_to -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_connect_to Établit une connexion à une machine distante. @@ -12405,12 +12152,12 @@ appelée sans un processus issu d'un "fork", pour ne pas bloquer WeeChat. Prototype : [source,C] ----------------------------------------- +---- int weechat_network_connect_to (const char *proxy, int sock, unsigned long address, int port); ----------------------------------------- +---- Paramètres : @@ -12426,7 +12173,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct sockaddr_in addr; socklen_t length; unsigned long address; @@ -12445,28 +12192,26 @@ else { /* erreur */ } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. [[infos]] -Infos -~~~~~ +=== Infos Fonctions pour obtenir des informations. -weechat_info_get -^^^^^^^^^^^^^^^^ +==== weechat_info_get Retourne une information, sous forme de chaîne, de WeeChat ou d'une extension. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_info_get (const char *info_name, const char *arguments); ----------------------------------------- +---- Paramètres : @@ -12482,18 +12227,18 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "La version de WeeChat est : %s (compilée le %s)", weechat_info_get ("version", NULL), weechat_info_get ("date", NULL)); weechat_printf (NULL, "Le répertoire de WeeChat est : %s", weechat_info_get ("weechat_dir", NULL)); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.info_get(info_name, arguments) @@ -12501,10 +12246,9 @@ value = weechat.info_get(info_name, arguments) weechat.prnt("", "La version de WeeChat est : %s (compilée le %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) weechat.prnt("", "Le répertoire de WeeChat est : %s" % weechat.info_get("weechat_dir", "")) ----------------------------------------- +---- -weechat_info_get_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_info_get_hashtable _WeeChat ≥ 0.3.4._ @@ -12513,10 +12257,10 @@ Retourne une information, sous forme de hashtable, de WeeChat ou d'une extension Prototype : [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_info_get_hashtable (const char *info_name, struct t_hashtable *hashtable); ----------------------------------------- +---- Paramètres : @@ -12532,7 +12276,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable_in, *hashtable_out; hashtable_in = weechat_hashtable_new (8, @@ -12557,12 +12301,12 @@ if (hashtable_in) weechat_hashtable_free (hashtable_in); weechat_hashtable_free (hashtable_out); } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype dict = weechat.info_get_hashtable(info_name, dict_in) @@ -12570,11 +12314,10 @@ dict = weechat.info_get_hashtable(info_name, dict_in) dict_in = { "message": ":nick!user@host PRIVMSG #weechat :message ici" } weechat.prnt("", "message analysé: %s" % weechat.info_get_hashtable("irc_message_parse", dict_in)) ----------------------------------------- +---- [[infolists]] -Infolists -~~~~~~~~~ +=== Infolists Une "infolist" est une liste composée d'objets ("items"). Chaque objet contient des variables. @@ -12592,17 +12335,16 @@ Chaque variable a un type et une valeur. Les types possibles sont : de données * 'time' : date/heure -weechat_infolist_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new Créé une "infolist". Prototype : [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_new (); ----------------------------------------- +---- Valeur de retour : @@ -12611,32 +12353,31 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_new (); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype infolist = weechat.infolist_new() # exemple infolist = weechat.infolist_new() ----------------------------------------- +---- -weechat_infolist_new_item -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_item Ajoute un objet dans l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_item *weechat_infolist_new_item (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -12649,34 +12390,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist_item *item = weechat_infolist_new_item (infolist); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype item = weechat.infolist_new_item(infolist) # exemple item = weechat.infolist_new_item(infolist) ----------------------------------------- +---- -weechat_infolist_new_var_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_integer Ajoute une variable de type "integer" dans l'objet de l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_integer (struct t_infolist_item *item, const char *name, int value); ----------------------------------------- +---- Paramètres : @@ -12691,36 +12431,35 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_integer (item, "mon_entier", 123); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_integer(item, name, value) # exemple var = weechat.infolist_new_var_integer(item, "mon_entier", 123) ----------------------------------------- +---- -weechat_infolist_new_var_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_string Ajoute une variable de type "string" dans l'objet de l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_string (struct t_infolist_item *item, const char *name, const char *value); ----------------------------------------- +---- Paramètres : @@ -12735,36 +12474,35 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_string (item, "ma_chaine", "valeur"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_string(item, name, value) # exemple var = weechat.infolist_new_var_string(item, "ma_chaine", "valeur") ----------------------------------------- +---- -weechat_infolist_new_var_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_pointer Ajoute une variable de type "pointer" dans l'objet de l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_pointer (struct t_infolist_item *item, const char *name, void *pointer); ----------------------------------------- +---- Paramètres : @@ -12779,37 +12517,36 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_pointer (item, "mon_pointeur", &pointer); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_pointer(item, name, pointer) # exemple var = weechat.infolist_new_var_pointer(item, "mon_pointeur", pointer) ----------------------------------------- +---- -weechat_infolist_new_var_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_buffer Ajoute une variable de type "buffer" dans l'objet de l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_buffer (struct t_infolist_item *item, const char *name, void *pointer, int size); ----------------------------------------- +---- Paramètres : @@ -12825,31 +12562,30 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- char buffer[256]; /* ... */ struct t_infolist_var *var = weechat_infolist_new_var_buffer (item, "mon_buffer", buffer, sizeof (buffer)); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_infolist_new_var_time -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_time Ajoute une variable de type "time" dans l'objet de l'infolist. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_time (struct t_infolist_item *item, const char *name, time_t time); ----------------------------------------- +---- Paramètres : @@ -12864,25 +12600,24 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_time (item, "mon_time", time (NULL)); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype var = weechat.infolist_new_var_time(item, name, time) # exemple var = weechat.infolist_new_var_time(item, "mon_time", int(time.time())) ----------------------------------------- +---- -weechat_infolist_get -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_get Retourne une "infolist" de WeeChat ou d'une extension. @@ -12898,11 +12633,11 @@ données brutes), voir <<hdata,hdata>>. Prototype : [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_get (const char *infolist_name, void *pointer, const char *arguments); ----------------------------------------- +---- Paramètres : @@ -12920,23 +12655,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_get ("irc_server", NULL, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype infolist = weechat.infolist_get(infolist_name, pointer, arguments) # exemple infolist = weechat.infolist_get("irc_server", "", "") ----------------------------------------- +---- -weechat_infolist_next -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_next Déplace le "curseur" vers l'objet suivant dans l'infolist. Le premier appel à cette fonction sur une infolist déplace le curseur sur le premier objet de @@ -12945,9 +12679,9 @@ l'infolist. Prototype : [source,C] ----------------------------------------- +---- int weechat_infolist_next (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -12961,7 +12695,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_infolist_next (infolist)) { /* lecture des variables dans l'objet... */ @@ -12970,12 +12704,12 @@ else { /* pas d'autre objet disponible */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.infolist_next(infolist) @@ -12985,10 +12719,9 @@ if rc: # lecture des variables dans l'objet... else: # pas d'autre objet disponible ----------------------------------------- +---- -weechat_infolist_prev -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_prev Déplace le "curseur" vers l'objet précédent dans l'infolist. Le premier appel à cette fonction sur une infolist déplace le curseur sur le dernier objet de @@ -12997,9 +12730,9 @@ l'infolist. Prototype : [source,C] ----------------------------------------- +---- int weechat_infolist_prev (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -13013,7 +12746,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_infolist_prev (infolist)) { /* lecture des variables dans l'objet... */ @@ -13022,12 +12755,12 @@ else { /* pas d'autre objet disponible */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.infolist_prev(infolist) @@ -13037,19 +12770,18 @@ if rc: # lecture des variables dans l'objet else: # pas d'autre objet disponible ----------------------------------------- +---- -weechat_infolist_reset_item_cursor -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_reset_item_cursor Réinitialise le "curseur" de l'infolist. Prototype : [source,C] ----------------------------------------- +---- void weechat_infolist_reset_item_cursor (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -13058,32 +12790,31 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_infolist_reset_item_cursor (infolist); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.infolist_reset_item_cursor(infolist) # exemple weechat.infolist_reset_item_cursor(infolist) ----------------------------------------- +---- -weechat_infolist_fields -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_fields Retourne la liste des champs pour l'objet courant de l'infolist. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_infolist_fields (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -13099,16 +12830,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *fields = weechat_infolist_fields (infolist); /* fields contient quelque chose comme : "i:mon_entier,s:ma_chaine,p:mon_pointeur,b:mon_buffer,t:ma_date" */ ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype fields = weechat.infolist_fields(infolist) @@ -13116,10 +12847,9 @@ fields = weechat.infolist_fields(infolist) fields = weechat.infolist_fields(infolist) # fields contient quelque chose comme : # "i:mon_entier,s:ma_chaine,p:mon_pointeur,b:mon_buffer,t:ma_date" ----------------------------------------- +---- -weechat_infolist_integer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_integer Retourne la valeur de la variable de l'objet courant de l'infolist, sous forme d'entier. @@ -13127,9 +12857,9 @@ d'entier. Prototype : [source,C] ----------------------------------------- +---- int weechat_infolist_integer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Paramètres : @@ -13143,24 +12873,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "entier = %d", weechat_infolist_integer (infolist, "mon_entier")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_integer(infolist, var) # exemple weechat.prnt("", "entier = %d" % weechat.infolist_integer(infolist, "mon_entier")) ----------------------------------------- +---- -weechat_infolist_string -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_string Retourne la valeur de la variable de l'objet courant de l'infolist, sous forme de chaîne de caractères. @@ -13168,9 +12897,9 @@ de chaîne de caractères. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_infolist_string (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Paramètres : @@ -13184,24 +12913,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "chaîne = %s", weechat_infolist_string (infolist, "ma_chaine")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_string(infolist, var) # exemple weechat.prnt("", "chaîne = %s" % weechat.infolist_string(infolist, "ma_chaine")) ----------------------------------------- +---- -weechat_infolist_pointer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_pointer Retourne la valeur de la variable de l'objet courant de l'infolist, sous forme de pointeur. @@ -13209,9 +12937,9 @@ de pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_infolist_pointer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Paramètres : @@ -13225,24 +12953,23 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "pointeur = 0x%lx", weechat_infolist_pointer (infolist, "mon_pointeur")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_pointer(infolist, var) # exemple weechat.prnt("", "pointeur = 0x%s" % weechat.infolist_pointer(infolist, "mon_pointeur")) ----------------------------------------- +---- -weechat_infolist_buffer -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_buffer Retourne la valeur de la variable de l'objet courant de l'infolist, sous forme de buffer. @@ -13250,10 +12977,10 @@ de buffer. Prototype : [source,C] ----------------------------------------- +---- void *weechat_infolist_buffer (struct t_infolist *infolist, const char *var, int *size); ----------------------------------------- +---- Paramètres : @@ -13269,18 +12996,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int size; void *pointer = weechat_infolist_buffer (infolist, "mon_buffer", &size); weechat_printf (NULL, "buffer = 0x%lx, taille = %d", pointer, size); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_infolist_time -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_time Retourne la valeur de la variable de l'objet courant de l'infolist, sous forme de date/heure. @@ -13288,9 +13014,9 @@ de date/heure. Prototype : [source,C] ----------------------------------------- +---- time_t weechat_infolist_time (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Paramètres : @@ -13304,33 +13030,32 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "date/heure = %ld", weechat_infolist_time (infolist, "mon_time")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.infolist_time(infolist, var) # exemple weechat.prnt("", "date/heure = %ld" % weechat.infolist_time(infolist, "mon_time")) ----------------------------------------- +---- -weechat_infolist_free -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_free Libère une infolist. Prototype : [source,C] ----------------------------------------- +---- void weechat_infolist_free (struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -13339,24 +13064,23 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_infolist_free (infolist); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.infolist_free(infolist) # exemple weechat.infolist_free(infolist) ----------------------------------------- +---- [[hdata]] -Hdata -~~~~~ +=== Hdata Fonctions pour les hdata (accès brut aux données de WeeChat ou des extensions). @@ -13365,8 +13089,7 @@ Le "hdata" fournit seulement un accès en lecture seule aux données. Il est *STRICTEMENT INTERDIT* d'écrire quelque chose dans une zone mémoire pointée par les variables du hdata. -weechat_hdata_new -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new _WeeChat ≥ 0.3.6, mis à jour dans la 0.3.9 et 0.4.0._ @@ -13374,7 +13097,7 @@ Créé un "hdata". [NOTE] .hdata vs infolist -======================================== +==== Le "hdata" est un moyen rapide de lire des données de WeeChat ou des extensions. Il est similaire à l'infolist, mais il y a quelques différences : @@ -13383,12 +13106,12 @@ Il est similaire à l'infolist, mais il y a quelques différences : * il peut contenir des informations différentes de l'infolist : il contient seulement les données brutes des structures (l'infolist peut ajouter des données supplémentaires pour plus de commodité) -======================================== +==== Prototype : [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, int create_allowed, int delete_allowed, int (*callback_update)(void *data, @@ -13396,7 +13119,7 @@ struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, void *pointer, struct t_hashtable *hashtable), void *callback_update_data); ----------------------------------------- +---- Paramètres : @@ -13429,15 +13152,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_new_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_var _WeeChat ≥ 0.3.6._ @@ -13446,10 +13168,10 @@ Créé une nouvelle variable dans le hdata. Prototype : [source,C] ----------------------------------------- +---- void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, int update_allowed, const char *array_size, const char *hdata_name); ----------------------------------------- +---- Paramètres : @@ -13481,7 +13203,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13503,12 +13225,12 @@ weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, ta weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- La macro "WEECHAT_HDATA_VAR" peut être utilisée pour raccourcir le code : [source,C] ----------------------------------------- +---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); @@ -13516,13 +13238,12 @@ WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", N WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_new_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_list _WeeChat ≥ 0.3.6._ @@ -13531,9 +13252,9 @@ Créé un nouveau pointer vers une liste dans le hdata. Prototype : [source,C] ----------------------------------------- +---- void weechat_hdata_new_list (struct t_hdata *hdata, const char *name, void *pointer); ----------------------------------------- +---- Paramètres : @@ -13544,7 +13265,7 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13569,21 +13290,20 @@ weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), W weechat_hdata_new_list (hdata, "buffers", &buffers); weechat_hdata_new_list (hdata, "last_buffer", &last_buffer); ----------------------------------------- +---- La macro "WEECHAT_HDATA_LIST" peut être utilisée pour raccourcir le code : [source,C] ----------------------------------------- +---- WEECHAT_HDATA_LIST(buffers); WEECHAT_HDATA_LIST(last_buffer); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_get -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get _WeeChat ≥ 0.3.6._ @@ -13598,9 +13318,9 @@ extension pour lire des données. Prototype : [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_get (const char *hdata_name); ----------------------------------------- +---- Paramètres : @@ -13617,23 +13337,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hdata = weechat.hdata_get(hdata_name) # exemple hdata = weechat.hdata_get("irc_server") ----------------------------------------- +---- -weechat_hdata_get_var_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_offset _WeeChat ≥ 0.3.6._ @@ -13642,9 +13361,9 @@ Retourne la position (offset) de la variable dans le hdata. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_offset (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Paramètres : @@ -13658,23 +13377,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int offset = weechat_hdata_get_var_offset (hdata, "name"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype offset = weechat.hdata_get_var_offset(hdata, name) # exemple offset = weechat.hdata_get_var_offset(hdata, "name") ----------------------------------------- +---- -weechat_hdata_get_var_type -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type _WeeChat ≥ 0.3.6._ @@ -13683,9 +13401,9 @@ Retourne le type de la variable dans le hdata (sous forme d'entier). Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_type (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Paramètres : @@ -13699,7 +13417,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int type = weechat_hdata_get_var_type (hdata, "name"); switch (type) { @@ -13731,13 +13449,12 @@ switch (type) /* variable non trouvée */ break; } ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_get_var_type_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type_string _WeeChat ≥ 0.3.6._ @@ -13746,9 +13463,9 @@ Retourne le type de la variable dans le hdata (sous forme de chaîne). Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_type_string (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Paramètres : @@ -13762,23 +13479,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "name")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype type = weechat.hdata_get_var_type_string(hdata, name) # exemple weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name")) ----------------------------------------- +---- -weechat_hdata_get_var_array_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size _WeeChat ≥ 0.3.9._ @@ -13787,9 +13503,9 @@ Retourne la taille du tableau pour la variable dans le hdata. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_array_size (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -13805,23 +13521,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int array_size = weechat_hdata_get_var_array_size (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype array_size = weechat.hdata_get_var_array_size(hdata, pointer, name) # exemple array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_array_size_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size_string _WeeChat ≥ 0.3.9._ @@ -13831,10 +13546,10 @@ chaîne). Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_count_array_size (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -13850,23 +13565,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- const char *array_size = weechat_hdata_get_var_array_size_string (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name) # exemple array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_hdata -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_hdata _WeeChat ≥ 0.3.6._ @@ -13875,9 +13589,9 @@ Retourne le hdata pour la variable dans le hdata. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Paramètres : @@ -13891,23 +13605,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hdata_name = weechat.hdata_get_var_hdata(hdata, name) # exemple weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name")) ----------------------------------------- +---- -weechat_hdata_get_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var _WeeChat ≥ 0.3.6._ @@ -13916,9 +13629,9 @@ Retourne un pointeur vers le contenu de la variable dans le hdata. Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -13933,17 +13646,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); void *pointer = weechat_hdata_get_var (hdata, buffer, "name"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_get_var_at_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_at_offset _WeeChat ≥ 0.3.6._ @@ -13953,9 +13665,9 @@ une position (offset). Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer, int offset); ----------------------------------------- +---- Paramètres : @@ -13970,18 +13682,17 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); int offset = weechat_hdata_get_var_offset (hdata, "name"); void *pointer = weechat_hdata_get_var_at_offset (hdata, buffer, offset); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_get_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_list _WeeChat ≥ 0.3.6._ @@ -13990,9 +13701,9 @@ Retourne un pointeur de liste du hdata. Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_get_list (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Paramètres : @@ -14006,25 +13717,24 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffers = weechat_hdata_get_list (hdata, "gui_buffers"); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype list = weechat.hdata_get_list(hdata, name) # exemple hdata = weechat.hdata_get("buffer") buffers = weechat.hdata_get_list(hdata, "gui_buffers") ----------------------------------------- +---- -weechat_hdata_check_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_check_pointer _WeeChat ≥ 0.3.7._ @@ -14033,9 +13743,9 @@ Vérifie si un pointeur est valide pour un hdata et un pointeur de liste. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_check_pointer (struct t_hdata *hdata, void *list, void *pointer); ----------------------------------------- +---- Paramètres : @@ -14050,7 +13760,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- /* vérifie si le pointeur vers le tampon est valide */ struct t_hdata *hdata = weechat_hdata_get ("buffer"); if (weechat_hdata_check_pointer (hdata, @@ -14063,12 +13773,12 @@ else { /* pointeur invalide */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.hdata_check_pointer(hdata, list, pointer) @@ -14080,10 +13790,9 @@ if weechat.hdata_check_pointer(hdata, weechat.hdata_get_list(hdata, "gui_buffers else: # pointeur invalide # ... ----------------------------------------- +---- -weechat_hdata_move -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_move _WeeChat ≥ 0.3.6._ @@ -14092,9 +13801,9 @@ Déplace le pointeur vers un autre élément dans la liste. Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_move (struct t_hdata *hdata, void *pointer, int count); ----------------------------------------- +---- Paramètres : @@ -14110,7 +13819,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); @@ -14120,12 +13829,12 @@ buffer = weechat_hdata_move (hdata, buffer, 2); /* se déplacer au tampon précédent */ if (buffer) buffer = weechat_hdata_move (hdata, buffer, -1); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype pointer = weechat.hdata_move(hdata, pointer, count) @@ -14139,10 +13848,9 @@ buffer = weechat.hdata_move(hdata, buffer, 2) # se déplacer au tampon précédent if buffer: buffer = weechat.hdata_move(hdata, buffer, -1) ----------------------------------------- +---- -weechat_hdata_search -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_search _WeeChat ≥ 0.4.1._ @@ -14152,9 +13860,9 @@ Cherche un élément dans la liste: l'expression 'search' est évaluée pour cha Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_search (struct t_hdata *hdata, void *pointer, const char *search, int move); ----------------------------------------- +---- Paramètres : @@ -14174,7 +13882,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); void *servers = weechat_hdata_get (hdata, "irc_servers"); @@ -14184,12 +13892,12 @@ if (server) { /* ... */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype pointer = weechat.hdata_search(hdata, pointer, search, count) @@ -14201,10 +13909,9 @@ servers = weechat.hdata_get_list(hdata, "irc_servers") server = weechat.hdata_search(hdata, servers, "${irc_server.name} == freenode", 1) if server: # ... ----------------------------------------- +---- -weechat_hdata_char -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_char _WeeChat ≥ 0.3.7._ @@ -14214,9 +13921,9 @@ forme de caractère. Prototype : [source,C] ----------------------------------------- +---- char weechat_hdata_char (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14233,23 +13940,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "letter = %c", weechat_hdata_char (hdata, pointer, "letter")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_char(hdata, pointer, name) # exemple weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter")) ----------------------------------------- +---- -weechat_hdata_integer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_integer _WeeChat ≥ 0.3.6._ @@ -14259,9 +13965,9 @@ forme d'entier. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_integer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14278,16 +13984,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "number = %d", weechat_hdata_integer (hdata, buffer, "number")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_integer(hdata, pointer, name) @@ -14295,10 +14001,9 @@ value = weechat.hdata_integer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) ----------------------------------------- +---- -weechat_hdata_long -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_long _WeeChat ≥ 0.3.6._ @@ -14308,9 +14013,9 @@ forme d'entier long. Prototype : [source,C] ----------------------------------------- +---- long weechat_hdata_long (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14327,23 +14032,22 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "longvar = %ld", weechat_hdata_long (hdata, pointer, "longvar")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_long(hdata, pointer, name) # exemple weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar")) ----------------------------------------- +---- -weechat_hdata_string -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_string _WeeChat ≥ 0.3.6._ @@ -14353,9 +14057,9 @@ forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hdata_string (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14372,16 +14076,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "name = %s", weechat_hdata_string (hdata, buffer, "name")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_string(hdata, pointer, name) @@ -14389,10 +14093,9 @@ value = weechat.hdata_string(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "name = %s" % weechat.hdata_string(hdata, buffer, "name")) ----------------------------------------- +---- -weechat_hdata_pointer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_pointer _WeeChat ≥ 0.3.6._ @@ -14402,9 +14105,9 @@ forme de pointeur. Prototype : [source,C] ----------------------------------------- +---- void *weechat_hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14421,16 +14124,16 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "lines = %lx", weechat_hdata_pointer (hdata, buffer, "lines")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_pointer(hdata, pointer, name) @@ -14438,10 +14141,9 @@ value = weechat.hdata_pointer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "lines = %lx" % weechat.hdata_pointer(hdata, buffer, "lines")) ----------------------------------------- +---- -weechat_hdata_time -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_time _WeeChat ≥ 0.3.6._ @@ -14451,9 +14153,9 @@ forme de date/heure. Prototype : [source,C] ----------------------------------------- +---- time_t weechat_hdata_time (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14470,7 +14172,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *ptr = weechat_buffer_search_main (); ptr = weechat_hdata_pointer (hdata, ptr, "lines"); @@ -14490,12 +14192,12 @@ if (ptr) } } } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_time(hdata, pointer, name) @@ -14509,10 +14211,9 @@ if ptr: if ptr: date = weechat.hdata_time(weechat.hdata_get("line_data"), ptr, "date") weechat.prnt("", "heure de la première ligne affichée = %s" % time.strftime("%F %T", time.localtime(int(date)))) ----------------------------------------- +---- -weechat_hdata_hashtable -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_hashtable _WeeChat ≥ 0.3.7._ @@ -14522,9 +14223,9 @@ forme de hashtable. Prototype : [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Paramètres : @@ -14541,18 +14242,18 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); struct t_hashtable *hashtable = weechat_hdata_hashtable (hdata, buffer, "local_variables"); weechat_printf (NULL, "%d variables locales dans le tampon principal", weechat_hashtable_get_integer (hashtable, "items_count")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype hashtable = weechat.hdata_hashtable(hdata, pointer, name) @@ -14563,10 +14264,9 @@ hash = weechat.hdata_hashtable(hdata, buffer, "local_variables") weechat.prnt("", "variables locales dans le tampon principal :") for key in hash: weechat.prnt("", " %s == %s" % (key, hash[key])) ----------------------------------------- +---- -weechat_hdata_set -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_set _WeeChat ≥ 0.3.9._ @@ -14581,9 +14281,9 @@ jour. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_set (struct t_hdata *hdata, void *pointer, const char *name, const char *value); ----------------------------------------- +---- Paramètres : @@ -14600,15 +14300,14 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_hdata_set (hdata, pointer, "message", "test"); ----------------------------------------- +---- [NOTE] Cette fonction n'est pas disponible dans l'API script. -weechat_hdata_update -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_update _WeeChat ≥ 0.3.9._ @@ -14617,9 +14316,9 @@ Met à jour des données dans le hdata. Prototype : [source,C] ----------------------------------------- +---- int weechat_hdata_update (struct t_hdata *hdata, void *pointer, struct t_hashtable *hashtable); ----------------------------------------- +---- Paramètres : @@ -14646,7 +14345,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- /* soustrait une heure sur le dernier message affiché dans le tampon courant */ struct t_gui_lines *own_lines; @@ -14678,12 +14377,12 @@ if (own_lines) } } } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype count = weechat.hdata_update(hdata, pointer, hashtable) @@ -14695,10 +14394,9 @@ if own_lines: line_data = weechat.hdata_pointer(weechat.hdata_get('line'), line, 'data') hdata = weechat.hdata_get('line_data') weechat.hdata_update(hdata, line_data, { 'date': str(weechat.hdata_time(hdata, line_data, 'date') - 3600) }) ----------------------------------------- +---- -weechat_hdata_get_string -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_string _WeeChat ≥ 0.3.6._ @@ -14707,9 +14405,9 @@ Retourne une valeur pour une propriété d'un hdata sous forme de chaîne. Prototype : [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_string (struct t_hdata *hdata, const char *property); ----------------------------------------- +---- Paramètres : @@ -14739,40 +14437,38 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- weechat_printf (NULL, "variables dans le hdata: %s", weechat_hdata_get_string (hdata, "var_keys")); weechat_printf (NULL, "listes dans le hdata: %s", weechat_hdata_get_string (hdata, "list_keys")); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype value = weechat.hdata_get_string(hdata, property) # exemple weechat.prnt("", "variables dans le hdata: %s" % weechat.hdata_get_string(hdata, "var_keys")) weechat.prnt("", "listes dans le hdata: %s" % weechat.hdata_get_string(hdata, "list_keys")) ----------------------------------------- +---- [[upgrade]] -Mise à jour -~~~~~~~~~~~ +=== Mise à jour Fonctions pour la mise à jour de WeeChat (commande "/upgrade"). -weechat_upgrade_new -^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_new Créé ou lit un fichier pour la mise à jour. Prototype : [source,C] ----------------------------------------- +---- struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write); ----------------------------------------- +---- Paramètres : @@ -14789,34 +14485,33 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("mon_fichier", 1); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype upgrade_file = weechat.upgrade_new(filename, write) # exemple upgrade_file = weechat.upgrade_new("mon_fichier", 1) ----------------------------------------- +---- -weechat_upgrade_write_object -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_write_object Écrit un objet dans le fichier de mise à jour. Prototype : [source,C] ----------------------------------------- +---- int weechat_upgrade_write_object (struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist); ----------------------------------------- +---- Paramètres : @@ -14831,7 +14526,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- if (weechat_upgrade_write_object (upgrade_file, 1, &infolist)) { /* ok */ @@ -14840,35 +14535,34 @@ else { /* erreur */ } ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist) # exemple weechat.upgrade_write_object(upgrade_file, 1, infolist) ----------------------------------------- +---- -weechat_upgrade_read -^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_read Lit un fichier de mise à jour. Prototype : [source,C] ----------------------------------------- +---- int weechat_upgrade_read (struct t_upgrade_file *upgrade_file, int (*callback_read)(void *data, struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist), void *callback_read_data); ----------------------------------------- +---- Paramètres : @@ -14892,7 +14586,7 @@ Valeur de retour : Exemple en C : [source,C] ----------------------------------------- +---- int my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, int object_id, @@ -14903,12 +14597,12 @@ my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, } weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data) @@ -14918,19 +14612,18 @@ def my_upgrade_read_cb(upgrade_file, object_id, infolist): return weechat.WEECHAT_RC_OK weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", "")) ----------------------------------------- +---- -weechat_upgrade_close -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_close Ferme un fichier de mise à jour. Prototype : [source,C] ----------------------------------------- +---- void weechat_upgrade_close (struct t_upgrade_file *upgrade_file); ----------------------------------------- +---- Paramètres : @@ -14939,17 +14632,17 @@ Paramètres : Exemple en C : [source,C] ----------------------------------------- +---- weechat_upgrade_close (upgrade_file); ----------------------------------------- +---- Script (Python) : [source,python] ----------------------------------------- +---- # prototype weechat.upgrade_close(upgrade_file) # exemple weechat.upgrade_close(upgrade_file) ----------------------------------------- +---- diff --git a/doc/fr/weechat_quickstart.fr.txt b/doc/fr/weechat_quickstart.fr.txt index 5fe6517e2..6e8c7cc51 100644 --- a/doc/fr/weechat_quickstart.fr.txt +++ b/doc/fr/weechat_quickstart.fr.txt @@ -1,11 +1,9 @@ -Guide de Démarrage Rapide WeeChat -================================= += Guide de Démarrage Rapide WeeChat Sébastien Helleu <flashcode@flashtux.org> [[start]] -Démarrer WeeChat ----------------- +== Démarrer WeeChat Un émulateur de terminal recommandé pour X (mais pas obligatoire) est rxvt-unicode (il a un bon support UTF-8, et aucun problème avec les @@ -13,32 +11,31 @@ touches par défaut). Lancer depuis votre shell : ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Aide en ligne / options ------------------------ +== Aide en ligne / options WeeChat dispose d'aide pour toutes les commandes, tapez simplement : ----------------------------------------- +---- /help ----------------------------------------- +---- Pour avoir de l'aide sur une commande, tapez : ----------------------------------------- +---- /help commande ----------------------------------------- +---- Pour modifier des options, tapez : ----------------------------------------- +---- /set config.section.option valeur ----------------------------------------- +---- (où `config` est le nom de la configuration (`weechat` pour le cœur, ou un nom d'extension), `section` la section de cette configuration et @@ -55,27 +52,27 @@ Par exemple : * afficher toutes les options (WeeChat et extensions) : ----------------------------------------- +---- /set ----------------------------------------- +---- * afficher les options WeeChat : ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * afficher les options de l'extension IRC : ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- Vous pouvez afficher de l'aide sur une option avec `/help`, par exemple : ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Toutes les options sont sauvées quand WeeChat quitte (ou avec la commande `/save` pour forcer une écriture des options). @@ -86,8 +83,7 @@ commande `/set`. [[core_vs_plugins]] -Cœur vs extensions ------------------- +== Cœur vs extensions Le cœur de WeeChat ("core") ne fait qu'afficher les données à l'écran et interagir avec l'utilisateur, cela signifie que le cœur sans extension @@ -101,25 +97,23 @@ devriez voir "irc" et d'autres extensions dans cette liste. [[create_irc_server]] -Créer un serveur IRC --------------------- +== Créer un serveur IRC Vous pouvez ajouter un serveur IRC par la commande `/server`, par exemple : ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- Comme d'habitude, de l'aide est disponible si vous êtes perdus : ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Définir les options du serveur IRC ----------------------------------- +== Définir les options du serveur IRC WeeChat utilise des valeurs par défaut pour tous les serveurs, si vous ne spécifiez pas de valeur spécifique pour une option de serveur. @@ -132,72 +126,71 @@ définie (non "null"). Sinon WeeChat utilise la valeur par défaut Par exemple il y a des pseudos par défaut (basés sur votre login un*x), et vous pouvez les écraser pour le serveur oftc avec la commande suivante : ----------------------------------------- +---- /set irc.server.oftc.nicks "pseudo,pseudo2,pseudo3,pseudo4,pseudo5" ----------------------------------------- +---- Pour modifier le nom d'utilisateur et nom réel : ----------------------------------------- +---- /set irc.server.oftc.username "Mon nom d'utilisateur" /set irc.server.oftc.realname "Mon nom réel" ----------------------------------------- +---- Pour activer la connexion automatique au serveur lors du démarrage : ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- Si SASL est disponible sur le serveur, vous pouvez l'utiliser pour l'authentification (vous serez identifié avant de rejoindre les canaux) : ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "pseudo" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- Pour lancer une commande après connexion au serveur, par exemple pour s'authentifier auprès de nickserv (seulement si vous n'utilisez pas SASL pour l'authentification) : ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Plusieurs commandes peuvent être séparées par ';' (point-virgule). Pour rejoindre automatiquement des canaux lors de la connexion au serveur : ----------------------------------------- +---- /set irc.server.oftc.autojoin "#canal1,#canal2" ----------------------------------------- +---- Pour supprimer la valeur d'une option du serveur et utiliser sa valeur par défaut à la place, par exemple pour utiliser les pseudos par défaut (irc.server_default.nicks) : ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Autres options : vous pouvez modifier les autres options avec la commande suivante ("xxx" est le nom d'une option) : ----------------------------------------- +---- /set irc.server.oftc.xxx valeur ----------------------------------------- +---- [[connect_to_irc_server]] -Se connecter au serveur IRC et rejoindre les canaux ---------------------------------------------------- +== Se connecter au serveur IRC et rejoindre les canaux ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Cette commande peut aussi être utilisée pour créer et se connecter au serveur @@ -211,38 +204,36 @@ faut utiliser la touche ctrl-X. Il est possible de désactiver le mélange des tampons serveurs pour avoir un tampon distinct par serveur : ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Rejoindre/quitter les canaux IRC ------------------------------- +== Rejoindre/quitter les canaux IRC Rejoindre un canal : ----------------------------------------- +---- /join #channel ----------------------------------------- +---- Quitter un canal (en laissant le tampon ouvert) : ----------------------------------------- +---- /part [message de fin] ----------------------------------------- +---- quitter un canal et fermer le tampon (`/close` est un alias sur `/buffer close`) : ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Gérer les tampons/fenêtres --------------------------- +== Gérer les tampons/fenêtres Un tampon ("buffer") est un composant lié à une extension, avec une catégorie et un nom. Le tampon contient les données affichées à l'écran. @@ -253,10 +244,10 @@ alors plusieurs fenêtres avec plusieurs tampons en même temps. Commandes pour gérer les tampons et les fenêtres : ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (je ne répéterai pas que vous pouvez avoir de l'aide sur ces commandes avec /help) @@ -264,14 +255,13 @@ avec /help) Par exemple, pour découper verticalement l'écran en une petite fenêtre (1/3 de la largeur) et une large (2/3), utilisez la commande : ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Raccourcis clavier ------------------- +== Raccourcis clavier WeeChat utilise un certain nombre de touches par défaut. Toutes ces touches sont dans la documentation, mais vous devriez connaître au moins @@ -291,26 +281,25 @@ Une touche utile est meta-k (alt-k) pour trouver le code des touches. Par exemple, pour associer meta-y (alt-y) à la commande `/buffer close` : ----------------------------------------- +---- /key bind (pressez meta-k) (pressez meta-y) /buffer close ----------------------------------------- +---- Vous aurez une ligne de commande qui ressemble à ceci : ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Pour enlever la touche : ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Extensions/scripts ------------------- +== Extensions/scripts Sur certaines distributions comme Debian, les extensions sont disponibles via un paquet séparé (par exemple weechat-plugins). @@ -326,8 +315,7 @@ Vous pouvez gérer les scripts dans WeeChat avec la commande `/script` (voir [[more_doc]] -Plus de documentation ---------------------- +== Plus de documentation Vous pouvez maintenant utiliser WeeChat et lire la FAQ/documentation pour toute autre question : http://weechat.org/doc diff --git a/doc/fr/weechat_scripting.fr.txt b/doc/fr/weechat_scripting.fr.txt index 03966bd11..d33e7130a 100644 --- a/doc/fr/weechat_scripting.fr.txt +++ b/doc/fr/weechat_scripting.fr.txt @@ -1,5 +1,4 @@ -WeeChat Guide pour Scripts -========================== += WeeChat Guide pour Scripts Sébastien Helleu <flashcode@flashtux.org> @@ -11,8 +10,7 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre, rapide et léger, conçu pour différents systèmes d'exploitation. @@ -32,28 +30,23 @@ La majorité des exemples de cette documentation sont écrits en Python, mais l'API est la même pour les autres langages. [[scripts_in_weechat]] -Scripts dans WeeChat --------------------- +== Scripts dans WeeChat [[languages_specifities]] -Spécificités des langages -~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Spécificités des langages -Python -^^^^^^ +==== Python * Vous devez utiliser `import weechat` * Les fonctions `print*` se nomment `prnt*` en python (car 'print' est un mot clé réservé) * Les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)` -Perl -^^^^ +==== Perl * Les fonctions sont appelées par `weechat::xxx(arg1, arg2, ...);` -Ruby -^^^^ +==== Ruby * Vous devez définir 'weechat_init' et appeler 'register' dedans * Les fonctions sont appelées par `Weechat.xxx(arg1, arg2, ...)` @@ -63,23 +56,20 @@ Ruby cette fonction ressemble à ceci : [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -Lua -^^^ +==== Lua * Les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)` -Tcl -^^^ +==== Tcl * Les fonctions sont appelées par `weechat::xxx arg1 arg2 ...` -Guile (scheme) -^^^^^^^^^^^^^^ +==== Guile (scheme) * Les fonctions sont appelées par `(weechat:xxx arg1 arg2 ...)` * Les fonctions suivantes prennent une liste de paramètres en entrée (au lieu @@ -90,8 +80,7 @@ Guile (scheme) ** bar_new [[register_function]] -Fonction register -~~~~~~~~~~~~~~~~~ +=== Fonction register Tous les scripts WeeChat doivent s'enregistrer ("register") auprès de WeeChat, et cela doit être la première fonction WeeChat appelée dans le script. @@ -99,9 +88,9 @@ et cela doit être la première fonction WeeChat appelée dans le script. Prototype : [source,python] ----------------------------------------- +---- weechat.register(name, author, version, license, description, shutdown_function, charset) ----------------------------------------- +---- Paramètres : @@ -121,100 +110,98 @@ Exemple, pour chaque langage : * python : [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Script de test", "", "") weechat.prnt("", "Bonjour, du script python !") ----------------------------------------- +---- * perl : [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Script de test", "", ""); weechat::print("", "Bonjour, du script perl !"); ----------------------------------------- +---- * ruby : [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Script de test", "", "") Weechat.print("", "Bonjour, du script ruby !") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua : [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Script de test", "", "") weechat.print("", "Bonjour, du script lua !") ----------------------------------------- +---- * tcl : [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Script de test" "" "" weechat::print "" "Bonjour, du script tcl !" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Script de test" "" "") (weechat:print "" "Bonjour, du script scheme !") ----------------------------------------- +---- [[load_script]] -Chargement du script -~~~~~~~~~~~~~~~~~~~~ +=== Chargement du script Il est recommandé d'utiliser l'extension "script" pour charger les scripts, par exemple : ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- Chaque langage a également sa propre commande : ----------------------------------------- +---- /python load python/script.py /perl load perl/script.pl /ruby load ruby/script.rb /lua load lua/script.lua /tcl load tcl/script.tcl /guile load guile/script.scm ----------------------------------------- +---- Vous pouvez faire un lien dans le répertoire 'langage/autoload' pour charger automatiquement le script quand WeeChat démarre. Par exemple en Python : ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../script.py ----------------------------------------- +---- [NOTE] Lors de l'installation d'un script avec la commande `/script install` le lien dans le répertoire 'autoload' est automatiquement créé. [[differences_with_c_api]] -Différences avec l'API C ------------------------- +== Différences avec l'API C L'API script est quasiment identique à l'API C. Vous pouvez consulter la 'Référence API Extension WeeChat' pour le détail de @@ -228,28 +215,27 @@ extension comme 'python' par la commande `/python`. Quand votre script 'test.py' appelle une fonction de l'API WeeChat, le chemin est le suivant : -........................................ +.... ┌──────────────────────┐ ╔══════════════════╗ │ extension python │ ║ WeeChat "core" ║ ├────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ API script │ API C │ ─────► ║ API C │ ║ └────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... Quand WeeChat appelle un "callback" dans votre script 'test.py', le chemin est inversé : -........................................ +.... ╔══════════════════╗ ┌──────────────────────┐ ║ WeeChat "core" ║ │ extension python │ ║ ┌─────────╢ ├─────────┬────────────┤ ║ │ API C ║ ─────► │ API C │ API script │ ─────► test.py ╚════════╧═════════╝ └─────────┴────────────┘ -........................................ +.... [[pointers]] -Pointeurs -~~~~~~~~~ +=== Pointeurs Comme vous le savez probablement, il n'y a pas vraiment de "pointeurs" dans les scripts. Donc quand les fonctions de l'API retournent un pointeur, il est @@ -267,9 +253,9 @@ Par exemple, pour afficher un message sur le tampon core (tampon principal WeeChat), vous pouvez faire : [source,python] ----------------------------------------- +---- weechat.prnt("", "bonjour !") ----------------------------------------- +---- [WARNING] Dans beaucoup de fonctions, pour des raisons de vitesse, WeeChat ne vérifie pas @@ -278,8 +264,7 @@ vérifier que vous donnez un pointeur valide, sinon vous pourriez voir un joli rapport de crash ;) [[callbacks]] -Callbacks -~~~~~~~~~ +=== Callbacks Tous les "callbacks" WeeChat doivent retourner WEECHAT_RC_OK ou WEECHAT_RC_ERROR (l'exception est le callback du "modifier", qui retourne une @@ -294,18 +279,18 @@ Exemple de callback, pour chaque langage : * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -313,71 +298,69 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -API script ----------- +== API script Pour plus d'informations sur les fonctions de l'API, merci de consulter la 'Référence API Extension WeeChat'. [[script_api_functions]] -Fonctions -~~~~~~~~~ +=== Fonctions Liste des fonctions de l'API script : [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Catégorie | Fonctions | général | register @@ -454,16 +437,15 @@ Liste des fonctions de l'API script : hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | mise à jour | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -Constantes -~~~~~~~~~~ +=== Constantes Liste des constantes de l'API script : [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Catégorie | Constantes | codes retour | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -491,23 +473,20 @@ Liste des constantes de l'API script : WEECHAT_HOOK_CONNECT_SOCKET_ERROR | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -Tâches courantes ----------------- +== Tâches courantes Ce chapitre montre quelques tâches courantes, avec des exemples. Seule une partie de l'API est utilisée ici, pour une référence complète, voir la 'Référence API Extension WeeChat'. [[buffers]] -Tampons -~~~~~~~ +=== Tampons [[buffers_display_messages]] -Afficher des messages -^^^^^^^^^^^^^^^^^^^^^ +==== Afficher des messages Une chaîne vide est souvent utilisée pour travailler avec le tampon core WeeChat. Pour les autres tampons, vous devez passer un pointeur (sous forme de chaîne, @@ -516,7 +495,7 @@ voir <<pointers,pointeurs>>). Exemples : [source,python] ----------------------------------------- +---- # afficher "bonjour" sur le tampon core weechat.prnt("", "bonjour") @@ -543,15 +522,14 @@ weechat.prnt(buffer, "message sur le canal #weechat") # (notez que le serveur et le canal sont séparés par une virgule) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "message sur le canal #weechat") ----------------------------------------- +---- [NOTE] La fonction d'affichage est appelée `print` en Perl/Ruby/Lua/Tcl et `prnt` en Python. [[buffers_send_text]] -Envoyer du texte au tampon -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Envoyer du texte au tampon Vous pouvez envoyer du texte ou une commande à un tampon. C'est exactement comme si vous tapiez le texte sur la ligne de commande et que vous pressiez [Enter]. @@ -559,18 +537,17 @@ si vous tapiez le texte sur la ligne de commande et que vous pressiez [Enter]. Exemples : [source,python] ----------------------------------------- +---- # exécuter la commande "/help" sur le tampon courant (le résultat est sur le tampon core) weechat.command("", "/help") # envoyer "bonjour" au canal IRC #weechat (les utilisateurs sur le canal verront le message) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "bonjour") ----------------------------------------- +---- [[buffers_new]] -Créer un nouveau tampon -^^^^^^^^^^^^^^^^^^^^^^^ +==== Créer un nouveau tampon Vous pouvez créer un nouveau tampon dans votre script, et l'utiliser pour afficher des messages. @@ -582,7 +559,7 @@ est appelé lorsque le tampon est fermé (par exemple avec `/buffer close`). Exemple : [source,python] ----------------------------------------- +---- # callback pour les données reçues en entrée def buffer_input_cb(data, buffer, input_data): # ... @@ -601,11 +578,10 @@ weechat.buffer_set(buffer, "title", "Ceci est le titre du tampon.") # désactiver l'enregistrement (log), en définissant la variable locale "no_log" à "1" weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -Propriétés du tampon -^^^^^^^^^^^^^^^^^^^^ +==== Propriétés du tampon Vous pouvez lire des propriétés du tampon, sous forme de chaîne, entier ou pointeur. @@ -613,19 +589,19 @@ pointeur. Exemples : [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() number = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") short_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- Il est possible d'ajouter, lire ou supprimer des variables locales dans le tampon : [source,python] ----------------------------------------- +---- # ajouter une variable locale weechat.buffer_set(buffer, "localvar_set_myvar", "my_value") @@ -634,22 +610,20 @@ myvar = weechat.buffer_get_string(buffer, "localvar_myvar") # supprimer une variable locale weechat.buffer_set(buffer, "localvar_del_myvar", "") ----------------------------------------- +---- Pour voir les variables locales d'un tampon, exécutez cette commande dans WeeChat : ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_command]] -Ajouter une nouvelle commande -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Ajouter une nouvelle commande Ajoutez une nouvelle commande avec `hook_command`. Vous pouvez utiliser une complétion personnalisée pour compléter les paramètres de votre commande. @@ -657,7 +631,7 @@ complétion personnalisée pour compléter les paramètres de votre commande. Exemple : [source,python] ----------------------------------------- +---- def my_command_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -672,37 +646,35 @@ hook = weechat.hook_command("monfiltre", "description de mon filtre", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- Puis sous WeeChat : ----------------------------------------- +---- /help monfiltre /monfiltre paramètres... ----------------------------------------- +---- [[hook_timer]] -Ajouter un timer -^^^^^^^^^^^^^^^^ +==== Ajouter un timer Ajoutez un timer avec `hook_timer`. Exemple : [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # timer appelé chaque minute quand la seconde est 00 weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -Lancer un processus en tâche de fond -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Lancer un processus en tâche de fond Vous pouvez lancer un processus en tâche de fond avec `hook_process`. Votre "callback" sera appelé quand des données seront prêtes. Il peut être appelé @@ -714,7 +686,7 @@ positive, c'est le code retour de la commande. Exemple : [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -726,11 +698,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -Transfert d'URL -^^^^^^^^^^^^^^^ +==== Transfert d'URL _Nouveau dans la version 0.3.7._ @@ -742,7 +713,7 @@ Exemple de transfert d'URL sans option : la page HTML sera reçue comme "out" dans le "callback" (sortie standard du processus) : [source,python] ----------------------------------------- +---- # Afficher la version stable courante de WeeChat. weechat_version = "" @@ -756,7 +727,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] Toutes les infos disponibles à propos de WeeChat sont sur la page @@ -766,7 +737,7 @@ Exemple de transfert d'URL avec une option : télécharger le dernier paquet de développement WeeChat dans le fichier '/tmp/weechat-devel.tar.gz' : [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "Fin du transfert (rc=%s)" % rc) @@ -775,19 +746,17 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- Pour plus d'information sur le transfert d'URL et les options disponibles, voir les fonctions `hook_process` et `hook_process_hashtable` dans la 'Référence API Extension WeeChat'. [[config_options]] -Config / options -~~~~~~~~~~~~~~~~ +=== Config / options [[config_options_set_script]] -Définir des options pour le script -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Définir des options pour le script La fonction `config_is_set_plugin` est utilisée pour vérifier si une option est définie ou pas, et `config_set_plugin` pour définir une option. @@ -795,7 +764,7 @@ définie ou pas, et `config_set_plugin` pour définir une option. Exemple : [source,python] ----------------------------------------- +---- script_options = { "option1" : "valeur1", "option2" : "valeur2", @@ -804,11 +773,10 @@ script_options = { for option, default_value in script_options.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, default_value) ----------------------------------------- +---- [[config_options_detect_changes]] -Détecter des changements -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Détecter des changements Vous devez utiliser `hook_config` pour être notifié si l'utilisateur modifie certaines options du script. @@ -816,7 +784,7 @@ certaines options du script. Exemple : [source,python] ----------------------------------------- +---- SCRIPT_NAME = "monscript" # ... @@ -831,18 +799,17 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_cb", "") # pour les autres langages, remplacez "python" par le langage ("perl", "ruby", "lua" ou "tcl") ----------------------------------------- +---- [[config_options_weechat]] -Lire les options WeeChat -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Lire les options WeeChat La fonction `config_get` retourne un pointeur vers une option. Ensuite, en fonction du type de l'option, il faut appeler `config_string`, `config_boolean`, `config_integer` ou `config_color`. [source,python] ----------------------------------------- +---- # chaîne weechat.prnt("", "la valeur de l'option weechat.look.item_time_format est : %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -858,15 +825,13 @@ weechat.prnt("", "la valeur de l'option weechat.look.scroll_page_percent est : % # couleur weechat.prnt("", "la valeur de l'option weechat.color.chat_delimiters est : %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -IRC -~~~ +=== IRC [[irc_catch_messages]] -Intercepter des messages -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Intercepter des messages L'extension IRC envoie deux signaux pour un message reçu (`xxx` est le nom interne du serveur IRC, `yyy` est le nom de la commande IRC comme JOIN, QUIT, @@ -879,7 +844,7 @@ xxx,irc_in2_yyy:: message sent après traitement du message [source,python] ----------------------------------------- +---- def join_cb(data, signal, signal_data): # signal est par exemple : "freenode,irc_in2_join" # signal_data est le message IRC, par exemple : ":nick!user@host JOIN :#canal" @@ -894,32 +859,30 @@ def join_cb(data, signal, signal_data): # il est pratique ici d'utiliser "*" comme serveur, pour intercepter les # messages JOIN de tous les serveurs IRC weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -Modifier des messages -^^^^^^^^^^^^^^^^^^^^^ +==== Modifier des messages L'extension IRC envoie un "modifier" appelé "irc_in_xxx" ("xxx" est la commande IRC) pour un message reçu, de sorte que vous puissiez le modifier. [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # ajouter le nom du serveur à tous les messages reçus # (ok ce n'est pas très utile, mais c'est juste un exemple !) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] Un message mal formé peut provoquer un plantage de WeeChat ou de sérieux problèmes ! [[irc_message_parse]] -Analyser un message -^^^^^^^^^^^^^^^^^^^ +==== Analyser un message _Nouveau dans la version 0.3.4._ @@ -927,22 +890,20 @@ Vous pouvez analyser un message IRC avec l'info_hashtable appelée "irc_message_parse". [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message ici" }) weechat.prnt("", "dict: %s" % dict) # output: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message ici', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -Infos -~~~~~ +=== Infos [[infos_weechat_version]] -Version de WeeChat -^^^^^^^^^^^^^^^^^^ +==== Version de WeeChat Le meilleur moyen de vérifier la version est de demander "version_number" et de faire une comparaison entre nombre entiers avec la version hexadécimale de la @@ -951,13 +912,13 @@ version. Exemple : [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "C'est WeeChat 0.3.2 ou plus récent") else: weechat.prnt("", "C'est WeeChat 0.3.1 ou plus ancien") ----------------------------------------- +---- [NOTE] Les versions ≤ 0.3.1.1 retournent une chaîne vide pour @@ -967,38 +928,35 @@ n'est *pas* vide. Pour obtenir la version sous forme de chaîne : [source,python] ----------------------------------------- +---- # ceci affichera par exemple "Version 0.3.2" weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -Autres infos -^^^^^^^^^^^^ +==== Autres infos [source,python] ----------------------------------------- +---- # répertoire de WeeChat, par exemple : "/home/xxxx/.weechat" weechat.prnt("", "Répertoire WeeChat : %s" % weechat.info_get("weechat_dir", "")) # inactivité clavier weechat.prnt("", "Inactivité depuis %s secondes" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -Infolists -~~~~~~~~~ +=== Infolists [[infolists_read]] -Lire une infolist -^^^^^^^^^^^^^^^^^ +==== Lire une infolist Vous pouvez lire une infolist construite par WeeChat ou d'autres extensions. Exemple : [source,python] ----------------------------------------- +---- # lecture de l'infolist "buffer", pour avoir la liste des tampons infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -1006,7 +964,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] N'oubliez pas d'appeler `infolist_free` pour libérer la mémoire utilisée par diff --git a/doc/fr/weechat_tester.fr.txt b/doc/fr/weechat_tester.fr.txt index fcfe0d15d..280686318 100644 --- a/doc/fr/weechat_tester.fr.txt +++ b/doc/fr/weechat_tester.fr.txt @@ -1,11 +1,9 @@ -Guide du testeur WeeChat -======================== += Guide du testeur WeeChat Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -Objet ------ +== Objet Beaucoup d'utilisateurs nous demandent comment aider WeeChat. La façon la plus facile (et aussi la plus rusée) consiste à le tester ! @@ -29,8 +27,7 @@ fonctionnalités (et à corriger des anciens bugs). [[prepare_system]] -Préparez votre système ----------------------- +== Préparez votre système Cela nous aiderait beaucoup si vous activiez les fichiers 'core' Linux : si WeeChat se plante, Linux écrit un fichier 'core'. Ce fichier contient des @@ -39,14 +36,13 @@ se situe dans WeeChat). Si vous utilisez le shell 'bash', ajoutez cette ligne dans votre `~/.bashrc` : ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -Téléchargement de la version devel ----------------------------------- +== Téléchargement de la version devel Le code tout frais (avec les derniers bugs et fonctionnalités) est stocké dans GIT. @@ -59,56 +55,54 @@ Vous pouvez décider de le construire manuellement (méthode recommandée) : WeeChat. [[get_sources]] -Obtenir et compiler les sources -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Obtenir et compiler les sources Créez tout d'abord un répertoire, par exemple 'weechat-git' : ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- Si vous avez git installé, vous pouvez cloner la base GIT (recommandé) : ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- NOTE: Plus tard, vous pourrez utiliser la commande "`git pull`" dans ce répertoire pour obtenir juste les deltas avec la version d'aujourd'hui. Sinon vous pouvez installer le paquet 'devel' : ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- Pour compiler les sources, cmake est recommandé : ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- Si vous n'avez pas cmake, il est toujours possible d'utiliser les autotools : ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -Obtenir un paquet binaire -~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Obtenir un paquet binaire Selon votre distribution Linux : @@ -119,17 +113,16 @@ Selon votre distribution Linux : [[run]] -Lancer WeeChat --------------- +== Lancer WeeChat Il est conseillé de lancer WeeChat avec un répertoire différent de la version stable, avec l'option `--dir`. La commande est : ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- Si vous êtes encore éveillé, vous devriez voir une interface familière et pouvoir vous vanter d'utiliser la version la plus récente possible de WeeChat ;) @@ -142,8 +135,7 @@ retour et de vos impressions ! [[links]] -Liens intéressants ------------------- +== Liens intéressants * Base GIT : http://git.savannah.gnu.org/gitweb/?p=weechat.git * Bug tracker : https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt index 5bf982e39..efc328be2 100644 --- a/doc/fr/weechat_user.fr.txt +++ b/doc/fr/weechat_user.fr.txt @@ -1,5 +1,4 @@ -Guide Utilisateur WeeChat -========================= += Guide Utilisateur WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -11,15 +10,13 @@ http://weechat.org/doc [[introduction]] -Introduction ------------- +== Introduction WeeChat (Wee Enhanced Environment for Chat) est un client de discussion libre, rapide et léger, conçu pour différents systèmes d'exploitation. [[features]] -Fonctionnalités -~~~~~~~~~~~~~~~ +=== Fonctionnalités Ses principales fonctionnalités sont les suivantes : @@ -38,8 +35,7 @@ Ses principales fonctionnalités sont les suivantes : La page d'accueil de WeeChat est ici : http://weechat.org/ [[pre-requisites]] -Prérequis -~~~~~~~~~ +=== Prérequis Pour installer WeeChat, vous devez avoir : @@ -49,12 +45,10 @@ Pour installer WeeChat, vous devez avoir : * la bibliothèque ncurses [[install]] -Installation ------------- +== Installation [[binary_packages]] -Paquets binaires -~~~~~~~~~~~~~~~~ +=== Paquets binaires Les paquets binaires sont disponibles pour beaucoup de distributions, dont : @@ -73,21 +67,19 @@ Pour les autres distributions supportées, merci de vous référer au manuel de la distribution pour la méthode d'installation. [[source_package]] -Paquet source -~~~~~~~~~~~~~ +=== Paquet source WeeChat peut être compilé avec cmake ou les autotools (cmake est la méthode recommandée). [[dependencies]] -Dépendances -^^^^^^^^^^^ +==== Dépendances Le tableau suivant liste les paquets qui sont requis ou optionnels pour compiler WeeChat. [width="100%",cols="5,^3,^3,13",options="header"] -|======================================== +|=== | Paquet ^(1)^ | Version | Requis | Fonctionnalité | cmake | | *oui* | Construction (autotools toujours possible, mais cmake est recommandé) | libncursesw5-dev ^(2)^ | | *oui* | Interface ncurses @@ -108,7 +100,7 @@ compiler WeeChat. | source-highlight | | | Coloration des sources dans la documentation | xsltproc, docbook-xml, docbook-xsl | | | Construction de la page de manuel -|======================================== +|=== [NOTE] ^(1)^ Le nom provient de la distribution GNU/Linux Debian, la version dans le @@ -119,35 +111,34 @@ nom du paquet peut être différente. + avec la version 2.7, mais pas avec les versions ≤ 2.6 ou ≥ 3.0). [[compile_with_cmake]] -Compilation avec cmake -^^^^^^^^^^^^^^^^^^^^^^ +==== Compilation avec cmake * Installation dans les répertoires systèmes (nécessite les droits 'root') : ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. $ make % make install (en root) ----------------------------------------- +---- * Installation dans un répertoire spécifique : ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=/chemin/vers/répertoire $ make $ make install ----------------------------------------- +---- Des options peuvent être utilisées pour cmake, avec le format: "-DOPTION=VALUE". Liste des options couramment utilisées : [width="100%",cols="2m,2,5m,12",options="header"] -|======================================== +|=== | Option | Valeurs | Valeur par défaut | Description | CMAKE_BUILD_TYPE | `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel` | | @@ -243,23 +234,22 @@ Liste des options couramment utilisées : | ENABLE_XFER | `ON`, `OFF` | ON | Compiler <<xfer_plugin,l'extension Xfer>>. -|======================================== +|=== Les autres options peuvent être affichées avec cette commande : ----------------------------------------- +---- $ cmake -LA ----------------------------------------- +---- Ou avec l'interface Curses : ----------------------------------------- +---- $ ccmake .. ----------------------------------------- +---- [[compile_with_autotools]] -Compilation avec autotools -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Compilation avec autotools [WARNING] Seulement cmake est officiellement supporté pour construire WeeChat. Vous ne @@ -270,52 +260,50 @@ qu'avec cmake. * Installation dans les répertoires systèmes (nécessite les droits 'root') : ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure $ make % make install (en root) ----------------------------------------- +---- * Installation dans un répertoire spécifique : ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure --prefix=/chemin/vers/répertoire $ make $ make install ----------------------------------------- +---- Des options peuvent être utilisées pour le script 'configure', elles peuvent être affichées avec cette commande : ----------------------------------------- +---- $ ./configure --help ----------------------------------------- +---- [[git_sources]] -Sources Git -~~~~~~~~~~~ +=== Sources Git Attention : les sources git sont réservés aux utilisateurs avancés : il se peut que WeeChat ne compile pas et qu'il soit très instable. Vous êtes prévenus ! Pour récupérer les sources git, tapez cette commande : ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git ----------------------------------------- +---- Suivez alors les instructions du paquet source (voir <<source_package,paquet source>>). [[report_crashes]] -Rapporter les plantages -~~~~~~~~~~~~~~~~~~~~~~~ +=== Rapporter les plantages Si vous avez eu des plantages, ou si vous souhaitez rapporter tout plantage futur de WeeChat, vous devez : @@ -326,14 +314,13 @@ futur de WeeChat, vous devez : * installer gdb [[debug_info]] -Infos de debug -^^^^^^^^^^^^^^ +==== Infos de debug Si vous compilez avec cmake : ----------------------------------------- +---- $ cmake .. -DCMAKE_BUILD_TYPE=Debug ----------------------------------------- +---- Si vous compilez avec les autotools, le debug est par défaut (`--with-debug=1`). @@ -341,15 +328,14 @@ Si vous avez installé un paquet binaire, alors installez le paquet 'weechat-dbg'. [[core_files]] -Fichiers core -^^^^^^^^^^^^^ +==== Fichiers core Pour activer les fichiers 'core', vous pouvez utiliser l'option <<option_weechat.startup.sys_rlimit,weechat.startup.sys_rlimit>>: ----------------------------------------- +---- /set weechat.startup.sys_rlimit "core:-1" ----------------------------------------- +---- Pour WeeChat ≤ 0.3.8 ou si vous voulez activer les fichiers core avant que WeeChat ne démarre, vous pouvez utiliser la commande `ulimit`. @@ -357,19 +343,18 @@ WeeChat ne démarre, vous pouvez utiliser la commande `ulimit`. Par exemple sous Linux avec le shell 'bash', ajoutez cette ligne dans votre `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- Ou une taille maximum : ----------------------------------------- +---- ulimit -c 200000 ----------------------------------------- +---- [[gdb_backtrace]] -Obtenir la trace avec gdb -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Obtenir la trace avec gdb Lorsque WeeChat se plante, votre système génère un fichier 'core' ou 'core.12345' ('12345' est l'identifiant du processus). @@ -379,9 +364,9 @@ Ce fichier est créé dans le répertoire où vous avez lancé WeeChat (ce n'est Par exemple si 'weechat' est installé dans '/usr/bin/' et que le fichier 'core' est dans '/home/xxx/', alors lancez gdb avec cette commande : ----------------------------------------- +---- gdb /usr/bin/weechat /home/xxx/core ----------------------------------------- +---- [NOTE] Si vous avez installé le paquet binaire 'weechat-dbg' (par exemple sous Debian), @@ -391,7 +376,7 @@ alors vous pouvez utiliser ce chemin pour l'exécutable WeeChat : Puis sous gdb, utilisez la commande `bt full` pour afficher la trace. Vous verrez quelque chose comme ceci : ----------------------------------------- +---- (gdb) set logging file /tmp/crash.txt (gdb) set logging on Copying output to /tmp/crash.txt. @@ -418,7 +403,7 @@ Copying output to /tmp/crash.txt. write_fds = {fds_bits = {0 <repeats 16 times>}} except_fds = {fds_bits = {0 <repeats 16 times>}} max_fd = <value optimized out> ----------------------------------------- +---- Vous devez envoyer cette trace aux développeurs, et leur indiquer quelle action a été la cause de ce plantage. @@ -426,30 +411,27 @@ a été la cause de ce plantage. Merci pour votre aide ! [[debug_running_weechat]] -Debug de WeeChat qui tourne -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Debug de WeeChat qui tourne Pour déboguer WeeChat qui tourne (par exemple si WeeChat semble bloqué), vous pouvez utiliser gdb avec l'identifiant du processus (remplacez '12345' par le PID du processus weechat) : ----------------------------------------- +---- gdb /usr/bin/weechat 12345 ----------------------------------------- +---- Ensuite comme pour un crash, utilisez la commande `bt full` : ----------------------------------------- +---- (gdb) bt full ----------------------------------------- +---- [[usage]] -Utilisation ------------ +== Utilisation [[running_weechat]] -Lancer WeeChat -~~~~~~~~~~~~~~ +=== Lancer WeeChat Paramètres de ligne de commande : @@ -457,9 +439,9 @@ include::cmdline_options.fr.txt[] Pour lancer WeeChat, tapez cette commande : ----------------------------------------- +---- $ weechat ----------------------------------------- +---- Lorsque vous lancez WeeChat pour la première fois, un fichier de configuration par défaut est créé, avec les options par défaut. @@ -470,12 +452,11 @@ vous pouvez modifier les paramètres dans WeeChat avec la commande `/set` (voir <<weechat_commands,commandes WeeChat>>). [[screen_layout]] -Organisation de l'écran -~~~~~~~~~~~~~~~~~~~~~~~ +=== Organisation de l'écran Exemple de terminal avec WeeChat : -........................................ +.... ▼ barre "title" ┌───────────────────────────────────────────────────────────────────────────┐ │Bienvenue sur #test, canal de test │ @@ -500,7 +481,7 @@ Exemple de terminal avec WeeChat : │[@Flashy(i)] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ barres "status" et "input" barre "nicklist" ▲ -........................................ +.... L'écran est composé des zones suivantes : @@ -518,7 +499,7 @@ L'écran est composé des zones suivantes : La barre 'status' contient les objets (items) suivants par défaut : [width="100%",cols="^3,^3,10",options="header"] -|======================================== +|=== | Objet (item) | Exemple | Description | time | `[12:55]` | Heure | buffer_count | `[6]` | Nombre de tampons ouverts @@ -532,23 +513,22 @@ La barre 'status' contient les objets (items) suivants par défaut : | hotlist | `[H: 4:#abc(2,5), 6]` | Liste des tampons où il y a de l'activité (messages non lus) (dans cet exemple, 2 highlights et 5 messages non lus sur '#abc', un message non lu sur le tampon numéro 6) | completion | `abc(2) def(5)` | Liste des mots pour la complétion, avec le nombre de complétions possibles pour chaque mot | scroll | `-PLUS(50)-` | Indicateur de scroll, avec le nombre de lignes sous la dernière ligne affichée -|======================================== +|=== La barre 'input' contient les objets (items) suivants par défaut : [width="100%",cols="^3,^6,8",options="header"] -|======================================== +|=== | Objet (item) | Exemple | Description | input_paste | `[Coller 7 lignes ? [ctrl-Y] Oui [ctrl-N] Non]` | Question à l'utilisateur pour coller des lignes | input_prompt | `[@Flashy(i)]` | Prompt, pour irc: pseudo et modes (le mode "+i" signifie invisible sur freenode) | away | `(absent)` | Indicateur d'absence | input_search | `[Recherche (~ str,msg)]` | Indicateur de recherche de texte ("`~`" : insensible à la casse, "`==`" : sensible à la casse, "`str`" : recherche de chaîne, "`regex`" : recherche d'expression régulière, "`msg`" : recherche dans les messages, "`pre`" : recherche dans les préfixes, "`pre\|msg`" : recherche dans les préfixes et messages) | input_text | `salut peter !` | Texte entré -|======================================== +|=== [[buffers_and_windows]] -Tampons et fenêtres -~~~~~~~~~~~~~~~~~~~ +=== Tampons et fenêtres Un tampon ('buffer') est composé d'un numéro, un nom, des lignes affichées (ainsi que d'autres données). @@ -569,7 +549,7 @@ aucune fenêtre) ou affiché par une ou plusieurs fenêtres. Exemple de découpage horizontal (`/window splith`) : -........................................ +.... ▼ fenêtre n°2 (tampon n°4) ┌───────────────────────────────────────────────────────────────────────────┐ │Bienvenue sur #abc │ @@ -597,11 +577,11 @@ Exemple de découpage horizontal (`/window splith`) : │[@Flashy] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ fenêtre n°1 (tampon n°3) -........................................ +.... Exemple de découpage vertical (`/window splitv`) : -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │Bienvenue sur #test │Bienvenue sur #abc │ │12:54:15 peter | ohé ! │@Flashy│12:55:12 Max | bonjour │@Flashy│ @@ -625,11 +605,11 @@ Exemple de découpage vertical (`/window splitv`) : │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ fenêtre n°1 (tampon n°3) ▲ fenêtre n°2 (tampon n°4) -........................................ +.... Exemple de découpage vertical + horizontal : -........................................ +.... ▼ fenêtre n°3 (tampon n°5) ┌───────────────────────────────────────────────────────────────────────────┐ │Bienvenue sur #test │Bienvenue sur #def │ @@ -657,11 +637,10 @@ Exemple de découpage vertical + horizontal : │[@Flashy] salut peter !█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ fenêtre n°1 (tampon n°3) ▲ fenêtre n°2 (tampon n°4) -........................................ +.... [[bars]] -Barres -~~~~~~ +=== Barres Une 'barre' est une zone à côté de la discussion qui peut contenir tout type de texte. @@ -672,7 +651,7 @@ Les options de barre sont définies avec les options `weechat.bar.nom.option` o Liste des options de barre : [width="100%",cols="2m,2,10",options="header"] -|======================================== +|=== | Option | Valeurs | Description | type | `root`, `window` | @@ -740,11 +719,10 @@ Liste des options de barre : | conditions | chaîne | Les conditions pour afficher la barre (voir <<bar_conditions,conditions>> pour plus d'infos). -|======================================== +|=== [[bar_items]] -Objets -^^^^^^ +==== Objets L'option 'items' est une chaîne avec une liste d'objets de barre, séparés par une virgule (espace entre les objets à l'écran) ou un "+" (objets collés). @@ -759,11 +737,11 @@ de barre avec la couleur des délimiteurs définie dans la barre (option Exemple de barre avec les objets "[time],buffer_number+:+buffer_plugin+.+buffer_name" : -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │[12:55] 3:irc/freenode.#weechat │ └───────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Une syntaxe spéciale peut être utilisée pour forcer le tampon utilisé lors de l'affichage de l'objet de barre : "@tampon:objet" (où "tampon" est le nom @@ -776,13 +754,12 @@ affiché du tout). Exemple : liste de pseudos de bitlbee dans une barre "root" (si la barre s'appelle 'bitlist' et si le serveur bitlbee s'appelle 'bitlbee') : ----------------------------------------- +---- /set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist" ----------------------------------------- +---- [[bar_filling]] -Remplissage -^^^^^^^^^^^ +==== Remplissage Il y a quatre types de remplissage : @@ -804,7 +781,7 @@ Les barres par défaut 'title', 'status' et 'input' ont un remplissage Quelques exemples de remplissage pour la barre 'nicklist' : -........................................ +.... ┌──────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ │12:54:15 peter | hey! │@carl │ @@ -858,11 +835,10 @@ Quelques exemples de remplissage pour la barre 'nicklist' : │───────────────────────────────────────────────────────────────────────│ │ │ filling_top_bottom = columns_horizontal ▲ -........................................ +.... [[bar_conditions]] -Conditions -^^^^^^^^^^ +==== Conditions L'option 'conditions' est une chaîne évaluée pour savoir si la barre doit être affichée ou non dans la fenêtre (elle est utilisée seulement pour les barres @@ -891,20 +867,19 @@ Les pointeurs suivants sont disponibles : Exemple pour afficher la liste de pseudos dans tous les tampons possédant une liste de pseudos, et seulement si la largeur de fenêtre est supérieurs à 100 : ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && ${window.win_width} > 100" ----------------------------------------- +---- Même condition, mais afficher toujours la liste de pseudos sur le tampon '&bitlbee' (même si la fenêtre est petite) : ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)" ----------------------------------------- +---- [[notify_levels]] -Niveaux de notification -~~~~~~~~~~~~~~~~~~~~~~~ +=== Niveaux de notification Quatre niveaux sont possibles dans les messages affichés dans les tampons, du moins important au plus important : @@ -922,46 +897,44 @@ Le niveau de notification par défaut peut être défini avec l'option la valeur par défaut est 'all'. [width="50%",cols="3m,10",options="header"] -|======================================== +|=== | Niveau de notification | Niveau des messages ajoutés à la hotlist | none | (aucun) | highlight | 'highlight' + 'private' | message | 'highlight' + 'private' + 'message' | all | 'highlight' + 'private' + 'message' + 'low' -|======================================== +|=== Le niveau de notification peut être défini pour un ensemble de tampons, par exemple tous les tampons du serveur irc "freenode" : ----------------------------------------- +---- /set weechat.notify.irc.freenode message ----------------------------------------- +---- Définir le niveau de notification 'highlight' sur le canal "#weechat" seulement : ----------------------------------------- +---- /set weechat.notify.irc.freenode.#weechat highlight ----------------------------------------- +---- Le niveau de notification pour un tampon peut aussi être défini avec la commande `/buffer` : ----------------------------------------- +---- /buffer notify highlight ----------------------------------------- +---- [[key_bindings]] -Raccourcis clavier par défaut -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Raccourcis clavier par défaut // 'C-' = ctrl, 'A-' = alt, 'S-' = shift [[key_bindings_command_line]] -Touches pour la ligne de commande -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Touches pour la ligne de commande [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Touche | Description | Commande | @k(←) .2+| Aller au caractère précédent sur la ligne de commande .2+| `/input move_previous_char` | @k(C-)@k(b) @@ -1006,14 +979,13 @@ Touches pour la ligne de commande | @k(A-)@k(k) | Capturer une touche et insérer son code (et la commande associée si la commande existe) sur la ligne de commande | `/input grab_key_command` | @k(A-)@k(r) | Effacer entièrement la ligne de commande | `/input delete_line` | @k(A-)@k(s) | Activer/désactiver aspell | `/mute aspell toggle` -|======================================== +|=== [[key_bindings_buffers_windows]] -Touches pour les tampons / fenêtres -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Touches pour les tampons / fenêtres [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Touche | Description | Commande | @k(C-)@k(l) | Réafficher toute la fenêtre | `/window refresh` | @k(C-)@k(s) , @k(C-)@k(u) | Positionner le marqueur de données non lues sur tous les tampons | `/input set_unread` @@ -1063,17 +1035,16 @@ Touches pour les tampons / fenêtres | @k(A-)@k(>) | Sauter au tampon suivant dans la liste des tampons visités | `/input jump_next_visited_buffer` | @k(A-)@k(/) | Sauter au dernier tampon affiché (avant le dernier saut vers un tampon) | `/input jump_last_buffer_displayed` | @k(A-)@k(=) | Activer/désactiver les filtres | `/filter toggle` -|======================================== +|=== [[key_bindings_search_context]] -Touches pour le contexte "search" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Touches pour le contexte "search" Ces touches sont utilisées dans le contexte "search" (lorsque @k(C-)@k(r) est pressé pour chercher du texte dans le tampon). [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Touche | Description | Commande | @k(C-)@k(r) | Basculer le type de recherche : chaîne (par défaut), expression régulière | `/input search_switch_regex` | @k(A-)@k(c) | Basculer la casse exacte pour la recherche | `/input search_switch_case` @@ -1083,17 +1054,16 @@ pressé pour chercher du texte dans le tampon). | @k(Enter) .3+| Arrêter la recherche .3+| `/input search_stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_cursor_context]] -Touches pour le contexte "cursor" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Touches pour le contexte "cursor" Ces touches sont utilisées dans le contexte "cursor" (mouvement libre du curseur à l'écran). [width="100%",cols="^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Touche | Zone | Description | Commande | @k(↑) | - | Déplacer le curseur d'une ligne vers le haut | `/cursor move up` | @k(↓) | - | Déplacer le curseur d'une ligne vers le bas | `/cursor move down` @@ -1114,17 +1084,16 @@ Ces touches sont utilisées dans le contexte "cursor" (mouvement libre du curseu | @k(Enter) .3+| - .3+| Arrêter le mode curseur ("cursor") .3+| `/cursor stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_mouse_context]] -Touches pour le contexte "mouse" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Touches pour le contexte "mouse" Ces touches sont utilisées dans le contexte "mouse", c'est-à-dire lorsqu'un évènement de la souris se produit. [width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Bouton ^(1)^ | Geste | Zone | Description | Commande | ◾◽◽ | - | chat | Aller à la fenêtre | `/window ${_window_number}` | ◾◽◽ | left | chat | Aller au tampon précédent | `/window ${_window_number};/buffer +1` @@ -1152,42 +1121,40 @@ Ces touches sont utilisées dans le contexte "mouse", c'est-à-dire lorsqu'un | ⇑ | - | toute barre | Faire défiler la barre de -20% | `/bar scroll ${_bar_name} ${_window_number} -20%` | ⇓ | - | toute barre | Faire défiler la barre de +20% | `/bar scroll ${_bar_name} ${_window_number} +20%` | ◽◾◽ | - | n'importe où | Démarrer le mode curseur ("cursor") à ce point | `/cursor go ${_x},${_y}` -|======================================== +|=== [NOTE] ^(1)^ "⇑" et "⇓" sont la roulette vers le haut et le bas. [[mouse]] -Support souris -~~~~~~~~~~~~~~ +=== Support souris WeeChat supporte les clics et mouvements avec la souris. Cela fonctionne avec un terminal local, et à distance via une connexion ssh, avec ou sans screen/tmux. [[mouse_enable]] -Activer la souris -^^^^^^^^^^^^^^^^^ +==== Activer la souris Pour activer la souris au démarrage : ----------------------------------------- +---- /set weechat.look.mouse on ----------------------------------------- +---- Pour activer la souris maintenant, appuyez sur @k(A-)@k(m) ou lancez la commande suivante : ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Il est possible de désactiver temporairement la souris, et associer ça à une touche. Par exemple la touche @k(A-)@k(x) pour désactiver la souris pendant 10 secondes : ----------------------------------------- +---- /key bind meta-x /mouse toggle 10 ----------------------------------------- +---- Lorsque la souris est activée dans WeeChat, vous pouvez utiliser la touche @k(-S-) pour sélectionner ou cliquer dans le terminal, comme si la souris était @@ -1198,8 +1165,7 @@ lieu de @k(-S-)). Pour tout problème avec la souris, merci de consulter la 'FAQ WeeChat'. [[mouse_bind_events]] -Associer des évènements souris à des commandes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Associer des évènements souris à des commandes De nombreux évènements souris sont déjà définis par WeeChat (voir <<key_bindings_mouse_context,les touches pour le contexte "mouse">>). @@ -1214,17 +1180,17 @@ un geste (facultatif). Les différents éléments sont séparés par "-". Liste des modifieurs : [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Modifieur | Description | ctrl | Touche @k(-C-) | alt | Touche @k(-A-) | ctrl-alt | Touches @k(-C-) et @k(-A-) -|======================================== +|=== Liste des boutons/roulette : [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Bouton/roulette | Description | button1 | Clic sur le bouton gauche | button2 | Clic sur le bouton droit @@ -1232,12 +1198,12 @@ Liste des boutons/roulette : | button4 ... button9 | Clic sur un bouton additionnel | wheelup | Roulette (haut) | wheeldown | Roulette (bas) -|======================================== +|=== Liste des gestes (seulement pour les boutons, pas la roulette) : [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Geste | Distance | gesture-up | 3 ... 19 | gesture-up-long | ≥ 20 @@ -1247,17 +1213,17 @@ Liste des gestes (seulement pour les boutons, pas la roulette) : | gesture-left-long | ≥ 40 | gesture-right | 3 ... 39 | gesture-right-long | ≥ 40 -|======================================== +|=== Liste des évènements incomplets (seulement pour les boutons, pratique pour les extensions/scripts) : [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Évènement | Description | event-down | Le bouton a été pressé mais pas encore relâché | event-drag | La souris a bougé avec le bouton pressé -|======================================== +|=== Exemples d'évènements : @@ -1283,40 +1249,37 @@ puis en faisant l'action avec la souris. Cela insérera le nom de l'évènement sur la ligne de commande. [[command_line]] -Ligne de commande -~~~~~~~~~~~~~~~~~ +=== Ligne de commande La ligne de commande WeeChat (située en bas de la fenêtre) permet d'exécuter des commandes ou d'envoyer du texte vers le tampon. [[command_line_syntax]] -Syntaxe -^^^^^^^ +==== Syntaxe Les commandes débutent par un caractère "/", suivi du nom de la commande. Par exemple pour afficher la liste de toutes les options : ----------------------------------------- +---- /set ----------------------------------------- +---- Le texte envoyé à un tampon est tout texte ne commençant pas par le caractère "/", par exemple pour envoyer 'bonjour' sur le tampon courant : ----------------------------------------- +---- bonjour ----------------------------------------- +---- Il est cependant possible de faire débuter un texte par "/" en le doublant. Par exemple pour envoyer le texte '/set' sur le tampon courant : ----------------------------------------- +---- //set ----------------------------------------- +---- [[command_line_colors]] -Codes couleurs -^^^^^^^^^^^^^^ +==== Codes couleurs Pour certaines extensions comme IRC, il est possible d'utiliser des codes couleur et attributs comme suit (appuyer sur @k(C-)@k(c) puis sur la lettre qui @@ -1351,7 +1314,7 @@ stopper l'attribut défini. Les codes couleur pour @k(C-)@k(c) , @k(c) sont : [width="50%",cols="^1m,3,3",options="header"] -|======================================== +|=== | Code | IRC | WeeChat (curses) | 00 | blanc | white | 01 | noir | black @@ -1369,22 +1332,21 @@ Les codes couleur pour @k(C-)@k(c) , @k(c) sont : | 13 | violet clair | lightmagenta | 14 | gris | gray | 15 | gris clair | white -|======================================== +|=== Exemple : affichage de "bonjour tout le monde !" avec "bonjour" en bleu clair gras, et "tout le monde" en rouge clair souligné : ----------------------------------------- +---- ^Cc12^Cbbonjour ^Cb^Cc04^Cutout le monde^Cu^Cc ! ----------------------------------------- +---- [NOTE] Dans l'extension irc, vous pouvez réassigner les couleurs en utilisant l'option <<option_irc.color.mirc_remap,irc.color.mirc_remap>>. [[colors]] -Couleurs -~~~~~~~~ +=== Couleurs WeeChat peut utiliser jusqu'à 256 paires de couleur pour afficher le texte dans les barres et la zone de discussion (votre terminal doit supporter 256 couleurs @@ -1394,13 +1356,13 @@ Selon la valeur de la variable d'environnement 'TERM', vous pouvez avoir les limites suivantes pour les couleurs dans WeeChat : [width="50%",cols="8,>2,>2",options="header"] -|======================================== +|=== | $TERM | Couleurs | Paires ^(1)^ | "rxvt-unicode", "xterm", ... | 88 | 256 | "rxvt-256color", "xterm-256color", ... | 256 | 32767 | "screen" | 8 | 64 | "screen-256color" | 256 | 32767 -|======================================== +|=== [NOTE] ^(1)^ Même si votre terminal supporte plus de 256 paires, seules 256 paires @@ -1420,27 +1382,26 @@ Si vous utilisez screen, vous pouvez ajouter cette ligne dans votre '~/.screenrc Vous devrez peut-être installer le paquet "ncurses-term" pour utiliser ces valeurs dans la variable 'TERM'. ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Si votre variable 'TERM' a une valeur erronée et que WeeChat est déjà lancé, ne paniquez pas ! Vous pouvez la changer sans redémarrer, grâce au script 'shell.py' : ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- [[colors_basic]] -Couleurs de base -^^^^^^^^^^^^^^^^ +==== Couleurs de base Les couleurs de base dans WeeChat sont : [width="50%",cols="^3m,8",options="header"] -|======================================== +|=== | Nom | Couleur | default | Couleur par défaut du terminal (transparent pour le fond) | black | Noir @@ -1459,11 +1420,10 @@ Les couleurs de base dans WeeChat sont : | lightcyan | Cyan clair | gray | Gris | white | Blanc -|======================================== +|=== [[colors_extended]] -Couleurs étendues -^^^^^^^^^^^^^^^^^ +==== Couleurs étendues WeeChat alloue dynamiquement les paires de couleurs quand elles sont utilisées sur l'écran (pour afficher les tampons et les barres). @@ -1478,33 +1438,31 @@ terminal pour choisir une couleur. Par exemple si vous souhaitez afficher l'heure en orange dans le tampon, faites : ----------------------------------------- +---- /set weechat.color.chat_time 214 ----------------------------------------- +---- Ou si vous voulez un fond vert très foncé pour la barre de statut : ----------------------------------------- +---- /set weechat.bar.status.color_bg 22 ----------------------------------------- +---- [[colors_aliases]] -Alias -^^^^^ +==== Alias Vous pouvez ajouter des alias de couleur avec la commande `/color alias` puis utiliser cet alias dans n'importe quelle option de couleur. Par exemple : ----------------------------------------- +---- /color alias 214 orange /set weechat.color.chat_delimiters orange ----------------------------------------- +---- [[colors_attributes]] -Attributs -^^^^^^^^^ +==== Attributs Il est possible d'utiliser des attributs pour les couleurs. Un ou plusieurs attributs peuvent être ajoutés avant le nom ou le numéro de la couleur : @@ -1518,15 +1476,15 @@ attributs peuvent être ajoutés avant le nom ou le numéro de la couleur : Par exemple si vous voulez votre pseudo en blanc souligné, faites : ----------------------------------------- +---- /set weechat.color.chat_nick_self _white ----------------------------------------- +---- Ou si vous voulez l'heure dans la barre de statut en orange souligné avec gras : ----------------------------------------- +---- /set weechat.color.status_time *_214 ----------------------------------------- +---- Pour utiliser un attribut avec la couleur par défaut du terminal (-1), vous devez utiliser un nombre supérieur à la dernière couleur du terminal, par @@ -1534,39 +1492,36 @@ exemple la couleur maximum de WeeChat : 99999. Exemple de gras avec la couleur de texte du terminal : ----------------------------------------- +---- /set weechat.color.status_time *99999 ----------------------------------------- +---- [[options_and_commands]] -Options et commandes -~~~~~~~~~~~~~~~~~~~~ +=== Options et commandes [[sec_options]] -Options des données sécurisées (sec.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options des données sécurisées (sec.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | crypt | /set sec.crypt.* | Options pour le chiffrement | data | <<command_weechat_secure,/secure>> | Données sécurisées -|======================================== +|=== Options : include::autogen/user/sec_options.txt[] [[weechat_options]] -Options WeeChat (weechat.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options WeeChat (weechat.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | debug | <<command_weechat_debug,/debug set>> + /set weechat.debug.* | Niveau de debug, pour le Debug level, pour le cœur et les extensions (les options peuvent être ajoutées/supprimées dans la section) @@ -1589,21 +1544,19 @@ Sections : | key_search | <<command_weechat_key,/key>> | Touches pour le contexte "search" | key_cursor | <<command_weechat_key,/key>> | Touches pour le contexte "cursor" | key_mouse | <<command_weechat_key,/key>> | Touches pour le contexte "mouse" -|======================================== +|=== Options : include::autogen/user/weechat_options.txt[] [[weechat_commands]] -Commandes WeeChat -^^^^^^^^^^^^^^^^^ +==== Commandes WeeChat include::autogen/user/weechat_commands.txt[] [[plugins]] -Extensions ----------- +== Extensions Une extension est une bibliothèque dynamique, écrite en C et compilée, qui est chargée par WeeChat. @@ -1625,16 +1578,16 @@ extension sont automatiquement fermés. Exemples pour charger, décharger et afficher les extensions : ----------------------------------------- +---- /plugin load irc /plugin unload irc /plugin list ----------------------------------------- +---- Les extensions par défaut sont : [width="50%",cols="^1,5",options="header"] -|======================================== +|=== | Extension | Description | alias | Définir des alias pour les commandes | aspell | Vérification orthographique de la ligne de commande @@ -1652,61 +1605,55 @@ Les extensions par défaut sont : | tcl | Interface (API) pour scripts Tcl | guile | Interface (API) pour scripts Guile (scheme) | xfer | Transfert de fichier et discussion directe -|======================================== +|=== Pour en apprendre plus sur le développement d'extension ou de script (via l'API), merci de consulter la 'Référence API Extension WeeChat' ou le 'Guide pour Scripts WeeChat'. [[alias_plugin]] -Extension Alias -~~~~~~~~~~~~~~~ +=== Extension Alias L'extension Alias permet de définir des alias pour des commandes (WeeChat ou d'autres extensions). [[alias_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/alias_commands.txt[] [[aspell_plugin]] -Extension Aspell -~~~~~~~~~~~~~~~~ +=== Extension Aspell L'extension Aspell permet de vérifier l'orthographe de la ligne de commande. Il est possible d'utiliser plusieurs langages par tampon. [[aspell_options]] -Options (aspell.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Options (aspell.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | color | /set aspell.color.* | Couleurs | check | /set aspell.check.* | Options pour contrôler la vérification orthographique | dict | <<command_aspell_aspell,/aspell setdict>> + /set aspell.dict.* | Dictionnaires utilisés par tampon (les options peuvent être ajoutées/supprimées dans la section) | option | /set aspell.option.* | <<aspell_speller_options,Options du vérificateur d'orthographe>> (les options peuvent être ajoutées/supprimées dans la section) -|======================================== +|=== Options : include::autogen/user/aspell_options.txt[] [[aspell_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/aspell_commands.txt[] [[aspell_speller_options]] -Options du vérificateur d'orthographe -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options du vérificateur d'orthographe Les options du vérificateur d'orthographe peuvent être définies en ajoutant des options dans la section "option" de la configuration aspell. @@ -1714,19 +1661,18 @@ options dans la section "option" de la configuration aspell. Le nom de l'option est une option de configuration aspell. La liste des options peut être trouvée par la commande suivante sous le shell : ----------------------------------------- +---- $ aspell config ----------------------------------------- +---- Par exemple, pour activer l'option "ignore-case": ----------------------------------------- +---- /set aspell.option.ignore-case "true" ----------------------------------------- +---- [[aspell_suggestions]] -Suggestions -^^^^^^^^^^^ +==== Suggestions Les suggestions sont affichées dans un objet de barre appelé "aspell_suggest". Le nombre de suggestions est défini dans l'option 'aspell.check.suggestions'. @@ -1737,23 +1683,22 @@ Pour activer les suggestions, vous devez modifier l'option Exemple de suggestions avec un dictionnaire anglais (`en`) : -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Exemple de suggestions avec des dictionnaires anglais et français (`en,fr`) : -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune/prime,primer,primé] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... [[charset_plugin]] -Extension Charset -~~~~~~~~~~~~~~~~~ +=== Extension Charset L'extension Charset vous permet de décoder et encoder les données en utilisant un jeu de caractères. @@ -1767,15 +1712,15 @@ WeeChat pourra uniquement lire/écrire des données UTF-8. L'extension Charset devrait être automatiquement chargée par WeeChat au démarrage. Pour s'assurer que l'extension est bien chargée, essayez : ----------------------------------------- +---- /charset ----------------------------------------- +---- Si la commande n'est pas trouvée, alors chargez l'extension avec la commande : ----------------------------------------- +---- /plugin load charset ----------------------------------------- +---- Si l'extension n'est pas trouvée, alors vous devriez recompiler WeeChat avec les extensions et le support de Charset. @@ -1787,49 +1732,46 @@ UTF-8. Par exemple : -........................................ +.... charset: terminal: ISO-8859-15, interne: UTF-8 -........................................ +.... [[charset_options]] -Options (charset.conf) -^^^^^^^^^^^^^^^^^^^^^^ +==== Options (charset.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | default | /set charset.default.* | Jeu de caractère d'encodage/décodage par défaut | decode | <<command_charset_charset,/charset decode>> + /set charset.decode.* | Jeu de caractère d'encodage par tampon (les options peuvent être ajoutées/supprimées dans la section) | encode | <<command_charset_charset,/charset encode>> + /set charset.encode.* | Jeu de caractère de décodage par tampon (les options peuvent être ajoutées/supprimées dans la section) -|======================================== +|=== Options : include::autogen/user/charset_options.txt[] [[charset_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/charset_commands.txt[] [[charset_set]] -Définir le jeu de caractère -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Définir le jeu de caractère Pour modifier les jeux de caractères de décodage et d'encodage globaux, utilisez la commande `/set`. Par exemple : ----------------------------------------- +---- /set charset.default.decode ISO-8859-15 /set charset.default.encode ISO-8859-15 ----------------------------------------- +---- Si le jeu de caractères de décodage global n'est pas renseigné (par exemple pendant le premier chargement de Charset), il sera renseigné automatiquement @@ -1846,16 +1788,16 @@ modifiez en même temps les valeurs de décodage et d'encodage. Par exemple : ----------------------------------------- +---- /charset ISO-8859-15 ----------------------------------------- +---- Ce qui est équivalent à : ----------------------------------------- +---- /charset decode ISO-8859-15 /charset encode ISO-8859-15 ----------------------------------------- +---- Pour modifier le jeu de caractères d'un canal IRC (ou d'une conversation privée), utilisez la même commande que pour le serveur, mais sur le tampon du @@ -1863,20 +1805,18 @@ canal (ou du privé). Pour voir tous les jeux de caractères utilisés, utilisez la commande suivante : ----------------------------------------- +---- /set charset.* ----------------------------------------- +---- [[charset_troubleshooting]] -En cas de problème -^^^^^^^^^^^^^^^^^^ +==== En cas de problème Pour tout problème avec les jeux de caractères, merci de consulter la 'FAQ WeeChat'. [[fifo_plugin]] -Extension Fifo -~~~~~~~~~~~~~~ +=== Extension Fifo Vous pouvez contrôler WeeChat à distance, en envoyant des commandes ou du texte dans un tube FIFO (si l'option 'plugins.var.fifo.fifo' est activée, @@ -1889,43 +1829,43 @@ tourne). La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO est une des suivantes : -........................................ +.... plugin.buffer *texte ou commande ici *texte ou commande ici -........................................ +.... Quelques exemples : * changement du pseudo sur freenode en "autrepseudo" : ----------------------------------------- +---- $ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * affichage de texte sur le canal IRC #weechat : ----------------------------------------- +---- $ echo 'irc.freenode.#weechat *bonjour !' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * affichage de texte sur le tampon courant : ----------------------------------------- +---- $ echo '*bonjour !' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * envoyer deux commandes pour décharger/recharger les scripts Python (vous devez les séparer par "\n") : ----------------------------------------- +---- $ echo -e '*/python unload\n*/python autoload' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- Vous pouvez écrire un script qui envoie les commandes à tous les WeeChat qui tournent en même temps, par exemple : [source,shell] ----------------------------------------- +---- #!/bin/sh if [ $# -eq 1 ]; then for fifo in ~/.weechat/weechat_fifo_* @@ -1933,17 +1873,16 @@ if [ $# -eq 1 ]; then echo -e "$1" >$fifo done fi ----------------------------------------- +---- Si le script s'appelle "auto_weechat_command", vous pouvez le lancer ainsi : ----------------------------------------- +---- $ ./auto_weechat_command 'irc.freenode.#weechat *bonjour' ----------------------------------------- +---- [[irc_plugin]] -Extension IRC -~~~~~~~~~~~~~ +=== Extension IRC L'extension IRC permet de dialoguer avec d'autres personnes via le protocole IRC. @@ -1953,30 +1892,28 @@ compris la discussion directe (DCC chat) et le transfert de fichier DCC (via l'extension xfer, voir <<xfer_plugin,extension Xfer>>). [[irc_command_line_options]] -Options de ligne de commande -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options de ligne de commande Il est possible de passer une URL pour un ou plusieurs serveurs, comme suit : ----------------------------------------- +---- irc[6][s]://[pseudo[:mot_passe]@]irc.example.org[:port][/canal][,canal[...]] ----------------------------------------- +---- Exemple pour rejoindre '#weechat' et '#toto' sur le serveur 'irc.freenode.net', port par défaut (6667), avec le pseudo 'nono' : ----------------------------------------- +---- $ weechat irc://nono@irc.freenode.net/#weechat,#toto ----------------------------------------- +---- [[irc_options]] -Options (irc.conf) -^^^^^^^^^^^^^^^^^^ +==== Options (irc.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set irc.look.* | Look and feel | color | /set irc.color.* | Couleurs @@ -1987,21 +1924,19 @@ Sections : | server_default | /set irc.server_default.* | Valeurs par défaut pour serveurs (les options peuvent être ajoutées/supprimées dans la section) | server | <<command_irc_server,/server>> + /set irc.server.* | Serveurs -|======================================== +|=== Options : include::autogen/user/irc_options.txt[] [[irc_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/irc_commands.txt[] [[irc_ssl_certificates]] -Certificats SSL -^^^^^^^^^^^^^^^ +==== Certificats SSL Lors de la connexion à un serveur IRC avec SSL, WeeChat vérifie par défaut que la connexion est entièrement de confiance. @@ -2030,50 +1965,47 @@ et peut échouer, même si cela pouvait être OK dans les versions inférieures 0.3.1. [[irc_connect_oftc_with_certificate]] -Premier exemple : se connecter à oftc en vérifiant le certificat -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +===== Premier exemple : se connecter à oftc en vérifiant le certificat * Importer le certificat sous le shell : ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt ----------------------------------------- +---- Note: il est possible de concaténer plusieurs certificats dans une le fichier CAs.pem. * Sous WeeChat, avec le serveur "oftc" déjà créé : ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [[irc_connect_oftc_with_certfp]] -Second exemple : se connecter à oftc en utilisant CertFP -++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +===== Second exemple : se connecter à oftc en utilisant CertFP * Créer le certificat sous le shell : ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ----------------------------------------- +---- * Sous WeeChat, avec le serveur "oftc" déjà créé : ----------------------------------------- +---- /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem" /connect oftc /msg nickserv cert add ----------------------------------------- +---- Pour plus d'informations, consulter http://www.oftc.net/oftc/NickServ/CertFP [[irc_sasl_authentication]] -Authentification avec SASL -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Authentification avec SASL WeeChat supporte l'authentification avec SASL, en utilisant différents mécanismes : @@ -2092,17 +2024,16 @@ Les options dans le serveur sont : Si vous voulez utiliser "dh-blowfish" par défaut pour tous les serveurs : ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish ----------------------------------------- +---- [NOTE] La librairie "gcrypt" est requise lors de la compilation de WeeChat pour utiliser le mécanisme "dh-blowfish" (voir <<dependencies,les dépendances>>). [[irc_tor_freenode]] -Connexion à Freenode avec TOR/SASL -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Connexion à Freenode avec TOR/SASL En plus du SSL, les serveurs Freenode supportent les connexions avec TOR (https://www.torproject.org/), un réseau de tunnels virtuels qui permet aux @@ -2115,49 +2046,48 @@ l'authentification "plain" avec SASL. En premier lieu, installez TOR. Pour Debian (et dérivés) : ----------------------------------------- +---- $ sudo apt-get install tor ----------------------------------------- +---- Sous WeeChat vous devez créer un proxy socks5 pour le service TOR (le nom/IP et port dépend de votre configuration de TOR) : ----------------------------------------- +---- /proxy add tor socks5 127.0.0.1 9050 ----------------------------------------- +---- Maintenant, créez un nouveau serveur, par exemple : ----------------------------------------- +---- /server add freenode-tor p4fsi4ockecnea7l.onion ----------------------------------------- +---- Définissez le proxy pour TOR : ----------------------------------------- +---- /set irc.server.freenode-tor.proxy "tor" ----------------------------------------- +---- Définissez l'authentification SASL : ----------------------------------------- +---- /set irc.server.freenode-tor.sasl_mechanism dh-blowfish /set irc.server.freenode-tor.sasl_username "votre_pseudo" /set irc.server.freenode-tor.sasl_password "votre_mot_de_passe" ----------------------------------------- +---- Et enfin, la connexion au serveur : ----------------------------------------- +---- /connect freenode-tor ----------------------------------------- +---- Pour plus d'informations à propos de Freenode et TOR : http://freenode.net/irc_servers.shtml#tor [[irc_smart_filter_join_part_quit]] -Filtre intelligent pour les messages join/part/quit -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Filtre intelligent pour les messages join/part/quit Un filtre intelligent est disponible pour filtrer les messages join/part/quit lorsque le pseudo n'a rien dit durant les X dernières minutes sur le canal. @@ -2165,37 +2095,36 @@ lorsque le pseudo n'a rien dit durant les X dernières minutes sur le canal. Le filtre intelligent est activé par défaut, mais vous devez ajouter un filtre pour cacher les lignes sur les tampons, par exemple : ----------------------------------------- +---- /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- Il est possible de créer un filtre pour un canal seulement ou plusieurs canaux commençant par le même nom (voir `/help filter`) : ----------------------------------------- +---- /filter add irc_smart_weechat irc.freenode.#weechat irc_smart_filter * /filter add irc_smart_weechats irc.freenode.#weechat* irc_smart_filter * ----------------------------------------- +---- Vous pouvez cacher seulement les join ou part/quit avec les options suivantes : ----------------------------------------- +---- /set irc.look.smart_filter_join on /set irc.look.smart_filter_quit on ----------------------------------------- +---- Vous pouvez modifier le délai (en minutes) : ----------------------------------------- +---- /set irc.look.smart_filter_delay 5 ----------------------------------------- +---- Si le pseudo n'a pas parlé durant les 5 dernières minutes, ses join et/ou part/quit seront cachés sur le canal. [[irc_ctcp_replies]] -Réponses CTCP -^^^^^^^^^^^^^ +==== Réponses CTCP Il est possible de personnaliser les réponses CTCP, ou de bloquer certaines demandes CTCP (ne pas y répondre). @@ -2203,42 +2132,42 @@ demandes CTCP (ne pas y répondre). Par exemple, pour personnaliser la réponse au CTCP "VERSION", utilisez la commande suivante : ----------------------------------------- +---- /set irc.ctcp.version "Je suis sous WeeChat $version, ça déchire !" ----------------------------------------- +---- Si vous voulez bloquer le CTCP "VERSION" (ne pas répondre à une demande), alors affectez une chaîne vide : ----------------------------------------- +---- /set irc.ctcp.version "" ----------------------------------------- +---- Même un CTCP inconnu peut être personnalisé, par exemple vous pouvez répondre au CTCP "BLABLA" : ----------------------------------------- +---- /set irc.ctcp.blabla "C'est ma réponse au CTCP BLABLA" ----------------------------------------- +---- Il est possible de personnaliser le CTCP pour un seul serveur, en utilisant son nom interne avant le nom du CTCP : ----------------------------------------- +---- /set irc.ctcp.freenode.version "WeeChat $version (pour freenode)" ----------------------------------------- +---- Si vous voulez restaurer la réponse CTCP standard, alors supprimez l'option : ----------------------------------------- +---- /unset irc.ctcp.version ----------------------------------------- +---- Les codes suivants peuvent être utilisés dans les chaînes et sont automatiquement remplacées par WeeChat lors de la réponse au CTCP : [width="100%",cols="^2l,4,8",options="header"] -|======================================== +|=== | Code | Description | Valeur / exemple | $clientinfo | Liste des CTCP supportés | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | $version | Version de WeeChat | `0.4.0-dev` @@ -2251,7 +2180,7 @@ automatiquement remplacées par WeeChat lors de la réponse au CTCP : | $time | Date/heure courante | `Sun, 16 Dec 2012 10:40:48 +0100` | $username | Nom d'utilisateur sur le serveur | `nom` | $realname | Nom réel sur le serveur | `John Doe` -|======================================== +|=== [NOTE] ^(1)^ La version git est la sortie de la commande `git describe`. Elle est @@ -2261,7 +2190,7 @@ installé. Si les options CTCP ne sont pas définies (par défaut), les réponses CTCP sont : [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | CTCP | Format de réponse | Exemple | CLIENTINFO | `$clientinfo` | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | FINGER | `WeeChat $versiongit` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)` @@ -2269,11 +2198,10 @@ Si les options CTCP ne sont pas définies (par défaut), les réponses CTCP sont | TIME | `$time` | `Sun, 16 Dec 2012 10:40:48 +0100` | USERINFO | `$username ($realname)` | `nom (John Doe)` | VERSION | `WeeChat $versiongit ($compilation)` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)` -|======================================== +|=== [[irc_target_buffer]] -Tampon cible pour les messages IRC -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tampon cible pour les messages IRC Il est possible de personnaliser le tampon cible pour les messages IRC (le tampon utilisé pour afficher le message) avec les options `irc.msgbuffer.*`. @@ -2300,7 +2228,7 @@ le tampon approprié, généralement le tampon du serveur ou du canal. Liste non exhaustive des messages ou alias que vous pouvez paramétrer : [width="60%",cols="^1m,^3m,8",options="header"] -|======================================== +|=== | message | alias | description | error | | erreur | invite | | invité sur un canal @@ -2368,7 +2296,7 @@ Liste non exhaustive des messages ou alias que vous pouvez paramétrer : | 728 | quietlist | liste des "quiet" | 729 | quietlist | fin de la liste des "quiet" | 901 | | vous êtes maintenant identifié -|======================================== +|=== Les autres messages numériques peuvent être paramétrés de la même manière. @@ -2379,65 +2307,61 @@ Quelques exemples: * afficher le résultat de `/whois` sur le tampon privé: ----------------------------------------- +---- /set irc.msgbuffer.whois private ----------------------------------------- +---- * restaurer le tampon par défaut pour whois (tampon du serveur): ----------------------------------------- +---- /unset irc.msgbuffer.whois ----------------------------------------- +---- * afficher une invitation sur le tampon courant, pour le serveur "freenode" seulement : ----------------------------------------- +---- /set irc.msgbuffer.freenode.invite current ----------------------------------------- +---- * afficher le message "303" (ison) sur le tampon "core" WeeChat: ----------------------------------------- +---- /set irc.msgbuffer.303 weechat ----------------------------------------- +---- [[logger_plugin]] -Extension Logger -~~~~~~~~~~~~~~~~ +=== Extension Logger L'extension Logger permet de sauvegarder le contenu des tampons dans des fichiers, avec des options sur comment et quoi sauvegarder. [[logger_options]] -Options (logger.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Options (logger.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set logger.look.* | Look and feel | color | /set logger.color.* | Couleurs | file | /set logger.file.* | Options pour les fichiers de log | level | /set logger.level.* | Niveau de log par tampon (les options peuvent être ajoutées/supprimées dans la section) | mask | /set logger.mask.* | Masque de nom de fichier par tampon (les options peuvent être ajoutées/supprimées dans la section) -|======================================== +|=== Options : include::autogen/user/logger_options.txt[] [[logger_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/logger_commands.txt[] [[logger_log_levels]] -Niveaux d'enregistrement -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Niveaux d'enregistrement L'enregistrement est fait selon un niveau pour chaque tampon. Le niveau par défaut est 9 (enregistrer tous les messages affichés dans le tampon). @@ -2461,68 +2385,66 @@ Quelques exemples : * affecter le niveau 3 pour le canal IRC #weechat : ----------------------------------------- +---- /set logger.level.irc.freenode.#weechat 3 ----------------------------------------- +---- * affecter le niveau 3 pour le tampon serveur freenode : ----------------------------------------- +---- /set logger.level.irc.server.freenode 3 ----------------------------------------- +---- * affecter le niveau 3 pour tous les canaux sur le serveur freenode : ----------------------------------------- +---- /set logger.level.irc.freenode 3 ----------------------------------------- +---- * affecter le niveau 2 pour tous les tampons IRC : ----------------------------------------- +---- /set logger.level.irc 2 ----------------------------------------- +---- [[logger_filenames_masks]] -Masques de noms de fichiers -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Masques de noms de fichiers Il est possible de définir un masque de nom de fichier pour chaque tampon, et d'utiliser les variables locales du tampon pour construire le nom de fichier. Pour voir les variables du tampon courant : ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- Par exemple, sur le tampon "irc.freenode.#weechat", WeeChat cherchera un masque avec le nom de l'option, dans cet ordre : ----------------------------------------- +---- logger.mask.irc.freenode.#weechat logger.mask.irc.freenode logger.mask.irc logger.file.mask ----------------------------------------- +---- Cela signifie que vous pouvez avoir un masque spécifique pour certaines serveurs IRC ("logger.mask.irc.freenode") ou pour une extension ("logger.mask.irc"). [[logger_files_by_date]] -Fichiers de log par date -++++++++++++++++++++++++ +===== Fichiers de log par date Pour avoir des fichiers de log par date, vous pouvez utiliser des marqueurs dans le masque (voir `man strftime` pour le format), par exemple : ----------------------------------------- +---- /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" ----------------------------------------- +---- Vous obtiendrez les fichiers suivants : -........................................ +.... ~/.weechat/ |--- logs/ |--- 2010/ @@ -2533,21 +2455,20 @@ Vous obtiendrez les fichiers suivants : |--- 12/ | irc.server.freenode.weechatlog | irc.freenode.#weechat.weechatlog -........................................ +.... [[logger_irc_files_by_server_channel]] -Fichiers de log IRC par serveur et canal -++++++++++++++++++++++++++++++++++++++++ +===== Fichiers de log IRC par serveur et canal Si vous voulez un répertoire par serveur IRC et un fichier par canal dedans : ----------------------------------------- +---- /set logger.mask.irc "irc/$server/$channel.weechatlog" ----------------------------------------- +---- Vous obtiendrez les fichiers suivants : -........................................ +.... ~/.weechat/ |--- logs/ |--- irc/ @@ -2559,11 +2480,10 @@ Vous obtiendrez les fichiers suivants : | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog -........................................ +.... [[relay_plugin]] -Extension Relay -~~~~~~~~~~~~~~~ +=== Extension Relay L'extension Relay est utilisée pour relayer des données via le réseau, en utilisant divers protocoles : @@ -2574,13 +2494,12 @@ utilisant divers protocoles : QWeeChat ou weechat-android). [[relay_options]] -Options (relay.conf) -^^^^^^^^^^^^^^^^^^^^ +==== Options (relay.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set relay.look.* | Look and feel | color | /set relay.color.* | Couleurs @@ -2588,34 +2507,31 @@ Sections : | 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) -|======================================== +|=== Options : include::autogen/user/relay_options.txt[] [[relay_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/relay_commands.txt[] [[relay_password]] -Mot de passe -^^^^^^^^^^^^ +==== Mot de passe Il est fortement recommandé de définir un mot de passe pour le relai, avec la commande : ----------------------------------------- +---- /set relay.network.password "motdepasse" ----------------------------------------- +---- Ce mot de passe sera utilisé pour les protocoles 'irc' et 'weechat'. [[relay_ssl]] -SSL -^^^ +==== SSL Vous pouvez utiliser SSL en créant un certificat et clé privée et en utilisant le préfixe "ssl." dans le nom du protocole. @@ -2625,22 +2541,21 @@ Le fichier par défaut pour le certificat/clé est '~/.weechat/ssl/relay.pem' Vous pouvez créer le certificat et la clé privée avec les commandes suivantes : ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----------------------------------------- +---- Si WeeChat tourne déjà, vous pouvez recharger le certificat et clé privée avec la commande : ----------------------------------------- +---- /relay sslcertkey ----------------------------------------- +---- [[relay_irc_proxy]] -IRC proxy -^^^^^^^^^ +==== IRC proxy L'extension Relay peut agir comme un proxy IRC : elle simulera un serveur IRC, et vous pourrez vous connecter sur WeeChat avec n'importe quel autre client IRC @@ -2652,45 +2567,43 @@ les serveurs. Lors de l'utilisation d'un port pour tous les serveurs, le client doit envoyer le nom interne du serveur dans la commande IRC "PASS", avec le format : ----------------------------------------- +---- PASS serveur:motdepasse ----------------------------------------- +---- Exemple : proxy IRC avec SSL pour tout serveur (le client choisira) : ----------------------------------------- +---- /relay add ssl.irc 8000 ----------------------------------------- +---- Exemple : proxy IRC sans SSL seulement pour le serveur "freenode" : ----------------------------------------- +---- /relay add irc.freenode 8000 ----------------------------------------- +---- Maintenant vous pouvez vous connecter sur le port 8000 avec n'importe quel client IRC en utilisant le mot de passe "motdepasse" (ou "freenode:motdepasse" si aucun serveur n'a été spécifié dans le relai). [[relay_weechat_protocol]] -Protocole WeeChat -^^^^^^^^^^^^^^^^^ +==== Protocole WeeChat L'extension Relay peut envoyer les données à une interface distante en utilisant le protocole WeeChat. Par exemple : ----------------------------------------- +---- /relay add weechat 9000 ----------------------------------------- +---- Maintenant vous pouvez vous connecter sur le port 9000 avec une interface distante en utilisant le mot de passe "motdepasse". [[relay_websocket]] -WebSocket -^^^^^^^^^ +==== WebSocket Le protocole WebSocket (http://tools.ietf.org/html/rfc6455[RFC 6455]) est supporté dans l'extension Relay pour tous les protocoles. @@ -2704,17 +2617,16 @@ Un WebSocket peut être ouvert dans une page HTML5 avec une seule ligne de JavaScript : [source,js] ----------------------------------------- +---- 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'). [[rmodifier_plugin]] -Extension Rmodifier -~~~~~~~~~~~~~~~~~~~ +=== Extension Rmodifier L'extension Rmodifier vous permet de modifier les chaînes de "modifier" avec des expressions régulières. @@ -2724,32 +2636,29 @@ ou lorsque WeeChat les sauvegarde dans l'historique des commandes. Il est possible par exemple de remplacer chaque lettre de ces mots de passe par `*`. [[rmodifier_options]] -Options (rmodifier.conf) -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options (rmodifier.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set rmodifier.look.* | Look and feel | modifier | <<command_rmodifier_rmodifier,/rmodifier add>> + /set rmodifier.modifier.* | Rmodifiers -|======================================== +|=== Options : include::autogen/user/rmodifier_options.txt[] [[rmodifier_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/rmodifier_commands.txt[] [[rmodifier_creation]] -Création d'un rmodifier -^^^^^^^^^^^^^^^^^^^^^^^ +==== Création d'un rmodifier Un rmodifier se compose de trois éléments : @@ -2790,8 +2699,7 @@ Si la ligne de commande contient : `/oper nick password` alors l'affichage sera : `/oper nick ********`. [[scripts_plugins]] -Extensions Scripts -~~~~~~~~~~~~~~~~~~ +=== Extensions Scripts WeeChat fournit 6 extensions pour scripts : Python, Perl, Ruby, Lua, Tcl et Guile (scheme). @@ -2807,68 +2715,59 @@ Pour plus d'informations sur comment écrire des scripts, ou sur l'API WeeChat pour les scripts, merci de lire le 'Le Guide pour Scripts WeeChat'. [[script_options]] -Options Script (script.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Options Script (script.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set script.look.* | Look and feel | color | /set script.color.* | Couleurs | scripts | /set script.scripts.* | Options pour le téléchargement des scripts -|======================================== +|=== Options : include::autogen/user/script_options.txt[] [[script_commands]] -Commandes Script -^^^^^^^^^^^^^^^^ +==== Commandes Script include::autogen/user/script_commands.txt[] [[python_commands]] -Commandes Python -^^^^^^^^^^^^^^^^ +==== Commandes Python include::autogen/user/python_commands.txt[] [[perl_commands]] -Commandes Perl -^^^^^^^^^^^^^^ +==== Commandes Perl include::autogen/user/perl_commands.txt[] [[ruby_commands]] -Commandes Ruby -^^^^^^^^^^^^^^ +==== Commandes Ruby include::autogen/user/ruby_commands.txt[] [[lua_commands]] -Commandes Lua -^^^^^^^^^^^^^ +==== Commandes Lua include::autogen/user/lua_commands.txt[] [[tcl_commands]] -Commandes Tcl -^^^^^^^^^^^^^ +==== Commandes Tcl include::autogen/user/tcl_commands.txt[] [[guile_commands]] -Commandes Guile -^^^^^^^^^^^^^^^ +==== Commandes Guile include::autogen/user/guile_commands.txt[] [[xfer_plugin]] -Extension Xfer -~~~~~~~~~~~~~~ +=== Extension Xfer L'extension Xfer permet : @@ -2877,33 +2776,30 @@ L'extension Xfer permet : * le transfert de fichiers, par exemple le "DCC" via l'extension IRC [[xfer_options]] -Options (xfer.conf) -^^^^^^^^^^^^^^^^^^^ +==== Options (xfer.conf) Sections : [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Commande de contrôle | Description | look | /set xfer.look.* | Look and feel | color | /set xfer.color.* | Couleurs | network | /set xfer.network.* | Options réseau | file | /set xfer.file.* | Options pour les fichiers envoyés/reçus -|======================================== +|=== Options : include::autogen/user/xfer_options.txt[] [[xfer_commands]] -Commandes -^^^^^^^^^ +==== Commandes include::autogen/user/xfer_commands.txt[] [[support]] -Support -------- +== Support Avant de faire appel au support, merci de lire la documentation et la FAQ de WeeChat (la documentation est le document que vous êtes en train de lire, si diff --git a/doc/it/autogen/plugin_api/completions.txt b/doc/it/autogen/plugin_api/completions.txt index ecfeb667a..59314031e 100644 --- a/doc/it/autogen/plugin_api/completions.txt +++ b/doc/it/autogen/plugin_api/completions.txt @@ -1,5 +1,5 @@ [width="65%",cols="^1,^2,8",options="header"] -|======================================== +|=== | Plugin | Nome | Descrizione | alias | alias | elenco di alias @@ -130,4 +130,4 @@ | xfer | nick | nick della chat DCC -|======================================== +|=== diff --git a/doc/it/autogen/plugin_api/infolists.txt b/doc/it/autogen/plugin_api/infolists.txt index f1f8e9418..7a436655c 100644 --- a/doc/it/autogen/plugin_api/infolists.txt +++ b/doc/it/autogen/plugin_api/infolists.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,5,5,5",options="header"] -|======================================== +|=== | Plugin | Nome | Descrizione | Puntatore | Argomenti | alias | alias | elenco di alias | puntatore all'alias (opzionale) | nome alias (può iniziare o terminare con "*" come carattere jolly) (opzionale) @@ -70,4 +70,4 @@ | xfer | xfer | elenco di xfer | puntatore a xfer (opzionale) | - -|======================================== +|=== diff --git a/doc/it/autogen/plugin_api/infos.txt b/doc/it/autogen/plugin_api/infos.txt index 878e39b77..315fd2f6b 100644 --- a/doc/it/autogen/plugin_api/infos.txt +++ b/doc/it/autogen/plugin_api/infos.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,6,6",options="header"] -|======================================== +|=== | Plugin | Nome | Descrizione | Argomenti | aspell | aspell_dict | elenco separato da virgole di dizionari usati nel buffer | puntatore al buffer ("0x12345678") o buffer con il nome completo ("irc.freenode.weechat") @@ -62,4 +62,4 @@ | weechat | weechat_upgrading | 1 se si sta aggiornando WeeChat (comando `/upgrade`) | - -|======================================== +|=== diff --git a/doc/it/autogen/plugin_api/infos_hashtable.txt b/doc/it/autogen/plugin_api/infos_hashtable.txt index 4c6f43ac9..3a66edf70 100644 --- a/doc/it/autogen/plugin_api/infos_hashtable.txt +++ b/doc/it/autogen/plugin_api/infos_hashtable.txt @@ -1,9 +1,9 @@ [width="100%",cols="^1,^2,6,6,6",options="header"] -|======================================== +|=== | Plugin | Nome | Descrizione | Tabella hash (input) | Tabella hash (output) | irc | irc_message_parse | controlla un messaggio IRC | "message": messaggio IRC, "server": nome server (opzionale) | "tags": tag, "message_without_tags": messaggio senza tag, "nick": nick, "host": nome host, "command": comando, "channel": canale, "arguments": argomenti (include il canale) | irc | irc_message_split | divide un messaggio IRC (per adattarlo in 512 byte) | "message": messaggio IRC, "server": nome server (opzionale) | "msg1" ... "msgN": messaggio da inviare (senza "\r\n" finale), "args1" ... "argsN": argomenti dei messaggi, "count": numero di messaggi -|======================================== +|=== diff --git a/doc/it/autogen/plugin_api/url_options.txt b/doc/it/autogen/plugin_api/url_options.txt index 88861e8fb..eda1cce2d 100644 --- a/doc/it/autogen/plugin_api/url_options.txt +++ b/doc/it/autogen/plugin_api/url_options.txt @@ -1,5 +1,5 @@ [width="100%",cols="2,^1,7",options="header"] -|======================================== +|=== | Opzione | Tipo | Costanti ^(1)^ | verbose | long | @@ -298,4 +298,4 @@ | new_directory_perms | long | -|======================================== +|=== diff --git a/doc/it/autogen/user/alias_commands.txt b/doc/it/autogen/user/alias_commands.txt index a7d1f25bc..64c7e071c 100644 --- a/doc/it/autogen/user/alias_commands.txt +++ b/doc/it/autogen/user/alias_commands.txt @@ -1,7 +1,7 @@ [[command_alias_alias]] [command]*`alias`* crea un alias per un comando:: ----------------------------------------- +---- /alias [-completion <completamento>] <alias> [<comando> [;<comando>...]] completion: completion for alias (optional, by default completion is done with target command) @@ -30,5 +30,5 @@ Examples: /alias hello /allchan -exclude=#weechat msg * hello alias /forcejoin to send IRC command "forcejoin" with completion of /sajoin: /alias -completion %%sajoin forcejoin /quote forcejoin ----------------------------------------- +---- diff --git a/doc/it/autogen/user/aspell_commands.txt b/doc/it/autogen/user/aspell_commands.txt index e7110d362..d96a83631 100644 --- a/doc/it/autogen/user/aspell_commands.txt +++ b/doc/it/autogen/user/aspell_commands.txt @@ -1,7 +1,7 @@ [[command_aspell_aspell]] [command]*`aspell`* configurazione del plugin aspell:: ----------------------------------------- +---- /aspell enable|disable|toggle listdict setdict <dizionario>[,<dizionario>...] @@ -23,5 +23,5 @@ Per abilitare aspell su tutti i buffer, usare l'opzione "default_dict", poi abil /aspell enable Il tasto predefinito per (dis)abilitare aspell è alt-s. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/charset_commands.txt b/doc/it/autogen/user/charset_commands.txt index fcc6f34ad..26fa8e7f8 100644 --- a/doc/it/autogen/user/charset_commands.txt +++ b/doc/it/autogen/user/charset_commands.txt @@ -1,7 +1,7 @@ [[command_charset_charset]] [command]*`charset`* modifica il set di caratteri per il buffer corrente:: ----------------------------------------- +---- /charset decode|encode <set_caratteri> reset @@ -9,5 +9,5 @@ encode: modifica il set di caratteri per la codifica set_caratteri: nuovo set di caratteri per il buffer corrente reset: resetta il set di caratteri per il buffer corrente ----------------------------------------- +---- diff --git a/doc/it/autogen/user/guile_commands.txt b/doc/it/autogen/user/guile_commands.txt index 0f3a0fb24..f422e993b 100644 --- a/doc/it/autogen/user/guile_commands.txt +++ b/doc/it/autogen/user/guile_commands.txt @@ -1,7 +1,7 @@ [[command_guile_guile]] [command]*`guile`* elenca/carica/scarica script:: ----------------------------------------- +---- /guile list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt index 38554851f..2c095dc06 100644 --- a/doc/it/autogen/user/irc_commands.txt +++ b/doc/it/autogen/user/irc_commands.txt @@ -1,16 +1,16 @@ [[command_irc_admin]] [command]*`admin`* trova informazioni sull'amministratore del server:: ----------------------------------------- +---- /admin [<destinazione>] destinazione: server ----------------------------------------- +---- [[command_irc_allchan]] [command]*`allchan`* esegue un comando su tutti i canali di tutti i server connessi:: ----------------------------------------- +---- /allchan [-current] [-exclude=<canale>[,<canale>...]] <comando> [<argomenti>] -current: execute command for channels of current server only @@ -25,12 +25,12 @@ Examples: /allchan -exclude=#weechat msg * hello say 'hello' everywhere but not on #weechat and channels beginning with #linux: /allchan -exclude=#weechat,#linux* msg * hello ----------------------------------------- +---- [[command_irc_allserv]] [command]*`allserv`* esegue un comando su tutti i server connessi:: ----------------------------------------- +---- /allserv [-exclude=<server>[,<server>...]] <comando> [<argomenti>] -exclude: exclude some servers ('*' is allowed at beginning or end of server name, to exclude many servers) @@ -44,24 +44,24 @@ Examples: /allserv away I'm away do a whois on my nick on all servers: /allserv whois $nick ----------------------------------------- +---- [[command_irc_ban]] [command]*`ban`* banna nick oppure host:: ----------------------------------------- +---- /ban [<canale>] [<nick> [<nick>...]] canale: canale per il ban nick: utente o host su cui effettuare il ban Senza argomento, il comando mostra la lista dei ban per il canale corrente. ----------------------------------------- +---- [[command_irc_connect]] [command]*`connect`* connette ad uno o più server IRC:: ----------------------------------------- +---- /connect <server> [<server>...] [-<opzione>[=<valore>]] [-no<option>] [-nojoin] [-switch] -all|-auto|-open [-nojoin] [-switch] @@ -85,33 +85,33 @@ Esempi: /connect mio.server.org/6697 -ssl -password=test /connect irc://nick@irc.oftc.net/#canale /connect -switch ----------------------------------------- +---- [[command_irc_ctcp]] [command]*`ctcp`* invia un messaggio CTCP (Protocollo Client-A-Client):: ----------------------------------------- +---- /ctcp <destinazione> <tipo> [<argomenti>] destinazione: nick o canale a cui inviare il CTCP tipo: tipo CTCP (esempi: "version", "ping", ..) argomenti: argomenti per il CTCP ----------------------------------------- +---- [[command_irc_cycle]] [command]*`cycle`* esce e rienta in un canale:: ----------------------------------------- +---- /cycle [<canale>[,<canale>...]] [<messaggio>] canale: nome del canale per il ciclo messaggio: messaggio di uscita (mostrato agli altri utenti) ----------------------------------------- +---- [[command_irc_dcc]] [command]*`dcc`* avvia una DCC (trasferimento file o chat diretta):: ----------------------------------------- +---- /dcc chat <nick> send <nick> <file> @@ -123,76 +123,76 @@ Esempi: /dcc chat tizio invia file "/home/foo/bar.txt al nick "tizio": /dcc send tizio /home/foo/bar.txt ----------------------------------------- +---- [[command_irc_dehalfop]] [command]*`dehalfop`* revoca lo stato di half-op del canale da uno o più nick:: ----------------------------------------- +---- /dehalfop <nick> [<nick>...] nick: nick or mask (can start or end with "*" as wildcard) *: remove channel half-operator status from everybody on channel except yourself ----------------------------------------- +---- [[command_irc_deop]] [command]*`deop`* revoca lo stato di operatore del canale da uno o più nick:: ----------------------------------------- +---- /deop <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: remove channel operator status from everybody on channel except yourself ----------------------------------------- +---- [[command_irc_devoice]] [command]*`devoice`* revoca il voice da uno o più nick:: ----------------------------------------- +---- /devoice <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: remove voice from everybody on channel ----------------------------------------- +---- [[command_irc_die]] [command]*`die`* arresta il server:: ----------------------------------------- +---- /die [<destinazione>] destinazione: nome server ----------------------------------------- +---- [[command_irc_disconnect]] [command]*`disconnect`* disconnette da uno o tutti i server IRC:: ----------------------------------------- +---- /disconnect [<server>|-all|-pending [<motivo>]] server: nome del server da cui disconnettersi -all: disconnette da tutti i server -pending: annulla la riconnessione automatica sui server in fase di riconnessione motivo: motivo per la disconnessione ----------------------------------------- +---- [[command_irc_halfop]] [command]*`halfop`* concede lo stato di half-op del canale ad uno o più nick:: ----------------------------------------- +---- /halfop <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: give channel half-operator status to everybody on channel ----------------------------------------- +---- [[command_irc_ignore]] [command]*`ignore`* ignora nick/host dai server o dai canali:: ----------------------------------------- +---- /ignore list add [re:]<nick> [<server> [<canale>]] del <numero>|-all @@ -215,40 +215,40 @@ Esempi: /ignore add tizio@dominio.com freenode ignora l'host "tizio*@*.dominio.com" su freenode/#weechat: /ignore add tizio*@*.dominio.com freenode #weechat ----------------------------------------- +---- [[command_irc_info]] [command]*`info`* ottieni informazioni sul server:: ----------------------------------------- +---- /info [<destinazione>] destinazione: nome server ----------------------------------------- +---- [[command_irc_invite]] [command]*`invite`* invita un nick su un canale:: ----------------------------------------- +---- /invite <nick> [<nick>...] [<canale>] nick: nick da invitare canale: canale su cui invitare ----------------------------------------- +---- [[command_irc_ison]] [command]*`ison`* verifica se un nick è collegato IRC:: ----------------------------------------- +---- /ison <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_join]] [command]*`join`* entra in un canale:: ----------------------------------------- +---- /join [-noswitch] [-server <server>] [<canale1>[,<canale2>...]] [<chiave1>[,<chiave2>...]] -noswitch: non passare al nuovo buffer @@ -261,23 +261,23 @@ Esempi: /join #canaleprotetto,#weechat chiave /join -server freenode #weechat /join -noswitch #weechat ----------------------------------------- +---- [[command_irc_kick]] [command]*`kick`* caccia forzatamente un utente da un canale:: ----------------------------------------- +---- /kick [<canale>] <nick> [<motivo>] channel: channel where user is nick: nick to kick reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ----------------------------------------- +---- [[command_irc_kickban]] [command]*`kickban`* caccia e banna un nick da un canale:: ----------------------------------------- +---- /kickban [<canale>] <nick> [<motivo>] channel: channel where user is @@ -289,32 +289,32 @@ It is possible to kick/ban with a mask, nick will be extracted from mask and rep Example: ban "*!*@host.com" and then kick "toto": /kickban toto!*@host.com ----------------------------------------- +---- [[command_irc_kill]] [command]*`kill`* chiude connessione client-server:: ----------------------------------------- +---- /kill <nick> <motivo> nick: nick per il kill motivo: motivo per il kill ----------------------------------------- +---- [[command_irc_links]] [command]*`links`* elenca tutti i nomi server conosciuti dal server che risponde alla richiesta:: ----------------------------------------- +---- /links [[<server>] <mask_server>] server: questo server dovrebbe rispondere alla richiesta mask_server: elenco dei server che devono corrispondere a questa mask ----------------------------------------- +---- [[command_irc_list]] [command]*`list`* elenca i canali ed i loro argomenti:: ----------------------------------------- +---- /list [<canale>[,<canale>...]] [<server>] [-re <regexp>] canale: canale da elencare @@ -328,37 +328,37 @@ Esempi: /list #weechat.* elenca tutti i canali che iniziano con "#weechat" (può essere molto lento su grandi network): /list -re #weechat.* ----------------------------------------- +---- [[command_irc_lusers]] [command]*`lusers`* ottiene statistiche sulla dimensione del network IRC:: ----------------------------------------- +---- /lusers [<mask> [<destinazione>]] mask: server corrispondenti alla mask destinazione: server per redirigere la richiesta ----------------------------------------- +---- [[command_irc_map]] [command]*`map`* mostra una mappa grafica della rete IRC:: ----------------------------------------- ----------------------------------------- +---- +---- [[command_irc_me]] [command]*`me`* invia un'azione CTCP al canale corrente:: ----------------------------------------- +---- /me <messaggio> messaggio: messaggio da inviare ----------------------------------------- +---- [[command_irc_mode]] [command]*`mode`* cambia modalità canale o utente:: ----------------------------------------- +---- /mode [<canale>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<arguments>] <nick> [+|-]i|s|w|o @@ -390,62 +390,62 @@ Esempi: /mode #weechat +t diventa invisibile sul server: /mode nick +i ----------------------------------------- +---- [[command_irc_motd]] [command]*`motd`* riceve il "Messaggio Del Giorno":: ----------------------------------------- +---- /motd [<destinazione>] destinazione: nome server ----------------------------------------- +---- [[command_irc_msg]] [command]*`msg`* invia un messaggio ad un nick o a un canale:: ----------------------------------------- +---- /msg [-server <server>] <destinazione>[,<destinazione>...] <testo> server: invia a questo server (nome interno) destinazione: nick o canale (può essere una mask, '*' = canale corrente) testo: testo da inviare ----------------------------------------- +---- [[command_irc_names]] [command]*`names`* elenca i nick sul canale:: ----------------------------------------- +---- /names [<canale>[,<canale>...]] canale: nome canale ----------------------------------------- +---- [[command_irc_nick]] [command]*`nick`* cambia il nick corrente:: ----------------------------------------- +---- /nick [-all] <nick> -all: imposta nuovo nick per tutti i server connessi nick: nuovo nick ----------------------------------------- +---- [[command_irc_notice]] [command]*`notice`* invia messaggio di notifica all'utente:: ----------------------------------------- +---- /notice [-server <server>] <destinazione> <testo> server: invia a questo server (nome interno) destinazione: nick o canale testo: testo da inviare ----------------------------------------- +---- [[command_irc_notify]] [command]*`notify`* aggiunge una notifica per lo stato di presenza o assenza dei nick sui server:: ----------------------------------------- +---- /notify add <nick> [<server> [-away]] del <nick>|-all [<server>] @@ -465,96 +465,96 @@ Esempi: /notify add toto freenode notifica quando "tizio" è assente o presente sul server freenode: /notify add toto freenode -away ----------------------------------------- +---- [[command_irc_op]] [command]*`op`* concede lo stato di operatore del canale ad uno o più nick:: ----------------------------------------- +---- /op <nick> [<nick>...] * -yes nick: nick or mask (can start or end with "*" as wildcard) *: give channel operator status to everybody on channel ----------------------------------------- +---- [[command_irc_oper]] [command]*`oper`* ottiene i privilegi di operatore:: ----------------------------------------- +---- /oper <utente> <password> user: utente password: password ----------------------------------------- +---- [[command_irc_part]] [command]*`part`* esce da un canale:: ----------------------------------------- +---- /part [<canale>[,<canale>...]] [<messaggio>] canale: nome del canale da lasciare messaggio: messaggio di uscita (mostrato agli altri utenti) ----------------------------------------- +---- [[command_irc_ping]] [command]*`ping`* invia un ping al server:: ----------------------------------------- +---- /ping <server1> [<server2>] server1: server su cui effettuare il ping server2: reindirizza il ping a questo server ----------------------------------------- +---- [[command_irc_pong]] [command]*`pong`* risponde ad un messaggio ping:: ----------------------------------------- +---- /pong <demone> [<demone2>] demone: demone che ha risposto al messaggio di Ping demone2: reindirizza messaggio a questo demone ----------------------------------------- +---- [[command_irc_query]] [command]*`query`* invia un messaggio privato ad un nick:: ----------------------------------------- +---- /query [-server <server>] <nick>[,<nick>...] [<testo>] server: invia a questo server (nome interno) nick: nick per la conversazione privata testo: testo da inviare ----------------------------------------- +---- [[command_irc_quiet]] [command]*`quiet`* fa tacere nick o host:: ----------------------------------------- +---- /quiet [<canale>] [<nick> [<nick>...]] canale: canale da mettere a tacere nick: utente o host da mettere a tacere Senza argomento, il comando mostra la lista dei ban per il canale corrente. ----------------------------------------- +---- [[command_irc_quote]] [command]*`quote`* invia dati grezzi al server senza analisi:: ----------------------------------------- +---- /quote [-server <server>] <dati> server: invia a questo server (nome interno) dati: dati raw da inviare ----------------------------------------- +---- [[command_irc_reconnect]] [command]*`reconnect`* riconnette a uno o più server:: ----------------------------------------- +---- /reconnect <server> [<server>...] [-nojoin] [-switch] -all [-nojoin] [-switch] @@ -562,80 +562,80 @@ server: invia a questo server (nome interno) -all: riconnetti a tutti i server -nojoin: non entrare in nessun canale (anche se l'ingresso automatico è abilitato sul server) -switch: passa al server successivo ----------------------------------------- +---- [[command_irc_rehash]] [command]*`rehash`* chiede al server di ricaricare il proprio file di configurazione:: ----------------------------------------- +---- /rehash [<opzione>] opzione: opzione extra, per alcuni server ----------------------------------------- +---- [[command_irc_restart]] [command]*`restart`* chiede al server di riavviarsi:: ----------------------------------------- +---- /restart [<destinazione>] destinazione: nome server ----------------------------------------- +---- [[command_irc_sajoin]] [command]*`sajoin`* forza un utente ad entrare su uno o più canali:: ----------------------------------------- +---- /sajoin <nick> <canale>[,<canale>...] nick: nick canale: nome del canale ----------------------------------------- +---- [[command_irc_samode]] [command]*`samode`* cambia modalità sul canale, senza avere lo status di operatore:: ----------------------------------------- +---- /samode <canale> <modalità> canale: nome del canale modalità: modalità per il canale ----------------------------------------- +---- [[command_irc_sanick]] [command]*`sanick`* forza un utente ad usare un altro nick:: ----------------------------------------- +---- /sanick <nick> <nuovo_nick> nick: nick nuovo_nick: nuovo nick ----------------------------------------- +---- [[command_irc_sapart]] [command]*`sapart`* forza un utente a lasciare uno o più canali:: ----------------------------------------- +---- /sapart <nick> <canale>[,<canale>...] nick: nick canale: nome del canale ----------------------------------------- +---- [[command_irc_saquit]] [command]*`saquit`* forza un utente ad abbandonare il server con un motivo:: ----------------------------------------- +---- /saquit <nick> <motivo> nick: nick motivo: motivo ----------------------------------------- +---- [[command_irc_server]] [command]*`server`* elenca, aggiunge o rimuove server IRC:: ----------------------------------------- +---- /server list|listfull [<server>] add <server> <host>[/<porta>] [-temp] [-<opzione>[=<valore>]] [-no<option>] copy|rename <server> <nuovo_nome> @@ -668,179 +668,179 @@ Esempi: /server rename oftc newoftc /server del freenode /server deloutq ----------------------------------------- +---- [[command_irc_service]] [command]*`service`* registra un nuovo servizio:: ----------------------------------------- +---- /service <nick> <riservato> <distribuzione> <tipo> <riservato> <info> distrubuzione: visibilità del servizio tipo: riservato per un uso futuro ----------------------------------------- +---- [[command_irc_servlist]] [command]*`servlist`* elenca servizi attualmente connessi al network:: ----------------------------------------- +---- /servlist [<mask> [<tipo>]] mask: elenca solo i servizi che corrispondono a questa mask tipo: elenca solo i servizi di questo tipo ----------------------------------------- +---- [[command_irc_squery]] [command]*`squery`* invia un messaggio ad un servizio:: ----------------------------------------- +---- /squery <servizio> <testo> servizio: nome del servizio testo: testo da inviare ----------------------------------------- +---- [[command_irc_squit]] [command]*`squit`* disconnette collegamenti al server:: ----------------------------------------- +---- /squit <server> <commento> server: nome server commento: commento per l'uscita ----------------------------------------- +---- [[command_irc_stats]] [command]*`stats`* richiede statistiche sul server:: ----------------------------------------- +---- /stats [<query> [<server>]] query: c/h/i/k/l/m/o/y/u (per info RFC1459) server: nome server ----------------------------------------- +---- [[command_irc_summon]] [command]*`summon`* invia agli utenti connessi ad un host con un server IRC in esecuzione un messaggio per invitarli ad entrare su IRC:: ----------------------------------------- +---- /summon <utente> [<destinazione> [<canale>]] utente: nome utente destinazione: nome server canale: nome canale ----------------------------------------- +---- [[command_irc_time]] [command]*`time`* richiede l'ora locale dal server:: ----------------------------------------- +---- /time [<destinazione>] destinazione: richiede l'ora dal server specificato ----------------------------------------- +---- [[command_irc_topic]] [command]*`topic`* legge/modifica argomento del canale:: ----------------------------------------- +---- /topic <[canale>] [<argomento>|delete] canale: nome canale argomento: nuovo argomento per il canale -delete: elimina argomento del canale ----------------------------------------- +---- [[command_irc_trace]] [command]*`trace`* trova il path del server specifico:: ----------------------------------------- +---- /trace [<destinazione>] destinazione: server ----------------------------------------- +---- [[command_irc_unban]] [command]*`unban`* rimuove il ban da nick o host:: ----------------------------------------- +---- /unban [<canale>] <nick> [<nick>...] canale: canale da cui rimuovere il ban nick: utente o host a cui rimuovere il ban ----------------------------------------- +---- [[command_irc_userhost]] [command]*`userhost`* restituisce un elenco di informazioni sui nick:: ----------------------------------------- +---- /userhost <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_users]] [command]*`users`* lista di utenti autenticati sul server:: ----------------------------------------- +---- /users [<destinazione>] destinazione: server ----------------------------------------- +---- [[command_irc_version]] [command]*`version`* riceve informazioni di versione del nick o del server (corrente o specificato):: ----------------------------------------- +---- /version [<server>|<nick>] server: nome server nick: nick ----------------------------------------- +---- [[command_irc_voice]] [command]*`voice`* concede il voice ad uno o più utenti:: ----------------------------------------- +---- /voice <nick> [<nick>...] nick: nick o mask (può iniziare o terminare con "*" come carattere jolly) *: concede il voice a tutti sul canale ----------------------------------------- +---- [[command_irc_wallchops]] [command]*`wallchops`* invia una notifica agli operatori del canale:: ----------------------------------------- +---- /wallchops [<canale>] <testo> canale: nome del canale testo: testo da inviare ----------------------------------------- +---- [[command_irc_wallops]] [command]*`wallops`* invia un messaggio a tutti gli utenti attualmente connessi che hanno impostato la modalità 'w':: ----------------------------------------- +---- /wallops <testo> testo: testo da inviare ----------------------------------------- +---- [[command_irc_who]] [command]*`who`* genera una richiesta per ottenere una lista di informazioni:: ----------------------------------------- +---- /who [<mask> [o]] mask: solo l'informazione corrispondente al mask o: vengono restituiti solo gli operatori in base alla mask fornita ----------------------------------------- +---- [[command_irc_whois]] [command]*`whois`* richiedi informazioni su uno o più utenti:: ----------------------------------------- +---- /whois [<server>] [<nick>[,<nick>...]] server: server name @@ -849,16 +849,16 @@ server: server name Without argument, this command will do a whois on: - your own nick if buffer is a server/channel - remote nick if buffer is a private. ----------------------------------------- +---- [[command_irc_whowas]] [command]*`whowas`* richiede informazioni su un nick non più esistente:: ----------------------------------------- +---- /whowas <nick>[,<nick>...] [<count> [<destinazione>]] nick: nick da cercare count: numero di risultati da visualizzare (ricerca completa se il numero è negativo) destinazione: la risposta dovrebbe coincidere con la mask ----------------------------------------- +---- diff --git a/doc/it/autogen/user/logger_commands.txt b/doc/it/autogen/user/logger_commands.txt index ee274f7b7..7498677fe 100644 --- a/doc/it/autogen/user/logger_commands.txt +++ b/doc/it/autogen/user/logger_commands.txt @@ -1,7 +1,7 @@ [[command_logger_logger]] [command]*`logger`* configurazione del plugin logger:: ----------------------------------------- +---- /logger list set <livello> flush @@ -33,5 +33,5 @@ Esempi: /set logger.level.core.weechat 0 usa una directory per il server IRC e un file per ogni canale al suo interno: /set logger.mask.irc "$server/$channel.weechatlog" ----------------------------------------- +---- diff --git a/doc/it/autogen/user/lua_commands.txt b/doc/it/autogen/user/lua_commands.txt index ae7f17ade..54ef6fffb 100644 --- a/doc/it/autogen/user/lua_commands.txt +++ b/doc/it/autogen/user/lua_commands.txt @@ -1,7 +1,7 @@ [[command_lua_lua]] [command]*`lua`* elenca/carica/scarica script:: ----------------------------------------- +---- /lua list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/perl_commands.txt b/doc/it/autogen/user/perl_commands.txt index b2af6d8a0..ebc77a332 100644 --- a/doc/it/autogen/user/perl_commands.txt +++ b/doc/it/autogen/user/perl_commands.txt @@ -1,7 +1,7 @@ [[command_perl_perl]] [command]*`perl`* elenca/carica/scarica script:: ----------------------------------------- +---- /perl list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/python_commands.txt b/doc/it/autogen/user/python_commands.txt index 263650f1c..bf1f39223 100644 --- a/doc/it/autogen/user/python_commands.txt +++ b/doc/it/autogen/user/python_commands.txt @@ -1,7 +1,7 @@ [[command_python_python]] [command]*`python`* elenca/carica/scarica script:: ----------------------------------------- +---- /python list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/relay_commands.txt b/doc/it/autogen/user/relay_commands.txt index ce9b42011..76179fb76 100644 --- a/doc/it/autogen/user/relay_commands.txt +++ b/doc/it/autogen/user/relay_commands.txt @@ -1,7 +1,7 @@ [[command_relay_relay]] [command]*`relay`* controllo relay:: ----------------------------------------- +---- /relay list|listfull|listrelay add [ipv4.][ipv6.][ssl.]<protocollo.nome> <porta> del [ipv4.][ipv6.][ssl.]<protocollo.nome> @@ -42,5 +42,5 @@ Esempi: /relay add ipv6.ssl.weechat 9001 protocollo weechat con SSL, usando IPv4 + IPv6: /relay add ipv4.ipv6.ssl.weechat 9001 ----------------------------------------- +---- diff --git a/doc/it/autogen/user/rmodifier_commands.txt b/doc/it/autogen/user/rmodifier_commands.txt index a0d9fcc99..7eadd5298 100644 --- a/doc/it/autogen/user/rmodifier_commands.txt +++ b/doc/it/autogen/user/rmodifier_commands.txt @@ -1,7 +1,7 @@ [[command_rmodifier_rmodifier]] [command]*`rmodifier`* sostituisce le stringhe del modificatore con le espressioni regolari:: ----------------------------------------- +---- /rmodifier list|listdefault add <name> <modifiers> <groups> <regex> del <name>|-all [<name>...] @@ -27,5 +27,5 @@ Examples: /rmodifier del password delete all rmodifiers: /rmodifier del -all ----------------------------------------- +---- diff --git a/doc/it/autogen/user/ruby_commands.txt b/doc/it/autogen/user/ruby_commands.txt index 779d74504..8159a2d88 100644 --- a/doc/it/autogen/user/ruby_commands.txt +++ b/doc/it/autogen/user/ruby_commands.txt @@ -1,7 +1,7 @@ [[command_ruby_ruby]] [command]*`ruby`* elenca/carica/scarica script:: ----------------------------------------- +---- /ruby list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/script_commands.txt b/doc/it/autogen/user/script_commands.txt index 3da4c0360..efe194960 100644 --- a/doc/it/autogen/user/script_commands.txt +++ b/doc/it/autogen/user/script_commands.txt @@ -1,7 +1,7 @@ [[command_script_script]] [command]*`script`* Gestore script di WeeChat:: ----------------------------------------- +---- /script list [-o|-i] search <text> show <script> @@ -73,5 +73,5 @@ Examples: /script hold urlserver.py /script reload urlserver /script upgrade ----------------------------------------- +---- diff --git a/doc/it/autogen/user/tcl_commands.txt b/doc/it/autogen/user/tcl_commands.txt index 6601575ce..f9e5560e3 100644 --- a/doc/it/autogen/user/tcl_commands.txt +++ b/doc/it/autogen/user/tcl_commands.txt @@ -1,7 +1,7 @@ [[command_tcl_tcl]] [command]*`tcl`* elenca/carica/scarica script:: ----------------------------------------- +---- /tcl list|listfull [<nome>] load [-q] <nomefile> autoload @@ -18,5 +18,5 @@ nome_file: (file) script da caricare -q: modalità silenziosa: non mostra messaggi Senza argomento, questo comando elenca tutti i plugin caricati. ----------------------------------------- +---- diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 53ae211ea..2ab3fb70a 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -1,17 +1,17 @@ [[command_weechat_away]] [command]*`away`* imposta o elimina lo stato di assenza:: ----------------------------------------- +---- /away [-all] [<messaggio>] -all: imposta o elimina lo stato di assenza su tutti i server connessi messaggio: messaggio di assenza (se non specificato, lo stato di assenza viene rimosso) ----------------------------------------- +---- [[command_weechat_bar]] [command]*`bar`* gestione delle barre:: ----------------------------------------- +---- /bar list|listfull|listitems add <nome> <type>[,<condizione>] <posizione> <dimensione> <separatore> <item1>[,<item2>...] default [input|title|status|nicklist] @@ -58,12 +58,12 @@ Examples: /bar scroll nicklist * y+10 scroll to end of nicklist on current buffer: /bar scroll nicklist * ye ----------------------------------------- +---- [[command_weechat_buffer]] [command]*`buffer`* gestione dei buffer:: ----------------------------------------- +---- /buffer list clear [<numero>|<nome>|-merged|-all] move|merge <numero> @@ -120,12 +120,12 @@ Esempi: /buffer #weechat passa al buffer successivo: /buffer +1 ----------------------------------------- +---- [[command_weechat_color]] [command]*`color`* definisce gli alias dei colori e visualizza la tavolozza dei colori:: ----------------------------------------- +---- /color alias <colore> <nome> unalias <colore> reset @@ -145,22 +145,22 @@ Esempi: /color alias 214 arancione elimina il colore 214: /color unalias 214 ----------------------------------------- +---- [[command_weechat_command]] [command]*`command`* esegui comando o plugin di WeeChat esplicito:: ----------------------------------------- +---- /command <plugin> <comando> plugin: nome plugin ('weechat' per il comando interno di WeeChat) comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trovata all'inizio del comando) ----------------------------------------- +---- [[command_weechat_cursor]] [command]*`cursor`* movimento libero del cursore sullo schermo per eseguire azioni su aree specifiche dello schermo:: ----------------------------------------- +---- /cursor go chat|<barra>|<x>,<y> move up|down|left|right|area_up|area_down|area_left|area_right stop @@ -178,12 +178,12 @@ Esempi: /cursor go nicklist vai alle coordinate x=10, y=5: /cursor go 10,5 ----------------------------------------- +---- [[command_weechat_debug]] [command]*`debug`* attiva debug per core/plugin:: ----------------------------------------- +---- /debug list set <plugin> <livello> dump [<plugin>] @@ -208,12 +208,12 @@ infolists: mostra informazioni sulle liste info tags: mostra tag per le righe term: mostra informazioni sul terminale windows: mostra l'albero delle finestre ----------------------------------------- +---- [[command_weechat_eval]] [command]*`eval`* analizza l'espressione e invia il risultato al buffer:: ----------------------------------------- +---- /eval [-n] <espressione> [-n] -c <espressione1> <operatore> <espressione2> @@ -266,12 +266,12 @@ Examples: /eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd !~ abc ==> 0 ----------------------------------------- +---- [[command_weechat_filter]] [command]*`filter`* filtra messaggi nei buffer, per nascondere/mostrare in base a tag o regexp:: ----------------------------------------- +---- /filter list enable|disable|toggle [<nome>] add <nome> <buffer>[,<buffer>...] <tag> <regex>] @@ -320,12 +320,12 @@ Examples: /filter add toto irc.freenode.#weechat nick_toto * filter lines containing "weechat sucks" on IRC channel #weechat: /filter add sucks irc.freenode.#weechat * weechat sucks ----------------------------------------- +---- [[command_weechat_help]] [command]*`help`* visualizza l'aiuto su comandi e opzioni:: ----------------------------------------- +---- /help -list|-listfull [<plugin> [<plugin>...]] <comando> <opzione> @@ -335,23 +335,23 @@ Examples: plugin: elenca i comandi per questo plugin comando: nome di un comando opzione: nome di un'opzione (usare /set per consultare la lista) ----------------------------------------- +---- [[command_weechat_history]] [command]*`history`* mostra la cronologia dei comandi del buffer:: ----------------------------------------- +---- /history <clear valore> clear: pulisci cronologia valore: numero delle voci nella cronologia da mostrare ----------------------------------------- +---- [[command_weechat_input]] [command]*`input`* funzioni per la riga di comando:: ----------------------------------------- +---- /input <azioni> [<argomenti>] list of actions: @@ -406,12 +406,12 @@ list of actions: paste_stop: stop paste (bracketed paste mode) This command is used by key bindings or plugins. ----------------------------------------- +---- [[command_weechat_key]] [command]*`key`* associa/disassocia tasti:: ----------------------------------------- +---- /key list|listdefault|listdiff [<contesto>] bind <tasto> [<comando> [<arg>]] bindctxt <contesto> <tasto> [<comando> <arg>]] @@ -461,12 +461,12 @@ Esempi: /key bindctxt search ctrl-I /input search_stop il tasto centrale del mouse su un nick per ottenere le informazioni: /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick} ----------------------------------------- +---- [[command_weechat_layout]] [command]*`layout`* salva/applica/ripristina il layout per i buffer e le finestre:: ----------------------------------------- +---- /layout save [<nome>] [buffers|windows] apply [<name>] [buffers|windows] leave @@ -484,12 +484,12 @@ buffers: salva/applica modifiche solo ai buffer (ordine dei buffer) windows: salva/applica modifiche solo alle finestre (buffer visualizzato da ogni finestra) Senza argomenti, il comando mostra i layout salvati. ----------------------------------------- +---- [[command_weechat_mouse]] [command]*`mouse`* controllo mouse:: ----------------------------------------- +---- /mouse enable|disable|toggle [<ritardo>] enable: abilita mouse @@ -504,12 +504,12 @@ Esempi: /mouse enable abilita/disabilita mouse per 5 secondi: /mouse toggle 5 ----------------------------------------- +---- [[command_weechat_mute]] [command]*`mute`* esegue un comando in silenzio:: ----------------------------------------- +---- /mute [-current | -buffer <nome> | -all] comando -current: nessun output sul buffer corrente @@ -527,12 +527,12 @@ Esempi: /mute -current msg * ciao! messaggio sul canale #weechat: /mute -buffer irc.freenode.#weechat msg #weechat ciao! ----------------------------------------- +---- [[command_weechat_plugin]] [command]*`plugin`* elenca/carica/scarica plugin:: ----------------------------------------- +---- /plugin list|listfull [<nome>] load <nome_file> [<argomenti>] autoload [<argomenti>] @@ -550,12 +550,12 @@ Esempi: argomenti: argomenti passati al plugin durante il caricamento Senza argomento, questo comando elenca i plugin caricati. ----------------------------------------- +---- [[command_weechat_proxy]] [command]*`proxy`* gestione dei proxy:: ----------------------------------------- +---- /proxy list add <nome> <tipo> <indirizzo> <porta> [<nomeutente> [<password>]] del <nome>|-all @@ -584,34 +584,34 @@ Esempi: /proxy add myproxy socks5 sample.host.org 3128 myuser mypass elimina un proxy: /proxy del mioproxy ----------------------------------------- +---- [[command_weechat_quit]] [command]*`quit`* esce da WeeChat:: ----------------------------------------- +---- /quit [-yes] [<argomenti>] -yes: richiesto se l'opzione option weechat.look.confirm_quit è abilitata argomenti: testo inviato con il segnale "quit" (ad esempio il plugin irc usa questo testo per inviare il messaggio di uscita al server) ----------------------------------------- +---- [[command_weechat_reload]] [command]*`reload`* ricarica i file di configurazione da disco:: ----------------------------------------- +---- /reload [<file> [<file....>]] file: file di configurazione da ricaricare (senza estensione ".conf") Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin). ----------------------------------------- +---- [[command_weechat_repeat]] [command]*`repeat`* esegue un comando più volte:: ----------------------------------------- +---- /repeat [-interval <ritardo>] <numero> <comando> ritardo: ritardo tra l'esecuzione dei comandi (in millisecondi) @@ -623,23 +623,23 @@ Tutti i comandi sono eseguiti sul buffer su cui viene dato il comando. Esempio: scorre due pagine in alto: /repeat 2 /window page_up ----------------------------------------- +---- [[command_weechat_save]] [command]*`save`* salva i file di configurazione su disco:: ----------------------------------------- +---- /save [<file> [<file....>]] file: file di configurazione da salvare (senza estensione ".conf") Senza argomento, vengono salvati tutti i file (WeeChat e plugin). ----------------------------------------- +---- [[command_weechat_secure]] [command]*`secure`* gestione dei dati sensibili (password o file privati cifrati nel file sec.conf):: ----------------------------------------- +---- /secure passphrase <chiave di cifratura>|-delete decrypt <chiave di cifratura|-discard set <nome> <valore> @@ -676,12 +676,12 @@ Esempi: /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}" alias per il "ghost" del nick "mionick": /alias ghost /eval /msg -server freenode nickserv ghost mionick ${sec.data.freenode} ----------------------------------------- +---- [[command_weechat_set]] [command]*`set`* imposta le opzioni di configurazione:: ----------------------------------------- +---- /set [<opzione> [<valore>]] diff [<opzione> [<opzione>...]] @@ -706,12 +706,12 @@ Esempi: /set diff mostra le opzioni modificate nel plugin irc: /set diff irc.* ----------------------------------------- +---- [[command_weechat_unset]] [command]*`unset`* annulla/ripristina opzione:: ----------------------------------------- +---- /unset <opzione> opzione: nome di un'opzione (può iniziare o terminare con "*" per il ripristino di più opzioni, attenzione!) @@ -723,12 +723,12 @@ Esempi: /unset weechat.look.item_time_format ripristina tutte le opzioni del colore: /unset weechat.color.* ----------------------------------------- +---- [[command_weechat_upgrade]] [command]*`upgrade`* aggiorna WeeChat senza disconnettere dai server:: ----------------------------------------- +---- /upgrade [<path_del_binario>|-quit] path_to_binary: path to WeeChat binary (default is current binary) @@ -754,32 +754,32 @@ With option "-quit", the process is slightly different: Then later you can restore session with command: weechat --upgrade IMPORTANT: you must restore the session with exactly same configuration (files *.conf). It is possible to restore WeeChat session on another machine if you copy the content of directory "~/.weechat". ----------------------------------------- +---- [[command_weechat_uptime]] [command]*`uptime`* mostra l'uptime di WeeChat:: ----------------------------------------- +---- /uptime [-o | -ol] -o: invia l'uptime al buffer corrente come input (stringa in inglese) -ol: invia l'uptime al buffer corrente come input (stringa tradotta) ----------------------------------------- +---- [[command_weechat_version]] [command]*`version`* mostra la versione e la data di compilazione di WeeChat:: ----------------------------------------- +---- /version [-o | -ol] -o: invia la versione al buffer corrente come input (stringa inglese) -ol: invia la versione al buffer corrente come input (stringa tradotta) ----------------------------------------- +---- [[command_weechat_wait]] [command]*`wait`* pianifica l'esecuzione di un comando:: ----------------------------------------- +---- /wait <numero>[<unità>] <comando> numero: tempo di attesa (numero intero) @@ -799,12 +799,12 @@ Esempi: /wait 15m /away -all Sono assente scrive 'ciao' tra 2 minuti: /wait 2m ciao ----------------------------------------- +---- [[command_weechat_window]] [command]*`window`* gestione delle finestre:: ----------------------------------------- +---- /window list -1|+1|b#|up|down|left|right [-window <number>] <number> @@ -863,5 +863,5 @@ Examples: /window scroll -d zoom on window #2: /window zoom -window 2 ----------------------------------------- +---- diff --git a/doc/it/autogen/user/xfer_commands.txt b/doc/it/autogen/user/xfer_commands.txt index 9bfada3ab..71d5da654 100644 --- a/doc/it/autogen/user/xfer_commands.txt +++ b/doc/it/autogen/user/xfer_commands.txt @@ -1,21 +1,21 @@ [[command_xfer_me]] [command]*`me`* invia un'azione CTCP all'host remoto:: ----------------------------------------- +---- /me <messaggio> messaggio: messaggio da inviare ----------------------------------------- +---- [[command_xfer_xfer]] [command]*`xfer`* controllo xfer:: ----------------------------------------- +---- /xfer [list|listfull] list: lista xfer listfull: lista xfer (dettagliata) Senza argomenti, il comando apre il buffer con la lista xfer. ----------------------------------------- +---- diff --git a/doc/it/weechat.1.it.txt b/doc/it/weechat.1.it.txt index dd41c7260..7bac3d734 100644 --- a/doc/it/weechat.1.it.txt +++ b/doc/it/weechat.1.it.txt @@ -1,15 +1,12 @@ // TRANSLATION MISSING (WHOLE FILE) -WEECHAT(1) -========== += WEECHAT(1) :doctype: manpage -NAME ----- +== NAME weechat - the extensible chat client -SYNOPSIS --------- +== SYNOPSIS [verse] 'weechat' [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...] @@ -19,21 +16,18 @@ SYNOPSIS 'weechat' [-l|--license] 'weechat' [-v|--version] -DESCRIPTION ------------ +== DESCRIPTION WeeChat is a fast, light and extensible chat client. It is modular (lightweight core with plugins), multi-protocols (IRC and Jabber), extensible with C and scripts written in several languages. -OPTIONS -------- +== OPTIONS include::cmdline_options.it.txt[] -PLUGIN OPTIONS --------------- +== PLUGIN OPTIONS For complete doc on plugin options, please look at plugins documentation in http://weechat.org/doc[WeeChat user's guide]. @@ -51,8 +45,7 @@ example: irc://mynick@[2001:db8:0:85a3::ac1f:8001]:6668/#test -FILES ------ +== FILES $HOME/.weechat/weechat.conf:: main WeeChat configuration file @@ -90,8 +83,7 @@ $HOME/.weechat/xfer.conf:: $HOME/.weechat/weechat.log:: WeeChat log file -AUTHORS -------- +== AUTHORS WeeChat is written by Sébastien Helleu and contributors (complete list is in the AUTHORS file). @@ -107,8 +99,7 @@ Please read the COPYING file for more information. Web: <http://weechat.org/> -REPORTING BUGS --------------- +== REPORTING BUGS Please report bugs or feature requests at Savannah website: diff --git a/doc/it/weechat_faq.it.txt b/doc/it/weechat_faq.it.txt index 7f59494d5..102747451 100644 --- a/doc/it/weechat_faq.it.txt +++ b/doc/it/weechat_faq.it.txt @@ -1,5 +1,4 @@ -FAQ di WeeChat (Domande Frequenti) -================================== += FAQ di WeeChat (Domande Frequenti) Sébastien Helleu <flashcode@flashtux.org> @@ -9,12 +8,10 @@ essere usato preferibilmente con l'ultima versione stabile di WeeChat. [[general]] -Generale --------- +== Generale [[weechat_name]] -Da dove viene il nome "WeeChat"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Da dove viene il nome "WeeChat"? "Wee" è un acronimo ricorsivo che sta per "Wee Enhanced Environment". Quindi il nome completo è "Wee Enhanced Envoronment for Chat." @@ -23,8 +20,7 @@ Quindi il nome completo è "Wee Enhanced Envoronment for Chat." non c'entra con WeeChat!). [[why_choose_weechat]] -Perché scegliere WeeChat? X-Chat ed Irssi vanno così bene... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Perché scegliere WeeChat? X-Chat ed Irssi vanno così bene... // TRANSLATION MISSING Because WeeChat is very light and brings innovating features. @@ -32,12 +28,10 @@ Because WeeChat is very light and brings innovating features. Maggiori informazioni su http://weechat.org/about/features [[compilation_install]] -Compilazione / installazione ----------------------------- +== Compilazione / installazione [[gui]] -Ho sentito parlare di molte interfacce per WeeChat. Come si possono compilare/utilizzare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ho sentito parlare di molte interfacce per WeeChat. Come si possono compilare/utilizzare? // TRANSLATION MISSING Some remote GUIs are available: @@ -48,8 +42,7 @@ Some remote GUIs are available: * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -Non è possibile compilare WeeChat dopo aver clonato il repository git, perché? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Non è possibile compilare WeeChat dopo aver clonato il repository git, perché? Il metodo raccomandato per compilare WeeChat è utilizzando cmake. @@ -63,8 +56,7 @@ esattamente alla base git ed è meno conveniente rispetto al clone di git per l'installazione degli aggiornamenti. [[lost]] -Ho avviato WeeChat, ma mi sono perso, cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ho avviato WeeChat, ma mi sono perso, cosa posso fare? Per l'aiuto digitare `/help`. Per l'aiuto su un comando, digitare `/help comando`. Tasti e comandi sono elencati nella documentazione. @@ -73,12 +65,10 @@ Si raccomanda ai nuovi utenti di leggere la guida rapida (consultare la pagina della documentazione sul sito). [[display]] -Visualizzare ------------- +== Visualizzare [[charset]] -Non riesco a vedere alcuni caratteri con gli accenti, cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Non riesco a vedere alcuni caratteri con gli accenti, cosa posso fare? È un problema noto, per favore leggere con attenzione e verificare *OGNI* soluzione tra quelle elencate: @@ -109,8 +99,7 @@ locale, per favore verificare che *tutte* le impostazioni (terminale, screen) siano ISO e *non* UTF-8. [[bars_background]] -Barre come quella del titolo e di stato non sono complete, il colore di sfondo si ferma dopo il testo, perché? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Barre come quella del titolo e di stato non sono complete, il colore di sfondo si ferma dopo il testo, perché? Potrebbe essere causato da un valore errato della variabile TERM nella propria shell (consultare l'output di `echo $TERM` nel terminale). @@ -125,8 +114,7 @@ A seconda di dove viene eseguito WeeChat, si dovrebbe avere: Se necessario, correggere la variabile TERM: `export TERM="xxx"`. [[screen_weird_chars]] -Quando uso weechat con screen/tmux, appaiono dei caratteri strani, come posso risolvere il problema? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quando uso weechat con screen/tmux, appaiono dei caratteri strani, come posso risolvere il problema? Potrebbe essere causato da un valore errato della variabile TERM nella propria shell (consultare l'output di `echo $TERM` nel terminale *al di fuori di @@ -138,8 +126,7 @@ Per esempio, 'xterm-color' potrebbe visualizzare questo tipo di caratteri strani Se necessario, correggere la variabile TERM: `export TERM="xxx"`. [[osx_display_broken]] -Ho compilato WeeChat su OS X, e vedo "(null)" dovunque sullo schermo, cosa non va? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ho compilato WeeChat su OS X, e vedo "(null)" dovunque sullo schermo, cosa non va? Se ncursesw è stato compilato manualmente, utilizzare ncurses standard (incluse col sistema). @@ -148,8 +135,7 @@ Inoltre, su OS X, si raccomanda di installare WeeChat con il gestore pacchetti Homebrew. [[buffer_vs_window]] -Ho sentito parlare di "buffer" e "finestre", qual è la differenza? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ho sentito parlare di "buffer" e "finestre", qual è la differenza? Un 'buffer' è composto da un numero, un nome, delle righe visualizzate (e qualche altro dato). @@ -161,43 +147,40 @@ Ogni finestra visualizza un buffer. Un buffer può essere nascosto (non visualiz da una finestra) o visualizzato da una o più finestre. [[buffers_list]] -Come si può visualizzare la lista dei buffer sulla sinistra? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come si può visualizzare la lista dei buffer sulla sinistra? Utilizzando lo script 'buffers.pl'. Per limitare la dimensione della barra: ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- Per spostare la barra in basso: ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -Come si può ridurre la lunghezza dei nick o rimuovere l'allineamento nella finestra di chat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come si può ridurre la lunghezza dei nick o rimuovere l'allineamento nella finestra di chat? Per ridurre la lunghezza massima dei nick nell'area di chat: ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- To remove nick alignment: Per rimuovere l'allineamento dei nick: ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -Come posso usare la riga di comando con più di una riga? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso usare la riga di comando con più di una riga? L'opzione 'size' nella barra di input può essere impostata a un valore maggiore di uno (il valore predefinito per la dimensione fissa è 1) oppure 0 per la @@ -206,41 +189,39 @@ dimensione dinamica, e poi l'opzione 'size_max' imposta la dimensione massima (0 Esempio con la dimensione dinamica: ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- Dimensione massima a 2: ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -È possibile mostrare solo una barra di input per tutte le finestre (dopo lo split)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== È possibile mostrare solo una barra di input per tutte le finestre (dopo lo split)? Sì, bisogna creare una barra con il tipo "root" (con un elemento per sapere in quale finestra ci si trova), poi eliminare la barra di input corrente. Ad esempio: ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- Se non si è soddisfatti del risultato, basta eliminare la nuova barra, WeeChat creerà automaticamente la barra predefinita "input" se l'elemento "input_text" non viene usato da un'altra barra: ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -Come posso copiare/incollare testo senza incollare la lista nick? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso copiare/incollare testo senza incollare la lista nick? È possibile usare un terminale con la selezione rettangolare (come rxvt-unicode, konsole, gnome-terminal, ...). La combinazione tasti in @@ -248,32 +229,31 @@ generale è @k(C-)@k(A-) selezione mouse. Un'altra soluzione è spostare la lista nick in alto o in basso, per esempio: ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -Come posso cliccare su URL lunghi (più di una riga)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso cliccare su URL lunghi (più di una riga)? Con le impostazioni predefinite, WeeChat mostra l'ora ed il prefisso per ogni riga e le barre opzionali intorno all'area di chat. Per facilitare il clic delle url, è possibile spostare la lista nick in alto e rimuovere l'allineamento sul nick: ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- Con WeeChat ≥ 0.3.6, si può abilitare l'opzione "eat_newline_glitch", in modo che non venga aggiunto il carattere di nuova riga all'inizio di ogni riga visualizzata (non interferisce con la selezione delle url): ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] Questa opzione può causare bug di visualizzazione. Se si dovessero verificare @@ -282,23 +262,21 @@ tali problemi, è necessario disabilitare questa opzione. Una soluzione alternativa è usare uno script: http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -Voglio cambiare la lingua utilizzata da WeeChat per i messaggi, ma senza uscire da WeeChat, è possibile? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Voglio cambiare la lingua utilizzata da WeeChat per i messaggi, ma senza uscire da WeeChat, è possibile? Sì. è necessario uno script python, 'shell.py' (disponibile sul sito di WeeChat) e digitare questi comandi quando viene caricato lo script: ----------------------------------------- +---- /shell setenv LANG=it_IT.UTF-8 /upgrade ----------------------------------------- +---- Per avere i messaggi in inglese con la codifica UTF-8 per il terminale, per gli utenti ISO, digitare: `/shell setenv LANG=en_US`. [[use_256_colors]] -Come posso usare 256 colori in WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso usare 256 colori in WeeChat? I 256 colori sono supportati nelle versioni di WeeChat ≥ 0.3.4. @@ -315,17 +293,17 @@ questi valori nella variabile 'TERM'. Se si sta utilizzando screen, è possibile aggiungere questa riga al proprio '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Se la variabile 'TERM' contiene un valore errato e WeeChat è già in esecuzione, niente panico! È possibile cambiarla senza riavviare, grazie allo script 'shell.py': ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- Per la versione 0.3.4, bisogna usare il comando `/color` per aggiungere nuovi colori. @@ -336,8 +314,7 @@ Per favore consultare la guida per l'utente per maggiori informazioni sulla gest dei colori. [[search_text]] -Come posso cercare testo nel buffer (come /lastlog con irssi)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso cercare testo nel buffer (come /lastlog con irssi)? Il tasto predefinito è @k(C-)@k(r) (il comando è: `/input search-text`). E per passare alle notifiche: @k(A-)@k(p)/@k(n). @@ -346,30 +323,27 @@ Consultare la guida per l'utente per maggiori informazioni su questa funzione (combinazioni tasti predefiniti). [[key_bindings]] -Associazioni dei tasti ----------------------- +== Associazioni dei tasti [[meta_keys]] -Alcuni tasti meta (alt + tasto) non funzionano, perché? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Alcuni tasti meta (alt + tasto) non funzionano, perché? Se si utilizzano terminali come xterm o uxterm, alcuni tasti meta non funzionano per default. È possibile aggiungere una riga nel file '~/.Xresources': * per xterm: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * per uxterm: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- Al termine, ricaricare la configurazione (`xrdb -override ~/.Xresources`) o riavviare X. [[customize_key_bindings]] -Come posso personalizzare le associazioni dei tasti? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso personalizzare le associazioni dei tasti? Le associazioni dei tasti sono personalizzabili con il comando `/key`. @@ -377,34 +351,32 @@ Il tasto predefinito @k(A-)@k(k) consente di registrare il codice tasto ed inserirlo nella riga di comando. [[jump_to_buffer_11_or_higher]] -Qual è il tasto per passare al buffer 11 (o superiore)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Qual è il tasto per passare al buffer 11 (o superiore)? Il tasto è @k(A-)@k(j) seguito da due numeri, ad esempio @k(A-)@k(j) e @k(1), @k(1) per passare al buffer 11. È possibile associare un tasto, ad esempio: ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- List of default keys is in User's guide. L'elenco dei tasti predefiniti è nella Guida dell'utente. [[global_history]] -Come si può usare la cronologia globale (invece di quella del buffer) con i tasti su e giù? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come si può usare la cronologia globale (invece di quella del buffer) con i tasti su e giù? È possibile associare i tasti su e giù alla cronologia globale (quelli predefiniti sono @k(C-)@k(↑) e @k(C-)@k(↓)). Esempio: ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] Keys "meta2-A" and "meta2-B" may be different in your terminal. To find key @@ -413,20 +385,18 @@ I tasti "meta2-A" e "meta2-B" possono essere differenti nel proprio terminale. Per trovare il codice tasto digitare @k(A-)@k(k) poi il tast (su o giù). [[mouse]] -Mouse ------ +== Mouse [[mouse_not_working]] -Il mouse non funziona affatto, cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Il mouse non funziona affatto, cosa posso fare? Il mouse è supportato con le versioni di WeeChat ≥ 0.3.6. Per prima cosa provare ad abilitare il mouse: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Se il mouse ancora non funziona, verificare la variabile TERM nella propria shell (consultare l'output di `echo $TERM` nel terminale). @@ -434,22 +404,21 @@ In base al terminale usato, il mouse potrebbe non essere supportato. È possibile testare il supporto al mouse nel terminale: ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- E poi cliccare sul primo carattere del terminale (in alto a sinistra. Dovrebbe essere possibile vedere !!#!!". Per disabilitare il mouse nel terminale: ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -Il mouse non fa nulla per X o Y maggiori di 94, perché? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Il mouse non fa nulla per X o Y maggiori di 94, perché? Alcuni terminale inviano solo caratteri ISO per le coordinate del mouse, per cui non funziona per X/Y maggiori di 94. @@ -458,8 +427,7 @@ Bisogna utilizzare un terminale che supporti le coordinate UTF-8 per il mouse, come rxvt-unicode. [[mouse_select_paste]] -Come posso selezionare o incollare del testo nel terminale quando il mouse è abilitato in WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso selezionare o incollare del testo nel terminale quando il mouse è abilitato in WeeChat? Quando il mouse è abilitato in WeeChat, è possibile usare il modificatore @k(-S-) per selezionare o cliccare nel terminale, come se il mouse fosse @@ -467,47 +435,43 @@ disabilitato (in alcuni terminali come iTerm, bisogna usare @k(-A-) invece di @k(-S-)). [[irc]] -IRC ---- +== IRC [[irc_ssl_connection]] -Ho dei problemi nella connessione al server con SSL, cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ho dei problemi nella connessione al server con SSL, cosa posso fare? Se si verificano problemi con l'handshake gnutls, si può cercare di usare una chiave Diffie-Hellman più piccola (la predefinita è 2048): ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- Se si verificano errori con i certificati, è possibile disabilitare "ssl_verify" (attenzione, la connessione in questo modo sarà meno sicura): ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -Alla connessione al server con SSL ottengo solo l'errore "handshake TLS fallito", cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Alla connessione al server con SSL ottengo solo l'errore "handshake TLS fallito", cosa posso fare? Provare una stringa di priorità diversa (solo WeeChat ≥ 0.3.5), sostituendo "xxx" con il nome del server: ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -Come ci si può connettere al server freenode via SSL? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come ci si può connettere al server freenode via SSL? Impostare l'opzione 'weechat.network.gnutls_ca_file' con il file dei certificati: ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] Verificare la presenza di questo file sul sistema (solitamente installato dal @@ -515,17 +479,16 @@ pacchetto "ca-certificates"). Impostare la porta del server, SSL, dhkey_size, poi riconnettersi: ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- // TRANSLATION MISSING [[irc_oauth]] -How to connect to a server that requires "oauth"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== How to connect to a server that requires "oauth"? Some servers like 'twitch' require oauth to connect. @@ -534,34 +497,32 @@ The oauth is simply a password with the value "oauth:XXXX". You can create such server and connect with following commands (replace name and address by appropriate values): ----------------------------------------- +---- /server add name irc.server.org -password="oauth:XXXX" /connect name ----------------------------------------- +---- [[irc_sasl]] -Come posso essere identificato prima di entrare in un canale? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso essere identificato prima di entrare in un canale? Se il server supporta SASL, dovrebbe essere utilizzato invece di inviare il comando di autenticazione con nickserv, ad esempio: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "mynick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- Se il server non supporta SASL, è possibile aggiungere un ritardo (tra il comando e l'ingresso nei canali): ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -Qual è la differenza tra i comandi /ignore e /filter? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Qual è la differenza tra i comandi /ignore e /filter? Il comando `/ignore` è un comando IRC, per cui è utile solo per i buffer IRC (server e canali). @@ -578,38 +539,36 @@ visualizzarle se i filtri vengono disabilitati (il comando predefinito @k(A-)@k(=) abilita/disabilita i filtri). [[filter_irc_join_part_quit]] -Come posso filtrare i messaggi di entrata/uscita/abbandono sui canali IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso filtrare i messaggi di entrata/uscita/abbandono sui canali IRC? Con il filtro intelligente (mantiene entrata/uscita/abbandono degli utenti che hanno scritto di recente): ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- Con un filtro globale (nasconde *tutti* entrata/uscita/abbandono): ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] Per aiuto: `/help filter` e `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -Come posso filtrare i messaggi visualizzati all'ingresso su un canale IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso filtrare i messaggi visualizzati all'ingresso su un canale IRC? Con WeeChat ≥ 0.4.1, è possibile disabilitare alcuni messaggi con l'opzione 'irc.look.display_join_message'. Ad esempio, per disabilitare i nomi (il messaggio IRC '366'): ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] For help: `/help irc.look.display_join_message` @@ -626,17 +585,16 @@ Un'altra soluzione sta nel filtrare i messagge in base ai tag: Esempi: * filtrare i nomi: ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * filtrare l'argomento (e la data): ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -Come posso filtrare i messaggi voice (ad esempio su server Bitlbee)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso filtrare i messaggi voice (ad esempio su server Bitlbee)? Non è semplice filtrare i messaggi voice, perché la modalità voice può essere impostata in altri modi nello stesso messaggio IRC. @@ -648,15 +606,15 @@ colore speciale per i nick assenti nella lista nick. Per versioni di Bitlbee ≥ 3, sul canale '&bitlbee' digitare: ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- Per versioni precedenti di Bitlbee, sul canale '&bitlbee' digitare: ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- Per verificare i nick assenti in WeeChat, consultare la domanda relativa a <<color_away_nicks,nick assenti>>. @@ -665,13 +623,12 @@ Se davvero di desidera filtrare i messaggi voice, è possibile usare questo comando, ma non funzionerà perfettamente (funziona se la prima modalità modificata è il voice): ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -Come posso vedere i nick assenti nella lista nick? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso vedere i nick assenti nella lista nick? È necessario impostare l'opzione 'irc.server_default.away_check' su un valore positivo (minuti tra ogni controllo dei nick assenti). @@ -682,55 +639,50 @@ assenze solo sui canali più piccoli. Ad esempio, per controllare ogni 5 minuti per i nick assenti, sui canali con massimo 25 nick: ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] Per WeeChat ≤ 0.3.3, le opzioni sono 'irc.network.away_check' e 'irc.network.away_check_max_nicks'. [[highlight_notification]] -Come posso essere avvisato quando qualcuno mi cerca in un canale? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso essere avvisato quando qualcuno mi cerca in un canale? È possibile usare script come 'beep.pl" o 'launcher.pl'. Per 'launcher.pl', bisogna impostare il comando: ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/path/del/comando argomenti" ----------------------------------------- +---- Altri script correlati: http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -Come si può modificare il buffer destinazione per i comandi sui buffer uniti (come i buffer con i server)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come si può modificare il buffer destinazione per i comandi sui buffer uniti (come i buffer con i server)? Il tasto predefinito è @k(C-)@k(x) (il comando è: `/input switch_active_buffer`). [[plugins_scripts]] -Plugin / script ---------------- +== Plugin / script [[openbsd_plugins]] -Uso OpenBSD e WeeChat non carica nessun plugin, cosa c'è che non va? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Uso OpenBSD e WeeChat non carica nessun plugin, cosa c'è che non va? In OpenBSD, i nomi file dei plugin finiscono con ".so.0.0" (".so" in Linux). Si deve impostare in questo modo: ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -Come posso caricare gli script Perl/Python/Ruby/Lua/Tcl? Sono compatibili con gli altri client IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso caricare gli script Perl/Python/Ruby/Lua/Tcl? Sono compatibili con gli altri client IRC? Si possono utilizzare i comandi `/perl`, `/python`, `/ruby`, `/lua` and `/tcl` per caricare gli script (il path predefinito per gli script è '~/.weechat/<linguaggio>/'). @@ -744,12 +696,10 @@ Note: * è disponibile un plugin 'tcl' con la versione ≥ 0.3.0. [[settings]] -Impostazioni ------------- +== Impostazioni [[memory_usage]] -Come posso ottimizzare WeeChat per poter utilizzare meno memoria? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso ottimizzare WeeChat per poter utilizzare meno memoria? Esistono diversi trucchi per ottimizzare l'uso della memoria: @@ -765,12 +715,10 @@ Esistono diversi trucchi per ottimizzare l'uso della memoria: * ridurre il valore dell'opzione 'weechat.history.max_commands' [[development]] -Sviluppo --------- +== Sviluppo [[bug_task_patch]] -Come posso segnalare bug, richiedere nuove funzionalità o inviare patch? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Come posso segnalare bug, richiedere nuove funzionalità o inviare patch? Esistono 3 modi: @@ -784,30 +732,28 @@ Esistono 3 modi: (è possibile iscriversi ed inviare alla mailing list "support") [[gdb_error_threads]] -Quando eseguo WeeChat in gdb, c'è un errore riguardo ai thread, cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Quando eseguo WeeChat in gdb, c'è un errore riguardo ai thread, cosa posso fare? Quando viene eseguito WeeChat all'interno di gdb, potrebbe verificarsi questo errore: ----------------------------------------- +---- $ gdb /path/to/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- Per correggerlo, è possibile eseguire gdb con questo comando (sostituire il path di libpthread e WeeChat con i path del proprio sistema): ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -Qual è la lista delle piattaforme supportate da WeeChat? Verrà effettuato il port su altri sistemi operativi? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Qual è la lista delle piattaforme supportate da WeeChat? Verrà effettuato il port su altri sistemi operativi? La lista completa è su questa pagina: http://weechat.org/download @@ -815,8 +761,7 @@ Facciamo del nostro meglio per portarlo su più piattaforme possibili. L'aiuto per gli OS che non abbiamo, e su cui testare WeeChat, è ben accetto. [[help_developers]] -Voglio aiutare gli sviluppatori di WeeChat. Cosa posso fare? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Voglio aiutare gli sviluppatori di WeeChat. Cosa posso fare? Ci sono molti compiti da fare (testing, scrittura del codice, documentazione, ...) @@ -824,8 +769,7 @@ Per favore contattateci su IRC o via mail e consultate la pagina di supporto: http://weechat.org/dev/support [[donate]] -Posso donare denaro o altre cose agli sviluppatori di WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Posso donare denaro o altre cose agli sviluppatori di WeeChat? È possibile donare denaro per aiutare lo sviluppo. Maggiori dettagli su http://weechat.org/about/donate diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index f3add0bbc..f23c3facb 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -1,5 +1,4 @@ -Referenze API per Plugin di WeeChat -=================================== += Referenze API per Plugin di WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -11,8 +10,7 @@ http://weechat.org/doc [[introduction]] -Introduzione ------------- +== Introduzione WeeChat (Wee Enhanced Environment for Chat) è un client di chat libero, veloce e leggero, realizzato per molti sistemi operativi. @@ -21,8 +19,7 @@ Questo manuale documenta le API per i plugin di WeeChat, utilizzate dai plugin C per interagire con il core di WeeChat. [[plugins_in_weechat]] -Plugin in WeeChat ------------------ +== Plugin in WeeChat Un plugin è un programma C che può richiamare le funzioni di WeeChat definite in un'interfaccia. @@ -39,8 +36,7 @@ sorgente di WeeChat). Il file definisce strutture e tipi utilizzati per comunicare con WeeChat. [[macros]] -Macro -~~~~~ +=== Macro Il plugin deve utilizzare alcune macro (per definire alcune variabili): @@ -57,16 +53,14 @@ WEECHAT_PLUGIN_LICENSE("GPL3"):: licenza del plugin [[main_functions]] -Funzioni principali -~~~~~~~~~~~~~~~~~~~ +=== Funzioni principali Il plugin deve usare due funzioni: * weechat_plugin_init * weechat_plugin_end -weechat_plugin_init -^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_init Questa funzione viene chiamata quando il plugin è caricato. da WeeChat. @@ -74,10 +68,10 @@ da WeeChat. Prototipo: [source,C] ----------------------------------------- +---- int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]); ----------------------------------------- +---- Argomenti: @@ -93,8 +87,7 @@ Valori restituiti: * 'WEECHAT_RC_ERROR' se c'è un errore (il plugin NON verrà caricato) -weechat_plugin_end -^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_end Questa funzione viene chiamata quando il plugin viene scaricato da WeeChat. @@ -102,9 +95,9 @@ scaricato da WeeChat. Prototipo: [source,C] ----------------------------------------- +---- int weechat_plugin_end (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Argomenti: @@ -116,22 +109,20 @@ Valori restituiti: * 'WEECHAT_RC_ERROR' se c'è un errore [[compile_plugin]] -Compilazione del plugin -~~~~~~~~~~~~~~~~~~~~~~~ +=== Compilazione del plugin La compilazione non richiede i sorgenti di WeeChat, è richiesto solo il file 'weechat-plugin.h'. Per compilare un plugin che ha un file "tizio.c" (in GNU/Linux): ----------------------------------------- +---- $ gcc -fPIC -Wall -c tizio.c $ gcc -shared -fPIC -o libtizio.so tizio.o ----------------------------------------- +---- [[load_plugin]] -Caricamento del plugin -~~~~~~~~~~~~~~~~~~~~~~ +=== Caricamento del plugin Copiare il file 'libtizio.so' nella cartella plugin di sistema (ad esempio '/usr/local/lib/weechat/plugins') oppure nella cartella @@ -139,20 +130,19 @@ plugin dell'utente (ad esempio '/home/xxx/.weechat/plugins'). In WeeChat: ----------------------------------------- +---- /plugin load tizio ----------------------------------------- +---- [[plugin_example]] -Plugin di esempio -~~~~~~~~~~~~~~~~~ +=== Plugin di esempio Un esempio completo di plugin, che aggiunge un comando '/double': visualizza due volte gli argomenti nel buffer corrente, oppure esegue un comando due volte (ok, non sarà molto utile, ma è solo un esempio!): [source,C] ----------------------------------------- +---- #include <stdlib.h> #include "weechat-plugin.h" @@ -212,11 +202,10 @@ weechat_plugin_end (struct t_weechat_plugin *plugin) return WEECHAT_RC_OK; } ----------------------------------------- +---- [[plugin_api]] -Plugin API ----------- +== Plugin API I capitoli seguenti descrivono le funzioni nelle API, organizzate in categorie. @@ -232,22 +221,20 @@ Per ogni funzione, viene fornita: scripting). [[plugins]] -Plugin -~~~~~~ +=== Plugin Funzioni per ottenere informazioni sui plugin. -weechat_plugin_get_name -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_plugin_get_name Ottiene il nome del plugin. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_plugin_get_name (struct t_weechat_plugin *plugin); ----------------------------------------- +---- Argomenti: @@ -261,32 +248,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *name = weechat_plugin_get_name (plugin); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo name = weechat.plugin_get_name(plugin) # esempio plugin = weechat.buffer_get_pointer(weechat.current_buffer(), "plugin") name = weechat.plugin_get_name(plugin) ----------------------------------------- +---- [[strings]] -Stringhe -~~~~~~~~ +=== Stringhe Molte delle funzioni stringa che seguono sono già disponibili tramite funzioni standard in C, ma si raccomanda di utilizzare le funzioni in questa API perché compatibili con UTF-8 e il locale. -weechat_charset_set -^^^^^^^^^^^^^^^^^^^ +==== weechat_charset_set Imposta il nuovo set caratteri del nuovo plugin (il set caratteri predefinito è 'UTF-8', così se il plugin usa 'UTF-8' non è necessario chiamare questa @@ -295,9 +280,9 @@ funzione). Prototipo: [source,C] ----------------------------------------- +---- void weechat_charset_set (const char *charset); ----------------------------------------- +---- Argomenti: @@ -306,23 +291,22 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_charset_set ("iso-8859-1"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.charset_set(charset) # esempio weechat.charset_set("iso-8859-1") ----------------------------------------- +---- -weechat_iconv_to_internal -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_to_internal Converte le stringhe per il set caratteri interno di WeeChat (UTF-8). @@ -330,9 +314,9 @@ WeeChat (UTF-8). Prototipo: [source,C] ----------------------------------------- +---- char *weechat_iconv_to_internal (const char *charset, const char *string); ----------------------------------------- +---- Argomenti: @@ -347,25 +331,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_iconv_to_internal ("iso-8859-1", "iso string: é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.iconv_to_internal(charset, string) # esempio str = weechat.iconv_to_internal("iso-8859-1", "iso string: é à") ----------------------------------------- +---- -weechat_iconv_from_internal -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_iconv_from_internal Converte la stringa dal set caratteri interno di WeeChat (UTF-8) in un'altra. @@ -373,9 +356,9 @@ in un'altra. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_iconv_from_internal (const char *charset, const char *string); ----------------------------------------- +---- Argomenti: @@ -390,34 +373,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_iconv_from_internal ("iso-8859-1", "utf-8 string: é à"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.iconv_from_internal(charset, string) # esempio str = weechat.iconv_from_internal("iso-8859-1", "utf-8 string: é à") ----------------------------------------- +---- -weechat_gettext -^^^^^^^^^^^^^^^ +==== weechat_gettext Restituisce la stringa tradotta (dipende dalla lingua). Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_gettext (const char *string); ----------------------------------------- +---- Argomenti: @@ -430,23 +412,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_gettext ("hello"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.gettext(string) # esempio str = weechat.gettext("hello") ----------------------------------------- +---- -weechat_ngettext -^^^^^^^^^^^^^^^^ +==== weechat_ngettext Restituisce la stringa tradotta, utilizzando il singolare o il plurale, in base all'argomento 'count' (contatore). @@ -454,10 +435,10 @@ all'argomento 'count' (contatore). Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_ngettext (const char *string, const char *plural, int count); ----------------------------------------- +---- Argomenti: @@ -473,24 +454,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_ngettext ("file", "files", num_files); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.ngettext(string, plural, count) # esempio num_files = 2 str = weechat.ngettext("file", "files", num_files) ----------------------------------------- +---- -weechat_strndup -^^^^^^^^^^^^^^^ +==== weechat_strndup Restituisce una stringa duplicata, con un massimo di caratteri impostato su 'chars'. @@ -498,9 +478,9 @@ impostato su 'chars'. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_strndup (const char *string, int length); ----------------------------------------- +---- Argomenti: @@ -515,26 +495,25 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_strndup ("abcdef", 3); /* result: "abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_tolower -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_tolower Converte una stringa UTF-8 in minuscolo. Prototipo: [source,C] ----------------------------------------- +---- void weechat_string_tolower (const char *string); ----------------------------------------- +---- Argomenti: @@ -543,25 +522,24 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_tolower (str); /* str ora è: "abcdé" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_toupper -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_toupper Converte una stringa UTF-8 in maiuscolo. Prototipo: [source,C] ----------------------------------------- +---- void weechat_string_toupper (const char *string); ----------------------------------------- +---- Argomenti: @@ -570,25 +548,24 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- char *str = "AbCdé"; weechat_string_toupper (str); /* str ora è: "ABCDé" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strcasecmp -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp Confronta stringa non sensibile alle maiuscole e alla localizzazione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_strcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Argomenti: @@ -605,15 +582,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strcasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcasecmp_range Confronta stringa non sensibile alle maiuscole e alla localizzazione, usando una serie per il confronto. @@ -621,9 +597,9 @@ serie per il confronto. Prototipo: [source,C] ----------------------------------------- +---- int weechat_strcasecmp_range (const char *string1, const char *string2, int range); ----------------------------------------- +---- Argomenti: @@ -647,15 +623,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_strcasecmp ("nick{away}", "NICK[AWAY]"); /* == 0 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strncasecmp -^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp Confronta stringa indipendente non sensibile alle maiuscole e alla localizzazione, per un numero 'max' di caratteri. @@ -663,9 +638,9 @@ localizzazione, per un numero 'max' di caratteri. Prototipo: [source,C] ----------------------------------------- +---- int weechat_strncasecmp (const char *string1, const char *string2, int max); ----------------------------------------- +---- Argomenti: @@ -683,15 +658,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp ("aabb", "aacc", 2); /* == 0 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strncasecmp_range -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strncasecmp_range Confronta una stringa non sensibile alle maiuscole e alla localizzazione, per un numero 'max' di caratteri, usando una serie per il confronto. @@ -699,9 +673,9 @@ numero 'max' di caratteri, usando una serie per il confronto. Prototipo: [source,C] ----------------------------------------- +---- int weechat_strncasecmp_range (const char *string1, const char *string2, int max, int range); ----------------------------------------- +---- Argomenti: @@ -726,15 +700,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_strncasecmp_range ("nick{away}", "NICK[away]", 6, 29); /* == 0 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strcmp_ignore_chars -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strcmp_ignore_chars Confronta una stringa localizzata (e opzionalmente non sensibile alle maiuscole), ignorando alcuni caratteri. @@ -742,11 +715,11 @@ maiuscole), ignorando alcuni caratteri. Prototipo: [source,C] ----------------------------------------- +---- int weechat_strcmp_ignore_chars (const char *string1, const char *string2, const char *chars_ignored, int case_sensitive); ----------------------------------------- +---- Argomenti: @@ -765,15 +738,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_strcmp_ignore_chars ("a-b", "--a-e", "-", 1); /* == -3 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strcasestr -^^^^^^^^^^^^^^^^^^ +==== weechat_strcasestr Cerca una stringa non sensibile alle maiuscole e indipendente dalla localizzazione. @@ -781,9 +753,9 @@ localizzazione. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_strcasestr (const char *string, const char *search); ----------------------------------------- +---- Argomenti: @@ -797,15 +769,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *pos = weechat_strcasestr ("aBcDeF", "de"); /* risultato: puntatore a "DeF" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_strlen_screen -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_strlen_screen _WeeChat ≥ 0.4.2._ @@ -818,9 +789,9 @@ Non-printable chars have a width of 1 (this is the difference with the function Prototipo: [source,C] ----------------------------------------- +---- int weechat_strlen_screen (const char *string); ----------------------------------------- +---- Argomenti: @@ -834,33 +805,32 @@ su schermo Esempio in C: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo length = weechat.strlen_screen(string) # esempio length = weechat.strlen_screen("é") # 1 ----------------------------------------- +---- -weechat_string_match -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_match Verifica se una stringa coincide ad una mask. Prototipo: [source,C] ----------------------------------------- +---- int weechat_string_match (const char *string, const char *mask, int case_sensitive); ----------------------------------------- +---- Argomenti: @@ -876,17 +846,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int match1 = weechat_string_match ("abcdef", "abc*", 0); /* == 1 */ int match2 = weechat_string_match ("abcdef", "*dd*", 0); /* == 0 */ int match3 = weechat_string_match ("abcdef", "*def", 0); /* == 1 */ int match4 = weechat_string_match ("abcdef", "*de*", 0); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo match = weechat.string_match(string, mask, case_sensitive) @@ -895,20 +865,19 @@ match1 = weechat.string_match("abcdef", "abc*", 0) # 1 match2 = weechat.string_match("abcdef", "*dd*", 0) # 0 match3 = weechat.string_match("abcdef", "*def", 0) # 1 match4 = weechat.string_match("abcdef", "*de*", 0) # 1 ----------------------------------------- +---- -weechat_string_replace -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_replace Sostituisce tutte le ricorrenze di una stringa con un'altra. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_replace (const char *string, const char *search, const char *replace); ----------------------------------------- +---- Argomenti: @@ -924,17 +893,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_string_replace ("test", "s", "x"); /* result: "text" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_expand_home -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_expand_home _WeeChat ≥ 0.3.3._ @@ -944,9 +912,9 @@ non inizia con `~`, viene restituita la stessa stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_expand_home (const char *path); ----------------------------------------- +---- Argomenti: @@ -960,18 +928,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_string_expand_home ("~/file.txt"); /* result: "/home/xxx/file.txt" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_remove_quotes -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_quotes Rimuove le virgolette all'inizio e alla fine della stringa (ignora gli spazi se presenti prima delle prime virgolette o dopo le ultime virgolette). @@ -979,9 +946,9 @@ spazi se presenti prima delle prime virgolette o dopo le ultime virgolette). Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_remove_quotes (const char *string, const char *quotes); ----------------------------------------- +---- Argomenti: @@ -996,28 +963,27 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_string_remove_quotes (string, " 'Non posso' ", "'"); /* risultato: "Non posso" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_strip -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_strip Rimuove i caratteri ad inizio/fine della stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_strip (const char *string, int left, int right, const char *chars); ----------------------------------------- +---- Argomenti: @@ -1033,17 +999,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = weechat_string_strip (".abc -", 0, 1, "- ."); /* risultato: ".abc" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_mask_to_regex -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_mask_to_regex Restituisce una espressione regolare con una mask, dove l'unico carattere speciale è "`*`". Tutti gli altri caratteri speciali per le espressioni regolari @@ -1052,9 +1017,9 @@ non vengono riconosciuti. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_mask_to_regex (const char *mask); ----------------------------------------- +---- Argomenti: @@ -1068,26 +1033,25 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str_regex = weechat_string_mask_to_regex ("test*mask"); /* result: "test.*mask" */ /* ... */ free (str_regex); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo regex = weechat.string_mask_to_regex(mask) # esempio regex = weechat.string_mask_to_regex("test*mask") # "test.*mask" ----------------------------------------- +---- -weechat_string_regex_flags -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regex_flags _WeeChat ≥ 0.3.7._ @@ -1097,9 +1061,9 @@ per compilare l'espressione regolare. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags) ----------------------------------------- +---- Argomenti: @@ -1134,18 +1098,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *regex = "(?i)test"; int flags; const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags); /* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_regcomp -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_regcomp _WeeChat ≥ 0.3.7._ @@ -1156,9 +1119,9 @@ Compila un'espressione regolare usando flag opzionali all'inizio della stringa Prototipo: [source,C] ----------------------------------------- +---- int weechat_string_regcomp (void *preg, const char *regex, int default_flags) ----------------------------------------- +---- Argomenti: @@ -1180,19 +1143,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- regex_t my_regex; if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0) { /* error */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_has_highlight -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_has_highlight Controlla se una stringa ha uno o più eventi, usando la lista di parole per gli eventi. @@ -1200,10 +1162,10 @@ gli eventi. Prototipo: [source,C] ----------------------------------------- +---- int weechat_string_has_highlight (const char *string, const char highlight_words); ----------------------------------------- +---- Argomenti: @@ -1217,34 +1179,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo highlight = weechat.string_has_highlight(string, highlight_words) # esempio highlight = weechat.string_has_highlight("my test string", "test,word2") # 1 ----------------------------------------- +---- -weechat_string_split -^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split Divide una stringa in base a uno o più delimitatori. Prototipo: [source,C] ----------------------------------------- +---- char **weechat_string_split (const char *string, const char *separators, int keep_eol, int num_items_max, int *num_items); ----------------------------------------- +---- Argomenti: @@ -1267,7 +1228,7 @@ Valore restituito: Esempi: [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc de fghi", " ", 0, 0, &argc); @@ -1287,19 +1248,18 @@ argv = weechat_string_split ("abc de fghi", " ", 1, 0, &argc); argc == 3 */ weechat_string_free_split (argv); ----------------------------------------- +---- -weechat_string_free_split -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split Libera la memoria usata per la divisione di una stringa. Prototipo: [source,C] ----------------------------------------- +---- void weechat_string_free_split (char **split_string); ----------------------------------------- +---- Argomenti: @@ -1309,29 +1269,28 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- char *argv; int argc; argv = weechat_string_split (string, " ", 0, 0, &argc); /* ... */ weechat_string_free_split (argv); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_build_with_split_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_build_with_split_string Compila una stringa con una stringa divisa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_build_with_split_string (char **split_string, const char *separator); ----------------------------------------- +---- Argomenti: @@ -1347,7 +1306,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); @@ -1355,13 +1314,12 @@ char *str = weechat_string_build_with_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_split_command Divide una lista di comandi separata da 'separator' (che può essere omesso aggiungendo "\" nella stringa). @@ -1369,9 +1327,9 @@ omesso aggiungendo "\" nella stringa). Prototipo: [source,C] ----------------------------------------- +---- char **weechat_string_split_command (const char *command, char separator); ----------------------------------------- +---- Argomenti: @@ -1386,28 +1344,27 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/command1 arg;/command2", ';'); /* result: argv[0] == "/command1 arg" argv[1] == "/command2" */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_free_split_command -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_free_split_command Libera la memoria utilizzata dalla divisione di un comando. Prototipo: [source,C] ----------------------------------------- +---- void weechat_string_free_split_command (char **split_command); ----------------------------------------- +---- Argomenti: @@ -1417,17 +1374,16 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- char **argv = weechat_string_split_command ("/command1 arg;/command2", ';'); /* ... */ weechat_free_split_command (argv); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_format_size -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_format_size Compila una stringa con un file di dimensione fissa ed una unità tradotta nella lingua locale. @@ -1435,9 +1391,9 @@ tradotta nella lingua locale. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_format_size (unsigned long long size); ----------------------------------------- +---- Argomenti: @@ -1450,7 +1406,7 @@ Valore restituito: Esempi in C: [source,C] ----------------------------------------- +---- /* esempi in lingua inglese */ char *str = weechat_string_format_size (0); /* str == "0 byte" */ @@ -1468,20 +1424,19 @@ free (str); char *str = weechat_string_format_size (2097152); /* str == "2 MB" */ /* ... */ free (str); ----------------------------------------- +---- -weechat_string_remove_color -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_remove_color Rimuove i colori di WeeChat da una stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_remove_color (const char *string, const char *replacement); ----------------------------------------- +---- Argomenti: @@ -1498,7 +1453,7 @@ Valore restituito: Esempi: [source,C] ----------------------------------------- +---- /* rimuove i codici colore */ char *str = weechat_string_remove_color (my_string1, NULL); /* ... */ @@ -1508,21 +1463,20 @@ free (str); char *str = weechat_string_remove_color (my_string2, "?"); /* ... */ free (str); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.string_remove_color(string, replacement) # esempio str = weechat.string_remove_color(my_string, "?") ----------------------------------------- +---- -weechat_string_encode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_encode_base64 _WeeChat ≥ 0.3.2._ @@ -1531,9 +1485,9 @@ Codifica una stringa in base64. Prototipo: [source,C] ----------------------------------------- +---- void weechat_string_encode_base64 (const char *from, int length, char *to); ----------------------------------------- +---- Argomenti: @@ -1545,17 +1499,16 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- char *string = "abcdefgh", result[128]; weechat_string_encode_base64 (string, strlen (string), result); /* result == "YWJjZGVmZ2g=" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_decode_base64 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_decode_base64 _WeeChat ≥ 0.3.2._ @@ -1564,9 +1517,9 @@ Decodifica una stringa in base64. Prototipo: [source,C] ----------------------------------------- +---- int weechat_string_decode_base64 (const char *from, char *to); ----------------------------------------- +---- Argomenti: @@ -1581,18 +1534,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *string = "YWJjZGVmZ2g=", result[128]; int length; length = weechat_string_decode_base64 (string, result); /* length == 8, result == "abcdefgh" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_string_is_command_char -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_is_command_char _WeeChat ≥ 0.3.2._ @@ -1602,9 +1554,9 @@ Verifica che il primo carattere della stringa sia un carattere comando Prototipo: [source,C] ----------------------------------------- +---- int weechat_string_is_command_char (const char *string); ----------------------------------------- +---- Argomenti: @@ -1618,25 +1570,24 @@ Valore restituito: Esempi in C: [source,C] ----------------------------------------- +---- int command_char1 = weechat_string_is_command_char ("/test"); /* == 1 */ int command_char2 = weechat_string_is_command_char ("test"); /* == 0 */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo is_cmdchar = weechat.string_is_command_char(string) # esempi command_char1 = weechat.string_is_command_char("/test") # == 1 command_char2 = weechat.string_is_command_char("test") # == 0 ----------------------------------------- +---- -weechat_string_input_for_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_input_for_buffer _WeeChat ≥ 0.3.2._ @@ -1646,9 +1597,9 @@ dell'argomento "string"), oppure NULL se è un comando. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_string_input_for_buffer (const char *string); ----------------------------------------- +---- Argomenti: @@ -1661,16 +1612,16 @@ Valore restituito: Esempi in C: [source,C] ----------------------------------------- +---- const char *str1 = weechat_string_input_for_buffer ("test"); /* "test" */ const char *str2 = weechat_string_input_for_buffer ("/test"); /* NULL */ const char *str3 = weechat_string_input_for_buffer ("//test"); /* "/test" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.string_input_for_buffer(string) @@ -1678,10 +1629,9 @@ str = weechat.string_input_for_buffer(string) str1 = weechat.string_input_for_buffer("test") # "test" str2 = weechat.string_input_for_buffer("/test") # "" str3 = weechat.string_input_for_buffer("//test") # "/test" ----------------------------------------- +---- -weechat_string_eval_expression -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_string_eval_expression // TRANSLATION MISSING _WeeChat ≥ 0.4.0, updated in 0.4.2._ @@ -1694,12 +1644,12 @@ Special variables with format `${variable}` are expanded (see command `/eval` in Prototipo: [source,C] ----------------------------------------- +---- char *weechat_string_eval_expression (const char *expr, struct t_hashtable *pointers, struct t_hashtable *extra_vars, struct t_hashtable *options); ----------------------------------------- +---- Argomenti: @@ -1727,7 +1677,7 @@ Valore restituito: Esempi in C: [source,C] ----------------------------------------- +---- struct t_hashtable *options = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -1738,12 +1688,12 @@ if (options) char *str1 = weechat_string_eval_expression ("${buffer.full_name}", NULL, NULL, NULL); /* "core.weechat" */ char *str2 = weechat_string_eval_expression ("${window.win_width} > 100", NULL, NULL, options); /* "1" */ char *str3 = weechat_string_eval_expression ("abc =~ def", NULL, NULL, options); /* "0" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo str = weechat.string_eval_expression(expr, pointers, extra_vars, options) @@ -1751,25 +1701,23 @@ str = weechat.string_eval_expression(expr, pointers, extra_vars, options) str1 = weechat.string_eval_expression("${buffer.full_name}", {}, {}, {}) # "core.weechat" str2 = weechat.string_eval_expression("${window.win_width} > 100", {}, {}, {"type": "condition"}) # "1" str3 = weechat.string_eval_expression("abc =~ def", {}, {}, {"type": "condition"}) # "0" ----------------------------------------- +---- [[utf-8]] -UTF-8 -~~~~~ +=== UTF-8 Alcune funzioni stringa UTF-8. -weechat_utf8_has_8bits -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_has_8bits Verifica che una stringa abbia caratteri a 8-bit. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_has_8bits (const char *string); ----------------------------------------- +---- Argomenti: @@ -1782,27 +1730,26 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_utf8_has_8bits (string)) { /* ... */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_is_valid -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_is_valid Verifica che una stringa sia valida in UTF-8. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_is_valid (const char *string, char **error); ----------------------------------------- +---- Argomenti: @@ -1817,7 +1764,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *error; if (weechat_utf8_is_valid (string, &error)) { @@ -1827,13 +1774,12 @@ else { /* "error" punta al primo carattere non valido */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_normalize -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_normalize Normalizza le stringhe UTF-8: rimuove i caratteri non UTF-8 e li sostituisce con un carattere. @@ -1841,9 +1787,9 @@ un carattere. Prototipo: [source,C] ----------------------------------------- +---- void weechat_utf8_normalize (char *string, char replacement); ----------------------------------------- +---- Argomenti: @@ -1853,24 +1799,23 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_utf8_normalize (string, '?'); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_prev_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_prev_char Restituisce il puntatore al carattere UTF-8 precedente in una stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_utf8_prev_char (const char *string_start, const char *string); ----------------------------------------- +---- Argomenti: @@ -1886,24 +1831,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *prev_char = weechat_utf8_prev_char (string, ptr_in_string); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_next_char -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_next_char Restituisce il puntatore al successivo carattere UTF-8 in una stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_utf8_next_char (const char *string); ----------------------------------------- +---- Argomenti: @@ -1917,24 +1861,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *next_char = weechat_utf8_next_char (string); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_char_int -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_int Restituisce un carattere UTF-8 come intero. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_char_int (const char *string); ----------------------------------------- +---- Argomenti: @@ -1947,24 +1890,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int char_int = weechat_utf8_char_int ("être"); /* "ê" come intero */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_char_size -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size Restituisce la dimensione di un carattere UTF-8 (in byte). Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_char_size (const char *string); ----------------------------------------- +---- Argomenti: @@ -1977,24 +1919,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int char_size = weechat_utf8_char_size ("être"); /* == 2 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_strlen -^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen Restituisce la lunghezza della stringa UTF-8 (nei caratteri UTF-8). Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_strlen (const char *string); ----------------------------------------- +---- Argomenti: @@ -2007,15 +1948,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int length = weechat_utf8_strlen ("chêne"); /* == 5 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_strnlen -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strnlen Restituisce la lunghezza della stringa UTF-8 (in caratteri UTF-8), per un massimo di 'bytes' nella stringa. @@ -2023,9 +1963,9 @@ un massimo di 'bytes' nella stringa. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_strnlen (const char *string, int bytes); ----------------------------------------- +---- Argomenti: @@ -2039,15 +1979,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int length = weechat_utf8_strnlen ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_strlen_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strlen_screen Restituisce il numero di caratteri necessari per visualizzare la stringa UTF-8 su schermo. @@ -2055,9 +1994,9 @@ UTF-8 su schermo. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_strlen_screen (const char *string); ----------------------------------------- +---- Argomenti: @@ -2071,24 +2010,23 @@ su schermo Esempio in C: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_strlen_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_charcmp -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcmp Confronta due caratteri UTF-8. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_charcmp (const char *string1, const char *string2); ----------------------------------------- +---- Argomenti: @@ -2105,24 +2043,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcmp ("aaa", "ccc"); /* == -2 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_charcasecmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_charcasecmp Confronta due caratteri UTF-8, ignorando la sensibilità alle maiuscole. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_charcasecmp (const char *string1, const char *string2); ----------------------------------------- +---- Argomenti: @@ -2139,15 +2076,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int diff = weechat_utf8_charcasecmp ("aaa", "CCC"); /* == -2 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_char_size_screen -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_char_size_screen Restituisce il numero di caratteri necessari per visualizzare il carattere UTF-8 sullo schermo. @@ -2155,9 +2091,9 @@ carattere UTF-8 sullo schermo. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_char_size_screen (const char *string); ----------------------------------------- +---- Argomenti: @@ -2171,24 +2107,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int length_on_screen = weechat_utf8_char_size_screen ("é"); /* == 1 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_add_offset -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_add_offset Si sposta in avanti di N caratteri in una stringa UTF-8. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_utf8_add_offset (const char *string, int offset); ----------------------------------------- +---- Argomenti: @@ -2202,25 +2137,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *str = "chêne"; char *str2 = weechat_utf8_add_offset (str, 3); /* points to "ne" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_real_pos -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_real_pos Restituisce la posizione reale nella stringa UTF-8. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_real_pos (const char *string, int pos); ----------------------------------------- +---- Argomenti: @@ -2234,24 +2168,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int pos = weechat_utf8_real_pos ("chêne", 3); /* == 4 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_pos -^^^^^^^^^^^^^^^^ +==== weechat_utf8_pos Restituisce la posizione nella stringa UTF-8. Prototipo: [source,C] ----------------------------------------- +---- int weechat_utf8_pos (const char *string, int real_pos); ----------------------------------------- +---- Argomenti: @@ -2265,24 +2198,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int pos = weechat_utf8_pos ("chêne", 4); /* == 3 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_utf8_strndup -^^^^^^^^^^^^^^^^^^^^ +==== weechat_utf8_strndup Restituisce la stringa duplicata, di lunghezza massima 'lenght'. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_utf8_strndup (const char *string, int length); ----------------------------------------- +---- Argomenti: @@ -2296,32 +2228,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *string = weechat_utf8_strndup ("chêne", 3); /* restituisce "chê" */ /* ... */ free (string); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. [[directories]] -Cartelle -~~~~~~~~ +=== Cartelle Alcune funzioni legate alle cartelle. -weechat_mkdir_home -^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_home Crea una cartella nella home di WeeChat. Prototipo: [source,C] ----------------------------------------- +---- int weechat_mkdir_home (char *directory, int mode); ----------------------------------------- +---- Argomenti: @@ -2335,35 +2265,34 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (!weechat_mkdir_home ("temp", 0755)) { /* errore */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.mkdir_home(directory, mode) # esempio weechat.mkdir_home("temp", 0755) ----------------------------------------- +---- -weechat_mkdir -^^^^^^^^^^^^^ +==== weechat_mkdir Crea una cartella. Prototipo: [source,C] ----------------------------------------- +---- int weechat_mkdir (char *directory, int mode); ----------------------------------------- +---- Argomenti: @@ -2377,35 +2306,34 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (!weechat_mkdir ("/tmp/mydir", 0755)) { /* errore */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.mkdir(directory, mode) # esempio weechat.mkdir("/tmp/mydir", 0755) ----------------------------------------- +---- -weechat_mkdir_parents -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_mkdir_parents Crea una cartella e le cartelle genitore se necessario. Prototipo: [source,C] ----------------------------------------- +---- int weechat_mkdir_parents (char *directory, int mode); ----------------------------------------- +---- Argomenti: @@ -2419,39 +2347,38 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (!weechat_mkdir_parents ("/tmp/my/dir", 0755)) { /* errore */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.mkdir_parents(directory, mode) # esempio weechat.mkdir_parents("/tmp/my/dir", 0755) ----------------------------------------- +---- -weechat_exec_on_files -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_exec_on_files Cerca i file in una cartella ed esegue una callback su ogni file. Prototipo: [source,C] ----------------------------------------- +---- void weechat_exec_on_files (const char *directory, int hidden_files, void *data, void (*callback)(void *data, const char *filename)); ----------------------------------------- +---- Argomenti: @@ -2465,20 +2392,19 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- void callback (void *data, const char *filename) { /* ... */ } ... weechat_exec_on_files ("/tmp", 0, NULL, &callback); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_file_get_content -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_file_get_content _WeeChat ≥ 0.3.1._ @@ -2487,9 +2413,9 @@ Ottiene il contenuto del file di testo in una stringa. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_file_get_content (const char *filename); ----------------------------------------- +---- Argomenti: @@ -2503,34 +2429,32 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *content; content = weechat_file_get_content ("/tmp/test.txt"); /* ... */ free (content); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. [[util]] -Utilità -~~~~~~~ +=== Utilità Alcune funzioni utili. -weechat_util_timeval_cmp -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_cmp Confronta due strutture "timeval". Prototipo: [source,C] ----------------------------------------- +---- int weechat_util_timeval_cmp (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Argomenti: @@ -2546,27 +2470,26 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_util_timeval_cmp (&tv1, &tv2) > 0) { /* tv1 > tv2 */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_util_timeval_diff -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_diff Restituisce la differenza (in millisecondi) tra due strutture "timeval". Prototipo: [source,C] ----------------------------------------- +---- long weechat_util_timeval_diff (struct timeval *tv1, struct timeval *tv2); ----------------------------------------- +---- Argomenti: @@ -2580,24 +2503,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- long diff = weechat_util_timeval_diff (&tv1, &tv2); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_util_timeval_add -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_timeval_add Aggiungi intervallo (in millisecondi) ad una struttura timeval. Prototipo: [source,C] ----------------------------------------- +---- void weechat_util_timeval_add (struct timeval *tv, long interval); ----------------------------------------- +---- Argomenti: @@ -2607,15 +2529,14 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_util_timeval_add (&tv, 2000); /* aggiunge 2 secondi */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_util_get_time_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_get_time_string _WeeChat ≥ 0.3.2._ @@ -2624,9 +2545,9 @@ Riceve data/ora come stringa compilata con "strftime". Prototipo: [source,C] ----------------------------------------- +---- char *weechat_util_get_time_string (const time_t *date); ----------------------------------------- +---- Argomenti: @@ -2635,17 +2556,16 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- time_t date = time (NULL); weechat_printf (NULL, "date: %s", weechat_util_get_time_string (&date)); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_util_version_number -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_util_version_number _WeeChat ≥ 0.3.9._ @@ -2655,9 +2575,9 @@ Convert a string with WeeChat version to a number. Prototipo: [source,C] ----------------------------------------- +---- int weechat_util_version_number (const char *version); ----------------------------------------- +---- Argomenti: @@ -2667,33 +2587,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- version_number = weechat_util_version_number ("0.3.8"); /* == 0x00030800 */ version_number = weechat_util_version_number ("0.3.9-dev"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9-rc1"); /* == 0x00030900 */ version_number = weechat_util_version_number ("0.3.9"); /* == 0x00030900 */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. [[sorted_lists]] -Elenchi ordinati -~~~~~~~~~~~~~~~~ +=== Elenchi ordinati Funzioni lista ordinata. -weechat_list_new -^^^^^^^^^^^^^^^^ +==== weechat_list_new Crea una nuova lista. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist *weechat_list_new (); ----------------------------------------- +---- Valore restituito: @@ -2702,35 +2620,34 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist *list = weechat_list_new (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo list = weechat.list_new() # esempio list = weechat.list_new() ----------------------------------------- +---- -weechat_list_add -^^^^^^^^^^^^^^^^ +==== weechat_list_add Aggiunge un elemento in una lista. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_add (struct t_weelist *weelist, const char *data, const char *where, void *user_data); ----------------------------------------- +---- Argomenti: @@ -2749,34 +2666,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *my_item = weechat_list_add (list, "my data", WEECHAT_LIST_POS_SORT, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_add(list, data, where, user_data) # esempio item = weechat.list_add(list, "my data", weechat.WEECHAT_LIST_POS_SORT, "") ----------------------------------------- +---- -weechat_list_search -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search Cerca un elemento nella lista. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_search (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Argomenti: @@ -2790,23 +2706,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_search (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_search(list, data) # esempio item = weechat.list_search(list, "my data") ----------------------------------------- +---- -weechat_list_search_pos -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_search_pos _WeeChat ≥ 0.3.4._ @@ -2815,10 +2730,10 @@ Cerca la posizione di un elemento nella lista. Prototipo: [source,C] ----------------------------------------- +---- int weechat_list_search_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Argomenti: @@ -2832,23 +2747,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int pos_item = weechat_list_search_pos (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo pos_item = weechat.list_search_pos(list, data) # esempio pos_item = weechat.list_search_pos(list, "my data") ----------------------------------------- +---- -weechat_list_casesearch -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch Cerca un elemento nella lista, senza effettuare una ricerca esatta. @@ -2856,10 +2770,10 @@ esatta. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_casesearch (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Argomenti: @@ -2873,23 +2787,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_casesearch (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_casesearch(list, data) # esempio item = weechat.list_casesearch(list, "my data") ----------------------------------------- +---- -weechat_list_casesearch_pos -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_casesearch_pos _WeeChat ≥ 0.3.4._ @@ -2898,10 +2811,10 @@ Cerca la posizione di un elemento in una lista, ricerca normale. Prototipo: [source,C] ----------------------------------------- +---- int weechat_list_casesearch_pos (struct t_weelist *weelist, const char *data); ----------------------------------------- +---- Argomenti: @@ -2915,33 +2828,32 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int pos_item = weechat_list_casesearch_pos (list, "my data"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo pos_item = weechat.list_casesearch_pos(list, data) # esempio pos_item = weechat.list_casesearch_pos(list, "my data") ----------------------------------------- +---- -weechat_list_get -^^^^^^^^^^^^^^^^ +==== weechat_list_get Restituisce un elemento in una lista in base alla sua posizione. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_get (struct t_weelist *weelist, int position); ----------------------------------------- +---- Argomenti: @@ -2955,32 +2867,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *item = weechat_list_get (list, 0); /* primo elemento */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_get(list, position) # esempio item = weechat.list_get(list, 0) ----------------------------------------- +---- -weechat_list_set -^^^^^^^^^^^^^^^^ +==== weechat_list_set Imposta un nuovo valore per un elemento. Prototipo: [source,C] ----------------------------------------- +---- void weechat_list_set (struct t_weelist_item *item, const char *value); ----------------------------------------- +---- Argomenti: @@ -2990,32 +2901,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_list_set (item, "nuovi dati"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.list_set(item, value) # esempio weechat.list_set(item, "nuovi dati") ----------------------------------------- +---- -weechat_list_next -^^^^^^^^^^^^^^^^^ +==== weechat_list_next Restituisce l'elemento successivo nella lista. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_next (struct t_weelist_item *item); ----------------------------------------- +---- Argomenti: @@ -3029,32 +2939,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *next_item = weechat_list_next (item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_next(item) # esempio item = weechat.list_next(item) ----------------------------------------- +---- -weechat_list_prev -^^^^^^^^^^^^^^^^^ +==== weechat_list_prev Restituisce l'elemento precedente nella lista. Prototipo: [source,C] ----------------------------------------- +---- struct t_weelist_item *weechat_list_prev (struct t_weelist_item *item); ----------------------------------------- +---- Argomenti: @@ -3068,32 +2977,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_weelist_item *prev_item = weechat_list_prev (item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.list_prev(item) # esempio item = weechat.list_prev(item) ----------------------------------------- +---- -weechat_list_string -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_string Restituisce il valore stringa di un elemento. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_list_string (struct t_weelist_item *item); ----------------------------------------- +---- Argomenti: @@ -3106,32 +3014,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "valore dell'elemento: %s", weechat_list_string (item)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.list_string(item) # esempio weechat.prnt("", "valore dell'elemento: %s" % weechat.list_string(item)) ----------------------------------------- +---- -weechat_list_size -^^^^^^^^^^^^^^^^^ +==== weechat_list_size Restituisce la dimensione della lista (numero di elementi). Prototipo: [source,C] ----------------------------------------- +---- char *weechat_list_size (struct t_weelist *weelist); ----------------------------------------- +---- Argomenti: @@ -3145,33 +3052,32 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "dimensione della lista: %d", weechat_list_size (list)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo size = weechat.list_size(list) # esempio weechat.prnt("", "dimensione della lista: %d" % weechat.list_size(list)) ----------------------------------------- +---- -weechat_list_remove -^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove Rimuove un elemento in una lista. Prototipo: [source,C] ----------------------------------------- +---- void weechat_list_remove (struct t_weelist *weelist, struct t_weelist_item *item); ----------------------------------------- +---- Argomenti: @@ -3181,32 +3087,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_list_remove (list, item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.list_remove(list, item) # esempio weechat.list_remove(list, item) ----------------------------------------- +---- -weechat_list_remove_all -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_list_remove_all Rimuove tutti gli elementi in una lista. Prototipo: [source,C] ----------------------------------------- +---- void weechat_list_remove_all (struct t_weelist *weelist); ----------------------------------------- +---- Argomenti: @@ -3215,32 +3120,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_list_remove_all (list); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.list_remove_all(list) # esempio weechat.list_remove_all(list) ----------------------------------------- +---- -weechat_list_free -^^^^^^^^^^^^^^^^^ +==== weechat_list_free Libera una lista. Prototipo: [source,C] ----------------------------------------- +---- void weechat_list_free (struct t_weelist *weelist); ----------------------------------------- +---- Argomenti: @@ -3249,29 +3153,27 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_list_free (list); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.list_free(list) # esempio weechat.list_free(list) ----------------------------------------- +---- [[hashtables]] -Tabelle hash -~~~~~~~~~~~~ +=== Tabelle hash Funzioni per le tabelle hash. -weechat_hashtable_new -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_new _WeeChat ≥ 0.3.3._ @@ -3280,7 +3182,7 @@ Crea una nuova tabella hash. Prototipo: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hashtable_new (int size, const char *type_keys, const char *type_values, @@ -3289,7 +3191,7 @@ struct t_hashtable *weechat_hashtable_new (int size, int (*callback_keycmp)(struct t_hashtable *hashtable, const void *key1, const void *key2)); ----------------------------------------- +---- Argomenti: @@ -3334,19 +3236,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, NULL, NULL); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_set_with_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_with_size // TRANSLATION MISSING _WeeChat ≥ 0.3.3, updated in 0.4.2._ @@ -3357,11 +3258,11 @@ chiave ed il valore. Prototipo: [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set_with_size (struct t_hashtable *hashtable, const void *key, int key_size, const void *value, int value_size); ----------------------------------------- +---- Argomenti: @@ -3381,16 +3282,15 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_set_with_size (hashtable, "my_key", 0, my_buffer, sizeof (my_buffer_struct)); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_set -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set // TRANSLATION MISSING _WeeChat ≥ 0.3.3, updated in 0.4.2._ @@ -3400,10 +3300,10 @@ Aggiunge o aggiorna un elemento nella tabella hash. Prototipo: [source,C] ----------------------------------------- +---- struct t_hashtable_item *weechat_hashtable_set (struct t_hashtable *hashtable, const void *key, const void *value); ----------------------------------------- +---- Argomenti: @@ -3419,12 +3319,11 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_set (hashtable, "my_key", "my_value"); ----------------------------------------- +---- -weechat_hashtable_get -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get _WeeChat ≥ 0.3.3._ @@ -3433,9 +3332,9 @@ Ottiene il valore associato ad una chiave in una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hashtable_get (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Argomenti: @@ -3449,15 +3348,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- void *value = weechat_hashtable_get (hashtable, "my_key"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_has_key -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_has_key _WeeChat ≥ 0.3.4._ @@ -3466,9 +3364,9 @@ Restituisce 1 se la tabella hash ha una chiave, altrimenti 0. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hashtable_has_key (struct t_hashtable *hashtable, void *key); ----------------------------------------- +---- Argomenti: @@ -3482,19 +3380,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_hashtable_has_key (hashtable, "my_key")) { /* la chiave è nella tabella hash */ /* ... */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_map -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map _WeeChat ≥ 0.3.3._ @@ -3503,14 +3400,14 @@ Chiama una funzione su tutte le voci della tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void hashtable_map (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const void *key, const void *value), void *callback_map_data); ----------------------------------------- +---- Argomenti: @@ -3521,7 +3418,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const void *key, const void *value) @@ -3533,13 +3430,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_map_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_map_string _WeeChat ≥ 0.3.7._ @@ -3549,14 +3445,14 @@ valori come stringhe. Prototipo: [source,C] ----------------------------------------- +---- void hashtable_map_string (struct t_hashtable *hashtable, void (*callback_map)(void *data, struct t_hashtable *hashtable, const char *key, const char *value), void *callback_map_data); ----------------------------------------- +---- Argomenti: @@ -3571,7 +3467,7 @@ eliminate dopo la chiamata alla callback. Esempio in C: [source,C] ----------------------------------------- +---- void map_cb (void *data, struct t_hashtable *hashtable, const char *key, const char *value) @@ -3582,13 +3478,12 @@ map_cb (void *data, struct t_hashtable *hashtable, } /* ... */ weechat_hashtable_map_string (hashtable, &map_cb, NULL); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_integer _WeeChat ≥ 0.3.3._ @@ -3597,10 +3492,10 @@ Restituisce un valore intero per la proprietà di una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hashtable_get_integer (struct t_hashtable *hashtable, void *property); ----------------------------------------- +---- Argomenti: @@ -3616,15 +3511,14 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int items_count = weechat_hashtable_get_integer (hashtable, "items_count"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_get_string _WeeChat ≥ 0.3.4._ @@ -3633,10 +3527,10 @@ Restituisce il valore stringa della proprietà di una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hashtable_get_string (struct t_hashtable *hashtable, const char *property); ----------------------------------------- +---- Argomenti: @@ -3669,18 +3563,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "keys are type: %s", weechat_hashtable_get_string (hashtable, "type_keys")); weechat_printf (NULL, "list of keys: %s", weechat_hashtable_get_string (hashtable, "keys")); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_set_pointer _WeeChat ≥ 0.3.4._ @@ -3689,10 +3582,10 @@ Imposta il valore puntatore della proprietà di una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hashtable_set_pointer (struct t_hashtable *hashtable, const char *property, void *pointer); ----------------------------------------- +---- Argomenti: @@ -3707,7 +3600,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- void my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) { @@ -3715,13 +3608,12 @@ my_free_value_cb (struct t_hashtable *hashtable, const void *key, void *value) } weechat_hashtable_set_pointer (hashtable, "callback_free_value", &my_free_value_cb); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_add_to_infolist -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_add_to_infolist _WeeChat ≥ 0.3.3._ @@ -3730,11 +3622,11 @@ Aggiunge elementi della tabella hash ad un elemento della lista info. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hashtable_add_to_infolist (struct t_hashtable *hashtable, struct t_infolist_item *infolist_item, const char *prefix); ----------------------------------------- +---- Argomenti: @@ -3749,7 +3641,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); /* se la tabella hash contiene: @@ -3761,13 +3653,12 @@ weechat_hashtable_add_to_infolist (hashtable, infolist_item, "testhash"); "testhash_name_00001" = "key2" "testhash_value_00001" = "value 2" */ ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_remove -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove _WeeChat ≥ 0.3.3._ @@ -3776,9 +3667,9 @@ Rimuove un elemento in una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hashtable_remove (struct t_hashtable *hashtable, const void *key); ----------------------------------------- +---- Argomenti: @@ -3788,15 +3679,14 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_remove (hashtable, "my_key"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_remove_all _WeeChat ≥ 0.3.3._ @@ -3805,9 +3695,9 @@ Rimuove tutti gli elementi in una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hashtable_remove_all (struct t_hashtable *hashtable); ----------------------------------------- +---- Argomenti: @@ -3816,15 +3706,14 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_remove_all (hashtable); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hashtable_free -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hashtable_free _WeeChat ≥ 0.3.3._ @@ -3833,9 +3722,9 @@ Libera una tabella hash. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hashtable_free (struct t_hashtable *hashtable); ----------------------------------------- +---- Argomenti: @@ -3844,33 +3733,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hashtable_free (hashtable); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. [[configuration_files]] -File di configurazione -~~~~~~~~~~~~~~~~~~~~~~ +=== File di configurazione Funzioni per i file di configurazione. -weechat_config_new -^^^^^^^^^^^^^^^^^^ +==== weechat_config_new Crea un nuovo file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_file *weechat_config_new (const char *name, int (*callback_reload)(void *data, struct t_config_file *config_file), void *callback_reload_data); ----------------------------------------- +---- Argomenti: @@ -3901,7 +3788,7 @@ opzioni (con <<_weechat_config_new_option,weechat_config_new_option>>). Esempio in C: [source,C] ----------------------------------------- +---- int my_config_reload_cb (void *data, struct t_config_file *config_file) { @@ -3913,12 +3800,12 @@ my_config_reload_cb (void *data, struct t_config_file *config_file) struct t_config_file *config_file = weechat_config_new ("test", &my_config_reload_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo config_file = weechat.config_new(name, calback_reload, callback_reload_data) @@ -3928,17 +3815,16 @@ def my_config_reload_cb(data, config_file): return weechat.WEECHAT_RC_OK config_file = weechat.config_new("test", "my_config_reload_cb", "") ----------------------------------------- +---- -weechat_config_new_section -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_section Crea una nuova sezione nel file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_new_section ( struct t_config_file *config_file, const char *name, @@ -3969,7 +3855,7 @@ struct t_config_section *weechat_config_new_section ( struct t_config_section *section, struct t_config_option *option), void *callback_delete_option_data); ----------------------------------------- +---- Argomenti: @@ -4052,7 +3938,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_section_read_cb (void *data, struct t_config_file *config_file, struct t_config_section *section, const char *option_name, @@ -4126,12 +4012,12 @@ struct t_config_section *new_section2 = &my_section_write_default_cb, NULL, &my_section_create_option_cb, NULL, &my_section_delete_option_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo section = weechat.config_new_section(config_file, name, user_can_add_options, user_can_delete_options, @@ -4170,21 +4056,20 @@ section = weechat.config_new_section(config_file, "section1", 1, 1, "my_section_write_default_cb", "", "my_section_create_option_cb", "", "my_section_delete_option_cb", "") ----------------------------------------- +---- -weechat_config_search_section -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section Cerca una sezione in un file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_section *weechat_config_search_section ( struct t_config_file *config_file, const char *section_name); ----------------------------------------- +---- Argomenti: @@ -4198,31 +4083,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_section *section = weechat_config_search_section (config_file, "section"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo section = weechat.config_search_section(config_file, section_name) # esempio section = weechat.config_search_section(config_file, "section") ----------------------------------------- +---- -weechat_config_new_option -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_new_option Crea una nuova opzione nella sezione di un file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_new_option ( struct t_config_file *config_file, struct t_config_section *section, @@ -4245,7 +4129,7 @@ struct t_config_option *weechat_config_new_option ( void (*callback_delete)(void *data, struct t_config_option *option), void *callback_delete_data); ----------------------------------------- +---- Argomenti: @@ -4296,7 +4180,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- /* booleano */ struct t_config_option *option1 = weechat_config_new_option (config_file, section, "option1", "boolean", @@ -4361,12 +4245,12 @@ struct t_config_option *option5 = NULL, NULL, /* verifica callback */ NULL, NULL, /* modifica callback */ NULL, NULL); /* elimina callback */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo option = weechat.config_new_option(config_file, section, name, type, description, string_values, min, max, default_value, value, null_value_allowed, @@ -4421,7 +4305,7 @@ option5 = weechat.config_new_option(config_file, section, "option5", "color", "", "", "", "", "", "") ----------------------------------------- +---- // TRANSLATION MISSING [NOTE] @@ -4429,20 +4313,19 @@ In Ruby, the 3 callbacks + data (6 strings) must be given in an array of 6 strings (due to a Ruby limitation of 15 arguments by function), see the 'WeeChat Scripting Guide' for more info _(fixed in version 0.4.1)_. -weechat_config_search_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_option Cerca un'opzione nella sezione di un file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_search_option ( struct t_config_file *config_file, struct t_config_section *section, const char *option_name); ----------------------------------------- +---- Argomenti: @@ -4457,37 +4340,36 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_search_option (config_file, section, "option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo option = weechat.config_search_option(config_file, section, option_name) # esempio option = weechat.config_search_option(config_file, section, "option") ----------------------------------------- +---- -weechat_config_search_section_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_section_option Cerca una sezione ed un'opzione in un file di configurazione o sezione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_search_section_option (struct t_config_file *config_file, struct t_config_section *section, const char *option_name, struct t_config_section **section_found, struct t_config_option **option_found); ----------------------------------------- +---- Argomenti: @@ -4502,7 +4384,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4519,26 +4401,25 @@ else { /* opzione non trovata */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_config_search_with_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_search_with_string Cerca un'opzione con il nome completo. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_search_with_string (const char *option_name, struct t_config_file **config_file, struct t_config_section **section, struct t_config_option **option, char **pos_option_name); ----------------------------------------- +---- Argomenti: @@ -4556,7 +4437,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_file *ptr_config_file; struct t_config_section *ptr_section; struct t_config_option *ptr_option; @@ -4575,22 +4456,21 @@ else { /* opzione non trovata */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_config_string_to_boolean -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_to_boolean Verifica se un testo è "vero" o "falso", come valore booleano. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_string_to_boolean (const char *text); ----------------------------------------- +---- Argomenti: @@ -4604,7 +4484,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_config_string_to_boolean (option_value)) { /* il valore è "true" */ @@ -4613,32 +4493,31 @@ else { /* il valore è "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_string_to_boolean(text) # esempio if weechat.config_string_to_boolean(text): # ... ----------------------------------------- +---- -weechat_config_option_reset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_reset Resetta un'opzione al proprio valore predefinito. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_reset (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Argomenti: @@ -4657,7 +4536,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_option_reset (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4670,12 +4549,12 @@ switch (weechat_config_option_reset (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_option_reset(option, run_callback) @@ -4687,20 +4566,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set Imposta un nuovo valore per l'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_set (struct t_config_option *option, const char *value, int run_callback); ----------------------------------------- +---- Argomenti: @@ -4719,7 +4597,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_option_set (option, "new_value", 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4732,12 +4610,12 @@ switch (weechat_config_option_set (option, "new_value", 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_option_set(option, value, run_callback) @@ -4749,20 +4627,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_set_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_set_null Imposta null (valore non definito) per un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_set_null (struct t_config_option *option, int run_callback); ----------------------------------------- +---- Argomenti: @@ -4784,7 +4661,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_option_set_null (option, 1)) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -4797,12 +4674,12 @@ switch (weechat_config_option_set_null (option, 1)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_option_set_null(option, run_callback) @@ -4814,19 +4691,18 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_unset -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_unset Rimuove/ripristina un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_unset (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -4844,7 +4720,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_option_unset (option)) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -4860,12 +4736,12 @@ switch (weechat_config_option_unset (option)) /* .... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_option_unset(option) @@ -4879,20 +4755,19 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- -weechat_config_option_rename -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_rename Rinomina un'opzione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_option_rename (struct t_config_option *option, const char *new_name); ----------------------------------------- +---- Argomenti: @@ -4902,33 +4777,32 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_option_rename (option, "new_name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_option_rename(option, new_name) # esempio weechat.config_option_rename(option, "new_name") ----------------------------------------- +---- -weechat_config_option_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_get_pointer Restituisce un puntatore alla proprietà di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_config_option_get_pointer (struct t_config_option *option, const char *property); ----------------------------------------- +---- Argomenti: @@ -4954,24 +4828,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *description = weechat_config_option_get_pointer (option, "description"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_config_option_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_is_null Verifica se un opzione è "null" (valore non definito). Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_is_null (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -4985,7 +4858,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_config_option_is_null (option)) { /* il valore è "null" */ @@ -4994,31 +4867,30 @@ else { /* il valore non è "null" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_option_is_null(option) # esempio if weechat.config_option_is_null(option): # ... ----------------------------------------- +---- -weechat_config_option_default_is_null -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_default_is_null Verifica che il valore predefinito di un'opzione sia "null" (valore non definito). Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_option_default_is_null (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5032,7 +4904,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_config_option_default_is_null (option)) { /* il valore predefinito è "null" */ @@ -5041,31 +4913,30 @@ else { /* il valore predefinito non è "null" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_option_default_is_null(option) # esempio if weechat.config_option_default_is_null(option): # ... ----------------------------------------- +---- -weechat_config_boolean -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean Restituisce il valore bool di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_boolean (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5078,7 +4949,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean (option)) { @@ -5088,12 +4959,12 @@ else { /* il valore è "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_boolean(option) @@ -5101,19 +4972,18 @@ value = weechat.config_boolean(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean(option): # ... ----------------------------------------- +---- -weechat_config_boolean_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_boolean_default Restituisce il valore bool predefinito di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_boolean_default (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5126,7 +4996,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); if (weechat_config_boolean_default (option)) { @@ -5136,12 +5006,12 @@ else { /* il valore è "false" */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_boolean_default(option) @@ -5149,19 +5019,18 @@ value = weechat.config_boolean_default(option) option = weechat.config_get("plugin.section.option") if weechat.config_boolean_default(option): # ... ----------------------------------------- +---- -weechat_config_integer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer Restituisce il valore intero di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_integer (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5174,34 +5043,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_integer(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_integer(option) ----------------------------------------- +---- -weechat_config_integer_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_integer_default Restituisce il valore intero predefinito di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_integer_default (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5214,34 +5082,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); int value = weechat_config_integer_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_integer_default(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_integer_default(option) ----------------------------------------- +---- -weechat_config_string -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string Restituisce il valore stringa di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_config_string (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5254,34 +5121,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_string(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_string(option) ----------------------------------------- +---- -weechat_config_string_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_string_default Restituisce il valore stringa predefinito di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_config_string_default (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5294,34 +5160,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *value = weechat_config_string_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_string_default(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_string_default(option) ----------------------------------------- +---- -weechat_config_color -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color Restituisce il valore colore di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_config_color (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5334,34 +5199,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_color(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_color(option) ----------------------------------------- +---- -weechat_config_color_default -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_color_default Restituisce il valore colore predefinito di un'opzione. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_config_color_default (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5374,25 +5238,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("plugin.section.option"); const char *color = weechat_config_color_default (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_color_default(option) # esempio option = weechat.config_get("plugin.section.option") value = weechat.config_color_default(option) ----------------------------------------- +---- -weechat_config_write_option -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_option Scrive una riga nel file di configurazione con l'opzione ed il suo valore (questa funzione dovrebbe essere chiamata solo nelle callback "write" @@ -5401,10 +5264,10 @@ o "write_default" per una sezione). Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_write_option (struct t_config_file *config_file, struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5414,7 +5277,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5425,12 +5288,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_write_option(config_file, option) @@ -5439,10 +5302,9 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "my_section", "") weechat.config_write_option(config_file, option) return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write_line -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write_line Scrive una riga nel file di configurazione (questa funzione dovrebbe essere chiamata solo nelle callback "write" o "write_default" per una @@ -5451,11 +5313,11 @@ sezione). Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_write_line (struct t_config_file *config_file, const char *option_name, const char *value, ...); ----------------------------------------- +---- Argomenti: @@ -5467,7 +5329,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- int my_section_write_cb (void *data, struct t_config_file *config_file, const char *section_name) @@ -5479,12 +5341,12 @@ my_section_write_cb (void *data, struct t_config_file *config_file, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_write_line(config_file, option_name, value) @@ -5493,19 +5355,18 @@ def my_section_write_cb(data, config_file, section_name): weechat.config_write_line(config_file, "my_section", "") weechat.config_write_line(config_file, "option", "value") return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_config_write -^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_write Scrive il file di configurazione su disco. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_write (struct t_config_file *config_file); ----------------------------------------- +---- Argomenti: @@ -5520,7 +5381,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_write (config_file)) { case WEECHAT_CONFIG_WRITE_OK: @@ -5533,12 +5394,12 @@ switch (weechat_config_write (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_write(config_file) @@ -5550,19 +5411,18 @@ elif rc == weechat.WEECHAT_CONFIG_WRITE_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_WRITE_ERROR: # ... ----------------------------------------- +---- -weechat_config_read -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_read Legge il file di configurazione da disco. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_read (struct t_config_file *config_file); ----------------------------------------- +---- Argomenti: @@ -5577,7 +5437,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_read (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5590,12 +5450,12 @@ switch (weechat_config_read (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_read(config_file) @@ -5607,19 +5467,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_reload -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_reload Ricarica il file di configurazione da disco. Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_reload (struct t_config_file *config_file); ----------------------------------------- +---- Argomenti: @@ -5634,7 +5493,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_reload (config_file)) { case WEECHAT_CONFIG_READ_OK: @@ -5647,12 +5506,12 @@ switch (weechat_config_reload (config_file)) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_reload(config_file) @@ -5664,19 +5523,18 @@ elif rc == weechat.WEECHAT_CONFIG_READ_MEMORY_ERROR: # ... elif rc == weechat.WEECHAT_CONFIG_READ_FILE_NOT_FOUND: # ... ----------------------------------------- +---- -weechat_config_option_free -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_option_free Libera un'opzione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_option_free (struct t_config_option *option); ----------------------------------------- +---- Argomenti: @@ -5685,32 +5543,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_option_free (option); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_option_free(option) # esempio weechat.config_option_free(option) ----------------------------------------- +---- -weechat_config_section_free_options -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free_options Libera tutte le opzioni in una sessione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_section_free_options (struct t_config_section *section); ----------------------------------------- +---- Argomenti: @@ -5719,32 +5576,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_section_free_options (section); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_section_free_options(section) # esempio weechat.config_section_free_options(section) ----------------------------------------- +---- -weechat_config_section_free -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_section_free Libera una sezione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_section_free (struct t_config_section *section); ----------------------------------------- +---- Argomenti: @@ -5753,32 +5609,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_section_free (section); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_section_free(section) # esempio weechat.config_section_free(section) ----------------------------------------- +---- -weechat_config_free -^^^^^^^^^^^^^^^^^^^ +==== weechat_config_free Libera un file di configurazione. Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_free (struct t_config_file *config_file); ----------------------------------------- +---- Argomenti: @@ -5787,32 +5642,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_free (config_file); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_free(config_file) # esempio weechat.config_free(config_file) ----------------------------------------- +---- -weechat_config_get -^^^^^^^^^^^^^^^^^^ +==== weechat_config_get Cerca un'opzione con il nome completo. Prototipo: [source,C] ----------------------------------------- +---- struct t_config_option *weechat_config_get (const char *option_name); ----------------------------------------- +---- Argomenti: @@ -5825,32 +5679,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_config_option *option = weechat_config_get ("weechat.look.item_time_format"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo option = weechat.config_get(option_name) # esempio option = weechat.config_get("weechat.look.item_time_format") ----------------------------------------- +---- -weechat_config_get_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_get_plugin Cerca un'opzione nei file di configurazione dei plugin (plugins.conf). Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_config_get_plugin (const char *option_name); ----------------------------------------- +---- Argomenti: @@ -5864,25 +5717,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- /* se il plugin corrente è "test", allora cerca il valore dell'opzione "plugins.var.test.option" nel file plugins.conf */ char *value = weechat_config_get_plugin ("option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_get_plugin(option_name) # esempio value = weechat.config_get_plugin("option") ----------------------------------------- +---- -weechat_config_is_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_is_set_plugin Verifica se un'opzione è impostata nel file di configurazione dei plugin (plugins.conf). @@ -5890,9 +5742,9 @@ plugin (plugins.conf). Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_is_set_plugin (const char *option_name); ----------------------------------------- +---- Argomenti: @@ -5906,7 +5758,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_config_is_set_plugin ("option")) { /* l'opzione è impostata */ @@ -5915,12 +5767,12 @@ else { /* l'opzione non esiste */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.config_is_set_plugin(option_name) @@ -5931,19 +5783,18 @@ if weechat.config_is_set_plugin("option"): else: # l'opzione non esiste # ... ----------------------------------------- +---- -weechat_config_set_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_plugin Imposta il nuovo valore per l'opzione nel file di configurazione dei plugin (plugins.conf). Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_set_plugin (const char *option_name, const char *value); ----------------------------------------- +---- Argomenti: @@ -5961,7 +5812,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_set_plugin ("option", "test_value")) { case WEECHAT_CONFIG_OPTION_SET_OK_CHANGED: @@ -5977,12 +5828,12 @@ switch (weechat_config_set_plugin ("option", "test_value")) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_set_plugin(option_name, value) @@ -5996,10 +5847,9 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_SET_ERROR: # ... ----------------------------------------- +---- -weechat_config_set_desc_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_set_desc_plugin _WeeChat ≥ 0.3.5._ @@ -6009,10 +5859,10 @@ Imposta la descrizione per l'opzione nel file di configurazione dei plugin Prototipo: [source,C] ----------------------------------------- +---- void weechat_config_set_desc_plugin (const char *option_name, const char *description); ----------------------------------------- +---- Argomenti: @@ -6027,14 +5877,14 @@ Una futura creazione dell'opzione con questo nome userà questa descrizione. Esempio in C: [source,C] ----------------------------------------- +---- weechat_config_set_desc_plugin ("option", "description of option"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.config_set_desc_plugin(option_name, description) @@ -6042,19 +5892,18 @@ weechat.config_set_desc_plugin(option_name, description) version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030500: weechat.config_set_desc_plugin("option", "description of option") ----------------------------------------- +---- -weechat_config_unset_plugin -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_config_unset_plugin Disattiva l'opzione nel file di configurazione dei plugin (plugins.conf). Prototipo: [source,C] ----------------------------------------- +---- int weechat_config_unset_plugin (const char *option_name); ----------------------------------------- +---- Argomenti: @@ -6073,7 +5922,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- switch (weechat_config_unset_plugin ("option")) { case WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET: @@ -6089,12 +5938,12 @@ switch (weechat_config_unset_plugin ("option")) /* ... */ break; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.config_unset_plugin(option_name) @@ -6108,16 +5957,14 @@ elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED: # ... elif rc == weechat.WEECHAT_CONFIG_OPTION_UNSET_ERROR: # ... ----------------------------------------- +---- [[key_bindings]] -Combinazione tasti -~~~~~~~~~~~~~~~~~~ +=== Combinazione tasti Funzioni per le combinazioni dei tasti. -weechat_key_bind -^^^^^^^^^^^^^^^^ +==== weechat_key_bind _WeeChat ≥ 0.3.6._ @@ -6131,9 +5978,9 @@ una combinazione tasti, usare <<_weechat_key_unbind,weechat_key_unbind>>. Prototipo: [source,C] ----------------------------------------- +---- int weechat_key_bind (const char *context, struct t_hashtable *keys); ----------------------------------------- +---- Argomenti: @@ -6151,7 +5998,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable *keys = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -6165,12 +6012,12 @@ if (keys) weechat_key_bind ("mouse", keys); weechat_hashtable_free (keys); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo num_keys = weechat.key_bind(context, keys) @@ -6179,10 +6026,9 @@ keys = { "@chat(python.test):button1": "hsignal:test_mouse", "@chat(python.test):wheelup": "/mycommand up", "@chat(python.test):wheeldown": "/mycommand down" } weechat.key_bind("mouse", keys) ----------------------------------------- +---- -weechat_key_unbind -^^^^^^^^^^^^^^^^^^ +==== weechat_key_unbind _WeeChat ≥ 0.3.6._ @@ -6195,9 +6041,9 @@ combinazione tasti definita dall'utente. Prototipo: [source,C] ----------------------------------------- +---- int weechat_key_unbind (const char *context, const char *key); ----------------------------------------- +---- Argomenti: @@ -6212,18 +6058,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- /* rimuove un singolo tasto */ weechat_key_unbind ("mouse", "@chat(plugin.buffer):button1"); /* rimuove tutti i tasti con la zona "chat(plugin.buffer)" */ weechat_key_unbind ("mouse", "area:chat(plugin.buffer)"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo num_keys = weechat.key_unbind(context, key) @@ -6234,39 +6080,37 @@ weechat.key_unbind("mouse", "@chat(plugin.buffer):button1") # rimuove tutti i tasti con la zona "chat(python.test)" weechat.key_unbind("mouse", "area:chat(python.test)") ----------------------------------------- +---- [[display]] -Visualizzazione -~~~~~~~~~~~~~~~ +=== Visualizzazione Funzioni per visualizzare il testo nei buffer. -weechat_prefix -^^^^^^^^^^^^^^ +==== weechat_prefix Restituisce un prefisso. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_prefix (const char *prefix); ----------------------------------------- +---- Argomenti: * 'prefix': nome del prefisso: [width="70%",cols="^2e,^1,^3,5",options="header"] -|======================================== +|=== | Prefisso | Valore | Colore | Descrizione | error | `=!=` | giallo | Messaggio di errore | network | `--` | magenta | Messaggio dalla rete | action | `*` | bianco | Azione automatica | join | `-->` | verde chiaro | Qualcuno entra nella chat corrente | quit | `<--` | rosso chiaro | Qualcuno lascia la chat corrente -|======================================== +|=== [NOTE] Valori e colori possono essere personalizzati con il comando `/set`. @@ -6279,32 +6123,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "%sQuesto è un errore...", weechat_prefix ("error")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.prefix(prefix) # esempio weechat.prnt("", "%sQuesto è un errore..." % weechat.prefix("error")) ----------------------------------------- +---- -weechat_color -^^^^^^^^^^^^^ +==== weechat_color Restituisce una codice colore stringa da visualizzare. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_color (const char *color_name); ----------------------------------------- +---- Argomenti: @@ -6357,36 +6200,35 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Color: %sblue %sdefault color %syellow on red", weechat_color ("blue"), weechat_color ("chat"), weechat_color ("yellow,red")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.color(color_name) # esempio weechat.prnt("", "%sColor: %sblue %sdefault color %syellow on red" % (weechat.color("blue"), weechat.color("chat"), weechat.color("yellow,red"))) ----------------------------------------- +---- -weechat_printf -^^^^^^^^^^^^^^ +==== weechat_printf Visualizza un messaggio su un buffer. Prototipo: [source,C] ----------------------------------------- +---- void weechat_printf (struct t_gui_buffer *buffer, const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6410,20 +6252,20 @@ Esempio in C: // TRANSLATION MISSING [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Benvenuto sul buffer di WeeChat"); weechat_printf (buffer, "Benvenuto su questo buffer"); weechat_printf (buffer, "%sQuesto è un errore!", weechat_prefix ("error")); weechat_printf (buffer, " \tMessaggio senza prefisso ma con \t alcune \t tabulazioni"); weechat_printf (buffer, "\t\tMessage without time/alignment"); weechat_printf (buffer, "\t\t"); /* empty line (without time) */ ----------------------------------------- +---- Script (Python): // TRANSLATION MISSING [source,python] ----------------------------------------- +---- # prototipo weechat.prnt(buffer, message) @@ -6434,23 +6276,22 @@ weechat.prnt(buffer, "%sQuesto è un errore!" % weechat.prefix("error")) weechat.prnt(buffer, " \tMessaggio senza prefisso ma con \t alcune \t tabulazioni") weechat.prnt(buffer, "\t\tMessage without time/alignment") weechat.prnt(buffer, "\t\t") # empty line (without time) ----------------------------------------- +---- [NOTE] La funzione è chiamata "print" negli script ("prnt" in Python). -weechat_printf_date -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date Visualizza un messaggio sul buffer, utilizzando una data personalizzata. Prototipo: [source,C] ----------------------------------------- +---- void weechat_printf_date (struct t_gui_buffer *buffer, time_t date, const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6462,25 +6303,24 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf_date (NULL, time (NULL) - 120, "Ciao, 2 minuti fa"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_printf_tags -^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_tags Visualizza un messaggio sul buffer, utilizzando tag personalizzati. Prototipo: [source,C] ----------------------------------------- +---- void weechat_printf_tags (struct t_gui_buffer *buffer, const char *tags, const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6492,26 +6332,25 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf_tags (NULL, "notify_message", "Messaggio con tag 'notify_message'"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_printf_date_tags -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_printf_date_tags Visualizza un messaggio sul buffer, usando tag e data personalizzati. Prototipo: [source,C] ----------------------------------------- +---- void weechat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, const char *tags, const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6524,7 +6363,7 @@ Argomenti: Tag usati di frequente (elenco non esaustivo): [width="70%",cols="1m,4",options="header"] -|======================================== +|=== | Tag | Descrizione | no_filter | La riga non può essere filtrata | no_highlight | Evidenziazione non possibile sulla riga @@ -6544,20 +6383,20 @@ Tag usati di frequente (elenco non esaustivo): | irc_ctcp_reply | Risposta ad un messaggio CTCP | irc_smart_filter | Messaggio IRC filtrabile tramite lo "smart filter" (filtro intelligente) | away_info | Messagio con informazioni sull'assenza -|======================================== +|=== Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf_date_tags (NULL, time (NULL) - 120, "notify_message", "Messaggio 2 minuti fa, con tag 'notify_message'"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.prnt_date_tags(buffer, date, tags, message) @@ -6565,23 +6404,22 @@ weechat.prnt_date_tags(buffer, date, tags, message) time = int(time.time()) weechat.prnt_date_tags("", time - 120, "notify_message", "Messaggio 2 minuti fa, con tag 'notify_message'") ----------------------------------------- +---- [NOTE] La funzione è chiamata "print_date_tags" negli script ("prnt_date_tags" in Python). -weechat_printf_y -^^^^^^^^^^^^^^^^ +==== weechat_printf_y Visualizza un messaggio sulla riga di un buffer con contenuto libero. Prototipo: [source,C] ----------------------------------------- +---- void weechat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6592,35 +6430,34 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf_y (buffer, 2, "Mio messaggio sulla terza riga"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.prnt_y(buffer, y, message) # esempio weechat.prnt_y("", 2, "Mio messaggio sulla terza riga") ----------------------------------------- +---- [NOTE] La funzione è chiamata "print_y" negli script ("prnt_y in Python). -weechat_log_printf -^^^^^^^^^^^^^^^^^^ +==== weechat_log_printf Scrive un messaggio nel file di log di WeeChat (weechat.log). Prototipo: [source,C] ----------------------------------------- +---- void weechat_log_printf (const char *message, ...); ----------------------------------------- +---- Argomenti: @@ -6629,32 +6466,30 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_log_printf ("Mio messaggio nel file di log"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.log_print(message) # esempio weechat.log_print("Mio messaggio nel file di log") ----------------------------------------- +---- [NOTE] La funzione è chiamata "log_print" negli script. [[hooks]] -Hook -~~~~ +=== Hook [[hook_priority]] [float] -Priorità degli hook -^^^^^^^^^^^^^^^^^^^ +==== Priorità degli hook _WeeChat ≥ 0.3.4._ @@ -6673,24 +6508,23 @@ La priorità predefinita è 1000. Esempio in C: [source,C] ----------------------------------------- +---- /* hook per il modificatore con priorità = 2000 */ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL); ----------------------------------------- +---- I tipi di hook che seguono consentono la priorità: command, command_run, signal, hsignal, config, completion, modifier, info, info_hashtable, infolist, hdata, focus. -weechat_hook_command -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command Hook su un comando. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command (const char *command, const char *description, const char *args, @@ -6702,7 +6536,7 @@ struct t_hook *weechat_hook_command (const char *command, char **argv, char **argv_eol), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -6744,7 +6578,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) @@ -6776,7 +6610,7 @@ struct t_hook *my_command_hook = &my_command_cb, /* callback_data */ NULL); ----------------------------------------- +---- Ad esempio, se il comando chiamato è `/comando abc def ghi`, allora 'argv' e 'argv_eol' contengono i seguenti valori: @@ -6797,7 +6631,7 @@ Per gli script, 'args' ha valore "abc def ghi". Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_command(command, description, args, args_description, completion, callback, callback_data) @@ -6819,23 +6653,22 @@ hook = weechat.hook_command("myfilter", "descrizione di myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- -weechat_hook_command_run -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_command_run Hook su un comando quando eseguito da WeeChat. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_command_run (const char *command, int (*callback)(void *data, struct t_gui_buffer *buffer, const char *command), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -6864,7 +6697,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_command_run_cb (void *data, struct t_gui_buffer *buffer, const char *command) @@ -6877,12 +6710,12 @@ my_command_run_cb (void *data, struct t_gui_buffer *buffer, struct t_hook *my_command_run_hook = weechat_hook_command_run ("/input complete*", &my_command_run_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_command_run(command, callback, callback_data) @@ -6892,24 +6725,23 @@ def my_command_run_cb(data, buffer, command): return weechat.WEECHAT_RC_OK_EAT hook = weechat.hook_command_run("/input complete*", "my_command_run_cb", "") ----------------------------------------- +---- -weechat_hook_timer -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_timer Hook sul timer. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_timer (long interval, int align_second, int max_calls, int (*callback)(void *data, int remaining_calls), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -6937,7 +6769,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_timer_cb (void *data, int remaining_calls) { @@ -6948,12 +6780,12 @@ my_timer_cb (void *data, int remaining_calls) /* timer chiamato ogni 20 secondi */ struct t_hook *my_timer_hook = weechat_hook_timer (20 * 1000, 0, 0, &my_timer_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_timer(interval, align_second, max_calls, callback, callback_data) @@ -6964,17 +6796,16 @@ def my_timer_cb(data, remaining_calls): # timer chiamato ogni 20 secondi hook = weechat.hook_timer(20 * 1000, 0, 0, "my_timer_cb", "") ----------------------------------------- +---- -weechat_hook_fd -^^^^^^^^^^^^^^^ +==== weechat_hook_fd Hook su un descrittore file (file oppure socket). Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_fd (int fd, int flag_read, int flag_write, @@ -6982,7 +6813,7 @@ struct t_hook *weechat_hook_fd (int fd, int (*callback)(void *data, int fd), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -7006,7 +6837,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_fd_cb (void *data, int fd) { @@ -7018,12 +6849,12 @@ int sock = socket (AF_INET, SOCK_STREAM, 0); /* imposta le opzioni del socket */ /* ... */ struct t_hook *my_fd_hook = weechat_hook_fd (sock, 1, 0, 0, &my_fd_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_fd(fd, flag_read, flag_write, flag_exception, callback, callback_data) @@ -7034,10 +6865,9 @@ def my_fd_cb(data, fd): sock = ... hook = weechat.hook_fd(sock, 1, 0, 0, "my_fd_cb", "") ----------------------------------------- +---- -weechat_hook_process -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process Hook su un processo (lanciato con un fork), e cattura l'output. @@ -7053,7 +6883,7 @@ arguments in the hashtable 'options' _(WeeChat ≥ 0.4.0)_. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process (const char *command, int timeout, int (*callback)(void *data, @@ -7062,7 +6892,7 @@ struct t_hook *weechat_hook_process (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -7125,7 +6955,7 @@ codice restituito è non-negativo. Esempio in C: [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7156,12 +6986,12 @@ my_process_cb (void *data, const char *command, int return_code, struct t_hook *my_process_hook = weechat_hook_process ("ls", 5000, &my_process_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_process(command, timeout, callback, callback_data) @@ -7179,10 +7009,9 @@ def my_process_cb(data, command, return_code, out, err): return weechat.WEECHAT_RC_OK hook = weechat.hook_process("ls", 5000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_process_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_process_hashtable _WeeChat ≥ 0.3.7._ @@ -7192,7 +7021,7 @@ e cattura dell'output. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_process_hashtable (const char *command, struct t_hashtable *options, int timeout, @@ -7202,7 +7031,7 @@ struct t_hook *weechat_hook_process_hashtable (const char *command, const char *out, const char *err), void *callback_data); ----------------------------------------- +---- Gli argomenti sono gli stessi della funzione <<_weechat_hook_process,weechat_hook_process>>, con un argomento aggiuntivo: @@ -7240,7 +7069,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_process_cb (void *data, const char *command, int return_code, const char *out, const char *err) @@ -7320,12 +7149,12 @@ if (options_cmd2) &my_process_cb, NULL); weechat_hashtable_free (options_cmd2); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_process_hashtable(command, options, timeout, callback, callback_data) @@ -7360,17 +7189,16 @@ hook3 = weechat.hook_process_hashtable("sh", { "arg1": "-c", "arg2": "ls -l /tmp | grep something" }, 20000, "my_process_cb", "") ----------------------------------------- +---- -weechat_hook_connect -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_connect Hook su una connessione (connessione in secondo piano ad un host remoto). Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_connect (const char *proxy, const char *address, int port, @@ -7388,7 +7216,7 @@ struct t_hook *weechat_hook_connect (const char *proxy, const char *error, const char *ip_address), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -7447,7 +7275,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_connect_cb (void *data, int status, int gnutls_rc, int sock, const char *error, const char *ip_address) @@ -7497,12 +7325,12 @@ struct t_hook *my_connect_hook = weechat_hook_connect (NULL, NULL, NULL, 0, /* GnuTLS */ NULL, &my_connect_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_connect(proxy, address, port, ipv6, retry, local_hostname, callback, callback_data) @@ -7535,17 +7363,16 @@ def my_connect_cb(data, status, gnutls_rc, sock, error, ip_address): hook = weechat.hook_connect("", "my.server.org", 1234, 1, 0, "", "my_connect_cb", "") ----------------------------------------- +---- -weechat_hook_print -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_print Hook su un messaggio stampato. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *tags, const char *message, @@ -7560,7 +7387,7 @@ struct t_hook *weechat_hook_print (struct t_gui_buffer *buffer, const char *prefix, const char *message), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -7595,7 +7422,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, int tags_count, const char **tags, @@ -7609,12 +7436,12 @@ my_print_cb (void *data, struct t_gui_buffer *buffer, time_t date, /* cattura tutti i messaggi, su tutti i buffer, senza colore */ struct t_hook *my_print_hook = weechat_hook_print (NULL, NULL, NULL, 1, &my_print_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_print(buffer, tags, message, strip_colors, callback, callback_data) @@ -7625,24 +7452,23 @@ def my_print_cb(data, buffer, date, tags, displayed, highlight, prefix, message) # cattura tutti i messaggi, su tutti i buffer, senza colore hook = weechat.hook_print("", "", "", 1, "my_print_cb", "") ----------------------------------------- +---- -weechat_hook_signal -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal Hook su un segnale. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_signal (const char *signal, int (*callback)(void *data, const char *signal, const char *type_data, void *signal_data), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -7651,7 +7477,7 @@ Argomenti: <<hook_priority,priority>>): [width="100%",cols="^1,^3,^4,5",options="header"] -|======================================== +|=== | Plugin | Segnale | Argomenti | Descrizione // TRANSLATION MISSING @@ -8209,7 +8035,7 @@ Argomenti: _(WeeChat ≥ 0.3.2)_ | Puntatore: lista info con info per xfer | Xfer terminato -|======================================== +|=== [NOTE] ^(1)^ 'xxx' è il nome del server IRC, 'yyy' è il nome del comando IRC. @@ -8238,7 +8064,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_signal_cb (void *data, const char *signal, const char *type_data, void *signal_data) @@ -8250,12 +8076,12 @@ my_signal_cb (void *data, const char *signal, const char *type_data, /* cattura il segnale "quit" */ struct t_hook *my_signal_hook = weechat_hook_signal ("quit", &my_signal_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_signal(signal, callback, callback_data) @@ -8266,20 +8092,19 @@ def my_signal_cb(data, signal, signal_data): # cattura il segnale "quit" hook = weechat.hook_signal("quit", "my_signal_cb", "") ----------------------------------------- +---- -weechat_hook_signal_send -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_signal_send Invia un segnale. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hook_signal_send (const char *signal, const char *type_data, void *signal_data); ----------------------------------------- +---- Argomenti: @@ -8291,24 +8116,23 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.hook_signal_send(signal, type_data, signal_data) # esempio weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string) ----------------------------------------- +---- [[signal_logger_backlog]] -Signal logger_backlog -+++++++++++++++++++++ +===== Signal logger_backlog Il segnale "logger_backlog" può essere inviato per visualizzare il backlog (cronologia di chat) nel buffer (ad esempio se il proprio buffer viene aperto @@ -8319,20 +8143,19 @@ L'argomento è un puntatore al buffer. Esempio in C: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("logger_backlog", WEECHAT_HOOK_SIGNAL_POINTER, buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_signal_send("logger_backlog", weechat.WEECHAT_HOOK_SIGNAL_POINTER, buffer) ----------------------------------------- +---- [[signals_xxx_script_install]] -Signals xxx_script_install -++++++++++++++++++++++++++ +===== Signals xxx_script_install Cinque segnali che possono essere inviati per installare uno script, a seconda del linguaggio: @@ -8359,22 +8182,21 @@ L'argomento è una stringa con il percorso dello script da installare. Esempio in C: [source,C] ----------------------------------------- +---- weechat_hook_signal_send ("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_signal_send("python_script_install", WEECHAT_HOOK_SIGNAL_STRING, "/home/xxx/.weechat/test.py") ----------------------------------------- +---- [[signals_xxx_script_remove]] -Signals xxx_script_remove -+++++++++++++++++++++++++ +===== Signals xxx_script_remove Cinque segnali che possono essere inviati per rimuovere un elenco di script, a seconda del linguaggio: @@ -8396,24 +8218,23 @@ rimuovere (script è il nome senza percorso, ad esempio 'script.py'). Esempio in C: [source,C] ----------------------------------------- +---- /* scarica e rimuove gli script test.py e script.py */ weechat_hook_signal_send ("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # scarica e rimuove gli script test.py e script.py weechat.hook_signal_send("python_script_remove", WEECHAT_HOOK_SIGNAL_STRING, "test.py,script.py") ----------------------------------------- +---- [[signal_irc_input_send]] -Signal irc_input_send -+++++++++++++++++++++ +===== Signal irc_input_send _WeeChat ≥ 0.3.4._ @@ -8439,7 +8260,7 @@ L'argomento è una stringa con il seguente formato: Esempi in C: [source,C] ----------------------------------------- +---- /* dice "Hello!" sul server freenode, canale #weechat */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Hello!"); @@ -8447,12 +8268,12 @@ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, /* invia il comando "/whois FlashCode" sul server freenode, con priorità minore */ weechat_hook_signal_send ("irc_input_send", WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # dice "Hello!" sul server freenode server, canale #weechat weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;#weechat;1;;Hello!") @@ -8460,10 +8281,9 @@ weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, # invia il comando "/whois FlashCode" sul server freenode, con priorità minore weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- -weechat_hook_hsignal -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal _WeeChat ≥ 0.3.4._ @@ -8472,13 +8292,13 @@ Hook su hsignal (segnale con tabella hash). Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hsignal (const char *signal, int (*callback)(void *data, const char *signal, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -8486,7 +8306,7 @@ Argomenti: (priorità consentita, consultare la nota a proposito di <<hook_priority,priority>>): [width="100%",cols="^1,^3,5,5",options="header"] -|======================================== +|=== | Plugin | Segnale | Argomenti | Descrizione | irc | irc_redirection_xxx_yyy ^(1)^ + @@ -8541,7 +8361,7 @@ Argomenti: 'parent_group' ('struct t_gui_nick_group *'): parent group + 'nick' ('struct t_gui_nick *'): nick | Nick changed in nicklist -|======================================== +|=== [NOTE] ^(1)^ 'xxx' è l'argomento del segnale usato nella redirezione, 'yyy' è lo schema @@ -8567,7 +8387,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8577,12 +8397,12 @@ my_hsignal_cb (void *data, const char *signal, struct t_hashtable *hashtable) struct t_hook *my_hsignal_hook = weechat_hook_hsignal ("test", &my_hsignal_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_hsignal(signal, callback, callback_data) @@ -8592,10 +8412,9 @@ def my_hsignal_cb(data, signal, hashtable): return weechat.WEECHAT_RC_OK hook = weechat.hook_hsignal("test", "my_hsignal_cb", "") ----------------------------------------- +---- -weechat_hook_hsignal_send -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hsignal_send _WeeChat ≥ 0.3.4._ @@ -8604,9 +8423,9 @@ Invia un hsignal (segnale con tabella hash). Prototipo: [source,C] ----------------------------------------- +---- void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable); ----------------------------------------- +---- Argomenti: @@ -8616,7 +8435,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8628,22 +8447,21 @@ if (hashtable) weechat_hook_hsignal_send ("my_hsignal", hashtable); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.hook_hsignal_send(signal, hashtable) # esempio weechat.hook_hsignal_send("my_hsignal", { "key": "value" }) ----------------------------------------- +---- [[hsignal_irc_redirect_command]] -Hsignal irc_redirect_command -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_command _WeeChat ≥ 0.3.4._ @@ -8702,7 +8520,7 @@ sono stringhe): Esempio in C: [source,C] ----------------------------------------- +---- int test_whois_cb (void *data, const char *signal, struct t_hashtable *hashtable) { @@ -8728,12 +8546,12 @@ if (hashtable) "freenode;;2;;/whois FlashCode"); weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- def test_whois_cb(data, signal, hashtable): weechat.prnt("", "error = %s" % hashtable["error"]) weechat.prnt("", "output = %s" % hashtable["output"]) @@ -8745,11 +8563,10 @@ weechat.hook_hsignal_send("irc_redirect_command", "string": "FlashCode" }) weechat.hook_signal_send("irc_input_send", weechat.WEECHAT_HOOK_SIGNAL_STRING, "freenode;;2;;/whois FlashCode") ----------------------------------------- +---- [[hsignal_irc_redirect_pattern]] -Hsignal irc_redirect_pattern -++++++++++++++++++++++++++++ +===== Hsignal irc_redirect_pattern _WeeChat ≥ 0.3.4._ @@ -8769,9 +8586,9 @@ Per ogni comando in 'cmd_start', 'cmd_stop' e 'cmd_extra', è possibile fornire un intero con la posizione di "string" che va trovato nel messaggio ricevuto, ad esempio: ----------------------------------------- +---- 352:1,354,401:1 ----------------------------------------- +---- Per i comandi 352 e 401, "string" deve essere trovata nel messaggio ricevuto, come primo argomento. @@ -8784,7 +8601,7 @@ di ogni redirezione. Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable = weechat_hashtable_new (8, WEECHAT_HASHTABLE_STRING, WEECHAT_HASHTABLE_STRING, @@ -8805,12 +8622,12 @@ if (hashtable) /* ... */ weechat_hashtable_free (hashtable); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- weechat.hook_hsignal_send("irc_redirect_pattern", { "pattern": "my_whois", "timeout": "30", "cmd_start": "311:1", @@ -8819,23 +8636,22 @@ weechat.hook_hsignal_send("irc_redirect_pattern", # now redirect irc whois command with hsignal irc_redirect_command # using pattern "my_whois" # ... ----------------------------------------- +---- -weechat_hook_config -^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_config Hook su un'opzione di configurazione. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_config (const char *option, int (*callback)(void *data, const char *option, const char *value), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -8860,7 +8676,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_config_cb (void *data, const char *option, const char *value) { @@ -8871,12 +8687,12 @@ my_config_cb (void *data, const char *option, const char *value) /* cattura le modifiche dell'opzione "weechat.look.item_time_format" */ struct t_hook *my_config_hook = weechat_hook_config ("weechat.look.item_time_format", &my_config_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_config(option, callback, callback_data) @@ -8887,17 +8703,16 @@ def my_config_cb(data, option, value): # cattura le modifiche dell'opzione "weechat.look.item_time_format" hook = weechat.hook_config("weechat.look.item_time_format", "my_config_cb", "") ----------------------------------------- +---- -weechat_hook_completion -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion Hook su un completamento. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_completion (const char *completion_item, const char *description, int (*callback)(void *data, @@ -8905,7 +8720,7 @@ struct t_hook *weechat_hook_completion (const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -8939,7 +8754,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -8955,12 +8770,12 @@ my_completion_cb (void *data, const char *completion_item, struct t_hook *my_completion_hook = weechat_hook_completion ("plugin_item", "my custom completion!", &my_completion_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_completion(completion_item, description, callback, callback_data) @@ -8972,10 +8787,9 @@ def my_completion_cb(data, completion_item, buffer, completion): hook = weechat.hook_completion("plugin_item", "my custom completion!", "my_completion_cb", "") ----------------------------------------- +---- -weechat_hook_completion_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_get_string _Novità nella versioe 0.3.4._ @@ -8984,10 +8798,10 @@ Ottiene il completamento di una proprietà come stringa. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hook_completion_get_string (struct t_gui_completion *completion, const char *property); ----------------------------------------- +---- Argomenti: @@ -9000,7 +8814,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- int my_completion_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, @@ -9014,12 +8828,12 @@ my_completion_cb (void *data, const char *completion_item, return WEECHAT_RC_OK; } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hook_completion_get_string(completion, property) @@ -9030,22 +8844,21 @@ def my_completion_cb(data, completion_item, buffer, completion): # completamento che dipende dagli argomenti # ... return weechat.WEECHAT_RC_OK ----------------------------------------- +---- -weechat_hook_completion_list_add -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_completion_list_add Aggiunge una parola per il completamento. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hook_completion_list_add (struct t_gui_completion *completion, const char *word, int nick_completion, const char *where); ----------------------------------------- +---- Argomenti: @@ -9063,29 +8876,28 @@ Esempio in C: consultare <<_weechat_hook_completion,weechat_hook_completion>>. Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.hook_completion_list_add(completion, word, nick_completion, where) # esempio: consultare function hook_completion precedente ----------------------------------------- +---- -weechat_hook_modifier -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier Hook su un modificatore. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_modifier (const char *modifier, char *(*callback)(void *data, const char *modifier, const char *modifier_data, const char *string), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9095,7 +8907,7 @@ Argomenti: <<hook_priority,priority>>) [width="100%",cols="^2,3,4,4",options="header"] -|======================================== +|=== | Modificatore | Dati modificatore | Stringa | Output | charset_decode | @@ -9190,7 +9002,7 @@ Argomenti: plugin + ";" + buffer_name + ";" + tags | Messaggio stampato | Nuovo messaggio stampato -|======================================== +|=== [NOTE] ^(1)^ 'xxx' è il nome del comando IRC. + @@ -9212,7 +9024,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char * my_modifier_cb (void *data, const char *modifier, const char *modifier_data, @@ -9237,12 +9049,12 @@ my_modifier_cb (void *data, const char *modifier, struct t_hook *my_modifier_hook = weechat_hook_modifier ("weechat_print", &my_modifier_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_modifier(modifier, callback, callback_data) @@ -9251,21 +9063,20 @@ def my_modifier_cb(data, modifier, modifier_data, string): return "%s xxx" % string hook = weechat.hook_modifier("weechat_print", "my_modifier_cb", "") ----------------------------------------- +---- -weechat_hook_modifier_exec -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_modifier_exec Esegue modificatore(i). Prototipo: [source,C] ----------------------------------------- +---- char *weechat_hook_modifier_exec (const char *modifier, const char *modifier_data, const char *string); ----------------------------------------- +---- Argomenti: @@ -9280,31 +9091,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char *new_string = weechat_hook_modifier_exec ("my_modifier", my_data, my_string); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.hook_modifier_exec(modifier, modifier_data, string) # esempio weechat.hook_modifier_exec("my_modifier", my_data, my_string) ----------------------------------------- +---- -weechat_hook_info -^^^^^^^^^^^^^^^^^ +==== weechat_hook_info Hook su una informazione (la callback prende e restituisce una stringa). Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info (const char *info_name, const char *description, const char *args_description, @@ -9312,7 +9122,7 @@ struct t_hook *weechat_hook_info (const char *info_name, const char *info_name, const char *arguments), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9336,7 +9146,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char * my_info_cb (void *data, const char *info_name, const char *arguments) { @@ -9349,12 +9159,12 @@ struct t_hook *my_info_hook = weechat_hook_info ("my_info", "Some info", "Info about arguments", &my_info_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_info(info_name, description, args_description, callback, callback_data) @@ -9364,10 +9174,9 @@ def my_info_cb(data, info_name, arguments): hook = weechat.hook_info("my_info", "Some info", "Info about arguments", "my_info_cb", "") ----------------------------------------- +---- -weechat_hook_info_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_info_hashtable _WeeChat ≥ 0.3.4._ @@ -9376,7 +9185,7 @@ Hook su una informazione (la callback prende e restituisce una tabella hash). Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *description, const char *args_description, @@ -9385,7 +9194,7 @@ struct t_hook *weechat_hook_info_hashtable (const char *info_name, const char *info_name, struct t_hashtable *hashtable), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9412,7 +9221,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable * my_info_hashtable_cb (void *data, const char *info_name, struct t_hashtable *hashtable) { @@ -9426,12 +9235,12 @@ struct t_hook *my_info_hook = weechat_hook_info_hashtable ("my_info_hashtable", "Info about input hashtable", "Info about output hashtable", &my_info_hashtable_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_info_hashtable(info_name, description, args_description, output_description, callback, callback_data) @@ -9444,10 +9253,9 @@ hook = weechat.hook_info_hashtable("my_info_hashtable", "Some info", "Info about input hashtable", "Info about output hashtable", "my_info_hashtable_cb", "") ----------------------------------------- +---- -weechat_hook_infolist -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hook_infolist Hook su una lista info: la callback restituisce il puntatore alla lista info richiesta. @@ -9455,7 +9263,7 @@ richiesta. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_infolist (const char *infolist_name, const char *description, const char *pointer_description, @@ -9465,7 +9273,7 @@ struct t_hook *weechat_hook_infolist (const char *infolist_name, void *pointer, const char *arguments), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9492,7 +9300,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist * my_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) @@ -9511,12 +9319,12 @@ struct t_hook *my_infolist = weechat_hook_infolist ("my_infolist", "Info about pointer", "Info about arguments", &my_infolist_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_infolist(infolist_name, description, pointer_description, args_description, callback, callback_data) @@ -9530,23 +9338,22 @@ def my_infolist_cb(data, infolist_name, pointer, arguments): hook = weechat.hook_infolist("my_infolist", "Infolist with some data", "Info about pointer", "Info about arguments", "my_infolist_cb", "") ----------------------------------------- +---- -weechat_hook_hdata -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_hdata Hook di un hdata: la callback restituisce il puntatore all'hdata richiesto. Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_hdata (const char *hdata_name, const char *description, struct t_hdata *(*callback)(void *data, const char *hdata_name), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9566,7 +9373,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata * my_hdata_cb (void *data, const char *hdata_name) { @@ -9582,13 +9389,12 @@ my_hdata_cb (void *data, const char *hdata_name) struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata", "Hdata for my structure", &my_hdata_cb, NULL); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hook_focus -^^^^^^^^^^^^^^^^^^ +==== weechat_hook_focus Hook sul foucus: evento del mouse o tasto premuto nella modalità cursore (movimento libero del cursore). @@ -9596,12 +9402,12 @@ Hook sul foucus: evento del mouse o tasto premuto nella modalità cursore Prototipo: [source,C] ----------------------------------------- +---- struct t_hook *weechat_hook_focus (const char *area, struct t_hashtable *(*callback)(void *data, struct t_hashtable *info), void *callback_data); ----------------------------------------- +---- Argomenti: @@ -9629,7 +9435,7 @@ Contenuto della tabella hash inviata alla callback (tasti e valori sono di tipo "string"): [width="100%",cols="5m,5,8,3",options="header"] -|======================================== +|=== | Key ^(1)^ | Descrizione | Valori di esempio | Valore se N/D | _x | Colonna sullo schermo 2+| "0" ... "n" | _y | Riga sullo schermo 2+| "0" ... "n" @@ -9660,7 +9466,7 @@ Contenuto della tabella hash inviata alla callback (tasti e valori sono di tipo | _bar_item_name | Nome dell'elemento barra | "buffer_nicklist", "hotlist", ... | "" | _bar_item_line | Riga nell'elemento barra | "0" ... "n" | "-1" | _bar_item_col | Colonna nell'elemento barra | "0" ... "n" | "-1" -|======================================== +|=== [NOTE] ^(1)^ Ci sono alcune chiavi con il suffisso "2" (es: "_x2", "_y2", "_window2", @@ -9674,13 +9480,13 @@ per sapere dove il pulsante del mouse è stato rilasciato). + Informazioni aggiuntive per l'elemento barra "buffer_nicklist": [width="70%",cols="3m,3,8",options="header"] -|======================================== +|=== | Chiave | Plugin | Descrizione | nick | core | Nick | prefix | core | Prefisso per il nick | group | core | Nome gruppo | irc_host | irc | Host per il nick (se conosciuto) -|======================================== +|=== [NOTE] ^(1)^ Il nome del plugin che definisce un hook_focus per restituire @@ -9694,7 +9500,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable * my_focus_nicklist_cb (void *data, struct t_hashtable *info) { @@ -9707,12 +9513,12 @@ my_focus_nicklist_cb (void *data, struct t_hashtable *info) /* add focus on nicklist */ struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist", &my_focus_nicklist_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hook = weechat.hook_focus(area, callback, callback_data) @@ -9723,10 +9529,9 @@ def my_focus_nicklist_cb(data, info): return my_dict hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "") ----------------------------------------- +---- -weechat_hook_set -^^^^^^^^^^^^^^^^ +==== weechat_hook_set _WeeChat ≥ 0.3.9._ @@ -9736,10 +9541,10 @@ Set string value of a hook property. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hook_set (struct t_hook *hook, const char *property, const char *value); ----------------------------------------- +---- Argomenti: @@ -9747,40 +9552,39 @@ Argomenti: * 'property' e 'value': nome della proprietà, con il proprio valore: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nome | Valore | Descrizione | subplugin | qualsiasi stringa | // TRANSLATION MISSING Name of sub plugin (commonly script name, which is displayed in `/help command` for a hook of type 'command') -|======================================== +|=== Esempio in C: [source,C] ----------------------------------------- +---- struct t_hook *my_command_hook = weechat_hook_command ("abcd", "description", "args", "description args", "", &my_command_cb, NULL); weechat_hook_set (my_command_hook, "subplugin", "test"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_unhook -^^^^^^^^^^^^^^ +==== weechat_unhook Rimuove un hook. Prototipo: [source,C] ----------------------------------------- +---- void weechat_unhook (struct t_hook *hook); ----------------------------------------- +---- Argomenti: @@ -9789,25 +9593,24 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hook *my_hook = weechat_hook_command ( /* ... */ ); /* ... */ weechat_unhook (my_hook); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.unhook(hook) # esempio weechat.unhook(my_hook) ----------------------------------------- +---- -weechat_unhook_all -^^^^^^^^^^^^^^^^^^ +==== weechat_unhook_all Rimuove l'hook in qualsiasi punto in cui è stato attivato dal plugin corrente. @@ -9815,43 +9618,41 @@ plugin corrente. Prototipo: [source,C] ----------------------------------------- +---- void weechat_unhook_all (); ----------------------------------------- +---- Esempio in C: [source,C] ----------------------------------------- +---- weechat_unhook_all (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.unhook_all() # esempio weechat.unhook_all() ----------------------------------------- +---- [[buffers]] -Buffer -~~~~~~ +=== Buffer Funzioni per creare/richiedere/chiudere buffer. -weechat_buffer_new -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_new Apre un nuovo buffer. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_new (const char *name, int (*input_callback)(void *data, struct t_gui_buffer *buffer, @@ -9860,7 +9661,7 @@ struct t_gui_buffer *weechat_buffer_new (const char *name, int (*close_callback)(void *data, struct t_gui_buffer *buffer), void *close_callback_data); ----------------------------------------- +---- Argomenti: @@ -9890,7 +9691,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_input_cb (void *data, struct t_gui_buffer *buffer, const char *input_data) { @@ -9909,12 +9710,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) struct t_gui_buffer *my_buffer = weechat_buffer_new ("my_buffer", &my_input_cb, NULL, &my_close_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo buffer = weechat.buffer_new(name, input_callback, input_callback_data, close_callback, close_callback_data) @@ -9929,10 +9730,9 @@ def my_close_cb(data, buffer): return weechat.WEECHAT_RC_OK buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "") ----------------------------------------- +---- -weechat_current_buffer -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_buffer Restituisce il puntatore al buffer corrente (buffer visualizzato nella finestra corrente). @@ -9940,9 +9740,9 @@ finestra corrente). Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_current_buffer (); ----------------------------------------- +---- Valore restituito: @@ -9951,33 +9751,32 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (weechat_current_buffer (), "Testo sul buffer corrente"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo buffer = weechat.current_buffer() # esempio weechat.prnt(weechat.current_buffer(), "Testo sul buffer corrente") ----------------------------------------- +---- -weechat_buffer_search -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search Cerca un buffer tramite plugin e/o nome. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search (const char *plugin, const char *name); ----------------------------------------- +---- Argomenti: @@ -9992,24 +9791,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("my_plugin", "my_buffer"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo buffer = weechat.buffer_search(plugin, name) # esempio buffer = weechat.buffer_search("my_plugin", "my_buffer") ----------------------------------------- +---- -weechat_buffer_search_main -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_search_main Cerca nel buffer principale di WeeChat (per primo nel buffer 'core', il primo visualizzato all'avvio di WeeChat). @@ -10017,9 +9815,9 @@ visualizzato all'avvio di WeeChat). Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer_search_main (); ----------------------------------------- +---- Valore restituito: @@ -10028,32 +9826,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_buffer *weechat_buffer = weechat_buffer_search_main (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo buffer = weechat.buffer_search_main() # esempio buffer = weechat.buffer_search_main() ----------------------------------------- +---- -weechat_buffer_clear -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_clear Pulisce il contenuto del buffer. Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_clear (struct t_gui_buffer *buffer); ----------------------------------------- +---- Argomenti: @@ -10062,19 +9859,19 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_search ("my_plugin", "my_buffer"); if (my_buffer) { weechat_buffer_clear (my_buffer); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.buffer_clear(buffer) @@ -10082,19 +9879,18 @@ weechat.buffer_clear(buffer) buffer = weechat.buffer_search("my_plugin", "my_buffer") if buffer != "": weechat.buffer_clear(buffer) ----------------------------------------- +---- -weechat_buffer_close -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_close Chiude un buffer. Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_close (struct t_gui_buffer *buffer); ----------------------------------------- +---- Argomenti: @@ -10103,18 +9899,18 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_buffer *my_buffer = weechat_buffer_new ("my_buffer", &my_input_cb, NULL, &my_close_cb, NULL); /* ... */ weechat_buffer_close (my_buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.buffer_close(buffer) @@ -10122,10 +9918,9 @@ weechat.buffer_close(buffer) buffer = weechat.buffer_new("my_buffer", "my_input_cb", "", "my_close_cb", "") # ... weechat.buffer_close(buffer) ----------------------------------------- +---- -weechat_buffer_merge -^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_merge Unisce un buffer in un altro: entrambi i buffer esistono separatamente, ma con lo stesso numero, e WeeChat visualizzerà le righe di entrambi i @@ -10134,10 +9929,10 @@ buffer (righe mischiate). Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_merge (struct t_gui_buffer *buffer, struct t_gui_buffer *target_buffer); ----------------------------------------- +---- Argomenti: @@ -10147,36 +9942,35 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- /* merge current buffer with weechat "core" buffer */ weechat_buffer_merge (weechat_current_buffer (), weechat_buffer_search_main ()); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.buffer_merge(buffer, target_buffer) # esempio # merge current buffer with WeeChat "core" buffer weechat.buffer_merge(weechat.current_buffer(), weechat.buffer_search_main()) ----------------------------------------- +---- -weechat_buffer_unmerge -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_unmerge Stacca un buffer da un gruppo di buffer uniti. Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_unmerge (struct t_gui_buffer *buffer, int number); ----------------------------------------- +---- Argomenti: @@ -10188,23 +9982,22 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_buffer_unmerge (weechat_current_buffer (), 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.buffer_unmerge(buffer, number) # esempio weechat.buffer_unmerge(weechat.current_buffer(), 1) ----------------------------------------- +---- -weechat_buffer_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_integer Restituisce il valore intero della proprietà di un buffer. @@ -10212,10 +10005,10 @@ un buffer. Prototipo: [source,C] ----------------------------------------- +---- int weechat_buffer_get_integer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Argomenti: @@ -10270,34 +10063,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "my buffer number is: %d", weechat_buffer_get_integer (my_buffer, "number")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.buffer_get_integer(buffer, property) # esempio weechat.prnt("", "my buffer number is: %d" % weechat.buffer_get_integer(my_buffer, "number")) ----------------------------------------- +---- -weechat_buffer_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_string Restituisce il valore stringa di una proprietà del buffer. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_buffer_get_string (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Argomenti: @@ -10327,16 +10119,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "name / short name of buffer are: %s / %s", weechat_buffer_get_string (my_buffer, "name"), weechat_buffer_get_string (my_buffer, "short_name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.buffer_get_string(buffer, property) @@ -10344,20 +10136,19 @@ value = weechat.buffer_get_string(buffer, property) weechat.prnt("", "name / short name of buffer are: %s / %s" % (weechat.buffer_get_string(my_buffer, "name"), weechat.buffer_get_string(my_buffer, "short_name"))) ----------------------------------------- +---- -weechat_buffer_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_get_pointer Restituisce il valore puntatore della proprietà di un buffer. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_buffer_pointer (struct t_gui_buffer *buffer, const char *property); ----------------------------------------- +---- Argomenti: @@ -10374,34 +10165,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "plugin pointer of my buffer: %lx", weechat_buffer_get_pointer (my_buffer, "plugin")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.buffer_get_pointer(buffer, property) # esempio weechat.prnt("", "plugin pointer of my buffer: %s" % weechat.buffer_get_pointer(my_buffer, "plugin")) ----------------------------------------- +---- -weechat_buffer_set -^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set Imposta il valore stringa della proprietà di un buffer. Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_set (struct t_gui_buffer *buffer, const char *property, const char *value); ----------------------------------------- +---- Argomenti: @@ -10409,7 +10199,7 @@ Argomenti: * 'property' e 'value': nome della proprietà, con il proprio valore: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nome | Valore | Descrizione | hotlist | "+", "-", WEECHAT_HOTLIST_LOW, WEECHAT_HOTLIST_MESSAGE, @@ -10531,12 +10321,12 @@ Argomenti: | localvar_del_xxx | - | Rimuove la variabile locale 'xxx' -|======================================== +|=== Esempio in C: [source,C] ----------------------------------------- +---- /* disabilita hotlist (per tutti i buffer) */ weechat_buffer_set (NULL, "hotlist", "-"); @@ -10551,12 +10341,12 @@ weechat_buffer_set (my_buffer, "localvar_set_tizio", "abc"); /* rimuove la variabile locale "tizio" */ weechat_buffer_set (my_buffer, "localvar_del_tizio", NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.buffer_set(buffer, property, value) @@ -10576,20 +10366,19 @@ weechat.buffer_set(my_buffer, "localvar_set_tizio", "abc") # rimuove la variabile locale "tizio" weechat.buffer_set(my_buffer, "localvar_del_tizio", "") ----------------------------------------- +---- -weechat_buffer_set_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_set_pointer Imposta il valore puntatore per la proprietà di un buffer. Prototipo: [source,C] ----------------------------------------- +---- void weechat_buffer_set_pointer (struct t_gui_buffer *buffer, const char *property, void *pointer); ----------------------------------------- +---- Argomenti: @@ -10610,18 +10399,18 @@ Argomenti: Prototypes for callbacks: [source,C] ----------------------------------------- +---- int close_callback (void *data, struct t_gui_buffer *buffer); int input_callback (void *data, struct t_gui_buffer *buffer, const char *input_data); int nickcmp_callback (void *data, struct t_gui_buffer *buffer, const char *nick1, const char *nick2); ----------------------------------------- +---- Esempio in C: [source,C] ----------------------------------------- +---- int my_close_cb (void *data, struct t_gui_buffer *buffer) { @@ -10630,13 +10419,12 @@ my_close_cb (void *data, struct t_gui_buffer *buffer) } weechat_buffer_set_pointer (my_buffer, "close_callback", &my_close_cb); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_buffer_string_replace_local_var -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_string_replace_local_var Sostituisce le variabili globali in una stringa con i loro valori, utilizzando le variabili del buffer locale. @@ -10644,10 +10432,10 @@ le variabili del buffer locale. Prototipo: [source,C] ----------------------------------------- +---- char *weechat_buffer_string_replace_local_var (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Argomenti: @@ -10661,18 +10449,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_buffer_set (my_buffer, "localvar_set_toto", "abc"); char *str = weechat_buffer_string_replace_local_var (my_buffer, "test with $toto"); /* str contiene "test with abc" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.buffer_string_replace_local_var(buffer, string) @@ -10680,10 +10468,9 @@ value = weechat.buffer_string_replace_local_var(buffer, string) weechat.buffer_set(my_buffer, "localvar_set_toto", "abc") str = weechat.buffer_string_replace_local_var(my_buffer, "test with $toto") # str contains "test with abc" ----------------------------------------- +---- -weechat_buffer_match_list -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_buffer_match_list _WeeChat ≥ 0.3.5._ @@ -10692,9 +10479,9 @@ Verifica se il buffer corrisponde ad una lista di buffer. Prototipo: [source,C] ----------------------------------------- +---- int weechat_buffer_match_list (struct t_gui_buffer *buffer, const char *string); ----------------------------------------- +---- Argomenti: @@ -10711,7 +10498,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_buffer *buffer = weechat_buffer_search ("irc", "freenode.#weechat"); if (buffer) { @@ -10720,12 +10507,12 @@ if (buffer) weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.freenode.*")); /* 1 */ weechat_printf (NULL, "%d", weechat_buffer_match_list (buffer, "irc.oftc.*,python.*")); /* 0 */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo match = weechat.buffer_match_list(buffer, string) @@ -10736,25 +10523,23 @@ if buffer: weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "*,!*#weechat*")) # 0 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.freenode.*")) # 1 weechat.prnt("", "%d" % weechat.buffer_match_list(buffer, "irc.oftc.*,python.*")) # 0 ----------------------------------------- +---- [[windows]] -Finestre -~~~~~~~~ +=== Finestre Funzioni per richiedere finestre. -weechat_current_window -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_current_window Restituisce il puntatore alla finestra corrente Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_current_window (); ----------------------------------------- +---- Valore restituito: @@ -10763,23 +10548,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_window *current_window = weechat_current_window (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo window = weechat.current_window() # esempio current_window = weechat.current_window() ----------------------------------------- +---- -weechat_window_search_with_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_search_with_buffer _WeeChat ≥ 0.3.5._ @@ -10788,9 +10572,9 @@ Restituisce il puntatore alla finestra che mostra il buffer. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_window *weechat_window_search_with_buffer (struct t_gui_buffer *buffer); ----------------------------------------- +---- Argomenti: @@ -10804,36 +10588,35 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "window displaying core buffer: %lx", weechat_window_search_with_buffer (weechat_buffer_search_main ())); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo window = weechat.window_search_with_buffer(buffer) # esempio weechat.prnt("", "window displaying core buffer: %s" % weechat.window_search_with_buffer(weechat.buffer_search_main())) ----------------------------------------- +---- -weechat_window_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_integer Restituisce il valore intero della proprietà di una finestra. Prototipo: [source,C] ----------------------------------------- +---- int weechat_window_get_integer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Argomenti: @@ -10868,16 +10651,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "current window is at position (x,y): (%d,%d)", weechat_window_get_integer (weechat_current_window (), "win_x"), weechat_window_get_integer (weechat_current_window (), "win_y")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.window_get_integer(window, property) @@ -10885,10 +10668,9 @@ value = weechat.window_get_integer(window, property) weechat.prnt("", "current window is at position (x,y): (%d,%d)" % (weechat.window_get_integer(weechat.current_window(), "win_x"), weechat.window_get_integer(weechat.current_window(), "win_y"))) ----------------------------------------- +---- -weechat_window_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_string Restituisce il valore stringa della proprietà di una finestra. @@ -10898,10 +10680,10 @@ La funzione non è utilizzata oggi, è riservata per una versione futura. Prototipo: [source,C] ----------------------------------------- +---- int weechat_window_get_string (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Argomenti: @@ -10912,18 +10694,17 @@ Valore restituito: * valore stringa della proprietà -weechat_window_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_get_pointer Restituisce il valore puntatore della proprietà di una finestra. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_window_get_pointer (struct t_gui_window *window, const char *property); ----------------------------------------- +---- Argomenti: @@ -10939,35 +10720,34 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "buffer displayed in current window: %lx", weechat_window_get_pointer (weechat_current_window (), "buffer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.window_get_pointer(window, property) # esempio weechat.prnt("", "buffer displayed in current window: %s" % weechat.window_get_pointer(weechat.current_window(), "buffer")) ----------------------------------------- +---- -weechat_window_set_title -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_window_set_title Imposta il titolo per il terminale. Prototipo: [source,C] ----------------------------------------- +---- void weechat_window_set_title (const char *title); ----------------------------------------- +---- Argomenti: @@ -10976,42 +10756,40 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_window_set_title ("nuovo titolo qui"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.window_set_title(window, title) # esempio weechat.window_set_title("nuovo titolo qui") ----------------------------------------- +---- [[nicklist]] -Lista nick -~~~~~~~~~~ +=== Lista nick Funzioni per il buffer nicklist. -weechat_nicklist_add_group -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_group Aggiunge un gruppo in una lista nick. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_add_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *parent_group, const char *name, const char *color, int visible); ----------------------------------------- +---- Argomenti: @@ -11043,40 +10821,39 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *my_group = weechat_nicklist_add_group (my_buffer, my_parent_group, "test_group", "weechat.color.nicklist_group", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo group = weechat.nicklist_add_group(buffer, parent_group, name, color, visible) # esempio group = weechat.nicklist_add_group(my_buffer, my_parent_group, "test_group", "weechat.color.nicklist_group", 1) ----------------------------------------- +---- -weechat_nicklist_search_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_group Cerca un gruppo in una lista nick. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *weechat_nicklist_search_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Argomenti: @@ -11092,31 +10869,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group = weechat_nicklist_search_group (my_buffer, NULL, "test_group"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo group = weechat.nicklist_search_group(buffer, from_group, name) # esempio group = weechat.nicklist_search_group(my_buffer, "", "test_group") ----------------------------------------- +---- -weechat_nicklist_add_nick -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_add_nick Aggiunge un nick in un gruppo. Prototipo: [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, @@ -11124,7 +10900,7 @@ struct t_gui_nick_group *weechat_nicklist_add_nick (struct t_gui_buffer *buffer, const char *prefix, const char *prefix_color, int visible); ----------------------------------------- +---- Argomenti: @@ -11157,19 +10933,19 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick *my_nick = weechat_nicklist_add_nick (my_buffer, my_group, "test_nick", (nick_away) ? "weechat.color.nicklist_away" : "bar_fg", "@", "lightgreen", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo nick = weechat.nicklist_add_nick(buffer, group, name, color, prefix, prefix_color, visible) @@ -11179,21 +10955,20 @@ if nick_away: else: color = "bar_fg" nick = weechat.nicklist_add_nick(my_buffer, my_group, "test_nick", color, "@", "lightgreen", 1) ----------------------------------------- +---- -weechat_nicklist_search_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_search_nick Cerca un nick nella lista nick. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_nick *weechat_nicklist_search_nick (struct t_gui_buffer *buffer, struct t_gui_nick_group *from_group, const char *name); ----------------------------------------- +---- Argomenti: @@ -11209,34 +10984,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick *ptr_nick = weechat_nicklist_search_nick (my_buffer, NULL, "test_nick"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo nick = weechat.nicklist_search_nick(buffer, from_group, name) # esempio nick = weechat.nicklist_search_nick(my_buffer, "", "test_nick") ----------------------------------------- +---- -weechat_nicklist_remove_group -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_group Rimuove un gruppo da una lista nick. Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_group (struct t_gui_buffer *buffer, struct t_gui_nick_group *group); ----------------------------------------- +---- Argomenti: @@ -11247,33 +11021,32 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_group (my_buffer, my_group); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.nicklist_remove_group(buffer, group) # esempio weechat.nicklist_remove_group(my_buffer, my_group) ----------------------------------------- +---- -weechat_nicklist_remove_nick -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_nick Rimuove un nick dalla lista nick. Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_nick (struct t_gui_buffer *buffer, struct t_gui_nick *nick); ----------------------------------------- +---- Argomenti: @@ -11283,32 +11056,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_nick (my_buffer, my_nick); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.nicklist_remove_nick(buffer, nick) # esempio weechat.nicklist_remove_nick(my_buffer, my_nick) ----------------------------------------- +---- -weechat_nicklist_remove_all -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_remove_all Rimuove tutti i gruppi/nick da una lista nick. Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_remove_all (struct t_gui_buffer *buffer); ----------------------------------------- +---- Argomenti: @@ -11317,23 +11089,22 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_nicklist_remove_all (my_buffer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.nicklist_remove_all(buffer) # esempio weechat.nicklist_remove_all(my_buffer) ----------------------------------------- +---- -weechat_nicklist_get_next_item -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_get_next_item _WeeChat ≥ 0.3.7._ @@ -11343,11 +11114,11 @@ per mostrare la lista nick). Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_get_next_item (struct t_gui_buffer *buffer, struct t_gui_nick_group **group, struct t_gui_nick **nick); ----------------------------------------- +---- Argomenti: @@ -11358,7 +11129,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *ptr_group; struct t_gui_nick *ptr_nick; @@ -11379,13 +11150,12 @@ while (ptr_group || ptr_nick) } weechat_nicklist_get_next_item (buffer, &ptr_group, &ptr_nick); } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_nicklist_group_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_integer _WeeChat ≥ 0.3.4._ @@ -11394,11 +11164,11 @@ Restituisce un valore intero della proprietà di un gruppo. Prototipo: [source,C] ----------------------------------------- +---- int weechat_nicklist_group_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Argomenti: @@ -11415,23 +11185,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_group_get_integer (buffer, group, "visible"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_group_get_integer(buffer, group, property) # esempio visible = weechat.nicklist_group_get_integer(buffer, group, "visible") ----------------------------------------- +---- -weechat_nicklist_group_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_string _WeeChat ≥ 0.3.4._ @@ -11440,11 +11209,11 @@ Restituisce il valore stringa della proprietà di un gruppo. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_nicklist_group_get_string (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Argomenti: @@ -11461,23 +11230,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_group_get_string (buffer, group, "color"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_group_get_string(buffer, group, property) # esempio color = weechat.nicklist_group_get_string(buffer, group, "color") ----------------------------------------- +---- -weechat_nicklist_group_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_get_pointer _WeeChat ≥ 0.3.4._ @@ -11486,11 +11254,11 @@ Restituisce il valore puntatore della proprietà di un gruppo. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_nicklist_group_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property); ----------------------------------------- +---- Argomenti: @@ -11506,23 +11274,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *parent = weechat_nicklist_group_get_pointer (buffer, group, "parent"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_group_get_pointer(buffer, group, property) # esempio parent = weechat.nicklist_group_get_pointer(buffer, group, "parent") ----------------------------------------- +---- -weechat_nicklist_group_set -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_group_set _WeeChat ≥ 0.3.4._ @@ -11531,12 +11298,12 @@ Imposta il valore stringa della proprietà di un gruppo. Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_group_set (struct t_gui_buffer *buffer, struct t_gui_nick_group *group, const char *property, const char *value); ----------------------------------------- +---- Argomenti: @@ -11545,7 +11312,7 @@ Argomenti: * 'property' e 'value': nome della proprietà, con il suo valore: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nome | Valore | Descrizione | color | nome per l'opzione del colore per WeeChat | @@ -11554,12 +11321,12 @@ Argomenti: | visible | "0", "1" | "0" = gruppo nascosto, "1" = gruppo visibile -|======================================== +|=== Esempio in C: [source,C] ----------------------------------------- +---- /* cambia colore del gruppo a "bar_fg" */ weechat_nicklist_group_set (buffer, group, "color", "bar_fg"); @@ -11568,12 +11335,12 @@ weechat_nicklist_group_set (buffer, group, "color", "yellow"); /* nasconde gruppo nella lista nick */ weechat_nicklist_group_set (buffer, group, "visible", "0"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.nicklist_group_set(buffer, group, property, value) @@ -11587,10 +11354,9 @@ weechat.nicklist_group_set(buffer, group, "color", "yellow") # nasconde gruppo nella lista nick weechat.nicklist_group_set(buffer, group, "visible", "0") ----------------------------------------- +---- -weechat_nicklist_nick_get_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_integer _WeeChat ≥ 0.3.4._ @@ -11599,11 +11365,11 @@ Restituisce il valore intero della proprietà di un nick. Prototipo: [source,C] ----------------------------------------- +---- int weechat_nicklist_nick_get_integer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Argomenti: @@ -11619,23 +11385,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int visible = weechat_nicklist_nick_get_integer (buffer, nick, "visible"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_nick_get_integer(buffer, nick, property) # esempio visible = weechat.nicklist_nick_get_integer(buffer, nick, "visible") ----------------------------------------- +---- -weechat_nicklist_nick_get_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_string _WeeChat ≥ 0.3.4._ @@ -11644,11 +11409,11 @@ Restituisce il valore stringa della proprietà di un nick. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_nicklist_nick_get_string (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Argomenti: @@ -11667,23 +11432,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *color = weechat_nicklist_nick_get_string (buffer, nick, "color"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_nick_get_string(buffer, nick, property) # esempio color = weechat.nicklist_nick_get_string(buffer, nick, "color") ----------------------------------------- +---- -weechat_nicklist_nick_get_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_get_pointer _WeeChat ≥ 0.3.4._ @@ -11692,11 +11456,11 @@ Restituisce il valore puntatore della proprietà di un nick. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_nicklist_nick_get_pointer (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property); ----------------------------------------- +---- Argomenti: @@ -11712,23 +11476,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_nick_group *group = weechat_nicklist_nick_get_pointer (buffer, nick, "group"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.nicklist_nick_get_pointer(buffer, nick, property) # esempio group = weechat.nicklist_nick_get_pointer(buffer, nick, "group") ----------------------------------------- +---- -weechat_nicklist_nick_set -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_nicklist_nick_set _WeeChat ≥ 0.3.4._ @@ -11737,12 +11500,12 @@ Imposta il valore stringa della proprietà di un nick. Prototipo: [source,C] ----------------------------------------- +---- void weechat_nicklist_nick_set (struct t_gui_buffer *buffer, struct t_gui_nick *nick, const char *property, const char *value); ----------------------------------------- +---- Argomenti: @@ -11751,7 +11514,7 @@ Argomenti: * 'property' and 'value': nome della proprietà, con il suo valore: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | Nome | Valore | Descrizione | color | nome per l'opzione del colore di WeeChat | @@ -11767,12 +11530,12 @@ Argomenti: | visible | "0", "1" | "0" = nick nascosto, "1" = nick visibile -|======================================== +|=== Esempi in C: [source,C] ----------------------------------------- +---- /* cambia colore del nick in azzurro */ weechat_nicklist_nick_set (buffer, nick, "color", "cyan"); @@ -11784,12 +11547,12 @@ weechat_nicklist_nick_set (buffer, nick, "prefix_color", "yellow"); /* nascondi nick nella lista nick */ weechat_nicklist_nick_set (buffer, nick, "visible", "0"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.nicklist_nick_set(buffer, nick, property, value) @@ -11806,25 +11569,23 @@ weechat.nicklist_nick_set(buffer, nick, "prefix_color", "yellow") # nascondi nick nella lista nick weechat.nicklist_nick_set(buffer, nick, "visible", "0") ----------------------------------------- +---- [[bars]] -Barre -~~~~~ +=== Barre Funzioni per le barre. -weechat_bar_item_search -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_search Cerca un elemento barra. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_search (const char *name); ----------------------------------------- +---- Argomenti: @@ -11837,23 +11598,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *bar_item = weechat_bar_item_search ("myitem"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo bar_item = weechat.bar_item_search(name) # esempio bar_item = weechat.bar_item_search("myitem") ----------------------------------------- +---- -weechat_bar_item_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_new // TRANSLATION MISSING _Updated in version 0.4.2._ @@ -11863,7 +11623,7 @@ Crea un nuovo elemento barra. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_bar_item *weechat_bar_item_new (const char *name, char *(*build_callback)(void *data, struct t_gui_bar_item *item, @@ -11871,7 +11631,7 @@ struct t_gui_bar_item *weechat_bar_item_new (const char *name, struct t_gui_buffer *buffer, struct t_hashtable *extra_info), void *build_callback_data); ----------------------------------------- +---- Argomenti: @@ -11901,7 +11661,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char * my_build_callback (void *data, struct t_gui_bar_item *item, @@ -11915,7 +11675,7 @@ my_build_callback (void *data, struct t_gui_bar_item *my_item = weechat_bar_item_new ("myitem", &my_build_callback, NULL); ----------------------------------------- +---- Script (Python): @@ -11928,7 +11688,7 @@ see example below (supported only in WeeChat ≥ 0.4.2). // TRANSLATION MISSING [source,python] ----------------------------------------- +---- # prototipo bar_item = weechat.bar_item_new(name, build_callback, build_callback_data) @@ -11943,10 +11703,9 @@ def my_build_callback2(data, item, window, buffer, extra_info): return "my content" bar_item2 = weechat.bar_item_new("(extra)myitem2", "my_build_callback2", "") # WeeChat ≥ 0.4.2 ----------------------------------------- +---- -weechat_bar_item_update -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_update Aggiorna il contenuto dell'elemento barra, chiamando la callback che lo ha compilato. @@ -11954,9 +11713,9 @@ che lo ha compilato. Prototipo: [source,C] ----------------------------------------- +---- void weechat_bar_item_update (const char *name); ----------------------------------------- +---- Argomenti: @@ -11965,32 +11724,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_bar_item_update ("myitem"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.bar_item_update(name) # esempio weechat.bar_item_update("myitem") ----------------------------------------- +---- -weechat_bar_item_remove -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_bar_item_remove Rimuove un elemento barra. Prototipo: [source,C] ----------------------------------------- +---- void weechat_bar_item_remove (struct t_gui_bar_item *item); ----------------------------------------- +---- Argomenti: @@ -11999,32 +11757,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_bar_item_remove (&my_item); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.bar_item_remove(item) # esempio weechat.bar_item_remove(myitem) ----------------------------------------- +---- -weechat_bar_search -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_search Cerca una barra. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_search (const char *name); ----------------------------------------- +---- Argomenti: @@ -12037,30 +11794,29 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_bar *bar = weechat_bar_search ("mybar"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo bar = weechat.bar_search(name) # esempio bar = weechat.bar_search("mybar") ----------------------------------------- +---- -weechat_bar_new -^^^^^^^^^^^^^^^ +==== weechat_bar_new Crea una nuova barra. Prototipo: [source,C] ----------------------------------------- +---- struct t_gui_bar *weechat_bar_new (const char *name, const char *hidden, const char *priority, @@ -12076,7 +11832,7 @@ struct t_gui_bar *weechat_bar_new (const char *name, const char *color_bg, const char *separator, const char *items); ----------------------------------------- +---- Argomenti: @@ -12131,7 +11887,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "off", "100", @@ -12147,12 +11903,12 @@ struct t_gui_bar *my_bar = weechat_bar_new ("mybar", "blue", "off", "time,buffer_number+buffer_name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo bar = weechat.bar_new(name, hidden, priority, type, condition, position, filling_top_bottom, filling_left_right, size, size_max, @@ -12161,20 +11917,19 @@ bar = weechat.bar_new(name, hidden, priority, type, condition, position, # esempio bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical", "0", "5", "default", "cyan", "blue", "off", "time,buffer_number+buffer_name") ----------------------------------------- +---- -weechat_bar_set -^^^^^^^^^^^^^^^ +==== weechat_bar_set Imposta un nuovo valore per la proprietà di una barra. Prototipo: [source,C] ----------------------------------------- +---- int weechat_bar_set (struct t_gui_bar *bar, const char *property, const char *value); ----------------------------------------- +---- Argomenti: @@ -12191,32 +11946,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_bar_set (mybar, "position", "bottom"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.bar_set(bar, property, value) # esempio weechat.bar_set(my_bar, "position", "bottom") ----------------------------------------- +---- -weechat_bar_update -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_update Aggiorna il contenuto di una barra su schermo. Prototipo: [source,C] ----------------------------------------- +---- void weechat_bar_update (const char *name); ----------------------------------------- +---- Argomenti: @@ -12225,32 +11979,31 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_bar_update ("mybar"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.bar_update(name) # esempio weechat.bar_update("mybar") ----------------------------------------- +---- -weechat_bar_remove -^^^^^^^^^^^^^^^^^^ +==== weechat_bar_remove Rimuove una barra. Prototipo: [source,C] ----------------------------------------- +---- void weechat_bar_remove (struct t_gui_bar *bar); ----------------------------------------- +---- Argomenti: @@ -12259,38 +12012,36 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_bar_remove (mybar); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.bar_remove(bar) # esempio weechat.bar_remove(my_bar) ----------------------------------------- +---- [[commands]] -Comandi -~~~~~~~ +=== Comandi Funzioni per eseguire comandi di WeeChat. -weechat_command -^^^^^^^^^^^^^^^ +==== weechat_command Esegue un comando. Prototipo: [source,C] ----------------------------------------- +---- void weechat_command (struct t_gui_buffer *buffer, const char *command); ----------------------------------------- +---- Argomenti: @@ -12302,30 +12053,28 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_command (weechat_buffer_search ("irc", "freenode.#weechat"), "/whois FlashCode"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.command(buffer, command) # esempio weechat.command(weechat.buffer_search("irc", "freenode.#weechat"), "/whois FlashCode") ----------------------------------------- +---- [[network]] -Network -~~~~~~~ +=== Network Funzioni di rete. -weechat_network_pass_proxy -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_pass_proxy Stabilisce una connessione/autenticazione con un proxy. @@ -12337,12 +12086,12 @@ process only, to not block WeeChat. Prototipo: [source,C] ----------------------------------------- +---- int weechat_network_pass_proxy (const char *proxy, int sock, const char *address, int port); ----------------------------------------- +---- Argomenti: @@ -12359,7 +12108,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_network_pass_proxy ("my_proxy", sock, "irc.freenode.net", 6667)) { /* OK */ @@ -12368,13 +12117,12 @@ else { /* errore */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_network_connect_to -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_network_connect_to Stabilisce una connessione con un host remoto. @@ -12386,12 +12134,12 @@ process only, to not block WeeChat. Prototipo: [source,C] ----------------------------------------- +---- int weechat_network_connect_to (const char *proxy, int sock, unsigned long address, int port); ----------------------------------------- +---- Argomenti: @@ -12408,7 +12156,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct sockaddr_in addr; socklen_t length; unsigned long address; @@ -12427,28 +12175,26 @@ else { /* errore */ } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. [[infos]] -Info -~~~~ +=== Info Funzioni per ottenere info. -weechat_info_get -^^^^^^^^^^^^^^^^ +==== weechat_info_get Restituisce la info, come stringa, da WeeChat o da un plugin. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_info_get (const char *info_name, const char *arguments); ----------------------------------------- +---- Argomenti: @@ -12464,18 +12210,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "Current WeeChat version is: %s (compiled on %s)", weechat_info_get ("version", NULL), weechat_info_get ("date", NULL)); weechat_printf (NULL, "WeeChat home is: %s", weechat_info_get ("weechat_dir", NULL)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.info_get(info_name, arguments) @@ -12483,10 +12229,9 @@ value = weechat.info_get(info_name, arguments) weechat.prnt("", "Current WeeChat version is: %s (compiled on %s)" % (weechat.info_get("version", ""), weechat.info_get("date", "")) weechat.prnt("", "WeeChat home is: %s" % weechat.info_get("weechat_dir")) ----------------------------------------- +---- -weechat_info_get_hashtable -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_info_get_hashtable _WeeChat ≥ 0.3.4._ @@ -12495,10 +12240,10 @@ Restituisce una info, come tabella hash, da WeeChat o da un plugin. Prototipo: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_info_get_hashtable (const char *info_name, struct t_hashtable *hashtable); ----------------------------------------- +---- Argomenti: @@ -12514,7 +12259,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hashtable *hashtable_in, *hashtable_out; hashtable_in = weechat_hashtable_new (8, @@ -12539,12 +12284,12 @@ if (hashtable_in) weechat_hashtable_free (hashtable_in); weechat_hashtable_free (hashtable_out); } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo dict = weechat.info_get_hashtable(info_name, dict_in) @@ -12552,11 +12297,10 @@ dict = weechat.info_get_hashtable(info_name, dict_in) dict_in = { "message": ":nick!user@host PRIVMSG #weechat :message here" } weechat.prnt("", "message parsed: %s" % weechat.info_get_hashtable("irc_message_parse", dict_in)) ----------------------------------------- +---- [[infolists]] -Liste info -~~~~~~~~~~ +=== Liste info Una lista info è una lista di "elementi". Ciascun elemento contiene delle variabili. @@ -12573,17 +12317,16 @@ Ogni variabile ha un tipo e un valore. I tipi possibili sono: * 'buffer': buffer di lunghezza fissa, contenente qualunque dato * 'time': valore tempo -weechat_infolist_new -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new Crea una nuova lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_new (); ----------------------------------------- +---- Valore restituito: @@ -12592,32 +12335,31 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_new (); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo infolist = weechat.infolist_new() # esempio infolist = weechat.infolist_new() ----------------------------------------- +---- -weechat_infolist_new_item -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_item Aggiunge un elemento alla lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_item *weechat_infolist_new_item (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -12630,23 +12372,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist_item *item = weechat_infolist_new_item (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo item = weechat.infolist_new_item(infolist) # esempio item = weechat.infolist_new_item(infolist) ----------------------------------------- +---- -weechat_infolist_new_var_integer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_integer Aggiunge una variabile intera ad un elemento della lista info. @@ -12654,11 +12395,11 @@ lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_integer (struct t_infolist_item *item, const char *name, int value); ----------------------------------------- +---- Argomenti: @@ -12673,25 +12414,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_integer (item, "my_integer", 123); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo var = weechat.infolist_new_var_integer(item, name, value) # esempio var = weechat.infolist_new_var_integer(item, "my_integer", 123) ----------------------------------------- +---- -weechat_infolist_new_var_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_string Aggiunge una variabile stringa ad un elemento della lista info. @@ -12699,11 +12439,11 @@ della lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_string (struct t_infolist_item *item, const char *name, const char *value); ----------------------------------------- +---- Argomenti: @@ -12718,25 +12458,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_string (item, "my_string", "value"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo var = weechat.infolist_new_var_string(item, name, value) # esempio var = weechat.infolist_new_var_string(item, "my_string", "value") ----------------------------------------- +---- -weechat_infolist_new_var_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_pointer Aggiunge una variabile puntatore ad un elemento della lista info. @@ -12744,11 +12483,11 @@ della lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_pointer (struct t_infolist_item *item, const char *name, void *pointer); ----------------------------------------- +---- Argomenti: @@ -12763,37 +12502,36 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_pointer (item, "my_pointer", &pointer); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo var = weechat.infolist_new_var_pointer(item, name, pointer) # esempio var = weechat.infolist_new_var_pointer(item, "my_pointer", pointer) ----------------------------------------- +---- -weechat_infolist_new_var_buffer -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_buffer Aggiunge una variabile puntatore ad un elemento della lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_buffer (struct t_infolist_item *item, const char *name, void *pointer, int size); ----------------------------------------- +---- Argomenti: @@ -12809,31 +12547,30 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- char buffer[256]; /* ... */ struct t_infolist_var *var = weechat_infolist_new_var_buffer (item, "my_buffer", &buffer, sizeof (buffer)); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_infolist_new_var_time -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_new_var_time Aggiunge una variabile tempo ad un elemento della lista info. Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist_var *weechat_infolist_new_var_time (struct t_infolist_item *item, const char *name, time_t time); ----------------------------------------- +---- Argomenti: @@ -12848,25 +12585,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist_var *var = weechat_infolist_new_var_time (item, "my_time", time (NULL)); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo var = weechat.infolist_new_var_time(item, name, time) # esempio var = weechat.infolist_new_var_time(item, "my_time", int(time.time())) ----------------------------------------- +---- -weechat_infolist_get -^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_get Restituisce una lista info da WeeChat o da un plugin. @@ -12881,11 +12617,11 @@ info potrebbero avere più info di hdata, che sono dati raw), consultare <<hdata Prototipo: [source,C] ----------------------------------------- +---- struct t_infolist *weechat_infolist_get (const char *infolist_name, void *pointer, const char *arguments); ----------------------------------------- +---- Argomenti: @@ -12903,23 +12639,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_infolist *infolist = weechat_infolist_get ("irc_server", NULL, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo infolist = weechat.infolist_get(infolist_name, pointer, arguments) # esempio infolist = weechat.infolist_get("irc_server", "", "") ----------------------------------------- +---- -weechat_infolist_next -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_next Sposta "cursor" all'elemento successivo nella lista info. La prima chiamata a questa funzione per una lista info sposta il cursore al primo elemento @@ -12928,9 +12663,9 @@ nella lista info. Prototipo: [source,C] ----------------------------------------- +---- int weechat_infolist_next (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -12944,7 +12679,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_infolist_next (infolist)) { /* legge variabili nell'elemento... */ @@ -12953,12 +12688,12 @@ else { /* nessun altro elemento disponibile */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.infolist_next(infolist) @@ -12968,10 +12703,9 @@ if rc: # legge variabili nell'elemento... else: # nessun altro elemento disponibile ----------------------------------------- +---- -weechat_infolist_prev -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_prev Sposta "cursor" all'elemento precedente nella lista info. La prima chiamata a questa funzione per una lista info sposta il cursore @@ -12980,9 +12714,9 @@ all'ultimo elemento. Prototipo: [source,C] ----------------------------------------- +---- int weechat_infolist_prev (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -12996,7 +12730,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_infolist_prev (infolist)) { /* legge variabili nell'elemento... */ @@ -13005,12 +12739,12 @@ else { /* nessun altro elemento disponibile */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.infolist_prev(infolist) @@ -13020,19 +12754,18 @@ if rc: # read variables in item... else: # no more item available ----------------------------------------- +---- -weechat_infolist_reset_item_cursor -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_reset_item_cursor Ripristina "cursor" per la lista info. Prototipo: [source,C] ----------------------------------------- +---- void weechat_infolist_reset_item_cursor (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -13041,23 +12774,22 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_infolist_reset_item_cursor (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.infolist_reset_item_cursor(infolist) # esempio weechat.infolist_reset_item_cursor(infolist) ----------------------------------------- +---- -weechat_infolist_fields -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_fields Restituisce una lista di campi per l'elemento della lista info corrente. @@ -13065,9 +12797,9 @@ lista info corrente. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_infolist_fields (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -13083,16 +12815,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *fields = weechat_infolist_fields (infolist); /* i campi contengono qualcosa come: "i:my_integer,s:my_string,p:my_pointer,b:my_buffer,t:my_time" */ ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo fields = weechat.infolist_fields(infolist) @@ -13100,10 +12832,9 @@ fields = weechat.infolist_fields(infolist) fields = weechat.infolist_fields(infolist) # i campi contengono qualcosa come: # "i:my_integer,s:my_string,p:my_pointer,b:my_buffer,t:my_time" ----------------------------------------- +---- -weechat_infolist_integer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_integer Restituisce il valore della variabile intera nell'elemento corrente della lista info. @@ -13111,9 +12842,9 @@ corrente della lista info. Prototipo: [source,C] ----------------------------------------- +---- int weechat_infolist_integer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Argomenti: @@ -13127,24 +12858,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "integer = %d", weechat_infolist_integer (infolist, "my_integer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.infolist_integer(infolist, var) # esempio weechat.prnt("", "integer = %d" % weechat.infolist_integer(infolist, "my_integer")) ----------------------------------------- +---- -weechat_infolist_string -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_string Restituisce il valore della variabile stringa nell'elemento della lista info corrente. @@ -13152,9 +12882,9 @@ della lista info corrente. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_infolist_string (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Argomenti: @@ -13168,24 +12898,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "string = %s", weechat_infolist_string (infolist, "my_string")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.infolist_string(infolist, var) # esempio weechat.prnt("", "string = %s" % weechat.infolist_string(infolist, "my_string")) ----------------------------------------- +---- -weechat_infolist_pointer -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_pointer Restituisce il valore della variabile puntatore nell'elemento della lista info corrente. @@ -13193,9 +12922,9 @@ della lista info corrente. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_infolist_pointer (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Argomenti: @@ -13209,24 +12938,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "pointer = 0x%lx", weechat_infolist_pointer (infolist, "my_pointer")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.infolist_pointer(infolist, var) # esempio weechat.prnt("", "pointer = 0x%s" % weechat.infolist_pointer(infolist, "my_pointer")) ----------------------------------------- +---- -weechat_infolist_buffer -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_buffer Restituisce il valore della variabile buffer nell'elemento corrente della lista info. @@ -13234,10 +12962,10 @@ della lista info. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_infolist_buffer (struct t_infolist *infolist, const char *var, int *size); ----------------------------------------- +---- Argomenti: @@ -13253,18 +12981,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int size; void *pointer = weechat_infolist_buffer (infolist, "my_buffer", &size); weechat_printf (NULL, "buffer = 0x%lx, size = %d", pointer, size); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_infolist_time -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_time Restituisce il valore della variabile data/ora nell'elemento attivo della lista info. @@ -13272,9 +12999,9 @@ attivo della lista info. Prototipo: [source,C] ----------------------------------------- +---- time_t weechat_infolist_time (struct t_infolist *infolist, const char *var); ----------------------------------------- +---- Argomenti: @@ -13288,33 +13015,32 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "time = %ld", weechat_infolist_time (infolist, "my_time")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.infolist_time(infolist, var) # esempio weechat.prnt("", "time = %ld" % weechat.infolist_time(infolist, "my_time")) ----------------------------------------- +---- -weechat_infolist_free -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_infolist_free Libera una lista info. Prototipo: [source,C] ----------------------------------------- +---- void weechat_infolist_free (struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -13323,24 +13049,23 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_infolist_free (infolist); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.infolist_free(infolist) # esempio weechat.infolist_free(infolist) ----------------------------------------- +---- [[hdata]] -Hdata -~~~~~ +=== Hdata Funzioni per hdata (accesso raw a WeeChat o ai dati dei plugin). @@ -13348,8 +13073,7 @@ Funzioni per hdata (accesso raw a WeeChat o ai dati dei plugin). Hdata fornisce un accesso in sola lettura ai dati. È *SEVERAMENTE VIETATO* scrivere qualcosa in memoria puntato dalle variabili in hdata. -weechat_hdata_new -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new // TRANSLATION MISSING _WeeChat ≥ 0.3.6, updated in 0.3.9 and 0.4.0._ @@ -13358,7 +13082,7 @@ Crea un nuovo hdata. [NOTE] .hdata vs infolist -======================================== +==== Hdata è un metodo veloce per leggere i dati di WeeChat o dei plugin. È simile alle liste info, ma ci sono alcune differenze: @@ -13366,12 +13090,12 @@ alle liste info, ma ci sono alcune differenze: * può contenere informazioni differenti rispetto alle liste info: esso contiene solo dati raw in strutture (le liste info possono aggiungere alcuni dati extra per convenienza) -======================================== +==== Prototipo: [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, const char *var_next, int create_allowed, int delete_allowed, int (*callback_update)(void *data, @@ -13379,7 +13103,7 @@ struct t_hdata *weechat_hdata_new (const char *hdata_name, const char *var_prev, void *pointer, struct t_hashtable *hashtable), void *callback_update_data); ----------------------------------------- +---- Argomenti: @@ -13412,15 +13136,14 @@ Valore restituito: Esempio in C: source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_new ("myplugin_list", "prev", "next", 0, 0, &callback_update, NULL); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_new_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_var // TRANSLATION MISSING _WeeChat ≥ 0.3.6, updated in 0.3.9_ @@ -13430,10 +13153,10 @@ Crea una nuova variabile in hdata. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hdata_new_var (struct t_hdata *hdata, const char *name, int offset, int type, int update_allowed, const char *array_size, const char *hdata_name); ----------------------------------------- +---- Argomenti: @@ -13465,7 +13188,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13487,12 +13210,12 @@ weechat_hdata_new_var (hdata, "tags_array", offsetof (struct t_myplugin_list, ta weechat_hdata_new_var (hdata, "string_split", offsetof (struct t_myplugin_list, string_split), WEECHAT_HDATA_STRING, 0, "*", NULL); weechat_hdata_new_var (hdata, "prev", offsetof (struct t_myplugin_list, prev), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), WEECHAT_HDATA_POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- La macro "WEECHAT_HDATA_VAR" può essere usata per accorciare il codice: [source,C] ----------------------------------------- +---- WEECHAT_HDATA_VAR(struct t_myplugin_list, name, STRING, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, buffer, POINTER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_count, INTEGER, 0, NULL, NULL); @@ -13500,13 +13223,12 @@ WEECHAT_HDATA_VAR(struct t_myplugin_list, tags_array, STRING, 0, "tags_count", N WEECHAT_HDATA_VAR(struct t_myplugin_list, string_split, STRING, 0, "*", NULL); WEECHAT_HDATA_VAR(struct t_myplugin_list, prev, POINTER, 0, NULL, "myplugin_list"); WEECHAT_HDATA_VAR(struct t_myplugin_list, next, POINTER, 0, NULL, "myplugin_list"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_new_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_new_list _WeeChat ≥ 0.3.6._ @@ -13515,9 +13237,9 @@ Crea una nuovo puntatore alla lista in hdata. Prototipo: [source,C] ----------------------------------------- +---- void weechat_hdata_new_list (struct t_hdata *hdata, const char *name, void *pointer); ----------------------------------------- +---- Argomenti: @@ -13528,7 +13250,7 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- struct t_myplugin_list { char *name; @@ -13553,21 +13275,20 @@ weechat_hdata_new_var (hdata, "next", offsetof (struct t_myplugin_list, next), W weechat_hdata_new_list (hdata, "buffers", &buffers); weechat_hdata_new_list (hdata, "last_buffer", &last_buffer); ----------------------------------------- +---- La macro "WEECHAT_HDATA_LIST" può essere usata per accorciare il codice: [source,C] ----------------------------------------- +---- WEECHAT_HDATA_LIST(buffers); WEECHAT_HDATA_LIST(last_buffer); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_get -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get _WeeChat ≥ 0.3.6._ @@ -13581,9 +13302,9 @@ un oggetto di WeeChat/plugin per leggere dei dati. Prototipo: [source,C] ----------------------------------------- +---- struct t_hdata *weechat_hdata_get (const char *hdata_name); ----------------------------------------- +---- Argomenti: @@ -13601,23 +13322,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hdata = weechat.hdata_get(hdata_name) # esempio hdata = weechat.hdata_get("irc_server") ----------------------------------------- +---- -weechat_hdata_get_var_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_offset _WeeChat ≥ 0.3.6._ @@ -13626,9 +13346,9 @@ Restituisce l'offset della variabile in hdata. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_offset (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Argomenti: @@ -13642,23 +13362,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int offset = weechat_hdata_get_var_offset (hdata, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo offset = weechat.hdata_get_var_offset(hdata, name) # esempio offset = weechat.hdata_get_var_offset(hdata, "name") ----------------------------------------- +---- -weechat_hdata_get_var_type -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type _WeeChat ≥ 0.3.6._ @@ -13667,9 +13386,9 @@ Restituisce il tipo di variabile in hdata (come intero). Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_type (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Argomenti: @@ -13683,7 +13402,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int type = weechat_hdata_get_var_type (hdata, "name"); switch (type) { @@ -13715,13 +13434,12 @@ switch (type) /* variable not found */ break; } ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_get_var_type_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_type_string _WeeChat ≥ 0.3.6._ @@ -13730,9 +13448,9 @@ Restituisce il tipo di variabile in hdata (come stringa). Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_type_string (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Argomenti: @@ -13746,24 +13464,23 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "type = %s", weechat_hdata_get_var_type_string (hdata, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo type = weechat.hdata_get_var_type_string(hdata, name) # esempio weechat.prnt("", "type = %s" % weechat.hdata_get_var_type_string(hdata, "name")) ----------------------------------------- +---- -weechat_hdata_get_var_array_size -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size _WeeChat ≥ 0.3.9._ @@ -13773,9 +13490,9 @@ Return array size for variable in hdata. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_get_var_array_size (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -13791,23 +13508,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int array_size = weechat_hdata_get_var_array_size (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo array_size = weechat.hdata_get_var_array_size(hdata, pointer, name) # esempio array_size = weechat.hdata_get_var_array_size(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_array_size_string -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_array_size_string _WeeChat ≥ 0.3.9._ @@ -13817,10 +13533,10 @@ Return array size for variable in hdata (as string). Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_array_size_string (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -13837,23 +13553,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- const char *array_size = weechat_hdata_get_var_array_size_string (hdata, pointer, "name"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, name) # esempio array_size = weechat.hdata_get_var_array_size_string(hdata, pointer, "name") ----------------------------------------- +---- -weechat_hdata_get_var_hdata -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_hdata _WeeChat ≥ 0.3.6._ @@ -13862,9 +13577,9 @@ Restituisce hdata per la variabile in hdata. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_var_hdata (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Argomenti: @@ -13878,23 +13593,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "hdata = %s", weechat_hdata_get_var_hdata (hdata, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hdata_name = weechat.hdata_get_var_hdata(hdata, name) # esempio weechat.prnt("", "hdata = %s" % weechat.hdata_get_var_hdata(hdata, "name")) ----------------------------------------- +---- -weechat_hdata_get_var -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var _WeeChat ≥ 0.3.6._ @@ -13903,9 +13617,9 @@ Restituisce il puntatore al contenuto della variabile in hdata. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -13920,17 +13634,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); void *pointer = weechat_hdata_get_var (hdata, buffer, "name"); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_get_var_at_offset -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_var_at_offset _WeeChat ≥ 0.3.6._ @@ -13939,9 +13652,9 @@ Restituisce il puntatore al contenuto della variabile in hdata, usando un offset Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_var_at_offset (struct t_hdata *hdata, void *pointer, int offset); ----------------------------------------- +---- Argomenti: @@ -13956,18 +13669,17 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); int offset = weechat_hdata_get_var_offset (hdata, "name"); void *pointer = weechat_hdata_get_var_at_offset (hdata, buffer, offset); ----------------------------------------- +---- [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -weechat_hdata_get_list -^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_list _WeeChat ≥ 0.3.6._ @@ -13976,9 +13688,9 @@ Restituisce il puntatore alla lista da hdata. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_get_list (struct t_hdata *hdata, const char *name); ----------------------------------------- +---- Argomenti: @@ -13992,25 +13704,24 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffers = weechat_hdata_get_list (hdata, "gui_buffers"); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo list = weechat.hdata_get_list(hdata, name) # esempio hdata = weechat.hdata_get("buffer") buffers = weechat.hdata_get_list(hdata, "gui_buffers") ----------------------------------------- +---- -weechat_hdata_check_pointer -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_check_pointer _WeeChat ≥ 0.3.7._ @@ -14019,9 +13730,9 @@ Verifica se un puntatore è valido per un hdata e un puntatore della lista. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_check_pointer (struct t_hdata *hdata, void *list, void *pointer); ----------------------------------------- +---- Argomenti: @@ -14036,7 +13747,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- /* check if a buffer pointer is valid */ struct t_hdata *hdata = weechat_hdata_get ("buffer"); if (weechat_hdata_check_pointer (hdata, @@ -14049,12 +13760,12 @@ else { /* invalid pointer */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.hdata_check_pointer(hdata, list, pointer) @@ -14066,10 +13777,9 @@ if weechat.hdata_check_pointer(hdata, weechat.hdata_get_list(hdata, "gui_buffers else: # invalid pointer # ... ----------------------------------------- +---- -weechat_hdata_move -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_move _WeeChat ≥ 0.3.6._ @@ -14078,9 +13788,9 @@ Sposta il puntatore ad un altro elemento nella lista. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_move (struct t_hdata *hdata, void *pointer, int count); ----------------------------------------- +---- Argomenti: @@ -14096,7 +13806,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); @@ -14106,12 +13816,12 @@ buffer = weechat_hdata_move (hdata, buffer, 2); /* passa al buffer precedente */ if (buffer) buffer = weechat_hdata_move (hdata, buffer, -1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo pointer = weechat.hdata_move(hdata, pointer, count) @@ -14125,10 +13835,9 @@ buffer = weechat.hdata_move(hdata, buffer, 2) # passa al buffer precedente if buffer: buffer = weechat.hdata_move(hdata, buffer, -1) ----------------------------------------- +---- -weechat_hdata_search -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_search _WeeChat ≥ 0.4.1._ @@ -14139,9 +13848,9 @@ in list, until element is found (or end of list). Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_search (struct t_hdata *hdata, void *pointer, const char *search, int move); ----------------------------------------- +---- Argomenti: @@ -14163,7 +13872,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("irc_server"); void *servers = weechat_hdata_get (hdata, "irc_servers"); @@ -14173,13 +13882,13 @@ if (server) { /* ... */ } ----------------------------------------- +---- Script (Python): // TRANSLATION MISSING [source,python] ----------------------------------------- +---- # prototipo pointer = weechat.hdata_search(hdata, pointer, search, count) @@ -14191,10 +13900,9 @@ servers = weechat.hdata_get_list(hdata, "irc_servers") server = weechat.hdata_search(hdata, servers, "${irc_server.name} == freenode", 1) if server: # ... ----------------------------------------- +---- -weechat_hdata_char -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_char _WeeChat ≥ 0.3.7._ @@ -14203,9 +13911,9 @@ Restituisce il valore di una variabile char in una struttura dati usando hdata. Prototipo: [source,C] ----------------------------------------- +---- char weechat_hdata_char (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14223,23 +13931,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "letter = %c", weechat_hdata_char (hdata, pointer, "letter")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_char(hdata, pointer, name) # esempio weechat.prnt("", "letter = %c" % weechat.hdata_char(hdata, pointer, "letter")) ----------------------------------------- +---- -weechat_hdata_integer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_integer _WeeChat ≥ 0.3.6._ @@ -14248,9 +13955,9 @@ Restituisce il valore di una variabile integer in una struttura dati usando hdat Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_integer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14268,16 +13975,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "number = %d", weechat_hdata_integer (hdata, buffer, "number")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_integer(hdata, pointer, name) @@ -14285,10 +13992,9 @@ value = weechat.hdata_integer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "number = %d" % weechat.hdata_integer(hdata, buffer, "number")) ----------------------------------------- +---- -weechat_hdata_long -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_long _WeeChat ≥ 0.3.6._ @@ -14297,9 +14003,9 @@ Restituisce il valore della variabile long della struttura usando hdata. Prototipo: [source,C] ----------------------------------------- +---- long weechat_hdata_long (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14317,23 +14023,22 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "longvar = %ld", weechat_hdata_long (hdata, pointer, "longvar")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_long(hdata, pointer, name) # esempio weechat.prnt("", "longvar = %ld" % weechat.hdata_long(hdata, pointer, "longvar")) ----------------------------------------- +---- -weechat_hdata_string -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_string _WeeChat ≥ 0.3.6._ @@ -14342,9 +14047,9 @@ Restituisce il valore della variabile string nella struttura usando hdata. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hdata_string (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14362,16 +14067,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "name = %s", weechat_hdata_string (hdata, buffer, "name")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_string(hdata, pointer, name) @@ -14379,10 +14084,9 @@ value = weechat.hdata_string(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "name = %s" % weechat.hdata_string(hdata, buffer, "name")) ----------------------------------------- +---- -weechat_hdata_pointer -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_pointer _WeeChat ≥ 0.3.6._ @@ -14391,9 +14095,9 @@ Restituisce il valore della variabile puntatore nella struttura usando hdata. Prototipo: [source,C] ----------------------------------------- +---- void *weechat_hdata_pointer (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14411,16 +14115,16 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); weechat_printf (NULL, "lines = %lx", weechat_hdata_pointer (hdata, buffer, "lines")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_pointer(hdata, pointer, name) @@ -14428,10 +14132,9 @@ value = weechat.hdata_pointer(hdata, pointer, name) hdata = weechat.hdata_get("buffer") buffer = weechat.buffer_search_main() weechat.prnt("", "lines = %lx" % weechat.hdata_pointer(hdata, buffer, "lines")) ----------------------------------------- +---- -weechat_hdata_time -^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_time _WeeChat ≥ 0.3.6._ @@ -14440,9 +14143,9 @@ Restituisce il valore della variabile time nella struttura usando hdata. Prototipo: [source,C] ----------------------------------------- +---- time_t weechat_hdata_time (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14460,7 +14163,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *ptr = weechat_buffer_search_main (); ptr = weechat_hdata_pointer (hdata, ptr, "lines"); @@ -14480,12 +14183,12 @@ if (ptr) } } } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_time(hdata, pointer, name) @@ -14499,10 +14202,9 @@ if ptr: if ptr: date = weechat.hdata_time(weechat.hdata_get("line_data"), ptr, "date") weechat.prnt("", "time of first line displayed = %s" % time.strftime("%F %T", time.localtime(int(date)))) ----------------------------------------- +---- -weechat_hdata_hashtable -^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_hashtable _WeeChat ≥ 0.3.7._ @@ -14512,9 +14214,9 @@ hdata. Prototipo: [source,C] ----------------------------------------- +---- struct t_hashtable *weechat_hdata_hashtable (struct t_hdata *hdata, void *pointer, const char *name); ----------------------------------------- +---- Argomenti: @@ -14532,18 +14234,18 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_hdata *hdata = weechat_hdata_get ("buffer"); struct t_gui_buffer *buffer = weechat_buffer_search_main (); struct t_hashtable *hashtable = weechat_hdata_hashtable (hdata, buffer, "local_variables"); weechat_printf (NULL, "%d local variables in core buffer", weechat_hashtable_get_integer (hashtable, "items_count")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo hashtable = weechat.hdata_hashtable(hdata, pointer, name) @@ -14554,11 +14256,10 @@ hash = weechat.hdata_hashtable(hdata, buffer, "local_variables") weechat.prnt("", "local variables in core buffer:") for key in hash: weechat.prnt("", " %s == %s" % (key, hash[key])) ----------------------------------------- +---- // TRANSLATION MISSING -weechat_hdata_set -^^^^^^^^^^^^^^^^^ +==== weechat_hdata_set _WeeChat ≥ 0.3.9._ @@ -14572,9 +14273,9 @@ This function can be called only in an update callback Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_set (struct t_hdata *hdata, void *pointer, const char *name, const char *value); ----------------------------------------- +---- Argomenti: @@ -14591,16 +14292,15 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_hdata_set (hdata, pointer, "message", "test"); ----------------------------------------- +---- [NOTE] This function is not available in scripting API. // TRANSLATION MISSING -weechat_hdata_update -^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_update _WeeChat ≥ 0.3.9._ @@ -14609,9 +14309,9 @@ Update data in a hdata. Prototipo: [source,C] ----------------------------------------- +---- int weechat_hdata_update (struct t_hdata *hdata, void *pointer, struct t_hashtable *hashtable); ----------------------------------------- +---- Argomenti: @@ -14636,7 +14336,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- /* subtract one hour on last message displayed in current buffer */ struct t_gui_lines *own_lines; @@ -14668,12 +14368,12 @@ if (own_lines) } } } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo count = weechat.hdata_update(hdata, pointer, hashtable) @@ -14685,10 +14385,9 @@ if own_lines: line_data = weechat.hdata_pointer(weechat.hdata_get('line'), line, 'data') hdata = weechat.hdata_get('line_data') weechat.hdata_update(hdata, line_data, { 'date': str(weechat.hdata_time(hdata, line_data, 'date') - 3600) }) ----------------------------------------- +---- -weechat_hdata_get_string -^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_hdata_get_string _WeeChat ≥ 0.3.6._ @@ -14697,9 +14396,9 @@ Restituisce il valore stringa di una proprietà di hdata. Prototipo: [source,C] ----------------------------------------- +---- const char *weechat_hdata_get_string (struct t_hdata *hdata, const char *property); ----------------------------------------- +---- Argomenti: @@ -14729,40 +14428,38 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- weechat_printf (NULL, "variables in hdata: %s", weechat_hdata_get_string (hdata, "var_keys")); weechat_printf (NULL, "lists in hdata: %s", weechat_hdata_get_string (hdata, "list_keys")); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo value = weechat.hdata_get_string(hdata, property) # esempio weechat.prnt("", "variables in hdata: %s" % weechat.hdata_get_string(hdata, "var_keys")) weechat.prnt("", "lists in hdata: %s" % weechat.hdata_get_string(hdata, "list_keys")) ----------------------------------------- +---- [[upgrade]] -Aggiornamento -~~~~~~~~~~~~~ +=== Aggiornamento Funzioni per l'aggiornamento di WeeChat (comando "/upgrade"). -weechat_upgrade_new -^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_new Crea o legge un file per l'aggiornamento. Prototipo: [source,C] ----------------------------------------- +---- struct t_upgrade_file *weechat_upgrade_new (const char *filename, int write); ----------------------------------------- +---- Argomenti: @@ -14779,34 +14476,33 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- struct t_upgrade_file *upgrade_file = weechat_upgrade_new ("my_file", 1); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo upgrade_file = weechat.upgrade_new(filename, write) # esempio upgrade_file = weechat.upgrade_new("my_file", 1) ----------------------------------------- +---- -weechat_upgrade_write_object -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_write_object Scrive un oggetto nel file di aggiornamento. Prototipo: [source,C] ----------------------------------------- +---- int weechat_upgrade_write_object (struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist); ----------------------------------------- +---- Argomenti: @@ -14821,7 +14517,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- if (weechat_upgrade_write_object (upgrade_file, 1, &infolist)) { /* ok */ @@ -14830,35 +14526,34 @@ else { /* errore */ } ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.upgrade_write_object(upgrade_file, object_id, infolist) # esempio weechat.upgrade_write_object(upgrade_file, 1, infolist) ----------------------------------------- +---- -weechat_upgrade_read -^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_read Legge un file di aggiornamento. Prototipo: [source,C] ----------------------------------------- +---- int weechat_upgrade_read (struct t_upgrade_file *upgrade_file, int (*callback_read)(void *data, struct t_upgrade_file *upgrade_file, int object_id, struct t_infolist *infolist), void *callback_read_data); ----------------------------------------- +---- Argomenti: @@ -14882,7 +14577,7 @@ Valore restituito: Esempio in C: [source,C] ----------------------------------------- +---- int my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, int object_id, @@ -14893,12 +14588,12 @@ my_upgrade_read_cb (struct t_upgrade_file *upgrade_file, } weechat_upgrade_read (upgrade_file, &my_upgrade_read_cb, NULL); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo rc = weechat.upgrade_read(upgrade_file, callback_read, callback_read_data) @@ -14908,19 +14603,18 @@ def my_upgrade_read_cb(upgrade_file, object_id, infolist): return weechat.WEECHAT_RC_OK weechat.upgrade_read(upgrade_file, "my_upgrade_read_cb", "")) ----------------------------------------- +---- -weechat_upgrade_close -^^^^^^^^^^^^^^^^^^^^^ +==== weechat_upgrade_close Chiude un file di aggiornamento. Prototipo: [source,C] ----------------------------------------- +---- void weechat_upgrade_close (struct t_upgrade_file *upgrade_file); ----------------------------------------- +---- Argomenti: @@ -14929,17 +14623,17 @@ Argomenti: Esempio in C: [source,C] ----------------------------------------- +---- weechat_upgrade_close (upgrade_file); ----------------------------------------- +---- Script (Python): [source,python] ----------------------------------------- +---- # prototipo weechat.upgrade_close(upgrade_file) # esempio weechat.upgrade_close(upgrade_file) ----------------------------------------- +---- diff --git a/doc/it/weechat_quickstart.it.txt b/doc/it/weechat_quickstart.it.txt index b7f9369ff..d31b3b8b4 100644 --- a/doc/it/weechat_quickstart.it.txt +++ b/doc/it/weechat_quickstart.it.txt @@ -1,11 +1,9 @@ -Guida Rapida a WeeChat -====================== += Guida Rapida a WeeChat Sébastien Helleu <flashcode@flashtux.org> [[start]] -Avvio di WeeChat ----------------- +== Avvio di WeeChat Un emulatore di terminale raccomandato per X (ma non obbligatorio) è rxvt-unicode (ha un buon supporto per UTF-8, e nessun problema con @@ -13,32 +11,31 @@ le scorciatoie da tastiera predefinite). Avviare dalla propria shell: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Aiuto online / opzioni ----------------------- +== Aiuto online / opzioni WeeChat offre aiuto per tutti i comandi, basta digitare: ----------------------------------------- +---- /help ----------------------------------------- +---- Per ricevere aiuto su un comando specifico, digitare: ----------------------------------------- +---- /help comando ----------------------------------------- +---- Per impostare le opzioni, utilizzare: ----------------------------------------- +---- /set config.sezione.opzione valore ----------------------------------------- +---- (dove `config` è il nome della configurazione (`weechat` per il core, oppure un nome plugin), `sezione` la sezione di questa configurazione @@ -53,27 +50,27 @@ Per esempio: * visualizza tutte le opzioni (WeeChat e plugin): ----------------------------------------- +---- /set ----------------------------------------- +---- * visualizza le opzioni di WeeChat: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * visualizza le opzioni del plugin IRC: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- È possibile visualizzare l'aiuto per ogni opzione con `/help`, per esempio: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Tutte le impostazioni vengono salvato all'uscita di WeeChat (o con il comando `/save` per forzare il salvataggio di una o più opzioni). @@ -83,8 +80,7 @@ ricaricarli con il comando `/reload` se non si vuole usare il comando `/set`. [[core_vs_plugins]] -Core vs plugin --------------- +== Core vs plugin Il "core" di WeeChat è utilizzato solo per visualizzare i dati sullo schermo e interagire con l'utente; ciò vuol dire che il core di weechat senza i @@ -98,25 +94,23 @@ vedere "irc" ed altri plugin nella lista. [[create_irc_server]] -Creare un server IRC --------------------- +== Creare un server IRC Si può aggiungere un server IRC con il comando `/server`, per esempio: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- Come al solito, è disponibile l'aiuto se c'è qualche problema: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Impostare opzioni personalizzate per il server IRC --------------------------------------------------- +== Impostare opzioni personalizzate per il server IRC WeeChat usa valori predefiniti per tutti i server, se non si specifica un valore preciso per un'opzione del server. Questi valori predefiniti sono @@ -129,38 +123,38 @@ Per ogni opzione del server, WeeChat usa il proprio valore se definito Per esempio ci sono dei nick predefiniti (basati sul proprio login un*x), ed è possibile sovrascriverli per il server oftc con il seguente comando: ----------------------------------------- +---- /set irc.server.oftc.nicks "mynick,mynick2,mynick3,mynick4,mynick5" ----------------------------------------- +---- Per impostare il nome utente ed il nome reale: ----------------------------------------- +---- /set irc.server.oftc.username "Mio nome utente" /set irc.server.oftc.realname "Mio nome reale" ----------------------------------------- +---- Per impostare la connessione automatica al server all'avvio: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- Se SASL è disponibile sul server, è possibile usarlo per l'autenticazione (l'autenticazione avviene prima dell'ingresso nei canali): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mynick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- Per eseguire un comando dopo la connessione al server, ad esempio per autenticarsi con nickserv (solo se non viene usato SASL per l'autenticazione): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Più comandi possono essere separati da ';' (punto e virgola). @@ -168,33 +162,32 @@ Più comandi possono essere separati da ';' (punto e virgola). Per entrare automaticamente in alcuni canali quando ci si connette al server: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#canale1,#canale2" ----------------------------------------- +---- Per eliminare il valore di un'opzione del server, e usare invece il valore predefinito, per esempio per utilizzare i nick predefiniti (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Altre opzioni: è possibile impostare altre opzioni con il seguente comando ("xxx" è il nome dell'opzione): ----------------------------------------- +---- /set irc.server.oftc.xxx value ----------------------------------------- +---- [[connect_to_irc_server]] -Connessione al server IRC e ingresso automatico nei canali ----------------------------------------------------------- +== Connessione al server IRC e ingresso automatico nei canali ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Questo comando può essere usato per creare e connettersi ad un nuovo server @@ -208,37 +201,35 @@ Ctrl-X. È possibile disabilitare l'unione automatica dei server dei buffer per avere i buffer dei server indipendenti: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Entrare/uscire dai canali IRC ------------------------------ +== Entrare/uscire dai canali IRC Entra in un canale: ----------------------------------------- +---- /join #canale ----------------------------------------- +---- Esce da un canale (mantenendo il buffer aperto): ----------------------------------------- +---- /part [messaggio di uscita] ----------------------------------------- +---- Chiude il buffer del server o del canale (`/close` è un alias per `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Gestione buffer/finestra ------------------------- +== Gestione buffer/finestra Un buffer è un componente collegato ad un plugin con un numero, una categoria e un nome. Un buffer contiene i dati visualizzati sullo @@ -251,24 +242,23 @@ stesso tempo. I comandi per gestire buffer e finestre: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (Qui non si ripeterà che è possibile avere aiuto su questi comandi con /help) Per esempio, per dividere verticalmente lo schermo in una finestra piccola (1/3 della larghezza) ed una grande (2/3), utilizzare il comando: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Associazione tasti ------------------- +== Associazione tasti WeeChat usa molti tasti. Essi sono tutti presenti nella documentazione, ma si dovrebbero conoscere almeno quelli vitali: @@ -290,26 +280,25 @@ Un tasto utile è meta-k (alt-k) per trovare i codici tasti. Ad esempio, per associare meta-y (alt-y) al comando `/buffer close`: ----------------------------------------- +---- /key bind (digitare meta-k) (digitare meta-y) /buffer close ----------------------------------------- +---- Si otterrà una riga di comando simile a: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Per eliminare il tasto: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Plugin/script -------------- +== Plugin/script Su alcune distribuzioni come Debian, i plugin sono disponibili tramite un pacchetto separato (come weechat-plugins). @@ -325,8 +314,7 @@ http://weechat.org/scripts [[more_doc]] -Ulteriore documentazione ------------------------- +== Ulteriore documentazione È ora possibilie usare WeeChat e leggere FAQ/documentazione per ogni altra domanda: diff --git a/doc/it/weechat_scripting.it.txt b/doc/it/weechat_scripting.it.txt index 659aba996..603e55aa7 100644 --- a/doc/it/weechat_scripting.it.txt +++ b/doc/it/weechat_scripting.it.txt @@ -1,5 +1,4 @@ -Guida allo Scripting di WeeChat -=============================== += Guida allo Scripting di WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -11,8 +10,7 @@ http://weechat.org/doc [[introduction]] -Introduzione ------------- +== Introduzione WeeChat (Wee Enhanced Environment for Chat) è un client di chat libero, veloce e leggero, realizzato per molti sistemi operativi. @@ -32,28 +30,23 @@ Quasi tutti gli esempi in questo manuale sono scritti in Python, ma l'API è identica per gli altri linguaggi. [[scripts_in_weechat]] -Script in WeeChat ------------------ +== Script in WeeChat [[languages_specifities]] -Specifiche per i linguaggi -~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Specifiche per i linguaggi -Python -^^^^^^ +==== Python * E necessario `import weechat` * Le funzioni `print*` sono chiamate `prnt*` in python (dato che 'print' è una parola riservata) * Le funzioni sono chiamate con `weechat.xxx(arg1, arg2, ...)` -Perl -^^^^ +==== Perl * Le funzioni sono chiamate con `weechat::xxx(arg1, arg2, ...);` -Ruby -^^^^ +==== Ruby * E necessario definire 'weechat_init' e chiamare 'register' all'interno * Le funzioni sono chiamate con `Weechat.xxx(arg1, arg2, ...)` @@ -63,23 +56,20 @@ Ruby funzione appare come: [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -Lua -^^^ +==== Lua * Le funzioni sono chiamate con `weechat.xxx(arg1, arg2, ...)` -Tcl -^^^ +==== Tcl * Le funzioni sono chiamate con `weechat::xxx arg1 arg2 ...` -Guile (scheme) -^^^^^^^^^^^^^^ +==== Guile (scheme) * Le funzioni sono chiamate con `(weechat:xxx arg1 arg2 ...)` * Le seguenti funzioni prendono un elenco di argomenti (invece di più argomenti @@ -90,8 +80,7 @@ Guile (scheme) ** bar_new [[register_function]] -Registrare una funzione -~~~~~~~~~~~~~~~~~~~~~~~ +=== Registrare una funzione Tutti gli script WeeChat devono "registrare" loro stessi in WeeChat, e questo deve essere la prima funzione chiamata nello script di WeeChat. @@ -99,9 +88,9 @@ deve essere la prima funzione chiamata nello script di WeeChat. Prototipo: [source,python] ----------------------------------------- +---- weechat.register(name, author, version, license, description, shutdown_function, charset) ----------------------------------------- +---- Argomenti: @@ -120,99 +109,97 @@ Esempio di script, per ogni linguaggio: * python: [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.prnt("", "Hello, from python script!") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Test script", "", ""); weechat::print("", "Hello, from perl script!"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Test script", "", "") Weechat.print("", "Hello, from ruby script!") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.print("", "Hello, from lua script!") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Test script" "" "" weechat::print "" "Hello, from tcl script!" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Test script" "" "") (weechat:print "" "Hello, from scheme script!") ----------------------------------------- +---- [[load_script]] -Caricare uno script -~~~~~~~~~~~~~~~~~~~ +=== Caricare uno script Si raccomanda di usare il plugin "script" per caricare gli script, ad esempio: ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- Ogni linguaggio ha anche il suo comando specifico: ----------------------------------------- +---- /python load python/script.py /perl load perl/script.pl /ruby load ruby/script.rb /lua load lua/script.lua /tcl load tcl/script.tcl /guile load guile/script.scm ----------------------------------------- +---- È possibile creare un link nella directory 'linguaggio/autoload' per caricare automaticamente gli script all'avvio di WeeChat. Ad esempio con Python: ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../script.py ----------------------------------------- +---- [NOTE] Quando viene installato un script con il comando `/script install` il link nella directory 'autoload' viene creato automaticamente'. [[differences_with_c_api]] -Differenze con le API in C --------------------------- +== Differenze con le API in C Le API per gli script sono quasi identiche di quelle per i plugin C. È possibile consultare '*' per i dettagli su ogni funzione nelle API: @@ -226,28 +213,27 @@ un plugin come 'python' con il comando `python`. Quando il proprio script 'test.py' chiama una funzione delle API di Weechat, il path è simile a questo: -........................................ +.... ┌──────────────────────┐ ╔══════════════════╗ │ python plugin │ ║ WeeChat "core" ║ ├────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║ └────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... Quando WeeChat chiama una callback nel proprio script 'test.py', è l'opposto del path precedente: -........................................ +.... ╔══════════════════╗ ┌──────────────────────┐ ║ WeeChat "core" ║ │ python plugin │ ║ ┌─────────╢ ├─────────┬────────────┤ ║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py ╚════════╧═════════╝ └─────────┴────────────┘ -........................................ +.... [[pointers]] -Puntatori -~~~~~~~~~ +=== Puntatori Come è già noto probabilmente, non esistono realmente i "puntatori" negli script. Quando le funzioni API restituiscono un puntatore, viene @@ -265,9 +251,9 @@ Ad esempio, per stampare dei dati sul buffer core (il buffer principale di WeeChat), è possibile fare questo: [source,python] ----------------------------------------- +---- weechat.prnt("", "hi!") ----------------------------------------- +---- [WARNING] In molte funzioni, per motivi legati alla velocità, WeeChat non verifica se @@ -276,8 +262,7 @@ stia fornendo un puntatore valido, altrimenti potrebbe comparire una bella segnalazione per un errore ;) [[callbacks]] -Callback -~~~~~~~~ +=== Callback Quasi tutte le callback di WeeChat devono restituire WEECHAT_RC_OK oppure WEECHAT_RC_ERROR (l'eccezione è la callback modifier, che @@ -292,18 +277,18 @@ Esempio di callback, per ogni linguaggio: * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -311,71 +296,69 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -Script API ----------- +== Script API Per maggiori informazioni sulle funzioni nelle API, consultare 'Referenze API per Plugin di WeeChat'. [[script_api_functions]] -Funzioni -~~~~~~~~ +=== Funzioni Elenco di funzioni nelle API per gli script: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Categoria | Funzioni | generale | register @@ -452,16 +435,15 @@ Elenco di funzioni nelle API per gli script: hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | aggiornamento | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -Costanti -~~~~~~~~ +=== Costanti Elenco di costanti nelle API per gli script: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Categoria | Costanti | codici restituiti | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -489,11 +471,10 @@ Elenco di costanti nelle API per gli script: WEECHAT_HOOK_CONNECT_SOCKET_ERROR | hook su segnale | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -Compiti comuni --------------- +== Compiti comuni Questo capitolo spiega alcuni compiti comuni, con degli esempi. Verranno utilizzati soltanto degli elementi parziali contenuti @@ -501,12 +482,10 @@ nelle API, per un riferimento completo consultare 'Referenze API per Plugin di WeeChat'. [[buffers]] -Buffer -~~~~~~ +=== Buffer [[buffers_display_messages]] -Visualizzare messaggi -^^^^^^^^^^^^^^^^^^^^^ +==== Visualizzare messaggi Una stringa vuota è utilizzata spesso per lavorare con il buffer core di WeeChat. Per gli altri buffer, è necessario fornire un puntatore (come @@ -515,7 +494,7 @@ stringa, consultare <<pointers,pointers>>). Esempi: [source,python] ----------------------------------------- +---- # visualizza "hello" sul buffer core weechat.prnt("", "hello") @@ -542,14 +521,13 @@ weechat.prnt(buffer, "message on #weechat channel") # (nota: server e canale sono separati da virgola) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "message on #weechat channel") ----------------------------------------- +---- [NOTE] La funzione print si chiama `print` in Perl/Ruby/Lua/Tcl e `prnt` in Python. [[buffers_send_text]] -Invia testo al buffer -^^^^^^^^^^^^^^^^^^^^^ +==== Invia testo al buffer È possibile inviare del testo o un comando ad un buffer. È esattamente come se si digitasse del testo o un comando, seguiti da [Enter]. @@ -558,18 +536,17 @@ Esempi: // TRANSLATION MISSING [source,python] ----------------------------------------- +---- # execute command "/help" on current buffer (result is on core buffer) weechat.command("", "/help") # invia "hello" sul canale IRC #weechat (gli utenti sul canale vedranno il messaggio) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "hello") ----------------------------------------- +---- [[buffers_new]] -Creare un nuovo buffer -^^^^^^^^^^^^^^^^^^^^^^ +==== Creare un nuovo buffer È possibile creare un nuovo buffer nel proprio script, per poi utilizzarlo per visualizzare i messaggi. @@ -581,7 +558,7 @@ quando il buffer viene chiuso (ad esempio con `/buffer close`). Esempio: [source,python] ----------------------------------------- +---- # callback per i dati ricevuti in input def buffer_input_cb(data, buffer, input_data): # ... @@ -600,29 +577,28 @@ weechat.buffer_set(buffer, "title", "Questo titolo è per il mio buffer.") # disabilita il logging, impostando la variabile locale "no_log" ad "1" weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -Proprietà dei buffer -^^^^^^^^^^^^^^^^^^^^ +==== Proprietà dei buffer Si possono leggere le proprietà del buffer, come stringa, intero o puntatore. Esempi: [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() number = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") short_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- È possibile aggiungere, leggere o eliminare le variabili locali nel buffer: [source,python] ----------------------------------------- +---- # aggiunge la variabile locale weechat.buffer_set(buffer, "localvar_set_myvar", "my_value") @@ -631,22 +607,20 @@ myvar = weechat.buffer_get_string(buffer, "localvar_myvar") # elimina la variabile locale weechat.buffer_set(buffer, "localvar_del_myvar", "") ----------------------------------------- +---- Per impostare le variabili locali di un buffer, digitare questo comando in WeeChat: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -Hook -~~~~ +=== Hook [[hook_command]] -Aggiungere un nuovo comando -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Aggiungere un nuovo comando Aggiunge un comando personalizzato con `hook_command`. Si può fare uso di un template di completamento personalizzato per completare gli argomenti @@ -655,7 +629,7 @@ del proprio comando. Esempio: [source,python] ----------------------------------------- +---- def my_command_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -670,37 +644,35 @@ hook = weechat.hook_command("myfilter", "descrizione di myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- E poi in WeeChat: ----------------------------------------- +---- /help myfilter /myfilter arguments... ----------------------------------------- +---- [[hook_timer]] -Aggiungere un timer -^^^^^^^^^^^^^^^^^^^ +==== Aggiungere un timer Aggiungere un timer con `hook_timer`. Esempio: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # timer chiamato ogni minuto quandi i secondi sono 00 weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -Eseguire un processo in background -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Eseguire un processo in background È possibile eseguire un processo in background con `hook_process`. La callback verrà chiamata quando i dati sono pronti. Può essere chiamata @@ -712,7 +684,7 @@ valore positivo, è il codice restituito dal comando. Esempio: [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -724,11 +696,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -Trasferimento URL -^^^^^^^^^^^^^^^^^ +==== Trasferimento URL _Novità nella versione 0.3.7._ @@ -740,7 +711,7 @@ Esempio di trasferimento di un URL senza opzioni: la pagina HTML verrà ricevuta come "out" nella callback (output standard di un processo): [source,python] ----------------------------------------- +---- # Mostra la versione stabile corrente di WeeChat. weechat_version = "" @@ -754,7 +725,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] Tutte le informazioni disponibili su Weechat sono sulla pagina @@ -764,7 +735,7 @@ Esempio di trasferimento di un URL con un'opzione: scaricare l'ultimo pacchetto di sviluppo di WeeChat nel file '/tmp/weechat-devel.tar.gz': [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "End of transfer (rc=%s)" % rc) @@ -773,19 +744,17 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- Per maggiori informazioni sul trasferimento degli URL e le opzioni disponibili, consultare le funzioni `hook_process` e `hook_process_hashtable` in 'Referenze API per Plugin'. [[config_options]] -Configurazione / opzioni -~~~~~~~~~~~~~~~~~~~~~~~~ +=== Configurazione / opzioni [[config_options_set_script]] -Impostare l'opzione per lo script -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Impostare l'opzione per lo script La funzione `config_is_set_plugin` viene utilizzare per verificare se un'opzione è impostata oppure no, e `config_set_plugin` per impostare l'opzione. @@ -793,7 +762,7 @@ La funzione `config_is_set_plugin` viene utilizzare per verificare se un'opzione Esempio: [source,python] ----------------------------------------- +---- script_options = { "option1" : "value1", "option2" : "value2", @@ -802,11 +771,10 @@ script_options = { for option, default_value in script_options.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, default_value) ----------------------------------------- +---- [[config_options_detect_changes]] -Rilevare le modifiche -^^^^^^^^^^^^^^^^^^^^^ +==== Rilevare le modifiche È necessario utilizzare `hook_config` per essere notificati se l'utente dovesse modificare alcune opzioni dello script. @@ -814,7 +782,7 @@ modificare alcune opzioni dello script. Esempio: [source,python] ----------------------------------------- +---- SCRIPT_NAME = "myscript" # ... @@ -829,18 +797,17 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_cb", "") # for other languages, change "python" with your language ("perl", "ruby", "lua" or "tcl") ----------------------------------------- +---- [[config_options_weechat]] -Leggere le opzioni di WeeChat -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Leggere le opzioni di WeeChat La funzione `config_get` restituisce il puntatore all'opzione. Poi, in base al tipo di opzione, è necessario chiamare `config_string`, `config_boolean`, `config_integer` oppure `config_color`. [source,python] ----------------------------------------- +---- # stringa weechat.prnt("", "value of option weechat.look.item_time_format is: %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -856,15 +823,13 @@ weechat.prnt("", "value of option weechat.look.scroll_page_percent is: %d" # colore weechat.prnt("", "value of option weechat.color.chat_delimiters is: %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -IRC -~~~ +=== IRC [[irc_catch_messages]] -Catturare messaggi -^^^^^^^^^^^^^^^^^^ +==== Catturare messaggi Il plugin IRC invia due segnali per un messaggio ricevuto (`xxx` è il nome interno del server IRC, `yyy` è il nome del comando IRC come JOIN, QUIT, @@ -877,7 +842,7 @@ xxx,irc_in2_yyy:: segnale inviato dopo aver esaminato il messaggio [source,python] ----------------------------------------- +---- def join_cb(data, signal, signal_data): # signal è per esempio: "freenode,irc_in2_join" # signal_data è il messaggio IRC message, ad esempio: ":nick!user@host JOIN :#channel" @@ -892,32 +857,30 @@ def join_cb(data, signal, signal_data): # può essere utile qui utilizzare "*" come server, per catturare # i messaggi JOIN su tutti i server IRC weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -Modificare i messaggi -^^^^^^^^^^^^^^^^^^^^^ +==== Modificare i messaggi Il plugin IRC invia un "modificatore" chiamato "irc_in_xxx" ("xxx" è il comando IRC) per un messaggio ricevuto, in modo da poterlo modificare. [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # aggiunge il nome del server a tutti i messaggi ricevuti # (ok non è molto utile, ma è solo un esempio!) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] A malformed message could crash WeeChat or cause severe problems! Un messaggio errato può mandare in crash WeeChat o causare seri problemi! [[irc_message_parse]] -Verifica messaggio -^^^^^^^^^^^^^^^^^^ +==== Verifica messaggio _Novità nella versione 0.3.4._ @@ -925,22 +888,20 @@ _Novità nella versione 0.3.4._ "irc_message_parse". [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message here" }) weechat.prnt("", "dict: %s" % dict) # output: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -Info -~~~~ +=== Info [[infos_weechat_version]] -Versione di WeeChat -^^^^^^^^^^^^^^^^^^^ +==== Versione di WeeChat Il modo migliore per verificare la versione è richiedere "version_number" e comparare l'intero con il numero di versione esadecimale. @@ -948,13 +909,13 @@ comparare l'intero con il numero di versione esadecimale. Esempio: [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "This is WeeChat 0.3.2 or newer") else: weechat.prnt("", "This is WeeChat 0.3.1 or older") ----------------------------------------- +---- [NOTE] Le versioni ≤ 0.3.1.1 restituiscono una stringa vuota per @@ -964,31 +925,28 @@ il valore restituito *non* sia vuoto. To get version as string: [source,python] ----------------------------------------- +---- # this will display for example "Version 0.3.2" weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -Altre informazioni -^^^^^^^^^^^^^^^^^^ +==== Altre informazioni [source,python] ----------------------------------------- +---- # la directory home di WeeChat, ad esempio: "/home/xxxx/.weechat" weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) # inattività della tastiera weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -Liste info -~~~~~~~~~~ +=== Liste info [[infolists_read]] -Leggere una lista info -^^^^^^^^^^^^^^^^^^^^^^ +==== Leggere una lista info È possibile leggere una lista info compilata da WeeChat o da altri plugin. @@ -996,7 +954,7 @@ o da altri plugin. Esempio: [source,python] ----------------------------------------- +---- # legge la lista info "buffer", per ottenere la lista dei buffer infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -1004,7 +962,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] Non dimenticare di chiamare `infolist_free` per liberare la memoria diff --git a/doc/it/weechat_tester.it.txt b/doc/it/weechat_tester.it.txt index c56eb2365..3cad8224d 100644 --- a/doc/it/weechat_tester.it.txt +++ b/doc/it/weechat_tester.it.txt @@ -1,11 +1,9 @@ -Guida al Tester di WeeChat -========================== += Guida al Tester di WeeChat Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -Scopo ------ +== Scopo Molti utenti riconoscenti chiedono come possono aiutare nello sviluppo di WeeChat. Il modo più semplice (ed anche più delicato) per aiutare @@ -29,8 +27,7 @@ vecchi bug). [[prepare_system]] -Preparazione del sistema ------------------------- +== Preparazione del sistema Sarebbe molto di aiuto abilitare i file 'core' di Linux: se WeeChat dovesse andare in crash, Linux scriverebbe un file chiamato 'core'. @@ -39,14 +36,13 @@ esattamente dove sia il problema in WeeChat. Se si utilizza la shell 'bash', aggiungere la seguente riga al file `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -Download della versione di sviluppo ------------------------------------ +== Download della versione di sviluppo Il codice più fresco (con gli ultimi bug e le funzionalità più recenti) è conservato in un deposito GIT. @@ -58,56 +54,54 @@ conservato in un deposito GIT. versione stabile di WeeChat. [[get_sources]] -Ottenere e compilare i sorgenti -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Ottenere e compilare i sorgenti Per prima cosa creare una directory, per esempio 'weechat-git': ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- Se si ha git installato, si può clonare il deposito git (raccomandato): ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- NOTA: In seguito, si può eseguire "`git pull`" in questa directory per ricevere gli ultimi aggiornamenti. Altrimenti si può scaricare ed estrarre il pacchetto 'devel': ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- Per compilare i sorgenti, si raccomanda cmake: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- Se cmake non è installato, è ancora possibile usare gli autotools: ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -Installazione del pacchetto binario -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Installazione del pacchetto binario A seconda della distribuzione Linux: @@ -118,17 +112,16 @@ A seconda della distribuzione Linux: [[run]] -Eseguire WeeChat ----------------- +== Eseguire WeeChat Si raccomanda di avviare WeeChat con un'altra directory (diversa dalla versione stabile), con l'opzione `--dir`. Il comando è: ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- Se siete ancora svegli dovreste vedere un'interfaccia familiare e vantarvi del fatto di avere la versione più nuova possibile di WeeChat. ;) @@ -142,8 +135,7 @@ commenti! [[links]] -Collegamenti utili ------------------- +== Collegamenti utili * Deposito GIT: http://git.savannah.gnu.org/gitweb/?p=weechat.git * Bug tracker: https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt index 9864a934a..67c03da4a 100644 --- a/doc/it/weechat_user.it.txt +++ b/doc/it/weechat_user.it.txt @@ -1,5 +1,4 @@ -Guida per l'Utente di WeeChat -============================= += Guida per l'Utente di WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -11,15 +10,13 @@ http://weechat.org/doc [[introduction]] -Introduzione ------------- +== Introduzione WeeChat (Wee Enhanced Environment for Chat) è un client di chat libero, veloce e leggero, realizzato per diversi sistemi operativi. [[features]] -Caratteristiche -~~~~~~~~~~~~~~~ +=== Caratteristiche Le principali caratteristiche: @@ -39,8 +36,7 @@ Le principali caratteristiche: La home page di WeeChat si trova qui: http://weechat.org/ [[pre-requisites]] -Requisiti -~~~~~~~~~ +=== Requisiti Per poter installare WeeChat, è necessario: @@ -51,12 +47,10 @@ Per poter installare WeeChat, è necessario: * librerie ncurses [[install]] -Installazione -------------- +== Installazione [[binary_packages]] -Pacchetti binari -~~~~~~~~~~~~~~~~ +=== Pacchetti binari I pacchetti binari sono disponibili per molte distribuzioni, incluse: @@ -76,21 +70,19 @@ Per altre distribuzioni, consultare il manuale per le istruzioni di installazione. [[source_package]] -Sorgenti -~~~~~~~~ +=== Sorgenti WeeChat può essere compilato con cmake oppure autotools (tuttavia si raccomanda cmake). [[dependencies]] -Dipendenze -^^^^^^^^^^ +==== Dipendenze La seguente tabella mostra l'elenco di pacchetti richiesti o opzionali per compilare WeeChat. [width="100%",cols="5,^3,^3,13",options="header"] -|======================================== +|=== | Pacchetto ^(1)^ | Versione | Richiesto | Caratteristica | cmake | | *sì* | Compilazione (ancora possibile con autotools, ma si raccomanda cmake) | libncursesw5-dev ^(2)^ | | *sì* | Interfaccia ncurses @@ -116,7 +108,7 @@ compilare WeeChat. // TRANSLATION MISSING | xsltproc, docbook-xml, docbook-xsl | | | Build of man page -|======================================== +|=== [NOTE] ^(1)^ Il nome viene dalla distribuzione Debian GNU/Linux, nomi e versioni dei pacchetti @@ -127,28 +119,27 @@ potrebbero essere differenti in versioni e distribuzioni differenti. + correttamente con la versione 2.7, ma non con le versioni ≤ 2.6 o ≥ 3.0). [[compile_with_cmake]] -Compilazione con cmake -^^^^^^^^^^^^^^^^^^^^^^ +==== Compilazione con cmake * Installazione nelle directory di sistema (richiede privilegi di 'root'): ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. $ make % make install (come root) ----------------------------------------- +---- * Installazione in una directory personalizzata: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=/path/della/directory $ make $ make install ----------------------------------------- +---- // TRANSLATION MISSING Options can be used for cmake, with format: "-DOPTION=VALUE". @@ -158,7 +149,7 @@ List of commonly used options: // TRANSLATION MISSING [width="100%",cols="2m,2,5m,12",options="header"] -|======================================== +|=== | Option | Values | Default value | Description | CMAKE_BUILD_TYPE | `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel` | | @@ -254,23 +245,22 @@ List of commonly used options: | ENABLE_XFER | `ON`, `OFF` | ON | Compile <<xfer_plugin,Xfer plugin>>. -|======================================== +|=== The other options can be displayed with this command: ----------------------------------------- +---- $ cmake -LA ----------------------------------------- +---- Or with Curses interface: ----------------------------------------- +---- $ ccmake .. ----------------------------------------- +---- [[compile_with_autotools]] -Compilazione con autotools -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Compilazione con autotools // TRANSLATION MISSING [WARNING] @@ -280,53 +270,51 @@ Build with autotools requires more dependencies and is slower than with cmake. * Installazione nelle directory di sistema (richiede privilegi di 'root'): ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure $ make % make install (come root) ----------------------------------------- +---- * Installazione in una directory personalizzata: ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure --prefix=/path/to/directory $ make $ make install ----------------------------------------- +---- // TRANSLATION MISSING Options can be used for 'configure' script, they can be displayed with this command: ----------------------------------------- +---- $ ./configure --help ----------------------------------------- +---- [[git_sources]] -Sorgenti git -~~~~~~~~~~~~ +=== Sorgenti git Attenzione: i sorgenti git sono per gli utenti avanzati: potrebbero non compilare o essere instabili. Siete avvisati! Per ottenere i sorgenti git, dare il comando: ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git ----------------------------------------- +---- Poi seguire le istruzioni per i sorgenti (consultare <<source_package,sorgenti>>). [[report_crashes]] -Segnalare gli errori -~~~~~~~~~~~~~~~~~~~~ +=== Segnalare gli errori Nel caso in cui si verifichino errori, o si desideri segnalare qualsiasi errore futuro di WeeChat, è necessario: @@ -337,30 +325,28 @@ futuro di WeeChat, è necessario: * installare gdb [[debug_info]] -Informazioni di debug -^^^^^^^^^^^^^^^^^^^^^ +==== Informazioni di debug Se si compila con cmake: ----------------------------------------- +---- $ cmake .. -DCMAKE_BUILD_TYPE=Debug ----------------------------------------- +---- Se compilato con gli autotools, il debug è attivato automaticamente (`--with-debug=1`). Se è stato installato il pacchetto binario, installare il pacchetto 'weechat-gdb'. [[core_files]] -File core -^^^^^^^^^ +==== File core // TRANSLATION MISSING To enable 'core' files, you can use option <<option_weechat.startup.sys_rlimit,weechat.startup.sys_rlimit>>: ----------------------------------------- +---- /set weechat.startup.sys_rlimit "core:-1" ----------------------------------------- +---- // TRANSLATION MISSING For WeeChat ≤ 0.3.8 or if you want to enable core files even before WeeChat @@ -369,19 +355,18 @@ starts, you can use `ulimit` command. Ad esempio su Linux con la shell 'bash', aggiungere questa riga al proprio `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- Oppure impostare una dimensione massima: ----------------------------------------- +---- ulimit -c 200000 ----------------------------------------- +---- [[gdb_backtrace]] -Ottenere un backtrace con gdb -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Ottenere un backtrace con gdb In caso di errore di WeeChat, il sistema creerà un file 'core' oppure 'core.12345' ('12345' è l'id del processo). @@ -391,9 +376,9 @@ Questo file viene creato nella directory in cui è in esecuzione WeeChat (e Ad esempio, se 'weechat' è installato in '/usr/bin/' ed il file 'core' si trova in '/home/xxx/', allora eseguire gdb con questo comando: ----------------------------------------- +---- gdb /usr/bin/weechat /home/xxx/core ----------------------------------------- +---- [NOTE] Se è stato installato il pacchetto binario 'weechat-dbg' (ad esempio in Debian), è @@ -403,7 +388,7 @@ possibile usare questo path per il binario di WeeChat: All'interno di gdb, usare il comando `bt full` per visualizzare il backtrace. Verrà mostrato qualcosa di simile a questo: ----------------------------------------- +---- (gdb) set logging file /tmp/crash.txt (gdb) set logging on Copying output to /tmp/crash.txt. @@ -430,7 +415,7 @@ Copying output to /tmp/crash.txt. write_fds = {fds_bits = {0 <repeats 16 times>}} except_fds = {fds_bits = {0 <repeats 16 times>}} max_fd = <value optimized out> ----------------------------------------- +---- Bisogna riportare l'errore agli sviluppatori, e specificare quale azione ha causato l'errore. @@ -438,30 +423,27 @@ l'errore. Grazie per il vostro aiuto! [[debug_running_weechat]] -Debug di WeeChat durante l'esecuzione -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Debug di WeeChat durante l'esecuzione Per eseguire il debug di un'istanza di WeeChat in esecuzione (ad esempio se WeeChat sembra sia bloccato), è possibile usare gdb con l'id del processo (sostituire '12345' con il PID del processo weechat): ----------------------------------------- +---- gdb /usr/bin/weechat 12345 ----------------------------------------- +---- Poi, come per un crash, usare il comando `bt full`: ----------------------------------------- +---- (gdb) bt full ----------------------------------------- +---- [[usage]] -Utilizzo --------- +== Utilizzo [[running_weechat]] -Esecuzione di WeeChat -~~~~~~~~~~~~~~~~~~~~~ +=== Esecuzione di WeeChat Argomenti a riga di comando: @@ -469,9 +451,9 @@ include::cmdline_options.it.txt[] Per avviare WeeChat, digitare questo comando: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- Alla prima esecuzione di WeeChat, viene creato un file di configurazione predefinito. Il file di configurazione viene creato nella directory: @@ -482,13 +464,12 @@ proprie esigenze, oppure impostando i parametri con il comando `/set` all'interno di WeeChat (consultare <<weechat_commands,comandi di WeeChat>>). [[screen_layout]] -Layout dello schermo -~~~~~~~~~~~~~~~~~~~~ +=== Layout dello schermo Esempio di terminale con WeeChat: // TRANSLATION MISSING -........................................ +.... ▼ bar "title" ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ @@ -513,7 +494,7 @@ Esempio di terminale con WeeChat: │[@Flashy(i)] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ bars "status" and "input" bar "nicklist" ▲ -........................................ +.... Lo schermo è composto dalle seguenti aree: @@ -530,7 +511,7 @@ Lo schermo è composto dalle seguenti aree: La barra 'stato' ha i seguenti elementi predefiniti: [width="100%",cols="^3,^3,10",options="header"] -|======================================== +|=== | Elemento | Esempio | Descrizione | time | `[12:55]` | Ora | buffer_count | `[6]` | Numero di buffer aperti @@ -544,12 +525,12 @@ La barra 'stato' ha i seguenti elementi predefiniti: | hotlist | `[H: 4:#abc(2,5), 6]` | Elenco dei buffer con attività (messaggi non letti) (nell'esempio, 2 notifiche e 5 messaggi non letti su #abc, un messaggio non letto sul buffer #6) | completion | `abc(2) def(5)` | Elenco di parole per il completamento, con il numero di completamenti possibili per ogni parola | scroll | `-ANCORA(50)-` | Indicatore di scorrimento, con il numero di righe sotto l'ultima riga visualizzata -|======================================== +|=== La barra 'input' ha i seguenti elementi predefiniti: [width="100%",cols="^3,^6,8",options="header"] -|======================================== +|=== | Elemento | Esempio | Descrizione | input_paste | `[Incollare 7 righe ? [ctrl-Y] Sì [ctrl-N] No]` | Chiede all'utente se incollare le righe // TRANSLATION MISSING @@ -558,11 +539,10 @@ La barra 'input' ha i seguenti elementi predefiniti: // TRANSLATION MISSING | input_search | `[Search (~ str,msg)]` | Search indicator ("`~`": case insensitive, "`==`": case sensitive, "`str`": search string, "`regex`": search regular expression, "`msg`": search in messages, "`pre`": search in prefixes, "`pre\|msg`": search in prefixes and messages) | input_text | `ciao peter!` | Testo in input -|======================================== +|=== [[buffers_and_windows]] -Buffer e finestre -~~~~~~~~~~~~~~~~~ +=== Buffer e finestre Un 'buffer' è composto da un numero, un nome, delle righe visualizzate (e altri dati). @@ -583,7 +563,7 @@ da una finestra) o visualizzato da una o più finestre. Esempio di split orizzontale (`/window splith`): // TRANSLATION MISSING -........................................ +.... ▼ window #2 (buffer #4) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #abc │ @@ -611,12 +591,12 @@ Esempio di split orizzontale (`/window splith`): │[@Flashy] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) -........................................ +.... Esempio di split verticale (`/window splitv`): // TRANSLATION MISSING -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #abc │ │12:54:15 peter | hey! │@Flashy│12:55:12 Max | hi │@Flashy│ @@ -640,12 +620,12 @@ Esempio di split verticale (`/window splitv`): │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... Esempio di split orizzontale + verticale: // TRANSLATION MISSING -........................................ +.... ▼ window #3 (buffer #5) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #def │ @@ -673,12 +653,11 @@ Esempio di split orizzontale + verticale: │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... // TRANSLATION MISSING [[bars]] -Bars -~~~~ +=== Bars A 'bar' is an area beside the chat that can contain any type of text. @@ -688,7 +667,7 @@ is the name of the bar and `option` the option for this bar. List of bar options: [width="100%",cols="2m,2,10",options="header"] -|======================================== +|=== | Option | Values | Description | type | `root`, `window` | @@ -752,11 +731,10 @@ List of bar options: | conditions | string | The conditions to display the bar (see <<bar_conditions,conditions>> for more info). -|======================================== +|=== [[bar_items]] -Items -^^^^^ +==== Items The option 'items' is a string with a list of bar items, separated by a comma (space between items on screen) or "+" (glued items). @@ -770,11 +748,11 @@ defined in bar (option 'color_delim'). Example of bar with items "[time],buffer_number+:+buffer_plugin+.+buffer_name": -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │[12:55] 3:irc/freenode.#weechat │ └───────────────────────────────────────────────────────────────────────────┘ -........................................ +.... // TRANSLATION MISSING A special syntax can be used to force the buffer used when displaying the bar @@ -789,13 +767,12 @@ not displayed in the current window (or even not displayed at all). Example: nicklist of bitlbee in a root bar (if the bar is called 'bitlist' and if bitlbee server is called 'bitlbee'): ----------------------------------------- +---- /set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist" ----------------------------------------- +---- [[bar_filling]] -Filling -^^^^^^^ +==== Filling There are four types of filling: @@ -814,7 +791,7 @@ default bar 'nicklist' has 'vertical' filling. Some examples of filling for bar 'nicklist': -........................................ +.... ┌──────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ │12:54:15 peter | hey! │@carl │ @@ -868,11 +845,10 @@ Some examples of filling for bar 'nicklist': │───────────────────────────────────────────────────────────────────────│ │ │ filling_top_bottom = columns_horizontal ▲ -........................................ +.... [[bar_conditions]] -Conditions -^^^^^^^^^^ +==== Conditions The option 'conditions' is a string evaluated to know if the bar is displayed or not in the window (it is used only for bars with type 'window'). @@ -899,20 +875,19 @@ Following pointers are available: Example to display nicklist bar in all buffers with a nicklist, and only if width of window is > 100 : ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && ${window.win_width} > 100" ----------------------------------------- +---- Same condition, but always display nicklist on buffer '&bitlbee' (even if window is small): ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)" ----------------------------------------- +---- [[notify_levels]] -Livelli di notifica -~~~~~~~~~~~~~~~~~~~ +=== Livelli di notifica Sono possibili quattro livelli per i messaggi mostrati nei buffer, dal più basso al più alto: @@ -931,45 +906,43 @@ Il livello predefinito di notifica può essere impostato usando l'opzione il valore predefinito è 'all'. [width="50%",cols="3m,10",options="header"] -|======================================== +|=== | Livello di notifica | Livello del messaggio aggiunto alla hotlist | none | (nessuno) | highlight | 'highlight' + 'private' | message | 'highlight' + 'private' + 'message' | all | 'highlight' + 'private' + 'message' + 'low' -|======================================== +|=== Il livello di notifica può essere definito per un set di buffer, ad esempio tutti i buffer per il server irc "freenode": ----------------------------------------- +---- /set weechat.notify.irc.freenode message ----------------------------------------- +---- Imposta il livello di notifica 'highlight' solo sul canale '#weechat': ----------------------------------------- +---- /set weechat.notify.irc.freenode.#weechat highlight ----------------------------------------- +---- Il livello di notifica per un buffer può essere impostato con il comando `/buffer`: ----------------------------------------- +---- /buffer notify highlight ----------------------------------------- +---- [[key_bindings]] -Associazione tasti predefinita -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Associazione tasti predefinita // 'C-' = ctrl, 'A-' = alt, 'S-' = shift [[key_bindings_command_line]] -Tasti per la riga di comando -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasti per la riga di comando [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Tasti | Descrizione | Comando | @k(←) .2+| Passa al carattere precedente nella riga di comando .2+| `/input move_previous_char` | @k(C-)@k(b) @@ -1014,14 +987,13 @@ Tasti per la riga di comando | @k(A-)@k(k) | Cattura un tasto ed inserisce il suo codice (e il comando associato se il tasto esiste) nella riga di comando | `/input grab_key_command` | @k(A-)@k(r) | Elimina l'intera riga di comando | `/input delete_line` | @k(A-)@k(s) | Abilita/disabilita aspell | `/mute aspell toggle` -|======================================== +|=== [[key_bindings_buffers_windows]] -Tasti per buffer / finestre -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasti per buffer / finestre [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Tasti | Descrizione | Comando | @k(C-)@k(l) | Ridisegna l'intera finestra | `/window refresh` | @k(C-)@k(s) , @k(C-)@k(u) | Imposta l'evidenziatore dei messaggi non letti su tutti i buffer | `/input set_unread` @@ -1072,17 +1044,16 @@ Tasti per buffer / finestre | @k(A-)@k(>) | Passa al buffer successivo nella lista dei buffer visitati | `/input jump_next_visited_buffer` | @k(A-)@k(/) | Passa all'ultimo buffer mostrato (prima dell'ultimo passaggio ad un buffer) | `/input jump_last_buffer_displayed` | @k(A-)@k(=) | Attiva/disattiva filtri | `/filter toggle` -|======================================== +|=== [[key_bindings_search_context]] -Tasti per il contesto "search" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasti per il contesto "search" Questi tasti sono usati nel contesto "search" (quando viene digitato @k(C-)@k(r) per cercare del testo nel buffer). [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | Key | Descrizione | Comando // TRANSLATION MISSING | @k(C-)@k(r) | Switch search type: string (default), regular expression | `/input search_switch_regex` @@ -1094,17 +1065,16 @@ Questi tasti sono usati nel contesto "search" (quando viene digitato | @k(Invio) .3+| Ferma ricerca .3+| `/input search_stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_cursor_context]] -Tasti per il contesto "cursor" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasti per il contesto "cursor" Questi tasti sono usati nel contesto "cursor" (movimento libero del cursore sullo schermo. [width="100%",cols="^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Tasto | Zona | Descrizione | Comando | @k(↑) | - | Sposta il cursore di una riga in alto | `/cursor move up` | @k(↓) | - | Sposta il cursore di una riga in basso | `/cursor move down` @@ -1125,18 +1095,17 @@ sullo schermo. | @k(Enter) .3+| - .3+| Ferma la modalità cursore .3+| `/cursor stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_mouse_context]] -Tasti per il contesto "mouse" -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Tasti per il contesto "mouse" Questi tasti sono usati nel contesto "mouse", ovvero quando si verifica un evento del mouse. // TRANSLATION MISSING (6) [width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | Tasto ^(1)^ | Azione | Zona | Descrizione | Comando | ◾◽◽ | - | chat | Passa alla finestra | `/window ${_window_number}` | ◾◽◽ | sinistra | chat | Passa al buffer precedente | `/window ${_window_number};/buffer +1` @@ -1164,41 +1133,39 @@ evento del mouse. | ⇑ | - | ogni barra | Scorre la barra del -20% | `/bar scroll ${_bar_name} ${_window_number} -20%` | ⇓ | - | ogni barra | Scorre la barra del +20% | `/bar scroll ${_bar_name} ${_window_number} +20%` | ◽◾◽ | - | ovunque | Avvia la modalità cursore in questo punto | `/cursor go ${_x},${_y}` -|======================================== +|=== // TRANSLATION MISSING [NOTE] ^(1)^ "⇑" and "⇓" are wheel up and down. [[mouse]] -Supporto del mouse -~~~~~~~~~~~~~~~~~~ +=== Supporto del mouse WeeChat supporta i click e le azioni del mouse. Funziona con il terminale locale, e da remoto via connessione ssh con o senza screen/tmux. [[mouse_enable]] -Abilitare il mouse -^^^^^^^^^^^^^^^^^^ +==== Abilitare il mouse Per abilitare il mouse all'avvio: ----------------------------------------- +---- /set weechat.look.mouse on ----------------------------------------- +---- Per abilitarlo subito, digitare @k(A-)@k(m) oppure eseguire il seguente comando: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- È possibile disabilitarlo temporaneamente, e associare il comando ad un tasto. Ad esempio il tasto @k(A-)@k(x) per disabilitare il mouse per 10 secondi: ----------------------------------------- +---- /key bind meta-x /mouse toggle 10 ----------------------------------------- +---- Quando il mouse è abilitato in WeeChat, è possibile usare il modificatore @k(-S-) per selezionare o cliccare nel terminale, come se il mouse fosse @@ -1209,8 +1176,7 @@ disabilitato (in alcuni terminali come iTerm, bisogna usare @k(-A-) invece di Per qualunque problema con il mouse, consultare 'FAQ di WeeChat'. [[mouse_bind_events]] -Associare gli eventi del mouse a comandi -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Associare gli eventi del mouse a comandi Molti eventi del mouse predefiniti sono già definiti da WeeChat (consultare <<key_bindings_mouse_context,tasti per il contesto "mouse">>). @@ -1224,17 +1190,17 @@ pulsante/rotellina e un'azione (opzionale). Elementi diversi sono separati da "- Elenco di modificatori [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Modificatore | Descrizione | ctrl | Tasto @k(-C-) | alt | Tasto @k(-A-) | ctrl-alt | Tasto @k(-C-) e @k(-A-) -|======================================== +|=== Elenco di pulsanti/rotellina: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Pulsante/rotellina | Descrizione | button1 | Click sul tasto sinistro | button2 | Click sul tasto destro @@ -1242,12 +1208,12 @@ Elenco di pulsanti/rotellina: | button4 ... button9 | Click sui pulsanti extra | wheelup | Rotellina (su) | wheeldown | Rotellina (giù) -|======================================== +|=== Elenco di azioni (solo per i pulsanti, non la rotellina): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Azione | Distanza | gesture-up | 3 ... 19 | gesture-up-long | ≥ 20 @@ -1257,17 +1223,17 @@ Elenco di azioni (solo per i pulsanti, non la rotellina): | gesture-left-long | ≥ 40 | gesture-right | 3 ... 39 | gesture-right-long | ≥ 40 -|======================================== +|=== // TRANSLATION MISSING List of incomplete events (only for buttons, useful for plugins/scripts): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | Event | Description | event-down | Button was pressed but not released yet | event-drag | Mouse was moved with button pressed down -|======================================== +|=== Esempio di eventi: @@ -1292,41 +1258,38 @@ poi eseguire l'evento col mouse. Il comando inserisce il nome dell'evento nella riga di comando. [[command_line]] -Riga di comando -~~~~~~~~~~~~~~~ +=== Riga di comando La riga di comando di WeeChat (nella parte inferiore della finestra) consente di inserire i comandi o di inviare del testo sul buffer. [[command_line_syntax]] -Sintassi -^^^^^^^^ +==== Sintassi I comandi iniziano con il carattere "/", seguito dal nome del comando. Ad esempio, per consultare un elenco di opzioni: ----------------------------------------- +---- /set ----------------------------------------- +---- Il testo inviato ad un buffer è qualsiasi testo che non comincia con il carattere "/". Per esempio, per inviare il testo 'ciao' sul buffer attivo: ----------------------------------------- +---- ciao ----------------------------------------- +---- Ad ogni modo, è possibile iniziare con il carattere "/", aggiungendone poi un altro. Ad esempio, per inviare il testo '/set' sul buffer attivo: ----------------------------------------- +---- //set ----------------------------------------- +---- [[command_line_colors]] -Codici colore -^^^^^^^^^^^^^ +==== Codici colore Per alcuni plugin come IRC, è possibile usare codici colori ed attributi, come segue (digitare @k(C-)@k(c) poi la lettera che segue, con il valore @@ -1362,7 +1325,7 @@ terminare l'attributo. I codici colore per @k(C-)@k(c) , @k(c) sono: [width="50%",cols="^1m,3,3",options="header"] -|======================================= +|=== | Codice | IRC | WeeChat (curses) | 00 | bianco | white | 01 | nero | black @@ -1380,22 +1343,21 @@ I codici colore per @k(C-)@k(c) , @k(c) sono: | 13 | rosa chiaro | lightmagenta | 14 | grigio | gray | 15 | grigio chiaro | white -|======================================= +|=== Esempio: visualizza "ciao a tutti!" con "ciao" scritto in blu chiaro grassetto e "a tutti" in rosso chiaro sottolineato: ----------------------------------------- +---- ^Cc12^Cbciao ^Cb^Cc04^Cua tutti^Cu^Cc ! ----------------------------------------- +---- [NOTE] Nel plugin irc, si possono riorganizzare i colori usando l'opzione <<option_irc.color.mirc_remap,irc.color.mirc_remap>>. [[colors]] -Colori -~~~~~~ +=== Colori WeeChat può usare fino a 256 coppie di colore per visualizzare il testo nelle barre e nell'area di chat(il terminale deve supportare 256 colori per essere utilizzati in WeeChat). @@ -1404,13 +1366,13 @@ In base al valore della variabile di ambiente 'TERM', potrebbero verificarsi i seguenti limiti per i colori in WeeChat: [width="50%",cols="8,>2,>2",options="header"] -|======================================== +|=== | $TERM | Colori | Coppie ^(1)^ | "rxvt-unicode", "xterm",... | 88 | 256 | "rxvt-256color", "xterm-256color",... | 256 | 32767 | "screen" | 8 | 64 | "screen-256color" | 256 | 32767 -|======================================== +|=== [NOTE] ^(1)^ Anche se il terminale supporta più di 256 coppie, possono essere utilizzate @@ -1431,26 +1393,25 @@ questi valori nella variabile 'TERM'. Se si sta utilizzando screen, è possibile aggiungere questa riga al proprio '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Se la variabile 'TERM' contiene un valore errato e WeeChat è già in esecuzione, niente panico! È possibile cambiarla senza riavviare, grazie allo script 'shell.py': ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- [[colors_basic]] -Colori base -^^^^^^^^^^^ +==== Colori base I colori base in WeeChat sono: [width="50%",cols="^3m,8",options="header"] -|======================================== +|=== | Nome | Colore | default | Colore predefinito del terminale (trasparente per lo sfondo) | black | Nero @@ -1469,11 +1430,10 @@ I colori base in WeeChat sono: | lightcyan | Azzurro chiaro | gray | Grigio | white | Bianco -|======================================== +|=== [[colors_extended]] -Colori estesi -^^^^^^^^^^^^^ +==== Colori estesi WeeChat alloca dinamicamente le coppie colore quando vengono usati i colori sullo schermo (per mostrare buffer e barre). @@ -1486,33 +1446,31 @@ passare temporaneamente ai colori del terminale per sceglierne uno. Se ad esempio si desidera visualizzare l'ora in arancione nel buffer: ----------------------------------------- +---- /set weechat.color.chat_time 214 ----------------------------------------- +---- O se si desidera uno sfondo verde scuro per la barra di stato: ----------------------------------------- +---- /set weechat.bar.status.color_bg 22 ----------------------------------------- +---- [[colors_aliases]] -Alias -^^^^^ +==== Alias Si possono aggiungere degli alias ai colori con il comando '/color alias' e usarli in ogni opzione relativa al colore. Ad esempio: ----------------------------------------- +---- /color alias 214 orange /set weechat.color.chat_delimiters orange ----------------------------------------- +---- [[colors_attributes]] -Attributi -^^^^^^^^^ +==== Attributi Esistono alcuni attributi per i colori. Uno o più attributi vanno aggiunti prima del nome o del numero del colore: @@ -1526,16 +1484,16 @@ del nome o del numero del colore: Ad esempio se si vuole il proprio nick bianco e sottolineato: ----------------------------------------- +---- /set weechat.color.chat_nick_self _white ----------------------------------------- +---- O se si desidera l'ora nella barra di stato arancione sottolineata e in grassetto: ----------------------------------------- +---- /set weechat.color.status_time *_214 ----------------------------------------- +---- Per usare un attributo con il colore predefinito del terminale (-1), bisogna usare un numero maggiore dell'ultimo colore del terminale, ad esempio il @@ -1543,30 +1501,28 @@ numero massimo in WeeChat: 99999. Esempio di grassetto con il colore di primo piano del terminale: ----------------------------------------- +---- /set weechat.color.status_time *99999 ----------------------------------------- +---- // TRANSLATION MISSING [[options_and_commands]] -Options and commands -~~~~~~~~~~~~~~~~~~~~ +=== Options and commands // TRANSLATION MISSING [[sec_options]] -Secured data options (sec.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Secured data options (sec.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | crypt | /set sec.crypt.* | Options for encryption | data | <<command_weechat_secure,/secure>> | Secured data -|======================================== +|=== // TRANSLATION MISSING Options: @@ -1574,15 +1530,14 @@ Options: include::autogen/user/sec_options.txt[] [[weechat_options]] -Opzioni di WeeChat (weechat.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni di WeeChat (weechat.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | debug | <<command_weechat_debug,/debug set>> + /set weechat.debug.* | Debug level, for core and plugins (options can be added/removed in section) @@ -1605,7 +1560,7 @@ Sections: | key_search | <<command_weechat_key,/key>> | Keys in search context | key_cursor | <<command_weechat_key,/key>> | Keys in cursor context | key_mouse | <<command_weechat_key,/key>> | Keys in mouse context -|======================================== +|=== // TRANSLATION MISSING Options: @@ -1613,14 +1568,12 @@ Options: include::autogen/user/weechat_options.txt[] [[weechat_commands]] -Comandi di WeeChat -^^^^^^^^^^^^^^^^^^ +==== Comandi di WeeChat include::autogen/user/weechat_commands.txt[] [[plugins]] -Plugin ------- +== Plugin Un plugin è una libreria dinamica, scritta in C e compilata, che viene caricata da WeeChat. @@ -1641,16 +1594,16 @@ sono chiusi automaticamente. Esempi per caricare, scaricare oppure elencare i plugin: ----------------------------------------- +---- /plugin load irc /plugin unload irc /plugin list ----------------------------------------- +---- I plugin predefiniti sono: [width="50%",cols="^1,5",options="header"] -|======================================= +|=== | Plugin | Descrizione | alias | Definisce gli alias per i comandi | aspell | Controllo ortografico per la riga di comando @@ -1668,49 +1621,45 @@ I plugin predefiniti sono: | tcl | API per lo scripting in TCL | guile | API per lo scripting in Guile (scheme) | xfer | Trasferimento file e chat diretta -|======================================= +|=== Per saperne di più riguardo lo sviluppo di plugin o script (tramite le API), per favore consultare 'Riferimento API dei Plugin per WeeChat' oppure 'Guida allo Scripting di WeeChat'. [[alias_plugin]] -Plugin Alias -~~~~~~~~~~~~ +=== Plugin Alias Il plugin Alias consente di creare alias per i comandi (da WeeChat o altri plugin). [[alias_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/alias_commands.txt[] [[aspell_plugin]] -Plugin Aspell -~~~~~~~~~~~~~ +=== Plugin Aspell Il plugin Aspell consente di verificare l'ortografia nella riga di comando. È possibile utilizzare più lingue per buffer. [[aspell_options]] -Opzioni (aspell.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni (aspell.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | color | /set aspell.color.* | Colors | check | /set aspell.check.* | Options to control spell checking | dict | <<command_aspell_aspell,/aspell setdict>> + /set aspell.dict.* | Dictionaries used by buffer (options can be added/removed in section) | option | /set aspell.option.* | <<aspell_speller_options,Opzioni ortografiche>> (options can be added/removed in section) -|======================================== +|=== // TRANSLATION MISSING Options: @@ -1718,14 +1667,12 @@ Options: include::autogen/user/aspell_options.txt[] [[aspell_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/aspell_commands.txt[] [[aspell_speller_options]] -Opzioni ortografiche -^^^^^^^^^^^^^^^^^^^^ +==== Opzioni ortografiche Le opzioni ortografiche possono essere definite aggiungendo opzioni nella sezione "opzioni" della configurazione di aspell. @@ -1733,20 +1680,19 @@ sezione "opzioni" della configurazione di aspell. Il nome dell'opzione è un parametro di configurazione per aspell. L'elenco delle opzioni disponibili può essere trovato nel terminale col seguente comando: ----------------------------------------- +---- $ aspell config ----------------------------------------- +---- Ad esempio, per abilitare l'opzione "ignore-case": ----------------------------------------- +---- /set aspell.option.ignore-case "true" ----------------------------------------- +---- // TRANSLATION MISSING [[aspell_suggestions]] -Suggestions -^^^^^^^^^^^ +==== Suggestions Suggestions are displayed in a bar item called "aspell_suggest". The number of suggestions is set in option 'aspell.check.suggestions'. @@ -1756,23 +1702,22 @@ integer ≥ 0 and add the bar item "aspell_suggest" to a bar, like 'status'. Example of suggestions with English dictionary (`en`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... Example of suggestions with English and French dictionaries (`en,fr`): -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune/prime,primer,primé] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... [[charset_plugin]] -Plugin Charset -~~~~~~~~~~~~~~ +=== Plugin Charset Il plugin Charset consente di decodificare o codificare dati utilizzando i set caratteri. @@ -1786,15 +1731,15 @@ può leggere/scrivere soltanto dati UTF-8. Il plugin Charset dovrebbe essere caricato automaticamente da WeeChat. Per essere sicuri che sia caricato, provare con: ----------------------------------------- +---- /charset ----------------------------------------- +---- Se non trovato, allora si deve caricare il plugin con il comando: ----------------------------------------- +---- /plugin load charset ----------------------------------------- +---- Se il plugin non viene trovato, allora è necessario ricompilare WeeChat con il supporto ai plugin e a Charset. @@ -1805,27 +1750,26 @@ locale, mentre quello interno è UTF-8. Per esempio: -........................................ +.... set caratteri: terminale: ISO-8859-15, interno: UTF-8 -........................................ +.... [[charset_options]] -Opzioni (charset.conf) -^^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni (charset.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | default | /set charset.default.* | Default decoding/encoding charset | decode | <<command_charset_charset,/charset decode>> + /set charset.decode.* | Decoding charset by buffer (options can be added/removed in section) | encode | <<command_charset_charset,/charset encode>> + /set charset.encode.* | Encoding charset by buffer (options can be added/removed in section) -|======================================== +|=== // TRANSLATION MISSING Options: @@ -1833,24 +1777,22 @@ Options: include::autogen/user/charset_options.txt[] [[charset_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/charset_commands.txt[] [[charset_set]] -Impostare il set caratteri -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Impostare il set caratteri Per impostare il set caratteri globale per la codifica e la decodifica, utilizzare il comando `/set`. Per esempio: ----------------------------------------- +---- /set charset.default.decode ISO-8859-15 /set charset.default.encode ISO-8859-15 ----------------------------------------- +---- Se il set caratteri globale per la decodifica non è impostato (ad esempio durante il primo caricamento del plugin Charset), verrà @@ -1866,36 +1808,34 @@ di codifica e decodifica saranno gli stessi. Ad esempio: ----------------------------------------- +---- /charset ISO-8859-15 ----------------------------------------- +---- È l'equivalente di: ----------------------------------------- +---- /charset decode ISO-8859-15 /charset encode ISO-8859-15 ----------------------------------------- +---- Per impostare il set caratteri per il canale IRC (o il privato), utilizzare gli stessi comandi per il server, ma sul buffer del canale (o quello privato). Per visualizzare tutti i set caratteri utilizzati, utilizzare il comando seguente: ----------------------------------------- +---- /set charset.* ----------------------------------------- +---- [[charset_troubleshooting]] -Risoluzione problemi -^^^^^^^^^^^^^^^^^^^^ +==== Risoluzione problemi Per qualunque problema con i set caratteri, per favore consultare le 'Domande Frequenti di WeeChat'. [[fifo_plugin]] -Plugin Fifo -~~~~~~~~~~~ +=== Plugin Fifo È possibile controllare da remoto WeeChat, inviando comandi o del testo ad una pipe FIFO (se l'opzione "plugins.var.fifo.fifo" è abilitata, e lo è per default). @@ -1905,43 +1845,43 @@ La pipe FIFO si trova in '~/.weechat/' ed è chiamata 'weechat_fifo_xxxx' La sintassi per i comandi/testo della pipe FIFO è una delle seguenti: -........................................ +.... plugin.buffer *testo o comando qui *testo o comando qui -........................................ +.... Alcuni esempi: * cambiare il nick sul server IRC freenode in "nuovonick": ----------------------------------------- +---- $ echo 'irc.server.freenode */nick nuovonick' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * visualizazre del testo sul canale IRC #weechat: ----------------------------------------- +---- $ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * visualizzare del testo sul buffer attivo: ----------------------------------------- +---- $ echo '*hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * inviare due comandi per scaricare/caricare gli script Python (è necessario separarli con "\n"): ----------------------------------------- +---- $ echo -e '*/python unload\n*/python autoload' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- È possibile realizzare uno script per inviare un comando a tutte le istanze di WeeChat in esecuzione, per esempio: [source,shell] ----------------------------------------- +---- #!/bin/sh if [ $# -eq 1 ]; then for fifo in ~/.weechat/weechat_fifo_* @@ -1949,18 +1889,17 @@ if [ $# -eq 1 ]; then echo -e "$1" >$fifo done fi ----------------------------------------- +---- Se lo script viene chiamato "auto_weechat_command", può essere eseguito con: ----------------------------------------- +---- $ ./auto_weechat_command 'irc.freenode.#weechat *ciao' ----------------------------------------- +---- [[irc_plugin]] -Plugin IRC -~~~~~~~~~~ +=== Plugin IRC Il plugin IRC è realizzato per chattare tramite protocollo IRC con altre persone. @@ -1968,32 +1907,30 @@ Il plugin IRC è realizzato per chattare tramite protocollo IRC con altre person trasferimento file (tramite plugin xfer, consultare <<xfer_plugin,plugin Xfer>>). [[irc_command_line_options]] -Opzioni a riga di comando -^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni a riga di comando È possibile fornire un URL per uno o più server IRC, come segue: ----------------------------------------- +---- irc[6][s]://[nick[:password]@]irc.esempio.org[:porta][/#canale][,#canale[...]] ----------------------------------------- +---- Esempio per entrare in '#weechat' e '#tizio' sul server 'irc.freenode.net', porta predefinita (6667), con il nick 'caio': ----------------------------------------- +---- $ weechat irc://caio@irc.freenode.net/#weechat,#tizio ----------------------------------------- +---- [[irc_options]] -Opzioni (irc.conf) -^^^^^^^^^^^^^^^^^^ +==== Opzioni (irc.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set irc.look.* | Look and feel | color | /set irc.color.* | Colors @@ -2004,7 +1941,7 @@ Sections: | server_default | /set irc.server_default.* | Default values for servers (used when options in server are not defined) | server | <<command_irc_server,/server>> + /set irc.server.* | Servers -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2012,14 +1949,12 @@ Options: include::autogen/user/irc_options.txt[] [[irc_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/irc_commands.txt[] [[irc_ssl_certificates]] -Certificati SSL -^^^^^^^^^^^^^^^ +==== Certificati SSL Al momento della connessione al server IRC con SSL, WeeChat verifica in maniera predefinita che la connessione sia completamente fidata. @@ -2047,49 +1982,46 @@ e potrebbe fallire, anche se funziona senza problemi con versioni precedenti la 0.3.1. [[irc_connect_oftc_with_certificate]] -Primo esempio: connessione a otfc e verifica del certificato -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +===== Primo esempio: connessione a otfc e verifica del certificato * Importare certificati nella shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt ----------------------------------------- +---- Nota: è possibile concatenare più certificati nel file CAs.pem. * In WeeChat, con il server "otfc" già creato: ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [[irc_connect_oftc_with_certfp]] -Secondo esempio: connessione a otfc con CertFP -++++++++++++++++++++++++++++++++++++++++++++++ +===== Secondo esempio: connessione a otfc con CertFP * Creare un certificato nella shell: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ----------------------------------------- +---- * In WeeChat, con il server "otfc" già creato: ----------------------------------------- +---- /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem" /connect oftc /msg nickserv cert add ----------------------------------------- +---- Per maggiori informazioni consultare http://www.oftc.net/oftc/NickServ/CertFP [[irc_sasl_authentication]] -Autenticazione SASL -^^^^^^^^^^^^^^^^^^^ +==== Autenticazione SASL // TRANSLATION MISSING WeeChat supports SASL authentication, using different mechanisms: @@ -2111,17 +2043,16 @@ Le opzioni nel server sono: Se si desidera usare "dh-blowfish" in tutti i server: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish ----------------------------------------- +---- [NOTE] La libreria "gcrypt" è richiesta per compilare WeeChat al fine di usare il meccanismo "dh-blowfish" (consultare <<dependencies,dipendenze>>). [[irc_tor_freenode]] -Connessione a Freenode con TOR/SASL -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Connessione a Freenode con TOR/SASL Oltre ad SSL, i server Freenode supportano connessioni con TOR (https://www.torproject.org), una rete di tunnel virtuali che consente ad @@ -2134,49 +2065,48 @@ sistema di autenticazione "plain" (in chiaro) con SASL. Il primo passo consiste nell'installare TOR. Per Debian (e derivate): ----------------------------------------- +---- $ sudo apt-get install tor ----------------------------------------- +---- In WeeChat è necessario creare un proxy socks5 per il servizio TOR (nome host/IP e porta dipendono dalla propria configurazione di TOR): ----------------------------------------- +---- /proxy add tor socks5 127.0.0.1 9050 ----------------------------------------- +---- Ora, bisogna creare un nuovo server, ad esempio: ----------------------------------------- +---- /server add freenode-tor p4fsi4ockecnea7l.onion ----------------------------------------- +---- Impostare il proxy per TOR: ----------------------------------------- +---- /set irc.server.freenode-tor.proxy "tor" ----------------------------------------- +---- Impostare l'autenticazione SASL: ----------------------------------------- +---- /set irc.server.freenode-tor.sasl_mechanism dh-blowfish /set irc.server.freenode-tor.sasl_username "your_nickname" /set irc.server.freenode-tor.sasl_password "your_password" ----------------------------------------- +---- E alla fine, connettersi al server: ----------------------------------------- +---- /connect freenode-tor ----------------------------------------- +---- Per maggiori informazioni su Freenode e TOR: http://freenode.net/irc_servers.shtml#tor [[irc_smart_filter_join_part_quit]] -Filtro smart per i messaggi di entrata/uscita/disconnessione -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Filtro smart per i messaggi di entrata/uscita/disconnessione Un filtro smart è disponibile per filtrare i messaggi di entrata/uscita/disconnessione quando il nick non ha detto nulla durante @@ -2185,38 +2115,37 @@ gli ultimi X minuti sul canale Il filtro smart è abilitato per default, ma è necessario aggiungere un filtro per nascondere le righe sul buffer, per esempio: ----------------------------------------- +---- /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- È possibile creare il filtro solo per un canale o per i canali che iniziano con lo stesso nome (consultare `/help filter`): ----------------------------------------- +---- /filter add irc_smart_weechat irc.freenode.#weechat irc_smart_filter * /filter add irc_smart_weechats irc.freenode.#weechat* irc_smart_filter * ----------------------------------------- +---- È possibile nascondere solo i messaggi di entrata o di uscita/disconnessione con le seguenti opzioni: ----------------------------------------- +---- /set irc.look.smart_filter_join on /set irc.look.smart_filter_quit on ----------------------------------------- +---- È possibile impostare un ritardo (in minuti): ----------------------------------------- +---- /set irc.look.smart_filter_delay 5 ----------------------------------------- +---- Se un nick non ha parlato durante gli ultimi 5 minuti, i suoi ingressi e/o uscite/disconnessioni verranno nascosti sul canale. [[irc_ctcp_replies]] -Risposte CTCP -^^^^^^^^^^^^^ +==== Risposte CTCP È possibile personalizzare le risposte CTCP, o bloccare alcune richieste CTCP (non rispondere). @@ -2224,44 +2153,44 @@ Risposte CTCP Ad esempio, per personalizzare la richiesta CTCP "VERSIONE", utilizzare il seguente comando: ----------------------------------------- +---- /set irc.ctcp.version "Uso WeeChat $version, fico!" ----------------------------------------- +---- Se si desidera bloccare CTCP "VERSIONE" (non rispondere ad una query), allora basta impostare una stringa vuota: ----------------------------------------- +---- /set irc.ctcp.version "" ----------------------------------------- +---- Anche un CTCP sconosciuto può essere personalizzato, per esempio si può rispondere "BLABLA": ----------------------------------------- +---- /set irc.ctcp.blabla "Questa è la mia risposta a CTCP BLABLA" ----------------------------------------- +---- È possibile personalizzare CTCP per un solo server, utilizzando il suo nome interno prima del nome CTCP: ----------------------------------------- +---- /set irc.ctcp.freenode.version "WeeChat $version (per freenode)" ----------------------------------------- +---- Se si desidera ripristinare la risposta CTCP standard, allora disabilitare l'opzione: ----------------------------------------- +---- /unset irc.ctcp.version ----------------------------------------- +---- I codici seguenti possono essere utilizzati nelle stringhe e vengono estese automaticamente da WeeChat quando si risponde alle CTCP // TRANSLATION MISSING ($versiongit + $git + $username (name)) [width="100%",cols="^2l,4,8",options="header"] -|======================================= +|=== | Codice | Descrizione | Valore/esempio | $clientinfo | Elenco di CTCP supportate | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | $version | Versione di WeeChat | `0.4.0-dev` @@ -2274,7 +2203,7 @@ automaticamente da WeeChat quando si risponde alle CTCP | $time | Data/ora correnti | `Sun, 16 Dec 2012 10:40:48 +0100` | $username | Nome utente sul server IRC | `name` | $realname | Nome reale sul server IRC | `John Doe` -|======================================= +|=== // TRANSLATION MISSING [NOTE] @@ -2286,7 +2215,7 @@ le risposte CTCP sono: // TRANSLATION MISSING ($username (name)) [width="100%",cols="^2,4,8",options="header"] -|======================================= +|=== | CTCP | Formato risposta | Esempio | CLIENTINFO | `$clientinfo` | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | FINGER | `WeeChat $versiongit` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)` @@ -2294,11 +2223,10 @@ le risposte CTCP sono: | TIME | `$time` | `Sun, 16 Dec 2012 10:40:48 +0100` | USERINFO | `$username ($realname)` | `name (John Doe)` | VERSION | `WeeChat $versiongit ($compilation)` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)` -|======================================= +|=== [[irc_target_buffer]] -Buffer di destinazione per i messaggi IRC -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Buffer di destinazione per i messaggi IRC È possibile personalizzare il buffer di destinazione per i messaggi IRC (buffer usato per visualizzare messaggi) con l'opzione `irc.msgbuffer.*`. @@ -2327,7 +2255,7 @@ Ecco una lista incompleta dei messaggi IRC o degli alias che è possibile personalizzare: [width="60%",cols="^1m,^3m,8",options="header"] -|======================================== +|=== | messaggio | alias | descrizione | error | | errore | invite | | invitato su un canale @@ -2397,7 +2325,7 @@ personalizzare: // TRANSLATION MISSING | 729 | quietlist | end of quiet list | 901 | | ora si è loggati -|======================================== +|=== Anche altri comandi numerici possono essere personalizzati. @@ -2408,52 +2336,50 @@ Alcuni esempi: * visualizza il risultato di `/whois` su un buffer privato: ----------------------------------------- +---- /set irc.msgbuffer.whois private ----------------------------------------- +---- * ripristina il buffer predefinito per il whois (buffer del server): ----------------------------------------- +---- /unset irc.msgbuffer.whois ----------------------------------------- +---- * visualizza inviti sul buffer corrente, solo per il server "freenode": ----------------------------------------- +---- /set irc.msgbuffer.freenode.invite current ----------------------------------------- +---- * visualizza messaggio "303" (ison) sul buffer "core" di WeeChat: ----------------------------------------- +---- /set irc.msgbuffer.303 weechat ----------------------------------------- +---- [[logger_plugin]] -Plugin Logger -~~~~~~~~~~~~~ +=== Plugin Logger Il plugin Logger consente di salvare il contenuto dei buffer su file, con opzioni a proposito su cosa e come viene salvato. [[logger_options]] -Opzioni (logger.conf) -^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni (logger.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set logger.look.* | Look and feel | color | /set logger.color.* | Colors | file | /set logger.file.* | Options for log files | level | /set logger.level.* | Log level by buffer (options can be added/removed in section) | mask | /set logger.mask.* | Filename mask by buffer (options can be added/removed in section) -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2461,14 +2387,12 @@ Options: include::autogen/user/logger_options.txt[] [[logger_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/logger_commands.txt[] [[logger_log_levels]] -Livelli di log -^^^^^^^^^^^^^^ +==== Livelli di log Il logging viene effettuato con un livello per ogni buffer. Il livello predefinito è il 9 (registra tutti i messaggi visualizzati sul buffer). @@ -2492,67 +2416,65 @@ Alcuni esempi: * imposta il livello 3 per il canale IRC #weechat: ----------------------------------------- +---- /set logger.level.irc.freenode.#weechat 3 ----------------------------------------- +---- * set level 3 for freenode server buffer: ----------------------------------------- +---- /set logger.level.irc.server.freenode 3 ----------------------------------------- +---- * imposta il livello 3 per tutti i canali sul server freenode: ----------------------------------------- +---- /set logger.level.irc.freenode 3 ----------------------------------------- +---- * imposta il livello 2 per tutti i buffer IRC: ----------------------------------------- +---- /set logger.level.irc 2 ----------------------------------------- +---- [[logger_filenames_masks]] -Mask per il nome file -^^^^^^^^^^^^^^^^^^^^^ +==== Mask per il nome file È possibile definire un mask per il nome del file di ogni buffer, ed utilizzare le variabili buffer locali per costruire il nome del file. Per visualizzare le variabili locali per il buffer corrente: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- Ad esempio, sul buffer "irc.freenode.#weechat", WeeChat cercherà un mask con il nome dell'opzione, in quest'ordine: ----------------------------------------- +---- logger.mask.irc.freenode.#weechat logger.mask.irc.freenode logger.mask.irc logger.file.mask ----------------------------------------- +---- Ciò vuol dire che si hanno dei mask specifici per alcuni server IRC ("logger.mask.irc.freenode") o per un plugin ("logger.mask.irc"). [[logger_files_by_date]] -File di log per data -++++++++++++++++++++ +===== File di log per data Per avere file di log per data, è possibile usare specificatori data/ora nei mask (consultare `man stfrtime` per i formati), ad esempio: ----------------------------------------- +---- /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" ----------------------------------------- +---- Si avranno i seguenti file: -........................................ +.... ~/.weechat/ |--- logs/ |--- 2010/ @@ -2563,22 +2485,21 @@ Si avranno i seguenti file: |--- 12/ | irc.server.freenode.weechatlog | irc.freenode.#weechat.weechatlog -........................................ +.... [[logger_irc_files_by_server_channel]] -File di log IRC per server e canale -+++++++++++++++++++++++++++++++++++ +===== File di log IRC per server e canale Se si desidera avere una directory per il server IRC ed una per il canale al suo interno: ----------------------------------------- +---- /set logger.mask.irc "irc/$server/$channel.weechatlog" ----------------------------------------- +---- Si avranno i seguenti file: -........................................ +.... ~/.weechat/ |--- logs/ |--- irc/ @@ -2590,11 +2511,10 @@ Si avranno i seguenti file: | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog -........................................ +.... [[relay_plugin]] -Plugin Relay -~~~~~~~~~~~~ +=== Plugin Relay Il plugin Relay viene utilizzato per inoltrare i dati via rete, facendo uso di protocolli differenti: @@ -2605,15 +2525,14 @@ protocolli differenti: con WeeChat (ad esempio QWeeChat) [[relay_options]] -Opzioni (relay.conf) -^^^^^^^^^^^^^^^^^^^^ +==== Opzioni (relay.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set relay.look.* | Look and feel | color | /set relay.color.* | Colors @@ -2621,7 +2540,7 @@ Sections: | 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) -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2629,27 +2548,24 @@ Options: include::autogen/user/relay_options.txt[] [[relay_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/relay_commands.txt[] // TRANSLATION MISSING [[relay_password]] -Password -^^^^^^^^ +==== Password It is highly recommended to set a password for relay, with command: ----------------------------------------- +---- /set relay.network.password "miapass" ----------------------------------------- +---- This password is used for 'irc' and 'weechat' protocols. [[relay_ssl]] -SSL -^^^ +==== SSL È possibile usare SSL creando un certificato e una chiave privata, e usando il prefisso "ssl." nel nome del protocollo. @@ -2659,23 +2575,22 @@ Il file predefinito per il certificato/chiave è '~/.weechat/ssl/relay.pem' È possibile creare un certificato e una chiave privata con i seguenti comandi: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----------------------------------------- +---- Se WeeChat è già in esecuzione, è possibile ricaricare il certificato e la chiave privata con il comando: ----------------------------------------- +---- /relay sslcertkey ----------------------------------------- +---- // TRANSLATION MISSING [[relay_irc_proxy]] -Proxy IRC -^^^^^^^^^ +==== Proxy IRC The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and you can connect to WeeChat with any other IRC client (including WeeChat itself). @@ -2685,45 +2600,43 @@ You can define one port by IRC server, or one generic port for all servers. When using one port for all servers, the client must send the internal name of server in the IRC "PASS" command, with this format: ----------------------------------------- +---- PASS server:miapass ----------------------------------------- +---- Example: IRC proxy with SSL for any server (client will choose): ----------------------------------------- +---- /relay add ssl.irc 8000 ----------------------------------------- +---- Example: IRC proxy without SSL only for server "freenode": ----------------------------------------- +---- /relay add irc.freenode 8000 ----------------------------------------- +---- Now you can connect on port 8000 with any IRC client using server password "miapass" (or "freenode:miapass" if no server was specified in the relay). [[relay_weechat_protocol]] -Protocollo WeeChat -^^^^^^^^^^^^^^^^^^ +==== Protocollo WeeChat Il plugin Relay può inviare dati alle interfacce remote usando il protocollo WeeChat. Ad esempio: ----------------------------------------- +---- /relay add weechat 9000 ----------------------------------------- +---- Ora è possibile connettersi sulla porta 9000 con un'interfaccia remota usando la password "miapass". // TRANSLATION MISSING [[relay_websocket]] -WebSocket -^^^^^^^^^ +==== WebSocket WebSocket protocol (http://tools.ietf.org/html/rfc6455[RFC 6455]) is supported in Relay plugin for all protocols. @@ -2736,16 +2649,15 @@ WebSocket if required headers are found in handshake and if origin is allowed A WebSocket can be opened in a HTML5 with a single line of JavaScript: [source,js] ----------------------------------------- +---- 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). [[rmodifier_plugin]] -Plugin Rmodifier -~~~~~~~~~~~~~~~~ +=== Plugin Rmodifier Il plugin Rmodifier consente di cambiare le stringhe del modificatore utilizzando le espressioni regolari. Si usa tipicamente per nascondere la @@ -2754,20 +2666,19 @@ comandi. Ad esempio, è possibile sostituire ogni carattere in questa password con `*`. [[rmodifier_options]] -Opzioni (rmodifier.conf) -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Opzioni (rmodifier.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set rmodifier.look.* | Look and feel | modifier | <<command_rmodifier_rmodifier,/rmodifier add>> + /set rmodifier.modifier.* | Rmodifiers -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2775,14 +2686,12 @@ Options: include::autogen/user/rmodifier_options.txt[] [[rmodifier_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/rmodifier_commands.txt[] [[rmodifier_creation]] -Creazione di Rmodifier -^^^^^^^^^^^^^^^^^^^^^^ +==== Creazione di Rmodifier Un rmodifier è costituito da tre elementi: @@ -2822,8 +2731,7 @@ Se la riga di comando contiene: `/oper nick password` allora sullo schermo diven `/oper nick ********`. [[scripts_plugins]] -Plugin per gli script -~~~~~~~~~~~~~~~~~~~~~ +=== Plugin per gli script WeeChat fornisce 6 plugin per lo scripting: Python, Perl, Ruby, Lua, Tcl, Guile (scheme). @@ -2840,20 +2748,19 @@ per gli script, consultare la 'Guida allo Scripting di WeeChat'. // TRANSLATION MISSING [[script_options]] -Script options (script.conf) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Script options (script.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set script.look.* | Look and feel | color | /set script.color.* | Colors | scripts | /set script.scripts.* | Options for download of scripts -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2861,50 +2768,42 @@ Options: include::autogen/user/script_options.txt[] [[script_commands]] -Comandi Script -^^^^^^^^^^^^^^ +==== Comandi Script include::autogen/user/script_commands.txt[] [[python_commands]] -Comandi Python -^^^^^^^^^^^^^^ +==== Comandi Python include::autogen/user/python_commands.txt[] [[perl_commands]] -Comandi Perl -^^^^^^^^^^^^ +==== Comandi Perl include::autogen/user/perl_commands.txt[] [[ruby_commands]] -Comandi Ruby -^^^^^^^^^^^^ +==== Comandi Ruby include::autogen/user/ruby_commands.txt[] [[lua_commands]] -Comandi Lua -^^^^^^^^^^^ +==== Comandi Lua include::autogen/user/lua_commands.txt[] [[tcl_commands]] -Comandi Tcl -^^^^^^^^^^^ +==== Comandi Tcl include::autogen/user/tcl_commands.txt[] [[guile_commands]] -Comandi Guile -^^^^^^^^^^^^^ +==== Comandi Guile include::autogen/user/guile_commands.txt[] [[xfer_plugin]] -Plugin Xfer -~~~~~~~~~~~ +=== Plugin Xfer Il plugin Xfer fornisce: @@ -2913,21 +2812,20 @@ Il plugin Xfer fornisce: * trasferimento file, per esempio "DCC" tramite il plugin IRC [[xfer_options]] -Opzioni (xfer.conf) -^^^^^^^^^^^^^^^^^^^ +==== Opzioni (xfer.conf) // TRANSLATION MISSING Sections: // TRANSLATION MISSING [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | Section | Control command | Description | look | /set xfer.look.* | Look and feel | color | /set xfer.color.* | Colors | network | /set xfer.network.* | Network options | file | /set xfer.file.* | Options for files sent/received -|======================================== +|=== // TRANSLATION MISSING Options: @@ -2935,14 +2833,12 @@ Options: include::autogen/user/xfer_options.txt[] [[xfer_commands]] -Comandi -^^^^^^^ +==== Comandi include::autogen/user/xfer_commands.txt[] [[support]] -Supporto --------- +== Supporto Prima di chiedere supporto, assicurarsi di aver letto la documentazione e le FAQ fornite con WeeChat (la documentazione è questo documento, se non sono state diff --git a/doc/ja/autogen/plugin_api/completions.txt b/doc/ja/autogen/plugin_api/completions.txt index c5a4a72e0..9e12301c4 100644 --- a/doc/ja/autogen/plugin_api/completions.txt +++ b/doc/ja/autogen/plugin_api/completions.txt @@ -1,5 +1,5 @@ [width="65%",cols="^1,^2,8",options="header"] -|======================================== +|=== | プラグイン | 名前 | 説明 | alias | alias | 別名のリスト @@ -130,4 +130,4 @@ | xfer | nick | DCC チャットのニックネーム -|======================================== +|=== diff --git a/doc/ja/autogen/plugin_api/infolists.txt b/doc/ja/autogen/plugin_api/infolists.txt index 08670fe2f..545e1ecbc 100644 --- a/doc/ja/autogen/plugin_api/infolists.txt +++ b/doc/ja/autogen/plugin_api/infolists.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,5,5,5",options="header"] -|======================================== +|=== | プラグイン | 名前 | 説明 | ポインタ | 引数 | alias | alias | 別名のリスト | 別名のポインタ (任意) | 別名の名前 (ワイルドカードとして "*" で始めるか終わるかできます) (任意) @@ -70,4 +70,4 @@ | xfer | xfer | xfer のリスト | xfer ポインタ (任意) | - -|======================================== +|=== diff --git a/doc/ja/autogen/plugin_api/infos.txt b/doc/ja/autogen/plugin_api/infos.txt index f57553b3a..94d384269 100644 --- a/doc/ja/autogen/plugin_api/infos.txt +++ b/doc/ja/autogen/plugin_api/infos.txt @@ -1,5 +1,5 @@ [width="100%",cols="^1,^2,6,6",options="header"] -|======================================== +|=== | プラグイン | 名前 | 説明 | 引数 | aspell | aspell_dict | バッファで使用中の辞書のコンマ区切りリスト | バッファポインタ ("0x12345678") またはバッファのフルネーム ("irc.freenode.#weechat") @@ -62,4 +62,4 @@ | weechat | weechat_upgrading | WeeChat がアップグレード中は 1 (コマンド `/upgrade`) | - -|======================================== +|=== diff --git a/doc/ja/autogen/plugin_api/infos_hashtable.txt b/doc/ja/autogen/plugin_api/infos_hashtable.txt index 44241f441..c59ff65a4 100644 --- a/doc/ja/autogen/plugin_api/infos_hashtable.txt +++ b/doc/ja/autogen/plugin_api/infos_hashtable.txt @@ -1,9 +1,9 @@ [width="100%",cols="^1,^2,6,6,6",options="header"] -|======================================== +|=== | プラグイン | 名前 | 説明 | ハッシュテーブル (入力) | ハッシュテーブル (出力) | irc | irc_message_parse | IRC メッセージを解析 | "message": IRC メッセージ、"server": サーバ名 (任意) | "tags": タグ、"message_without_tags": タグを含まないメッセージ、"nick": ニックネーム、"host": ホスト名、"command": コマンド、"channel": チャンネル、"arguments": 引数 (チャンネルを含む) | irc | irc_message_split | IRC メッセージを分割 (512 バイトに収める) | "message": IRC メッセージ、"server": サーバ名 (任意) | "msg1" ... "msgN": 送信メッセージ (最後の "\r\n" は無し), "args1" ... "argsN": メッセージの引数、"count": メッセージの数 -|======================================== +|=== diff --git a/doc/ja/autogen/plugin_api/url_options.txt b/doc/ja/autogen/plugin_api/url_options.txt index 43146bb4e..e216f5961 100644 --- a/doc/ja/autogen/plugin_api/url_options.txt +++ b/doc/ja/autogen/plugin_api/url_options.txt @@ -1,5 +1,5 @@ [width="100%",cols="2,^1,7",options="header"] -|======================================== +|=== | オプション | タイプ | 定数 ^(1)^ | verbose | long | @@ -298,4 +298,4 @@ | new_directory_perms | long | -|======================================== +|=== diff --git a/doc/ja/autogen/user/alias_commands.txt b/doc/ja/autogen/user/alias_commands.txt index daa240d34..bbf22a79b 100644 --- a/doc/ja/autogen/user/alias_commands.txt +++ b/doc/ja/autogen/user/alias_commands.txt @@ -1,7 +1,7 @@ [[command_alias_alias]] [command]*`alias`* コマンドの別名を作成:: ----------------------------------------- +---- /alias [-completion <completion>] <alias> [<command> [;<command>...]] completion: 別名の補完 (任意、デフォルトではターゲットコマンドを伴って補完される) @@ -30,5 +30,5 @@ completion: 別名の補完 (任意、デフォルトではターゲットコマ /alias hello /allchan -exclude=#weechat msg * hello /forcejoin を /sajoin の補完候補を使い IRC コマンド "forcejoin" を送信する別名と定義: /alias -completion %%sajoin forcejoin /quote forcejoin ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/aspell_commands.txt b/doc/ja/autogen/user/aspell_commands.txt index b621580df..fa9f8528f 100644 --- a/doc/ja/autogen/user/aspell_commands.txt +++ b/doc/ja/autogen/user/aspell_commands.txt @@ -1,7 +1,7 @@ [[command_aspell_aspell]] [command]*`aspell`* aspell プラグイン設定:: ----------------------------------------- +---- /aspell enable|disable|toggle listdict setdict <dict>[,<dict>...] @@ -23,5 +23,5 @@ listdict: インストール済み辞書を表示 /aspell enable aspell の有効無効を切り替えるデフォルトのキーは alt-s です。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/charset_commands.txt b/doc/ja/autogen/user/charset_commands.txt index 34ac8be18..9525c8951 100644 --- a/doc/ja/autogen/user/charset_commands.txt +++ b/doc/ja/autogen/user/charset_commands.txt @@ -1,7 +1,7 @@ [[command_charset_charset]] [command]*`charset`* 現在のバッファの文字集合を変更:: ----------------------------------------- +---- /charset decode|encode <charset> reset @@ -9,5 +9,5 @@ encode: エンコード文字集合を変更 charset: 現在のバッファの新しい文字集合 reset: 現在のバッファの文字集合をリセット ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/guile_commands.txt b/doc/ja/autogen/user/guile_commands.txt index 151d034be..aa8cc5c84 100644 --- a/doc/ja/autogen/user/guile_commands.txt +++ b/doc/ja/autogen/user/guile_commands.txt @@ -1,7 +1,7 @@ [[command_guile_guile]] [command]*`guile`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /guile list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/irc_commands.txt b/doc/ja/autogen/user/irc_commands.txt index 984b6a125..234f33ad1 100644 --- a/doc/ja/autogen/user/irc_commands.txt +++ b/doc/ja/autogen/user/irc_commands.txt @@ -1,16 +1,16 @@ [[command_irc_admin]] [command]*`admin`* サーバ管理者に関する情報を探す:: ----------------------------------------- +---- /admin [<target>] target: server ----------------------------------------- +---- [[command_irc_allchan]] [command]*`allchan`* 全てのサーバ、全てのチャンネルに対してコマンドを実行:: ----------------------------------------- +---- /allchan [-current] [-exclude=<channel>[,<channel>...]] <command> [<arguments>] -current: 現在のサーバ上のチャンネルに対してコマンドを実行 @@ -25,12 +25,12 @@ arguments: コマンドの引数 (特殊変数 $nick、$channel、$server はそ /allchan -exclude=#weechat msg * hello #weechat と #linux で始まるチャンネルを除いが全てのチャンネルで 'hello' と発言: /allchan -exclude=#weechat,#linux* msg * hello ----------------------------------------- +---- [[command_irc_allserv]] [command]*`allserv`* 全ての接続済みサーバでコマンドを実行:: ----------------------------------------- +---- /allserv [-exclude=<server>[,<server>...]] <command> [<arguments>] -exclude: いくつかのサーバを除外 (複数のサーバを除外するには '*' をサーバ名の最初と最後につける) @@ -44,24 +44,24 @@ arguments: コマンドの引数 (特殊変数 $nick、$channel、$server はそ /allserv away I'm away すべてのサーバで自分のニックネームに対して whois を実行: /allserv whois $nick ----------------------------------------- +---- [[command_irc_ban]] [command]*`ban`* ニックネームかホスト名を指定してバン:: ----------------------------------------- +---- /ban [<channel>] [<nick> [<nick>...]] channel: バン対象チャンネル nick: バンするユーザ名かホスト名 引数無しの場合は、現在のチャンネルのバンリストを表示。 ----------------------------------------- +---- [[command_irc_connect]] [command]*`connect`* IRC サーバに接続:: ----------------------------------------- +---- /connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-auto|-open [-nojoin] [-switch] @@ -85,33 +85,33 @@ channel: バン対象チャンネル /connect my.server.org/6697 -ssl -password=test /connect irc://nick@irc.oftc.net/#channel /connect -switch ----------------------------------------- +---- [[command_irc_ctcp]] [command]*`ctcp`* CTCP メッセージの送信 (Client-To-Client Protocol):: ----------------------------------------- +---- /ctcp <target> <type> [<arguments>] target: CTCP を送信するニックネーム又はチャンネル名 type: CTCP タイプ (例: "version"、"ping"、..) arguments: CTCP の引数 ----------------------------------------- +---- [[command_irc_cycle]] [command]*`cycle`* チャンネルから退出し再参加:: ----------------------------------------- +---- /cycle [<channel>[,<channel>...]] [<message>] channel: チャンネル名 message: 退出メッセージ (他のユーザに対する) ----------------------------------------- +---- [[command_irc_dcc]] [command]*`dcc`* DCC の開始 (ファイル転送かダイレクトチャット):: ----------------------------------------- +---- /dcc chat <nick> send <nick> <file> @@ -123,76 +123,76 @@ file: ファイルネーム (ローカルホスト上の) /dcc chat toto ファイル "/home/foo/bar.txt" を ニックネーム "toto" に送信: /dcc send toto /home/foo/bar.txt ----------------------------------------- +---- [[command_irc_dehalfop]] [command]*`dehalfop`* ニックネームから half-operator 権を剥奪:: ----------------------------------------- +---- /dehalfop <nick> [<nick>...] nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: 自分以外のチャンネル参加者からチャンネルの half-operator 権を剥奪 ----------------------------------------- +---- [[command_irc_deop]] [command]*`deop`* ニックネームからチャンネルオペレータ権を剥奪:: ----------------------------------------- +---- /deop <nick> [<nick>...] * -yes nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: 自分以外のチャンネル参加者からチャンネルオペレータ権を剥奪 ----------------------------------------- +---- [[command_irc_devoice]] [command]*`devoice`* ニックネームから発言権を剥奪:: ----------------------------------------- +---- /devoice <nick> [<nick>...] * -yes nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: チャンネル参加者全員から voice 状態を剥奪 ----------------------------------------- +---- [[command_irc_die]] [command]*`die`* サーバのシャットダウン:: ----------------------------------------- +---- /die [<target>] target: サーバ名 ----------------------------------------- +---- [[command_irc_disconnect]] [command]*`disconnect`* 特定のまたは全ての IRC サーバとの接続を切断:: ----------------------------------------- +---- /disconnect [<server>|-all|-pending [<reason>]] server: 接続を切断するサーバ名 -all: 全てのサーバとの接続を切る -pending: 現在再接続試行中のサーバに対する自動再接続を止める reason: 終了の理由 ----------------------------------------- +---- [[command_irc_halfop]] [command]*`halfop`* 指定したニックネームに half-operator 権を付与:: ----------------------------------------- +---- /halfop <nick> [<nick>...] * -yes nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: チャンネル参加者全員に half-operator 権を付与 ----------------------------------------- +---- [[command_irc_ignore]] [command]*`ignore`* あるサーバかチャンネルで、指定したニックネーム/ホスト名を無視:: ----------------------------------------- +---- /ignore list add [re:]<nick> [<server> [<channel>]] del <number>|-all @@ -215,40 +215,40 @@ nick: ニックネームまたはマスク (ワイルドカード "*" を最初 /ignore add toto@domain.com freenode freenode サーバの #weechat チャンネル上のホスト名 "toto*@*.domain.com" を無視: /ignore add toto*@*.domain.com freenode #weechat ----------------------------------------- +---- [[command_irc_info]] [command]*`info`* サーバに関する情報を入手:: ----------------------------------------- +---- /info [<target>] target: サーバ名 ----------------------------------------- +---- [[command_irc_invite]] [command]*`invite`* チャンネルにニックネームを招待:: ----------------------------------------- +---- /invite <nick> [<nick>...] [<channel>] nick: 招待するニックネーム channel: 招待先のチャンネル ----------------------------------------- +---- [[command_irc_ison]] [command]*`ison`* ニックネームが IRC 上にいるか確認:: ----------------------------------------- +---- /ison <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_join]] [command]*`join`* チャンネルに参加:: ----------------------------------------- +---- /join [-noswitch] [-server <server>] [<channel1>[,<channel2>...]] [<key1>[,<key2>...]] -noswitch: 新しいバッファに移動しない @@ -261,23 +261,23 @@ nick: nick /join #protectedchan,#weechat key /join -server freenode #weechat /join -noswitch #weechat ----------------------------------------- +---- [[command_irc_kick]] [command]*`kick`* チャンネルからユーザを強制的に削除:: ----------------------------------------- +---- /kick [<channel>] <nick> [<reason>] channel: channel where user is nick: nick to kick reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ----------------------------------------- +---- [[command_irc_kickban]] [command]*`kickban`* チャンネルからニックネームをキックして参加を禁止:: ----------------------------------------- +---- /kickban [<channel>] <nick> [<reason>] channel: channel where user is @@ -289,32 +289,32 @@ It is possible to kick/ban with a mask, nick will be extracted from mask and rep Example: ban "*!*@host.com" and then kick "toto": /kickban toto!*@host.com ----------------------------------------- +---- [[command_irc_kill]] [command]*`kill`* クライアント - サーバの接続を閉じる:: ----------------------------------------- +---- /kill <nick> <reason> nick: kill するニックネーム reason: kill の理由 ----------------------------------------- +---- [[command_irc_links]] [command]*`links`* このクエリに応答するサーバが知っている全てのサーバ名をリストアップ:: ----------------------------------------- +---- /links [[<server>] <server_mask>] server: このクエリに応答するべきサーバ server_mask: このマスクにマッチするサーバのリスト ----------------------------------------- +---- [[command_irc_list]] [command]*`list`* チャンネルとトピックをリストアップ:: ----------------------------------------- +---- /list [<channel>[,<channel>...]] [<server>] [-re <regex>] channel: リストアップするチャンネル名 @@ -328,37 +328,37 @@ channel: リストアップするチャンネル名 /list #weechat "#weechat" で始まる全てのチャンネルをリストアップ (大きなネットワークでは非常に遅い): /list -re #weechat.* ----------------------------------------- +---- [[command_irc_lusers]] [command]*`lusers`* IRC ネットワークのサイズに関する統計を入手:: ----------------------------------------- +---- /lusers [<mask> [<target>]] mask: このマスクにマッチするサーバ target: リクエストを送信するサーバ ----------------------------------------- +---- [[command_irc_map]] [command]*`map`* IRC ネットワークのグラフィカルマップを表示:: ----------------------------------------- ----------------------------------------- +---- +---- [[command_irc_me]] [command]*`me`* 現在のチャンネルに CTCP action を送信:: ----------------------------------------- +---- /me <message> message: 送信メッセージ ----------------------------------------- +---- [[command_irc_mode]] [command]*`mode`* チャンネルかユーザのモードを変更:: ----------------------------------------- +---- /mode [<channel>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<arguments>] <nick> [+|-]i|s|w|o @@ -390,62 +390,62 @@ message: 送信メッセージ /mode #weechat +t サーバ上で不可視にする: /mode nick +i ----------------------------------------- +---- [[command_irc_motd]] [command]*`motd`* "今日のメッセージ" を取得:: ----------------------------------------- +---- /motd [<target>] target: サーバ名 ----------------------------------------- +---- [[command_irc_msg]] [command]*`msg`* ニックネームかチャンネルにメッセージを送る:: ----------------------------------------- +---- /msg [-server <server>] <target>[,<target>...] <text> server: このサーバに送信 (内部サーバ名) target: ニックネーム又はチャンネル名 (マスクを使えるかもしれない、'*' = 現在のチャンネル) text: 送信するテキスト ----------------------------------------- +---- [[command_irc_names]] [command]*`names`* チャンネルに参加しているニックネームをリストアップ:: ----------------------------------------- +---- /names [<channel>[,<channel>...]] channel: チャンネル名 ----------------------------------------- +---- [[command_irc_nick]] [command]*`nick`* 現在のニックネームを変更:: ----------------------------------------- +---- /nick [-all] <nick> -all: 全ての接続済みサーバで新しいニックネームを設定 nick: 新しいニックネーム ----------------------------------------- +---- [[command_irc_notice]] [command]*`notice`* ユーザに notice メッセージを送信:: ----------------------------------------- +---- /notice [-server <server>] <target> <text> server: このサーバに送信 (内部サーバ名) target: ニックネーム又はチャンネル text: 送信するテキスト ----------------------------------------- +---- [[command_irc_notify]] [command]*`notify`* サーバ上のニックネームに対して接続か離席状態の通知を追加する:: ----------------------------------------- +---- /notify add <nick> [<server> [-away]] del <nick>|-all [<server>] @@ -465,96 +465,96 @@ server: 内部サーバ名 (デフォルトでは現在のサーバ) /notify add toto freenode "toto" が freenode サーバに戻るか離席状態になった場合に通知: /notify add toto freenode -away ----------------------------------------- +---- [[command_irc_op]] [command]*`op`* ニックネームにオペレータ権を付与:: ----------------------------------------- +---- /op <nick> [<nick>...] * -yes nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: チャンネル参加者全員にチャンネルオペレータ権を付与 ----------------------------------------- +---- [[command_irc_oper]] [command]*`oper`* オペレータ権を入手:: ----------------------------------------- +---- /oper <user> <password> user: ユーザ password: パスワード ----------------------------------------- +---- [[command_irc_part]] [command]*`part`* チャンネルから退出:: ----------------------------------------- +---- /part [<channel>[,<channel>...]] [<message>] channel: 退出するチャンネル名 message: 退出メッセージ (他のユーザに対して) ----------------------------------------- +---- [[command_irc_ping]] [command]*`ping`* サーバにピンを送信:: ----------------------------------------- +---- /ping <server1> [<server2>] server1: サーバ server2: このサーバにピンを転送 ----------------------------------------- +---- [[command_irc_pong]] [command]*`pong`* ピンメッセージに応答:: ----------------------------------------- +---- /pong <daemon> [<daemon2>] daemon: ピンメッセージに応答したデーモン daemon2: メッセージをデーモンに転送 ----------------------------------------- +---- [[command_irc_query]] [command]*`query`* ニックネーム宛にプライベートメッセージを送信:: ----------------------------------------- +---- /query [-server <server>] <nick>[,<nick>...] [<text>] server: 送信先サーバ (内部サーバ名) nick: プライベート会話を行うニックネーム text: 送信テキスト ----------------------------------------- +---- [[command_irc_quiet]] [command]*`quiet`* ニックネームかホストを発言禁止に:: ----------------------------------------- +---- /quiet [<channel>] [<nick> [<nick>...]] channel: 発言禁止にするチャンネル nick: 発言禁止にするユーザ名かホスト名 引数無しの場合は、現在のチャンネルの発言禁止リストを表示。 ----------------------------------------- +---- [[command_irc_quote]] [command]*`quote`* パースせずにサーバ宛に生データを送信:: ----------------------------------------- +---- /quote [-server <server>] <data> server: 送信先サーバ (内部サーバ名) data: 送信する生データ ----------------------------------------- +---- [[command_irc_reconnect]] [command]*`reconnect`* サーバに再接続:: ----------------------------------------- +---- /reconnect <server> [<server>...] [-nojoin] [-switch] -all [-nojoin] [-switch] @@ -562,80 +562,80 @@ server: 送信先サーバ (内部サーバ名) -all: 全てのサーバに再接続 -nojoin: チャンネルに参加しない (autojoin がサーバで有効化されていても) -switch: 次のサーバアドレスに移動 ----------------------------------------- +---- [[command_irc_rehash]] [command]*`rehash`* サーバに設定ファイルの読み込みを指示:: ----------------------------------------- +---- /rehash [<option>] option: 追加オプション、いくつかのサーバ用 ----------------------------------------- +---- [[command_irc_restart]] [command]*`restart`* サーバに再起動を指示:: ----------------------------------------- +---- /restart [<target>] target: サーバ名 ----------------------------------------- +---- [[command_irc_sajoin]] [command]*`sajoin`* ユーザがチャンネルへ参加することを強制:: ----------------------------------------- +---- /sajoin <nick> <channel>[,<channel>...] nick: ニックネーム channel: チャンネル名 ----------------------------------------- +---- [[command_irc_samode]] [command]*`samode`* チャンネルモードを変更、オペレータ権無しに:: ----------------------------------------- +---- /samode <channel> <mode> channel: チャンネル名 mode: チャンネルモード ----------------------------------------- +---- [[command_irc_sanick]] [command]*`sanick`* 強制的にユーザのニックネームを変更:: ----------------------------------------- +---- /sanick <nick> <new_nick> nick: ニックネーム new_nick: 新しいニックネーム ----------------------------------------- +---- [[command_irc_sapart]] [command]*`sapart`* 強制的にユーザをチャンネルから退出:: ----------------------------------------- +---- /sapart <nick> <channel>[,<channel>...] nick: ニックネーム channel: チャンネル名 ----------------------------------------- +---- [[command_irc_saquit]] [command]*`saquit`* ある理由で強制的にユーザをサーバから切断:: ----------------------------------------- +---- /saquit <nick> <reason> nick: ニックネーム reason: 理由 ----------------------------------------- +---- [[command_irc_server]] [command]*`server`* IRC サーバのリストアップ、追加、削除:: ----------------------------------------- +---- /server list|listfull [<server>] add <server> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>] copy|rename <server> <new_name> @@ -668,179 +668,179 @@ nooption: ブールオプションを 'off' に設定 (例えば: -nossl) /server rename oftc newoftc /server del freenode /server deloutq ----------------------------------------- +---- [[command_irc_service]] [command]*`service`* 新しいサービスを登録:: ----------------------------------------- +---- /service <nick> <reserved> <distribution> <type> <reserved> <info> distribution: サービスの可視性 type: 将来のために予約 ----------------------------------------- +---- [[command_irc_servlist]] [command]*`servlist`* 現在ネットワークに接続されたサービスをリストアップ:: ----------------------------------------- +---- /servlist [<mask> [<type>]] mask: マスクにマッチするサービスだけをリストアップ type: タイプにマッチするサービスだけをリストアップ ----------------------------------------- +---- [[command_irc_squery]] [command]*`squery`* サービスにメッセージを配送:: ----------------------------------------- +---- /squery <service> <text> service: サービス名 text: 送信テキスト ----------------------------------------- +---- [[command_irc_squit]] [command]*`squit`* サーバリンクを切断:: ----------------------------------------- +---- /squit <server> <comment> server: サーバ名 comment: 切断コメント ----------------------------------------- +---- [[command_irc_stats]] [command]*`stats`* サーバに関するクエリ統計:: ----------------------------------------- +---- /stats [<query> [<server>]] query: c/h/i/k/l/m/o/y/u (RFC1459 を参照) server: サーバ名 ----------------------------------------- +---- [[command_irc_summon]] [command]*`summon`* IRC サーバを実行中のホストにいるユーザ宛てに、IRC に参加することを要請するメッセージを送信:: ----------------------------------------- +---- /summon <user> [<target> [<channel>]] user: ユーザ名 target: サーバ名 channel: チャンネル名 ----------------------------------------- +---- [[command_irc_time]] [command]*`time`* サーバのローカル時間を要求:: ----------------------------------------- +---- /time [<target>] target: 時間を要求するサーバを指定 ----------------------------------------- +---- [[command_irc_topic]] [command]*`topic`* チャンネルトピックの取得/設定:: ----------------------------------------- +---- /topic [<channel>] [<topic>|-delete] channel: チャンネル名 topic: チャンネルに設定する新しいトピック -delete: チャンネルトピックを削除 ----------------------------------------- +---- [[command_irc_trace]] [command]*`trace`* 指定されたサーバへのルートを探す:: ----------------------------------------- +---- /trace [<target>] target: server ----------------------------------------- +---- [[command_irc_unban]] [command]*`unban`* ニックネームかホストの禁止設定を解除:: ----------------------------------------- +---- /unban [<channel>] <nick> [<nick>...] channel: 禁止設定を解除するチャンネル nick: 禁止設定を解除するユーザかホスト ----------------------------------------- +---- [[command_irc_userhost]] [command]*`userhost`* ニックネームに関する情報のリストを返す:: ----------------------------------------- +---- /userhost <nick> [<nick>...] nick: nick ----------------------------------------- +---- [[command_irc_users]] [command]*`users`* サーバにログインしているユーザのリスト:: ----------------------------------------- +---- /users [<target>] target: server ----------------------------------------- +---- [[command_irc_version]] [command]*`version`* ニックネームかサーバのバージョン情報を取得 (現在のサーバか指定したサーバ):: ----------------------------------------- +---- /version [<server>|<nick>] server: サーバ名 nick: ニックネーム ----------------------------------------- +---- [[command_irc_voice]] [command]*`voice`* ニックネームに発言権を付与:: ----------------------------------------- +---- /voice <nick> [<nick>...] nick: ニックネームまたはマスク (ワイルドカード "*" を最初と最後につけることが可能) *: チャンネル参加者全員に voice 権を付与 ----------------------------------------- +---- [[command_irc_wallchops]] [command]*`wallchops`* チャンネルオペレータに notice を送信:: ----------------------------------------- +---- /wallchops [<channel>] <text> channel: チャンネル名 text: 送信テキスト ----------------------------------------- +---- [[command_irc_wallops]] [command]*`wallops`* ユーザモードに 'w' を設定した全ての接続済みユーザ宛てにメッセージを送信:: ----------------------------------------- +---- /wallops <text> text: 送信テキスト ----------------------------------------- +---- [[command_irc_who]] [command]*`who`* 情報のリストを返すクエリを生成:: ----------------------------------------- +---- /who [<mask> [o]] mask: マスクにマッチする情報 o: マスクにマッチするオペレータだけを返す ----------------------------------------- +---- [[command_irc_whois]] [command]*`whois`* ユーザに関する情報を要求:: ----------------------------------------- +---- /whois [<server>] [<nick>[,<nick>...]] server: サーバ名 @@ -849,16 +849,16 @@ server: サーバ名 引数が無い場合、このコマンドは以下のユーザに対する whois を行います: - バッファがサーバ/チャンネルの場合、自分自身のニックネーム - バッファがプライベートの場合、相手のニックネーム。 ----------------------------------------- +---- [[command_irc_whowas]] [command]*`whowas`* 既に存在しないニックネームに関する情報を要求:: ----------------------------------------- +---- /whowas <nick>[,<nick>...] [<count> [<target>]] nick: 検索するニックネーム count: リプライの個数 (負の値で完全な検索) target: マスクに一致するものだけを返す ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/logger_commands.txt b/doc/ja/autogen/user/logger_commands.txt index dab20eaba..7ad6925b4 100644 --- a/doc/ja/autogen/user/logger_commands.txt +++ b/doc/ja/autogen/user/logger_commands.txt @@ -1,7 +1,7 @@ [[command_logger_logger]] [command]*`logger`* logger プラグイン設定:: ----------------------------------------- +---- /logger list set <level> flush @@ -33,5 +33,5 @@ IRC プラグインで使われるログレベル: /set logger.level.core.weechat 0 IRC サーバごとのディレクトリ、チャンネルごとのファイルを使う: /set logger.mask.irc "$server/$channel.weechatlog" ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/lua_commands.txt b/doc/ja/autogen/user/lua_commands.txt index 3193874da..57058642e 100644 --- a/doc/ja/autogen/user/lua_commands.txt +++ b/doc/ja/autogen/user/lua_commands.txt @@ -1,7 +1,7 @@ [[command_lua_lua]] [command]*`lua`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /lua list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/perl_commands.txt b/doc/ja/autogen/user/perl_commands.txt index d143d6357..6d3023e85 100644 --- a/doc/ja/autogen/user/perl_commands.txt +++ b/doc/ja/autogen/user/perl_commands.txt @@ -1,7 +1,7 @@ [[command_perl_perl]] [command]*`perl`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /perl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/python_commands.txt b/doc/ja/autogen/user/python_commands.txt index 004ac4e01..42bad534a 100644 --- a/doc/ja/autogen/user/python_commands.txt +++ b/doc/ja/autogen/user/python_commands.txt @@ -1,7 +1,7 @@ [[command_python_python]] [command]*`python`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /python list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/relay_commands.txt b/doc/ja/autogen/user/relay_commands.txt index ee7c355d0..6c03dab56 100644 --- a/doc/ja/autogen/user/relay_commands.txt +++ b/doc/ja/autogen/user/relay_commands.txt @@ -1,7 +1,7 @@ [[command_relay_relay]] [command]*`relay`* リレー管理:: ----------------------------------------- +---- /relay list|listfull|listrelay add [ipv4.][ipv6.][ssl.]<protocol.name> <port> del [ipv4.][ipv6.][ssl.]<protocol.name> @@ -42,5 +42,5 @@ protocol.name: リレーするプロトコルと名前: /relay add ipv6.ssl.weechat 9001 SSL を有効にした weechat プロトコル、IPv4 と IPv6 を利用: /relay add ipv4.ipv6.ssl.weechat 9001 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/rmodifier_commands.txt b/doc/ja/autogen/user/rmodifier_commands.txt index f5c94d90e..81631aeb4 100644 --- a/doc/ja/autogen/user/rmodifier_commands.txt +++ b/doc/ja/autogen/user/rmodifier_commands.txt @@ -1,7 +1,7 @@ [[command_rmodifier_rmodifier]] [command]*`rmodifier`* 正規表現で modifier 文字列を変更:: ----------------------------------------- +---- /rmodifier list|listdefault add <name> <modifiers> <groups> <regex> del <name>|-all [<name>...] @@ -27,5 +27,5 @@ listdefault: デフォルトの rmodifier をリストアップ /rmodifier del password 全ての rmodifiers を削除: /rmodifier del -all ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/ruby_commands.txt b/doc/ja/autogen/user/ruby_commands.txt index b53da3eeb..0d2ffabdc 100644 --- a/doc/ja/autogen/user/ruby_commands.txt +++ b/doc/ja/autogen/user/ruby_commands.txt @@ -1,7 +1,7 @@ [[command_ruby_ruby]] [command]*`ruby`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /ruby list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/script_commands.txt b/doc/ja/autogen/user/script_commands.txt index 8cace26f8..5ee951a13 100644 --- a/doc/ja/autogen/user/script_commands.txt +++ b/doc/ja/autogen/user/script_commands.txt @@ -1,7 +1,7 @@ [[command_script_script]] [command]*`script`* WeeChat スクリプトマネージャ:: ----------------------------------------- +---- /script list [-o|-i] search <text> show <script> @@ -73,5 +73,5 @@ toggleautoload: 自動ロードの切り替え /script hold urlserver.py /script reload urlserver /script upgrade ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/tcl_commands.txt b/doc/ja/autogen/user/tcl_commands.txt index a0435c5b6..852e9f178 100644 --- a/doc/ja/autogen/user/tcl_commands.txt +++ b/doc/ja/autogen/user/tcl_commands.txt @@ -1,7 +1,7 @@ [[command_tcl_tcl]] [command]*`tcl`* スクリプトをリストアップ/ロード/アンロード:: ----------------------------------------- +---- /tcl list|listfull [<name>] load [-q] <filename> autoload @@ -18,5 +18,5 @@ filename: ロードするスクリプト (ファイル) -q: 出力抑制モード: メッセージを表示しない 引数無しの場合、全てのロード済みスクリプトをリストアップします。 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/weechat_commands.txt b/doc/ja/autogen/user/weechat_commands.txt index 5f620eecd..a5174ff2d 100644 --- a/doc/ja/autogen/user/weechat_commands.txt +++ b/doc/ja/autogen/user/weechat_commands.txt @@ -1,17 +1,17 @@ [[command_weechat_away]] [command]*`away`* 離席状態の切り替え:: ----------------------------------------- +---- /away [-all] [<message>] -all: 全ての接続済みサーバに対して離席状態を切り替え message: 離席メッセージ (メッセージが無い場合は、離席状態を解除) ----------------------------------------- +---- [[command_weechat_bar]] [command]*`bar`* バーの管理:: ----------------------------------------- +---- /bar list|listfull|listitems add <name> <type>[,<condition>] <position> <size> <separator> <item1>[,<item2>...] default [input|title|status|nicklist] @@ -58,12 +58,12 @@ message: 離席メッセージ (メッセージが無い場合は、離席状態 /bar scroll nicklist * y+10 現在のバッファに対応したニックネームリストを最後までスクロール: /bar scroll nicklist * ye ----------------------------------------- +---- [[command_weechat_buffer]] [command]*`buffer`* バッファの管理:: ----------------------------------------- +---- /buffer list clear [<number>|<name>|-merged|-all] move|merge <number> @@ -120,12 +120,12 @@ localvar: 現在のバッファのローカル変数を表示 /buffer #weechat 次のバッファに移動: /buffer +1 ----------------------------------------- +---- [[command_weechat_color]] [command]*`color`* 色の別名の定義と、カラーパレットの表示:: ----------------------------------------- +---- /color alias <color> <name> unalias <color> reset @@ -145,22 +145,22 @@ unalias: 別名の削除 /color alias 214 orange 色番号 214 を削除: /color unalias 214 ----------------------------------------- +---- [[command_weechat_command]] [command]*`command`* WeeChat かプラグインのコマンドを起動:: ----------------------------------------- +---- /command <plugin> <command> plugin: プラグインの名前 ('weechat' は WeeChat の内部コマンドを意味します) command: 実行するコマンド (コマンドの最初に '/' が無い場合、'/' が自動的に追加されます) ----------------------------------------- +---- [[command_weechat_cursor]] [command]*`cursor`* カーソルを移動してアクションを実行するエリアを指定:: ----------------------------------------- +---- /cursor go chat|<bar>|<x>,<y> move up|down|left|right|area_up|area_down|area_left|area_right stop @@ -178,12 +178,12 @@ stop: カーソルモードを終了 /cursor go nicklist x=10、y=5 の位置に移動: /cursor go 10,5 ----------------------------------------- +---- [[command_weechat_debug]] [command]*`debug`* core やプラグインのデバッグ管理:: ----------------------------------------- +---- /debug list set <plugin> <level> dump [<plugin>] @@ -208,12 +208,12 @@ infolists: infolist に関する情報を表示 tags: 行のタグを表示 term: ターミナルに関する情報を表示 windows: ウィンドウツリーの情報を表示 ----------------------------------------- +---- [[command_weechat_eval]] [command]*`eval`* 式を評価して結果をバッファに送信:: ----------------------------------------- +---- /eval [-n] <expression> [-n] -c <expression1> <operator> <expression2> @@ -266,12 +266,12 @@ hdata と変数の名前については、"プラグイン API リファレン /eval -n -c abcd =~ (?-i)^ABC ==> 0 /eval -n -c abcd =~ (?-i)^abc ==> 1 /eval -n -c abcd !~ abc ==> 0 ----------------------------------------- +---- [[command_weechat_filter]] [command]*`filter`* タグか正規表現に基づくバッファメッセージの非表示/表示:: ----------------------------------------- +---- /filter list enable|disable|toggle [<name>] add <name> <buffer>[,<buffer>...] <tags> <regex> @@ -320,12 +320,12 @@ disable: フィルタを無効化 /filter add toto irc.freenode.#weechat nick_toto * IRC チャンネル #weechat で "weechat sucks" を含む行をフィルタ: /filter add sucks irc.freenode.#weechat * weechat sucks ----------------------------------------- +---- [[command_weechat_help]] [command]*`help`* コマンドとオプションに関するヘルプを表示:: ----------------------------------------- +---- /help -list|-listfull [<plugin> [<plugin>...]] <command> <option> @@ -335,23 +335,23 @@ disable: フィルタを無効化 plugin: このプラグインに関するコマンドをリストアップ command: コマンドの名前 option: オプションの名前 (リストを見るには /set を使用) ----------------------------------------- +---- [[command_weechat_history]] [command]*`history`* バッファコマンド履歴を表示:: ----------------------------------------- +---- /history clear <value> clear: 履歴の削除 value: 表示する履歴エントリの数 ----------------------------------------- +---- [[command_weechat_input]] [command]*`input`* コマンドライン関数:: ----------------------------------------- +---- /input <action> [<arguments>] アクションリスト: @@ -406,12 +406,12 @@ value: 表示する履歴エントリの数 paste_stop: ペーストの終了 (括弧付きペーストモード) これらのコマンドはキーバインドかプラグインで利用できます。 ----------------------------------------- +---- [[command_weechat_key]] [command]*`key`* キーの割り当てと割り当て解除:: ----------------------------------------- +---- /key list|listdefault|listdiff [<context>] bind <key> [<command> [<args>]] bindctxt <context> <key> [<command> [<args>]] @@ -461,12 +461,12 @@ listdefault: デフォルトキーをリストアップ /key bindctxt search ctrl-I /input search_stop ニック上でのマウスのセンターボタンをニックネームの情報取得に割り当てる: /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick} ----------------------------------------- +---- [[command_weechat_layout]] [command]*`layout`* バッファとウィンドウのレイアウトを保存/適用/リセット:: ----------------------------------------- +---- /layout save [<name>] [buffers|windows] apply [<name>] [buffers|windows] leave @@ -484,12 +484,12 @@ buffers: バッファのみに対してレイアウトを保存/適用 (バッ windows: ウィンドウのみに対してレイアウトを保存/適用 (それぞれのウィンドウに表示されるバッファ) 引数無しでは、保存されたレイアウトを表示します。 ----------------------------------------- +---- [[command_weechat_mouse]] [command]*`mouse`* マウス操作:: ----------------------------------------- +---- /mouse enable|disable|toggle [<delay>] enable: マウスの有効化 @@ -504,12 +504,12 @@ disable: マウスの無効化 /mouse enable 5 秒間マウスの有効無効を切り替え: /mouse toggle 5 ----------------------------------------- +---- [[command_weechat_mute]] [command]*`mute`* 静かにコマンドを実行:: ----------------------------------------- +---- /mute [-current | -buffer <name> | -all] command -current: 現在のバッファへの出力を禁止 @@ -527,12 +527,12 @@ disable: マウスの無効化 /mute -current msg * hi! #weechat チャンネルへのメッセージ: /mute -buffer irc.freenode.#weechat msg #weechat hi! ----------------------------------------- +---- [[command_weechat_plugin]] [command]*`plugin`* プラグインの表示/ロード/アンロード:: ----------------------------------------- +---- /plugin list|listfull [<name>] load <filename> [<arguments>] autoload [<arguments>] @@ -550,12 +550,12 @@ disable: マウスの無効化 arguments: ロードするプラグインに与える引数 引数無しでは、ロードされたプラグインをリストアップ。 ----------------------------------------- +---- [[command_weechat_proxy]] [command]*`proxy`* プロキシの管理:: ----------------------------------------- +---- /proxy list add <name> <type> <address> <port> [<username> [<password>]] del <name>|-all @@ -584,34 +584,34 @@ password: パスワード (任意) /proxy add myproxy socks5 sample.host.org 3128 myuser mypass プロキシを削除: /proxy del myproxy ----------------------------------------- +---- [[command_weechat_quit]] [command]*`quit`* WeeChat の終了:: ----------------------------------------- +---- /quit [-yes] [<arguments>] -yes: weechat.look.confirm_quit オプションが有効な場合に必要 arguments: "quit" シグナルと共に送られるテキスト (例えば irc プラグインはサーバに quit メッセージを送る際にこのテキストを使います) ----------------------------------------- +---- [[command_weechat_reload]] [command]*`reload`* ディスクから設定ファイルを再読み込み:: ----------------------------------------- +---- /reload [<file> [<file>...]] file: 再読み込みする設定ファイル (拡張子 ".conf" は不要) 引数無しでは、全てのファイル (WeeChat とプラグイン) が再読み込みされます。 ----------------------------------------- +---- [[command_weechat_repeat]] [command]*`repeat`* 複数回コマンドを実行:: ----------------------------------------- +---- /repeat [-interval <delay>] <count> <command> delay: コマンドの実行間隔 (ミリ秒単位) @@ -623,23 +623,23 @@ command: 実行するコマンド (最初に '/' が無い場合は自動的に 例: 2 ページ分上方向にスクロール: /repeat 2 /window page_up ----------------------------------------- +---- [[command_weechat_save]] [command]*`save`* 設定をファイルに保存:: ----------------------------------------- +---- /save [<file> [<file>...]] file: 保存する設定ファイル (拡張子 ".conf" は不要) 引数無しでは、全てのファイル (WeeChat とプラグイン) が保存されます。 ----------------------------------------- +---- [[command_weechat_secure]] [command]*`secure`* 保護データを管理します (パスワードやプライベートデータは暗号化されて sec.conf ファイルに保存):: ----------------------------------------- +---- /secure passphrase <passphrase>|-delete decrypt <passphrase>|-discard set <name> <value> @@ -676,12 +676,12 @@ Examples: /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}" alias to ghost the nick "mynick": /alias ghost /eval /msg -server freenode nickserv ghost mynick ${sec.data.freenode} ----------------------------------------- +---- [[command_weechat_set]] [command]*`set`* オプションの設定:: ----------------------------------------- +---- /set [<option> [<value>]] diff [<option> [<option>...]] @@ -706,12 +706,12 @@ option: オプションの名前 (多くのオプションをリストアップ /set diff irc プラグインのオプションの内、変更されたオプションを表示 /set diff irc.* ----------------------------------------- +---- [[command_weechat_unset]] [command]*`unset`* オプションのアンセット/リセット:: ----------------------------------------- +---- /unset <option> option: オプションの名前 ("*" で始めるか終わるかすれば大量のオプションをリセットできます、注意して使用!) @@ -723,12 +723,12 @@ option: オプションの名前 ("*" で始めるか終わるかすれば大量 /unset weechat.look.item_time_format 全ての色関連オプションをリセット: /unset weechat.color.* ----------------------------------------- +---- [[command_weechat_upgrade]] [command]*`upgrade`* サーバとの接続を維持して WeeChat をアップグレード:: ----------------------------------------- +---- /upgrade [<path_to_binary>|-quit] path_to_binary: WeeChat バイナリへのパス (デフォルトは現在のバイナリ) @@ -754,32 +754,32 @@ path_to_binary: WeeChat バイナリへのパス (デフォルトは現在のバ この後、セッションを回復させるには weechat --upgrade を使ってください。 重要: 完全に同一の設定で (*.conf ファイルで) セッションを回復させてください。 "~/.weechat" ディレクトリの内容をコピーすれば異なるマシンで WeeChat のセッションを回復することも可能です。 ----------------------------------------- +---- [[command_weechat_uptime]] [command]*`uptime`* WeeChat 連続稼働時間の表示:: ----------------------------------------- +---- /uptime [-o | -ol] -o: 連続稼働時間を現在のバッファの入力に送る (英語で) -ol: 連続稼働時間を現在のバッファの入力に送る (翻訳済み) ----------------------------------------- +---- [[command_weechat_version]] [command]*`version`* WeeChat のバージョンとコンパイル日時を表示:: ----------------------------------------- +---- /version [-o | -ol] -o: バージョンを現在のバッファの入力に送る (英語で) -ol: バージョンを現在のバッファの入力に送る (翻訳済み) ----------------------------------------- +---- [[command_weechat_wait]] [command]*`wait`* コマンドの実行を予約:: ----------------------------------------- +---- /wait <number>[<unit>] <command> number: 遅延時間 (整数) @@ -799,12 +799,12 @@ command: 実行するコマンド (コマンドが '/' で始まらない場合 /wait 15m /away -all I'm away 2 分後に 'hello' と発言: /wait 2m hello ----------------------------------------- +---- [[command_weechat_window]] [command]*`window`* ウィンドウの操作:: ----------------------------------------- +---- /window list -1|+1|b#|up|down|left|right [-window <number>] <number> @@ -863,5 +863,5 @@ splith と splitv に関しては、pct は新しいウィンドウのパーセ /window scroll -d ウィンドウ #2 を拡大: /window zoom -window 2 ----------------------------------------- +---- diff --git a/doc/ja/autogen/user/xfer_commands.txt b/doc/ja/autogen/user/xfer_commands.txt index ba97c7dab..c21bb7ac5 100644 --- a/doc/ja/autogen/user/xfer_commands.txt +++ b/doc/ja/autogen/user/xfer_commands.txt @@ -1,21 +1,21 @@ [[command_xfer_me]] [command]*`me`* CTCP action をリモートホストに送信:: ----------------------------------------- +---- /me <message> message: 送信メッセージ ----------------------------------------- +---- [[command_xfer_xfer]] [command]*`xfer`* xfer 管理:: ----------------------------------------- +---- /xfer [list|listfull] list: xfer をリストアップ listfull: xfer をリストアップ (詳細) 引数無しでは、xfer リストを含むバッファを開きます。 ----------------------------------------- +---- diff --git a/doc/ja/weechat.1.ja.txt b/doc/ja/weechat.1.ja.txt index f2c97887b..93434a8cb 100644 --- a/doc/ja/weechat.1.ja.txt +++ b/doc/ja/weechat.1.ja.txt @@ -1,11 +1,11 @@ -= WEECHAT(1) = += WEECHAT(1) :doctype: manpage -== 名前 == +== 名前 weechat - 拡張可能なチャットクライアント -== 書式 == +== 書式 [verse] 'weechat' [-a|--no-connect] [-d|--dir <path>] [-p|--no-plugin] [-r|--run-command <command>] [-s|--no-script] [--upgrade] [plugin:option...] @@ -15,18 +15,18 @@ weechat - 拡張可能なチャットクライアント 'weechat' [-l|--license] 'weechat' [-v|--version] -== 説明 == +== 説明 WeeChat は高速、軽量、拡張可能なチャットクライアントです。 モジュール式 (プラグインを持つ軽量なコア)、マルチプロトコル (IRC と Jabber)、 C 言語と様々なプログラミング言語で書かれたスクリプトを使って拡張可能です。 -== オプション == +== オプション include::cmdline_options.ja.txt[] -== プラグインオプション == +== プラグインオプション プラグインオプションに関する完全な文書は http://weechat.org/doc[WeeChat ユーザーガイド] のプラグインリファレンスを参照してください。 @@ -44,7 +44,7 @@ IPv6 アドレスの後にポートを指定するには IPv6 irc://mynick@[2001:db8:0:85a3::ac1f:8001]:6668/#test -== ファイル == +== ファイル $HOME/.weechat/weechat.conf:: WeeChat の主設定ファイル @@ -82,7 +82,7 @@ $HOME/.weechat/xfer.conf:: $HOME/.weechat/weechat.log:: WeeChat ログファイル -== 著者 == +== 著者 WeeChat は Sébastien Helleu さんと貢献者によって作成されています (完全なリストは AUTHORS ファイルを参照してください)。 @@ -97,7 +97,7 @@ GNU 一般公衆利用許諾契約書 (バージョン2か、希望によって Web: <http://weechat.org/> -== バグ報告 == +== バグ報告 バグの報告や機能追加のリクエストは Savannah ウェブサイトで行なってください: diff --git a/doc/ja/weechat_faq.ja.txt b/doc/ja/weechat_faq.ja.txt index 4b1960afa..cecd4df68 100644 --- a/doc/ja/weechat_faq.ja.txt +++ b/doc/ja/weechat_faq.ja.txt @@ -1,4 +1,4 @@ -= WeeChat FAQ (よくある質問) = += WeeChat FAQ (よくある質問) Sébastien Helleu <flashcode@flashtux.org> @@ -8,10 +8,10 @@ Sébastien Helleu <flashcode@flashtux.org> [[general]] -== 一般 == +== 一般 [[weechat_name]] -=== "WeeChat" という名前の由来は何ですか? === +=== "WeeChat" という名前の由来は何ですか? "Wee" は再帰的頭字語で、"Wee Enhanced Environment" の略です。 そのため、完全な名前は "Wee Enhanced Environment for Chat" です。 @@ -20,17 +20,17 @@ Sébastien Helleu <flashcode@flashtux.org> その他の意味もありますが、それは WeeChat とは関係ありませんよ!)。 [[why_choose_weechat]] -=== WeeChat を選ぶ理由は何ですか? X-Chat や Irssi は最高なのに... === +=== WeeChat を選ぶ理由は何ですか? X-Chat や Irssi は最高なのに... WeeChat は非常に軽く、革新的な機能を備えているからです。 こののページに関するより詳しい情報: http://weechat.org/about/features [[compilation_install]] -== コンパイル / インストール == +== コンパイル / インストール [[gui]] -=== WeeChat には多くの GUI があると聞きました。コンパイル/利用方法を教えてください。 === +=== WeeChat には多くの GUI があると聞きました。コンパイル/利用方法を教えてください。 いくつかのリモート GUI を使うことができます: @@ -40,7 +40,7 @@ WeeChat は非常に軽く、革新的な機能を備えているからです。 * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -=== git リポジトリをクローンした後に WeeChat をコンパイルできません。 === +=== git リポジトリをクローンした後に WeeChat をコンパイルできません。 WeeChat をコンパイルするには cmake を使うことが推奨されています。 @@ -53,7 +53,7 @@ autotools を使って (cmake を使わずに) コンパイルする場合、 アップデートをインストールする場合には git をクローンする方法よりも不便であることに注意してください。 [[lost]] -=== WeeChat を起動しました。でも何をすればいいかわかりません。 === +=== WeeChat を起動しました。でも何をすればいいかわかりません。 ヘルプを見るには、`/help` と入力してください。コマンドに関するヘルプを見るには、`/help command` と入力してください。 キーとコマンドはドキュメント内にリストアップされています。 @@ -62,10 +62,10 @@ autotools を使って (cmake を使わずに) コンパイルする場合、 (ウェブサイトのドキュメントページを参照)。 [[display]] -== 表示 == +== 表示 [[charset]] -=== いくつかの文字が見えません。どうすれば良いですか。 === +=== いくつかの文字が見えません。どうすれば良いですか。 これは良くある問題です。以下の内容をよく読んで、*全ての* 解決策をチェックしてください: @@ -92,7 +92,7 @@ WeeChat は UTF-8 ロケールを推奨します。ISO 又はその他のロケ UTF-8 *でない* ことを確認してください。 [[bars_background]] -=== タイトルやステータスバー等の背景色が行末ではなくテキストの最後で終わってしまいます。 === +=== タイトルやステータスバー等の背景色が行末ではなくテキストの最後で終わってしまいます。 シェルの TERM 変数に間違った値が設定されている可能性があります (ターミナルで `echo $TERM` の出力を確認してください)。 @@ -107,7 +107,7 @@ WeeChat を起動した場所に依存しますが、以下の値を持つはず もし必要であれば、TERM 変数を修正してください: `export TERM="xxx"` [[screen_weird_chars]] -=== weechat を screen/tmux の中で使っている場合、おかしなランダム文字列が表示されます。どうすれば直りますか。 === +=== weechat を screen/tmux の中で使っている場合、おかしなランダム文字列が表示されます。どうすれば直りますか。 シェルの TERM 変数に間違った値が設定されている可能性があります。 (ターミナル、*screen/tmux の外* で `echo $TERM` の出力を確認してください)。 @@ -118,7 +118,7 @@ WeeChat を起動した場所に依存しますが、以下の値を持つはず もし必要であれば、TERM 変数を修正してください: `export TERM="xxx"` [[osx_display_broken]] -=== OS X 上で WeeChat をコンパイルした場合、"(null)" という文字列が至る所に表示されます。 === +=== OS X 上で WeeChat をコンパイルした場合、"(null)" という文字列が至る所に表示されます。 ncursesw を自分でコンパイルした場合は、標準の (システムに元から存在する) ncurses を使ってみてください。 @@ -127,7 +127,7 @@ ncurses を使ってみてください。 WeeChat をインストールすることをお勧めします。 [[buffer_vs_window]] -=== "バッファ" と "ウィンドウ" の違いは何ですか。 === +=== "バッファ" と "ウィンドウ" の違いは何ですか。 'バッファ' とは番号、名前、表示行、(とその他のデータ) からなります。 @@ -139,39 +139,39 @@ WeeChat をインストールすることをお勧めします。 (ウィンドウで表示させない) ことや 1 つ以上のウィンドウに表示させることも出来ます。 [[buffers_list]] -=== どうすれば左側にバッファリストを表示できますか。 === +=== どうすれば左側にバッファリストを表示できますか。 'buffers.pl' スクリプトを使ってください。 バーのサイズを制限するには: ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- バーの位置を下に移動するには: ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -=== どうすればチャットエリア内のニックネームの最大長さを短く、又はニックネーム整列機能を無効化できますか。 === +=== どうすればチャットエリア内のニックネームの最大長さを短く、又はニックネーム整列機能を無効化できますか。 チャットエリアのニックネームの最大長を短くするには: ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- ニックネーム整列を抑制するには: ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -=== コマンドラインの行数を増やすにはどうすればいいですか。 === +=== コマンドラインの行数を増やすにはどうすればいいですか。 インプットバーの 'size' オプションには 1 (サイズ固定、デフォルト値) 以上の値又は動的なサイズの意味で 0 を設定できます。'size_max' @@ -179,69 +179,69 @@ WeeChat をインストールすることをお勧めします。 動的サイズを設定する例: ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- サイズの最大値を 2 に設定: ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -=== 全てのウィンドウに対して入力バーの数を 1 つだけにすることができますか (画面分割されている場合)。 === +=== 全てのウィンドウに対して入力バーの数を 1 つだけにすることができますか (画面分割されている場合)。 できます。"root" 型のバー (あなたのいるウィンドウを区別するためのアイテムを持つ) を作成し、現在の入力バーを削除してください。 例えば: ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- これに満足できない場合は、新しいバーを削除してください。 全てのバーに "input_text" アイテムが設定されていない場合は WeeChat は自動的にデフォルトバー "input" を作成します: ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -=== どうすればニックネームリストを選択せずにテキストだけをコピー/ペーストできますか。 === +=== どうすればニックネームリストを選択せずにテキストだけをコピー/ペーストできますか。 矩形選択のできるターミナルを使ってください (rxvt-unicode、 konsole、gnome-terminal、...)。通常、キーは @k(C-)@k(A-) マウス選択です。 別の解決策はニックネームリストを上か下かに移動することです、例えば: ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -=== どうすれば長い (一行以上に渡る) URL をクリックできますか。 === +=== どうすれば長い (一行以上に渡る) URL をクリックできますか。 デフォルトでは、WeeChat はそれぞれの行の最初に時間とプレフィックス、 さらにチャットエリアを囲むようにオプションバーを表示します。url のクリックを簡単にするには、 ニックネームリストを上に移動して、ニックネーム整列機能を無効化する方法があります: ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- WeeChat ≥ 0.3.6 では、"eat_newline_glitch" オプションを有効化できます。 これを有効化すると、表示行の行末に改行文字が入らなくなります (url 選択を邪魔しません)。 ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] このオプションには表示上の問題を引き起こす可能性があります。 @@ -250,21 +250,21 @@ WeeChat ≥ 0.3.6 では、"eat_newline_glitch" オプションを有効化で 別の解決策として、スクリプトを利用することもできます: http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -=== WeeChat が出力するメッセージの言語を、再起動せずに変更したいです。このようなことは可能ですか。 === +=== WeeChat が出力するメッセージの言語を、再起動せずに変更したいです。このようなことは可能ですか。 可能です。python スクリプト 'shell.py' (WeeChat ウェブサイトから入手可能) を使い、 スクリプトを読み込んだら以下のコマンドを打ってください。 ----------------------------------------- +---- /shell setenv LANG=en_US.UTF-8 /upgrade ----------------------------------------- +---- UTF-8 エンコードされた英語メッセージが表示されるようになります、 ISO ユーザは以下のようにして下さい: `/shell setenv LANG=en_US` [[use_256_colors]] -=== どうすれば WeeChat で 256 色が使えますか。 === +=== どうすれば WeeChat で 256 色が使えますか。 256 色は WeeChat ≥ 0.3.4 でサポートされます。 @@ -280,17 +280,17 @@ ISO ユーザは以下のようにして下さい: `/shell setenv LANG=en_US` screen を使っている場合は、以下の行を '~/.screenrc' に追加してください: ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- 'TERM' 変数の設定に間違いがあり、WeeChat が起動中の場合でも、 慌てないでください! 'shell.py' を使えば再起動せずに環境変数を変更できます。 ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- バージョン 0.3.4 では、新しい色を追加するには `/color` コマンドを使ってください。 @@ -300,7 +300,7 @@ term screen-256color 色管理に関するより詳しい情報はユーザーガイドを読んでください。 [[search_text]] -=== どうすればバッファ内の文字列を検索できますか (irssi の /lastlog の様に)。 === +=== どうすればバッファ内の文字列を検索できますか (irssi の /lastlog の様に)。 デフォルトのキーは @k(C-)@k(r) です (コマンドは: `/input search_text`)。 ハイライト部分へのジャンプは: @k(A-)@k(p)/@k(n) @@ -308,76 +308,76 @@ term screen-256color この機能に関するより詳しい情報はユーザーガイドを参照してください (デフォルトのキー割り当て)。 [[key_bindings]] -== キー割り当て == +== キー割り当て [[meta_keys]] -=== いくつかのメタキーが (alt + key) が動きません。 === +=== いくつかのメタキーが (alt + key) が動きません。 xterm や uxterm 等のターミナルを利用している場合、いくつかのメタキーはデフォルトでは利用できません。 以下の行を '~/.Xresources' に追加してください: * xterm の場合: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * uxterm の場合: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- このファイルを再読み込みするか (`xrdb -override ~/.Xresources`) 又は X を再起動してください。 [[customize_key_bindings]] -=== どうすればキー割り当てをカスタマイズできますか。 === +=== どうすればキー割り当てをカスタマイズできますか。 キー割り当ては `/key` コマンドでカスタマイズできます。 デフォルトキー @k(A-)@k(k) でキーコードを取り込み、これをコマンドラインに入力できます。 [[jump_to_buffer_11_or_higher]] -=== バッファ 11 番 (又はそれ以上の番号) にジャンプするキーは何ですか。 === +=== バッファ 11 番 (又はそれ以上の番号) にジャンプするキーは何ですか。 キー @k(A-)@k(j) の後に 2 桁の数字を入力します、例えば @k(A-)@k(j) その後に @k(1)、 @k(1) でバッファ 11 番にジャンプします。 これにキーを割り当てることが出来ます、例えば: ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- デフォルトキー割り当てのリストはユーザーガイドを参照してください。 [[global_history]] -=== どうすればグローバルヒストリを (バッファヒストリの代わりに) 上下矢印キーで使えますか。 === +=== どうすればグローバルヒストリを (バッファヒストリの代わりに) 上下矢印キーで使えますか。 上下矢印キーをグローバルヒストリに割り当ててください (グローバルヒストリに対する デフォルトのキーは @k(C-)@k(↑) と @k(C-)@k(↓) です。 例: ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] "meta2-A" と "meta2-B" キーはターミナルによって異なります。 キーコードを 見つけるには @k(A-)@k(k) の後にキー (上矢印又は下矢印) を押してください。 [[mouse]] -== マウス == +== マウス [[mouse_not_working]] -=== マウスが少しも動きません。どうすれば良いですか。 === +=== マウスが少しも動きません。どうすれば良いですか。 マウスのサポートは WeeChat 0.3.6 以上からです。 最初にマウスを有効化してください: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- これでマウスが動かない場合は、シェルの TERM 変数を確認してください (ターミナル内で `echo $TERM` の出力を見てください)。 @@ -385,20 +385,20 @@ UXTerm*metaSendsEscape: true マウスサポートをターミナルから確認するには: ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- ターミナルの最初の文字 (左上) をクリックしてください。" !!#!!" と見えるはずです。 ターミナルのマウスサポートを無効化するには: ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -=== マウスの位置座標 X 又は Y が 94 よりも大きい場合にマウス機能が正しく動きません。 === +=== マウスの位置座標 X 又は Y が 94 よりも大きい場合にマウス機能が正しく動きません。 一部のターミナルではマウスの位置座標を指定するために ISO 文字だけを使います、 このため X/Y が 94 よりも大きい場合は正しく動きません。 @@ -407,49 +407,49 @@ $ printf '\033[?1002l' 例えば rxvt-unicode 等です。 [[mouse_select_paste]] -=== WeeChat でマウスが利用可能な場合、ターミナルのテキストを選択したり、貼り付けるにはどうすれば良いですか。 === +=== WeeChat でマウスが利用可能な場合、ターミナルのテキストを選択したり、貼り付けるにはどうすれば良いですか。 WeeChat でマウスが利用可能な場合、@k(-S-) キーを押しながらターミナルをクリックして選択してください、 マウスが無効化されます (例えば iTerm 等の場合、@k(-S-) の代わりに @k(-A-) を使ってください)。 [[irc]] -== IRC == +== IRC [[irc_ssl_connection]] -=== SSL を使うサーバへの接続中に問題が発生しました。どうすればいいですか。 === +=== SSL を使うサーバへの接続中に問題が発生しました。どうすればいいですか。 gnutls ハンドシェイクに関するエラーの場合、Diffie-Hellman キー (デフォルトは 2048) のサイズを小さくすることを試してみてください: ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- 証明書に関するエラーの場合、"ssl_verify" を無効化してください (接続の機密保護がより甘くなることに注意): ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -=== SSL を使うサーバへの接続中に、"TLS handshake failed" というエラーだけが表示されます。どうすれば良いですか。 === +=== SSL を使うサーバへの接続中に、"TLS handshake failed" というエラーだけが表示されます。どうすれば良いですか。 異なる優先順位文字列を試してみてください (WeeChat 0.3.5 以上)、 "xxx" はサーバ名に書き換えてください。 ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -=== どうすれば SSL を使って freenode サーバに接続できますか。 === +=== どうすれば SSL を使って freenode サーバに接続できますか。 オプション 'weechat.network.gnutls_ca_file' に証明書ファイルへのパスを設定してください。 ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] 設定したファイルが自分のシステムに存在することを確認してください @@ -457,15 +457,15 @@ gnutls ハンドシェイクに関するエラーの場合、Diffie-Hellman キ サーバポート、SSL、dhkey_size を設定の後に接続してください: ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- [[irc_oauth]] -=== どうすれば "oauth" が必要なサーバに接続出来ますか? === +=== どうすれば "oauth" が必要なサーバに接続出来ますか? 'twitch' などの一部のサーバは接続するために oauth が必要です。 @@ -474,32 +474,32 @@ oauth を使うにはパスワードを "oauth:XXXX" のように指定してく 以下のコマンドでサーバを作成し、接続することができます (名前とアドレスは適当な値に変更してください): ----------------------------------------- +---- /server add name irc.server.org -password="oauth:XXXX" /connect name ----------------------------------------- +---- [[irc_sasl]] -=== どうすればチャンネル参加前にニックネーム認証を行うことができますか。 === +=== どうすればチャンネル参加前にニックネーム認証を行うことができますか。 サーバで SASL を利用可能なら、nickserv 認証のコマンドを送信するよりも SASL を利用する方が良いです。例えば: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "mynick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- If server does not support SASL, you can add a delay (between command and join of channels): ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -=== /ignore と /filter コマンドの違いは何ですか。 === +=== /ignore と /filter コマンドの違いは何ですか。 `/ignore` コマンドは IRC コマンドです、このため IRC バッファ (サーバとチャンネル) にのみ有効です。 @@ -515,35 +515,35 @@ of channels): フィルタを無効化すれば見えるようになります (デフォルトでは @k(A-)@k(=) でフィルタの有効無効の切り替えが出来ます)。 [[filter_irc_join_part_quit]] -=== どうすれば IRC チャンネルへの参加/退出/終了メッセージをフィルタできますか。 === +=== どうすれば IRC チャンネルへの参加/退出/終了メッセージをフィルタできますか。 スマートフィルタを使う場合 (最近発言したユーザの参加/退出/終了メッセージは表示): ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- グローバルフィルタを使う場合 (*全ての* 参加/退出/終了メッセージを隠す): ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] ヘルプを見るには: `/help filter` か `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -=== どうすれば IRC チャンネルに参加した際に表示される一部のメッセージをフィルタできますか。 === +=== どうすれば IRC チャンネルに参加した際に表示される一部のメッセージをフィルタできますか。 WeeChat ≥ 0.4.1 では、オプション 'irc.look.display_join_message' を使って一部のメッセージを隠すことができます。 例えば、ニックネームリストを隠すには (この IRC メッセージの番号は '366'): ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] ヘルプを見るには: `/help irc.look.display_join_message` @@ -560,16 +560,16 @@ IRC 生サーバ (`/server raw`) を参照することで、 例: * 名前をフィルタ: ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * トピック (と日時) をフィルタ: ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -=== どうすれば voice メッセージをフィルタできますか (例えば Bitlbee サーバ上で)。 === +=== どうすれば voice メッセージをフィルタできますか (例えば Bitlbee サーバ上で)。 voice メッセージをフィルタするのは簡単ではありません、なぜなら voice モードの設定は同じ IRC メッセージの中で他のモード設定と同時に行われる可能性があるからです。 @@ -580,15 +580,15 @@ voice メッセージでチャットエリアが溢れてしまうから、こ Bitlbee 3 以上の場合、以下のコマンドをチャンネル '&bitlbee' で入力: ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- Bitlbee の古いバージョンでは、以下のコマンドを '&bitlbee' で入力: ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- WeeChat で離席中のニックネームをチェックするには、 <<color_away_nicks,離席状態のニックネーム>> に関する質問を参照してください。 @@ -596,12 +596,12 @@ WeeChat で離席中のニックネームをチェックするには、 もし本当に voice メッセージをフィルタしたい場合は、以下のコマンドを使ってください、 ただしこれは完璧なものではありません (voice モードの変更が最初に指定されている場合のみ有効)。 ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -=== どうすればニックネームリストから離席中のニックネームを確認できますか。 === +=== どうすればニックネームリストから離席中のニックネームを確認できますか。 オプション 'irc.server_default.away_check' に正の値を設定してください (離席状態確認のインターバルを分単位で)。 @@ -612,50 +612,50 @@ WeeChat で離席中のニックネームをチェックするには、 例えば、5 分間隔で離席状態確認を行い、25 人より多いチャンネルではこれを行わないようにするには: ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] WeeChat 0.3.3 以下では、オプション名が 'irc.network.away_check' と 'irc.network.away_check_max_nicks' になっています。 [[highlight_notification]] -=== どうすればあるチャンネルで自分が呼ばれたら警告できますか。 === +=== どうすればあるチャンネルで自分が呼ばれたら警告できますか。 'beep.pl' や 'launcher.pl' 等のスクリプトを使ってください。 'launcher.pl' の場合、コマンドの設定が必要です: ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/path/to/command arguments" ----------------------------------------- +---- この問題に対するその他のスクリプトは: http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -=== どうすればマージされたバッファ内であるコマンドを発行するターゲットバッファを変更できますか。 === +=== どうすればマージされたバッファ内であるコマンドを発行するターゲットバッファを変更できますか。 デフォルトのキーは @k(C-)@k(x) です (コマンドは: `/input switch_active_buffer`)。 [[plugins_scripts]] -== プラグイン / スクリプト == +== プラグイン / スクリプト [[openbsd_plugins]] -=== OpenBSD と WeeChat を使っている場合、プラグインが 1 つもロードされません。 === +=== OpenBSD と WeeChat を使っている場合、プラグインが 1 つもロードされません。 OpenBSD では、プラグインファイル名の末尾が ".so.0.0" です (Linux では ".so")。 以下の様に設定してください: ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -=== どうすれば Perl/Python/Ruby/Lua/Tcl スクリプトをロードできますか。スクリプトは他の IRC クライアントのものと互換性がありますか。 === +=== どうすれば Perl/Python/Ruby/Lua/Tcl スクリプトをロードできますか。スクリプトは他の IRC クライアントのものと互換性がありますか。 `/perl` 、`/python` 、`/ruby` 、`/lua` 、`/tcl` コマンドを使ってスクリプトをロードしてください (スクリプトのデフォルトパスは '~/.weechat/<language>/' )。 @@ -669,10 +669,10 @@ OpenBSD では、プラグインファイル名の末尾が ".so.0.0" です (Li * 'tcl' プラグインはバージョン 0.3.0 以上で利用できます。 [[settings]] -== 設定 == +== 設定 [[memory_usage]] -=== どうすれば WeeChat のメモリ使用量を節約できますか。 === +=== どうすれば WeeChat のメモリ使用量を節約できますか。 メモリ使用量を減らすには以下のヒントを試してください: @@ -688,10 +688,10 @@ OpenBSD では、プラグインファイル名の末尾が ".so.0.0" です (Li * 'weechat.history.max_commands' オプションの値を減らしてください。 [[development]] -== 開発 == +== 開発 [[bug_task_patch]] -=== どのようにバグ報告、新機能のリクエスト、パッチ送信すればよいですか。 === +=== どのようにバグ報告、新機能のリクエスト、パッチ送信すればよいですか。 3 つの方法があります: @@ -705,27 +705,27 @@ OpenBSD では、プラグインファイル名の末尾が ".so.0.0" です (Li ("support" メーリングリストを購読して送信することもできます) [[gdb_error_threads]] -=== gdb で WeeChat を実行する場合、スレッドに関するエラーが発生します。 === +=== gdb で WeeChat を実行する場合、スレッドに関するエラーが発生します。 gdb で WeeChat を実行する場合、以下のエラーが出るかもしれません: ----------------------------------------- +---- $ gdb /path/to/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- これを修正するには、以下のコマンドを使って gdb を実行してください (システム上の libpthread と WeeChat へのパスを変更): ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -=== WeeChat をサポートするプラットフォームのリストを教えてください。他のオペレーティングシステムへの移植予定はありますか。 === +=== WeeChat をサポートするプラットフォームのリストを教えてください。他のオペレーティングシステムへの移植予定はありますか。 完全なリストはこのページにあります: http://weechat.org/download @@ -733,7 +733,7 @@ $ LD_PRELOAD=/lib/libpthread.so.0 gdb /path/to/weechat 我々が持っていない OS で WeeChat をテストすることを歓迎します。 [[help_developers]] -=== どうすれば WeeChat 開発者を手伝えますか。 === +=== どうすれば WeeChat 開発者を手伝えますか。 多くの課題があります (テスト、コード、ドキュメント作成、...)。 @@ -741,7 +741,7 @@ IRC かメールで連絡を取り、サポートページを確認してくだ http://weechat.org/dev/support [[donate]] -=== WeeChat 開発者にお金か何かを贈りたいのですが。 === +=== WeeChat 開発者にお金か何かを贈りたいのですが。 開発補助のためお金を贈ることができます。 詳しいことは http://weechat.org/about/donate に載っています。 diff --git a/doc/ja/weechat_quickstart.ja.txt b/doc/ja/weechat_quickstart.ja.txt index 59d294052..86bf18a61 100644 --- a/doc/ja/weechat_quickstart.ja.txt +++ b/doc/ja/weechat_quickstart.ja.txt @@ -1,40 +1,40 @@ -= WeeChat クイックスタートガイド = += WeeChat クイックスタートガイド Sébastien Helleu <flashcode@flashtux.org> [[start]] -== WeeChat を起動 == +== WeeChat を起動 X 用ターミナルエミュレータは rxvt-unicode を推奨します (UTF-8 がサポートされており、デフォルトのキーバインドで問題が発生しないためです)。 シェルから起動するには: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -== オンラインヘルプ / オプション == +== オンラインヘルプ / オプション WeeChat はすべてのコマンドにヘルプがあります。ヘルプを見るには、以下のコマンドを入力してください: ----------------------------------------- +---- /help ----------------------------------------- +---- 特定のコマンドに対するヘルプを見るには、以下のコマンドを入力してください: ----------------------------------------- +---- /help command ----------------------------------------- +---- オプションを設定するには以下のコマンドを入力してください: ----------------------------------------- +---- /set config.section.option value ----------------------------------------- +---- (ここで `config` は設定名 (core の場合は `weechat` もしくはプラグイン名)、`section` @@ -49,27 +49,27 @@ WeeChat を再起動する必要は*ありません*)。 * 全ての設定名を表示します (WeeChat およびプラグイン) ----------------------------------------- +---- /set ----------------------------------------- +---- * WeeChat のオプションを表示します ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * IRC プラグインのオプションを表示します ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- `/help` とオプション名を指定することでヘルプを表示できます、例: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- すべての設定は WeeChat の終了時 (または強制的に設定保存を行う `/save` コマンドを使用した場合) に保存されます。 @@ -79,7 +79,7 @@ WeeChat を再起動する必要は*ありません*)。 [[core_vs_plugins]] -== コア vs プラグイン == +== コア vs プラグイン WeeChat の "core" にはユーザインタフェースに関わるものだけが含まれているため、 プラグインがなければ使い物になりません (以前からのユーザーへ: IRC @@ -92,23 +92,23 @@ IRC 等全てのネットワークプロトコルはそれぞれ異なるプラ [[create_irc_server]] -== サーバ情報を作成する == +== サーバ情報を作成する `/server` コマンドで IRC サーバを追加できます。例: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- 書式が思い出せない場合はヘルプを利用してください: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -== IRC サーバのオプションを設定する == +== IRC サーバのオプションを設定する もしサーバオプションが特に設定されていない場合、WeeChat はデフォルト設定をすべてのサーバに適用します @@ -120,69 +120,69 @@ IRC 等全てのネットワークプロトコルはそれぞれ異なるプラ 例えばデフォルトでは (un*x ログイン名をベースにした) ニックネームが設定されますが、以下のコマンドで oftc サーバ用の設定として上書きすることが可能です: ----------------------------------------- +---- /set irc.server.oftc.nicks "mynick,mynick2,mynick3,mynick4,mynick5" ----------------------------------------- +---- ユーザ名と実名を設定する場合: ----------------------------------------- +---- /set irc.server.oftc.username "My user name" /set irc.server.oftc.realname "My real name" ----------------------------------------- +---- サーバへの自動接続を設定する場合: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- サーバで SASL を利用可能な場合、SASL を利用してニックネーム認証することができます (チャンネル参加前にニックネーム認証が行われるでしょう): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mynick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- 例えば nickserv との認証などを行うためにサーバ接続後にコマンドを実行するには (SASL を利用して認証を行わない場合): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] ';' (セミコロン) で繋ぐことで複数のコマンドを設定することができます チャンネルへの自動参加を設定する場合: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#channel1,#channel2" ----------------------------------------- +---- サーバオプションの代わりにデフォルトの値を使用する、例えばデフォルトのニックネーム (irc.server_default.nicks) を使用する場合: ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- その他設定: その他のオプションも以下のコマンドで設定できます ("xxx" は設定名です): ----------------------------------------- +---- /set irc.server.oftc.xxx value ----------------------------------------- +---- [[connect_to_irc_server]] -== サーバに接続し、チャンネルに自動接続する == +== サーバに接続し、チャンネルに自動接続する ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] このコマンドは、`/server` @@ -195,35 +195,35 @@ IRC 等全てのネットワークプロトコルはそれぞれ異なるプラ サーババッファへの自動マージを無効にして 独立したサーババッファにすることができます: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -== チャンネルに接続 / 切断する == +== チャンネルに接続 / 切断する チャンネルに接続する ----------------------------------------- +---- /join #channel ----------------------------------------- +---- チャンネルから切断する (バッファは開いたままにする) ----------------------------------------- +---- /part [切断メッセージ] ----------------------------------------- +---- チャンネルから切断し、バッファを閉じる (`/close` は `/buffer close` の別名) ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -== バッファ / ウィンドウ管理 == +== バッファ / ウィンドウ管理 バッファは番号、カテゴリおよび名前とともにプラグインに関連づけられたあるコンポーネントです。 バッファは画面に表示するデータを含んでいます。 @@ -234,23 +234,23 @@ IRC 等全てのネットワークプロトコルはそれぞれ異なるプラ バッファ / ウィンドウを管理するためのコマンド: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (言うまでもありませんが /help でこれらのコマンドもヘルプを確認することができます) 例えば、ウィンドウを垂直方向に小さいウィンドウ (1/3 幅) と大きいウィンドウ (2/3 幅) に分割する場合は次のコマンドを実行します: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -== キー割り当て設定 == +== キー割り当て設定 WeeChat はデフォルトでたくさんのショートカットキーが設定されています。 これらはドキュメントに記載されていますが、いくつか重要なキーがあります: @@ -269,25 +269,25 @@ WeeChat はデフォルトでたくさんのショートカットキーが設定 例えば、meta-y (alt-y) に `/buffer close` を割り当てる場合: ----------------------------------------- +---- /key bind (meta-kを押下) (meta-yを押下) /buffer close ----------------------------------------- +---- コマンドラインには以下のように表示されます: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- キー割り当てを解除する場合: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -== プラグイン / スクリプト == +== プラグイン / スクリプト Debian のようにいくつかのディストリビューションでは、プラグイン用パッケージが独立して用意されています (例えば weechat-plugins)。 @@ -302,7 +302,7 @@ WeeChat ではコマンド `/script` を使うことで、スクリプトの管 [[more_doc]] -== 詳しいドキュメント情報 == +== 詳しいドキュメント情報 FAQ やその他の質問に関するドキュメントはこちらで参照できます: http://weechat.org/doc diff --git a/doc/ja/weechat_scripting.ja.txt b/doc/ja/weechat_scripting.ja.txt index a0d7a63de..f02e0d7ee 100644 --- a/doc/ja/weechat_scripting.ja.txt +++ b/doc/ja/weechat_scripting.ja.txt @@ -1,4 +1,4 @@ -= WeeChat スクリプト製作ガイド = += WeeChat スクリプト製作ガイド Sébastien Helleu <flashcode@flashtux.org> @@ -9,7 +9,7 @@ http://weechat.org/doc [[introduction]] -== イントロダクション == +== イントロダクション WeeChat (Wee Enhanced Environment for Chat) はフリー、高速、軽量な 多くのオペレーティングシステムで動くチャットクライアントです。 @@ -29,23 +29,23 @@ WeeChat (Wee Enhanced Environment for Chat) はフリー、高速、軽量な で書かれていますが API は他の言語でも共通です。 [[scripts_in_weechat]] -== WeeChat のスクリプト == +== WeeChat のスクリプト [[languages_specifities]] -=== 言語仕様 === +=== 言語仕様 -==== Python ==== +==== Python * `import weechat` を使うことは必須です。 * python では `print*` 系の関数は `prnt*` と呼ばれます ('print' は予約済みキーワードなので)。 * 関数は `weechat.xxx(arg1, arg2, ...)` のように呼び出してください。 -==== Perl ==== +==== Perl * 関数は `weechat::xxx(arg1, arg2, ...);` のように呼び出してください。 -==== Ruby ==== +==== Ruby * 'weechat_init' を定義して、内部で 'register' を呼び出してください。 * 関数は `Weechat.xxx(arg1, arg2, ...)` のように呼び出してください。 @@ -54,20 +54,20 @@ WeeChat (Wee Enhanced Environment for Chat) はフリー、高速、軽量な + 3 個のデータ文字列)、したがって `Weechat.config_new_option` 関数を呼び出すには以下のようにしてください: [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "name", "string", "description of option", "", 0, 0, "value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -==== Lua ==== +==== Lua * 関数は `weechat.xxx(arg1, arg2, ...)` のように呼び出してください。 -==== Tcl ==== +==== Tcl * 関数は `weechat::xxx arg1 arg2 ...` のように呼び出してください。 -==== Guile (scheme) ==== +==== Guile (scheme) * 関数は `(weechat:xxx arg1 arg2 ...)` のように呼び出してください。 * 以下の関数は引数のリストをひとつだけ取ります。 @@ -78,7 +78,7 @@ Weechat.config_new_option(config, section, "name", "string", "description of opt ** bar_new [[register_function]] -=== 関数の登録 === +=== 関数の登録 全ての WeeChat スクリプトは WeeChat に自分自身を "登録" し、登録はスクリプトの最初で行われなければいけません。 @@ -86,9 +86,9 @@ Weechat.config_new_option(config, section, "name", "string", "description of opt プロトタイプ: [source,python] ----------------------------------------- +---- weechat.register(name, author, version, license, description, shutdown_function, charset) ----------------------------------------- +---- 引数: @@ -108,97 +108,97 @@ weechat.register(name, author, version, license, description, shutdown_function, * python: [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.prnt("", "Hello, from python script!") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Test script", "", ""); weechat::print("", "Hello, from perl script!"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Test script", "", "") Weechat.print("", "Hello, from ruby script!") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Test script", "", "") weechat.print("", "Hello, from lua script!") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Test script" "" "" weechat::print "" "Hello, from tcl script!" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Test script" "" "") (weechat:print "" "Hello, from scheme script!") ----------------------------------------- +---- [[load_script]] -=== スクリプトのロード === +=== スクリプトのロード スクリプトをロードするには "script" プラグインを使うことを推奨します。例: ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- プログラミング言語ごとの固有コマンドを利用することもできます: ----------------------------------------- +---- /python load python/script.py /perl load perl/script.pl /ruby load ruby/script.rb /lua load lua/script.lua /tcl load tcl/script.tcl /guile load guile/script.scm ----------------------------------------- +---- WeeChat の開始時にスクリプトを自動ロードするには 'language/autoload' ディレクトリ内にリンクを作ってください。 例えば Python の場合: ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../script.py ----------------------------------------- +---- [NOTE] `/script install` コマンドでスクリプトをインストールした場合、'autoload' ディレクトリ内にリンクが自動的に作成されます。 [[differences_with_c_api]] -== C API との違い == +== C API との違い スクリプト API は C プラグイン API とほぼ同じです。API に含まれる各関数の詳細については、'WeeChat プラグイン API リファレンス' @@ -212,28 +212,28 @@ $ ln -s ../script.py 例えば 'test.py' スクリプトが WeeChat API 関数を呼び出す場合、以下の順に呼び出されます: // PLEASE DO NOT TRANSLATE -........................................ +.... ┌──────────────────────┐ ╔══════════════════╗ │ python plugin │ ║ WeeChat "core" ║ ├────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ script API │ C API │ ─────► ║ C API │ ║ └────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... WeeChat が 'test.py' スクリプトで定義されたコールバックを呼び出す場合、順番は逆になります: // PLEASE DO NOT TRANSLATE -........................................ +.... ╔══════════════════╗ ┌──────────────────────┐ ║ WeeChat "core" ║ │ python plugin │ ║ ┌─────────╢ ├─────────┬────────────┤ ║ │ C API ║ ─────► │ C API │ script API │ ─────► test.py ╚════════╧═════════╝ └─────────┴────────────┘ -........................................ +.... [[pointers]] -=== ポインタ === +=== ポインタ ご存知かもしれませんが、スクリプトには本当の意味での "ポインタ" はありません。このため API 関数がポインタを返す場合、スクリプトでは文字列に変換されます。 @@ -249,9 +249,9 @@ API 関数を呼び出す前に C と解釈されます。例えば、データをコアバッファ (WeeChat メインバッファ) に表示する場合、以下のようになります: [source,python] ----------------------------------------- +---- weechat.prnt("", "hi!") ----------------------------------------- +---- [WARNING] 多くの関数ではスピードの関係で、WeeChat はポインタの値が正当なものか否かの確認を行いません。 @@ -259,7 +259,7 @@ weechat.prnt("", "hi!") 不正なポインタを利用した場合、細かなクラッシュレポートを目にすることになるでしょう ;) [[callbacks]] -=== コールバック === +=== コールバック ほとんど全ての WeeChat コールバックは WEECHAT_RC_OK 又は WEECHAT_RC_ERROR を返さなければいけません (modifier コールバックは例外で、これは文字列を返します)。 @@ -272,18 +272,18 @@ C コールバックはポインタ型の "data" 引数を利用します。ス * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -291,69 +291,69 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -== スクリプト API == +== スクリプト API API に含まれる関数の詳しい情報は 'WeeChat プラグイン API リファレンス' をご覧ください。. [[script_api_functions]] -=== 関数 === +=== 関数 スクリプト API に含まれる関数のリスト: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | カテゴリ | 関数 | 一般 | register @@ -430,15 +430,15 @@ API に含まれる関数の詳しい情報は hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | アップグレード | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -=== 定数 === +=== 定数 スクリプト API に含まれる定数のリスト: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | カテゴリ | 定数 | リターンコード | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -466,20 +466,20 @@ API に含まれる関数の詳しい情報は WEECHAT_HOOK_CONNECT_SOCKET_ERROR | シグナルのフック | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -== 良くあるタスク == +== 良くあるタスク この章ではいくつかの良くあるタスクを例を交えて紹介します。ここでは API の一部の機能を使っています。完全なリファレンスは 'WeeChat プラグイン API リファレンス' をご覧ください。 [[buffers]] -=== バッファ === +=== バッファ [[buffers_display_messages]] -==== メッセージの表示 ==== +==== メッセージの表示 WeeChat コアバッファに対して操作する場合、空文字列を使うことが多いです。他のバッファに対して操作する場合には、ポインタ (文字列型、<<pointers,ポインタ>> を参照) を与える必要があります。 @@ -487,7 +487,7 @@ WeeChat コアバッファに対して操作する場合、空文字列を使う 例: [source,python] ----------------------------------------- +---- # "hello" をコアバッファに表示 weechat.prnt("", "hello") @@ -514,13 +514,13 @@ weechat.prnt(buffer, "message on #weechat channel") # (サーバとチャンネルはコンマで区切ってください。) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "message on #weechat channel") ----------------------------------------- +---- [NOTE] Print 関数は Perl/Ruby/Lua/Tcl では `print` で、Python では `prnt` です。 [[buffers_send_text]] -==== バッファにテキストを送信 ==== +==== バッファにテキストを送信 テキストやコマンドをバッファに送信できます。これはテキストやコマンドをタイプして [Enter] を押すことに対応します。 @@ -528,17 +528,17 @@ Print 関数は Perl/Ruby/Lua/Tcl では `print` で、Python では `prnt` で 例: [source,python] ----------------------------------------- +---- # 現在のバッファでコマンド "/help" を実行 (結果は core バッファに出力されます) weechat.command("", "/help") # テキスト "hello" を #weechat IRC チャンネルに送信 (このチャンネルにいるユーザにはメッセージが見えます。) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "hello") ----------------------------------------- +---- [[buffers_new]] -==== 新規バッファの作成 ==== +==== 新規バッファの作成 スクリプトを使って新しいバッファを作成し、このバッファにメッセージを表示させることができます。 @@ -549,7 +549,7 @@ weechat.command(buffer, "hello") 例: [source,python] ----------------------------------------- +---- # データの入力時に呼び出されるコールバック def buffer_input_cb(data, buffer, input_data): # ... @@ -568,28 +568,28 @@ weechat.buffer_set(buffer, "title", "This is title for my buffer.") # ローカル変数 "no_log" に "1" を設定することでログ保存を無効化 weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -==== バッファプロパティ ==== +==== バッファプロパティ 文字列、整数、ポインタ型のバッファプロパティを読むことができます。 例: [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() number = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") short_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- バッファに対するローカル変数を追加、読み込み、削除することができます: [source,python] ----------------------------------------- +---- # ローカル変数の追加 weechat.buffer_set(buffer, "localvar_set_myvar", "my_value") @@ -598,19 +598,19 @@ myvar = weechat.buffer_get_string(buffer, "localvar_myvar") # ローカル変数の削除 weechat.buffer_set(buffer, "localvar_del_myvar", "") ----------------------------------------- +---- バッファに対するローカル変数を見るには、WeeChat で以下のコマンドを実行してください: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -=== フック === +=== フック [[hook_command]] -==== 新しいコマンドの追加 ==== +==== 新しいコマンドの追加 カスタムコマンドを追加するには `hook_command` を使ってください。 追加したコマンドに対してカスタム補完テンプレートを定義できます。 @@ -618,7 +618,7 @@ weechat.buffer_set(buffer, "localvar_del_myvar", "") 例: [source,python] ----------------------------------------- +---- def my_command_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -633,35 +633,35 @@ hook = weechat.hook_command("myfilter", "description of myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- 上で定義したコマンドを WeeChat で以下のように使うことができます: ----------------------------------------- +---- /help myfilter /myfilter arguments... ----------------------------------------- +---- [[hook_timer]] -==== タイマーの追加 ==== +==== タイマーの追加 タイマーを追加するには `hook_timer` を使ってください。 例: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # 1 分毎に (秒が 00 になった時に) 呼び出されるタイマー weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -==== バックグラウンドプロセスの実行 ==== +==== バックグラウンドプロセスの実行 `hook_process` を使ってバックグラウンドプロセスを実行できます。 コールバックはデータの準備が整った時点で呼び出されます。複数回呼び出されることもあります。 @@ -672,7 +672,7 @@ weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") 例: [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -684,10 +684,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -==== URL 転送 ==== +==== URL 転送 _バージョン 0.3.7 に含まれる新機能_ @@ -698,7 +698,7 @@ URL をダウンロードする (又は URL にポストする) には、関数 "out" 引数 (プロセスの標準出力) を通して渡されます。 [source,python] ----------------------------------------- +---- # 現在の WeeChat 安定版のバージョンを表示。 weechat_version = "" @@ -712,7 +712,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] WeeChat に関して利用できる情報は全て http://weechat.org/dev/info にあります @@ -721,7 +721,7 @@ WeeChat に関して利用できる情報は全て http://weechat.org/dev/info '/tmp/weechat-devel.tar.gz' にダウンロード: [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "End of transfer (rc=%s)" % rc) @@ -730,16 +730,16 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- URL 転送に関するより詳しい情報と利用可能なオプションを見るには、 'WeeChat プラグイン API リファレンス' の `hook_process` と `hook_process_hashtable` をご覧ください。 [[config_options]] -=== 設定 / オプション === +=== 設定 / オプション [[config_options_set_script]] -==== スクリプトのオプションを設定 ==== +==== スクリプトのオプションを設定 オプションが設定されているかどうかを確認するには `config_is_set_plugin` 関数、オプションを設定するには `config_set_plugin` 関数を使います。 @@ -747,7 +747,7 @@ URL 転送に関するより詳しい情報と利用可能なオプションを 例: [source,python] ----------------------------------------- +---- script_options = { "option1" : "value1", "option2" : "value2", @@ -756,17 +756,17 @@ script_options = { for option, default_value in script_options.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, default_value) ----------------------------------------- +---- [[config_options_detect_changes]] -==== 変更の検出 ==== +==== 変更の検出 ユーザがスクリプトオプションを変更したことを検出するには `hook_config` を使わなければいけません。 例: [source,python] ----------------------------------------- +---- SCRIPT_NAME = "myscript" # ... @@ -781,17 +781,17 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_cb", "") # 他のスクリプト言語の場合は "python" を適当なもの ("perl"、"ruby"、"lua"、"tcl") に変更してください。 ----------------------------------------- +---- [[config_options_weechat]] -==== WeeChat オプションの読み込み ==== +==== WeeChat オプションの読み込み `config_get` 関数はオプションへのポインタを返します。オプションの型に従って `config_string` 、`config_boolean` 、`config_integer` 、`config_color` を呼び出さなければいけません。 [source,python] ----------------------------------------- +---- # 文字列型の場合 weechat.prnt("", "value of option weechat.look.item_time_format is: %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -807,13 +807,13 @@ weechat.prnt("", "value of option weechat.look.scroll_page_percent is: %d" # 色型の場合 weechat.prnt("", "value of option weechat.color.chat_delimiters is: %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -=== IRC === +=== IRC [[irc_catch_messages]] -==== メッセージのキャッチ ==== +==== メッセージのキャッチ メッセージを受信すると IRC プラグインは 2 つのシグナルを送信します (`xxx` は IRC 内部サーバ名で、`yyy` は JOIN、QUIT、PRIVMSG、301 等の IRC コマンド名です): @@ -825,7 +825,7 @@ xxx,irc_in2_yyy:: メッセージの処理が行われた後に送信されるシグナル [source,python] ----------------------------------------- +---- def join_cb(data, signal, signal_data): # シグナル、例えば: "freenode,irc_in2_join" # signal_data は IRC メッセージ、例えば: ":nick!user@host JOIN :#channel" @@ -840,49 +840,49 @@ def join_cb(data, signal, signal_data): # 全ての IRC サーバに対する JOIN メッセージをキャッチするにはサーバの指定に # "*" を使うと便利です。 weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -==== メッセージの修正 ==== +==== メッセージの修正 メッセージを受信すると IRC プラグインは "irc_in_xxx" ("xxx" は IRC コマンド) と呼ばれる "modifier" を送信します。メッセージを修正するにはこのシグナルを使います。 [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # 全てのメッセージにサーバ名を追加する # (これは役に立ちませんが、例として!) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] 不正なメッセージは WeeChat をクラッシュさせ、深刻な問題を引き起こします! [[irc_message_parse]] -==== メッセージの構文解析 ==== +==== メッセージの構文解析 _バージョン 0.3.4 の新機能_ "irc_message_parse" と呼ばれる info_hashtable を使って IRC メッセージを構文解析できます。 [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message here" }) weechat.prnt("", "dict: %s" % dict) # 出力: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -=== 情報 === +=== 情報 [[infos_weechat_version]] -==== WeeChat のバージョン ==== +==== WeeChat のバージョン バージョンを確認する最良の方法は "version_number" を参照し、16 進数のバージョン番号と整数値比較することです。 @@ -890,13 +890,13 @@ weechat.prnt("", "dict: %s" % dict) 例: [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "This is WeeChat 0.3.2 or newer") else: weechat.prnt("", "This is WeeChat 0.3.1 or older") ----------------------------------------- +---- [NOTE] バージョン 0.3.1.1 以下では 'info_get("version_number")' @@ -905,35 +905,35 @@ else: 文字列でバージョンを使うには: [source,python] ----------------------------------------- +---- # 例えば "Version 0.3.2" のような出力が得られます。 weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -==== その他の情報 ==== +==== その他の情報 [source,python] ----------------------------------------- +---- # WeeChat ホームディレクトリ、例えば: "/home/xxxx/.weechat" weechat.prnt("", "WeeChat home dir: %s" % weechat.info_get("weechat_dir", "")) # キーボードの不使用時間 weechat.prnt("", "Inactivity since %s seconds" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -=== 情報リスト === +=== 情報リスト [[infolists_read]] -==== 情報リストの読み込み ==== +==== 情報リストの読み込み WeeChat や他のプラグインによって作られた情報リストを読み込むことができます。 例: [source,python] ----------------------------------------- +---- # バッファのリストを得るために "buffer" 情報リストを読み込む infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -941,7 +941,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] WeeChat は自動的にメモリを解放しません、情報リストによって使われたメモリを解放するには、`infolist_free` diff --git a/doc/ja/weechat_tester.ja.txt b/doc/ja/weechat_tester.ja.txt index 6bd3aa0fa..7b461a464 100644 --- a/doc/ja/weechat_tester.ja.txt +++ b/doc/ja/weechat_tester.ja.txt @@ -1,9 +1,9 @@ -= WeeChat テスターガイド = += WeeChat テスターガイド Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -== 目的 == +== 目的 WeeChat 開発への協力に興味を持っていただきありがとうございます。開発に協力する最も簡単 @@ -25,7 +25,7 @@ WeeChat [[prepare_system]] -== システムの準備 == +== システムの準備 Linux の 'core' ファイルを有効にすることはとても役に立ちます: WeeChat がクラッシュすると、Linux は 'core' と呼ばれるファイルを作ります。このファイルには、WeeChat @@ -33,13 +33,13 @@ Linux の 'core' ファイルを有効にすることはとても役に立ちま 'bash' シェルを使っている場合、以下の行を `~/.bashrc` に追記してください: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -== 開発版のダウンロード == +== 開発版のダウンロード 最新のコード (最新のバグと最新の機能も含んでいますが) は GIT リポジトリにあります。 @@ -50,55 +50,55 @@ ulimit -c unlimited 安定版を捨てる必要もありません。 [[get_sources]] -=== ソースの取得とビルド === +=== ソースの取得とビルド 最初にディレクトリを作ってください、ここでは 'weechat-git': ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- git がインストール済みの場合、git リポジトリを clone してください (推奨): ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- 注意: clone の後、このディレクトリ内で "`git pull`" を実行すれば、最新のアップデートとの差分が更新されます。 他の方法として 'devel' パッケージをダウンロードして展開する方法があります: ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- ソースをビルドするには cmake を使うことを推奨します: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- cmake が無い場合は autotools を使うことも可能です: ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -=== バイナリパッケージのインストール === +=== バイナリパッケージのインストール Linux ディストリビューション別に: @@ -109,16 +109,16 @@ Linux ディストリビューション別に: [[run]] -== WeeChat の実行 == +== WeeChat の実行 `--dir` オプションを使って WeeChat を専用の (安定版とは違う) ディレクトリで実行することを推奨します。 コマンド: ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- より万全を期すなら、上の方法を使って WeeChat の最新バージョンを使っていることを確認するべきです ;) @@ -130,7 +130,7 @@ $ ~/weechat-git/bin/weechat [[links]] -== 便利なリンク == +== 便利なリンク * GIT リポジトリ: http://git.savannah.gnu.org/gitweb/?p=weechat.git * バグトラッカー: https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/ja/weechat_user.ja.txt b/doc/ja/weechat_user.ja.txt index 37f3452cb..20ce585a7 100644 --- a/doc/ja/weechat_user.ja.txt +++ b/doc/ja/weechat_user.ja.txt @@ -1,4 +1,4 @@ -= WeeChat ユーザーズガイド = += WeeChat ユーザーズガイド Sébastien Helleu <flashcode@flashtux.org> @@ -9,13 +9,13 @@ http://weechat.org/doc [[introduction]] -== イントロダクション == +== イントロダクション WeeChat (Wee Enhanced Environment for Chat) はフリーのチャットクライアントです。 高速で軽量、多くのオペレーティングシステムで動くように設計されています。 [[features]] -=== 特徴 === +=== 特徴 主な特徴: @@ -35,7 +35,7 @@ WeeChat (Wee Enhanced Environment for Chat) はフリーのチャットクライ WeeChat のホームページ: http://weechat.org/ [[pre-requisites]] -=== 事前に必要なもの === +=== 事前に必要なもの WeeChat をインストールするには、以下のものが必要です: @@ -45,10 +45,10 @@ WeeChat をインストールするには、以下のものが必要です: * ncurses ライブラリ [[install]] -== インストール方法 == +== インストール方法 [[binary_packages]] -=== バイナリパッケージ === +=== バイナリパッケージ 多くのディストリビューションではバイナリパッケージが利用できます。例えば: @@ -67,18 +67,18 @@ WeeChat をインストールするには、以下のものが必要です: インストール説明マニュアルを参照してください。 [[source_package]] -=== ソースパッケージ === +=== ソースパッケージ WeeChat は cmake または autotools を使ってコンパイルできます (cmake を使うことが推奨されています)。 [[dependencies]] -==== 依存関係 ==== +==== 依存関係 以下の表は WeeChat のコンパイルに必須または任意で必要なパッケージのリストです。 [width="100%",cols="5,^3,^3,13",options="header"] -|======================================== +|=== | パッケージ ^(1)^ | バージョン | 必須 | 機能 | cmake | | *yes* | ビルド (autotools でも可能ですが、cmake を推奨します) | libncursesw5-dev ^(2)^ | | *yes* | ncurses インターフェイス @@ -99,7 +99,7 @@ WeeChat は cmake または autotools を使ってコンパイルできます (c | source-highlight | | | 文書中のソースに対するシンタックスハイライト | xsltproc, docbook-xml, docbook-xsl | | | man ページのビルド -|======================================== +|=== [NOTE] ^(1)^ Debian GNU/Linux ディストリビューションにおけるパッケージ名です。 @@ -110,34 +110,34 @@ WeeChat は cmake または autotools を使ってコンパイルできます (c で正しく動きますが、バージョン 2.6 以下または 3.0 以上では正しく動きません)。 [[compile_with_cmake]] -==== cmake によるコンパイル ==== +==== cmake によるコンパイル * システムディレクトリにインストールする場合 ('root' 特権が必要です): ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. $ make % make install (as root) ----------------------------------------- +---- * 任意のディレクトリにインストールする場合: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=/path/to/directory $ make $ make install ----------------------------------------- +---- cmake に対するオプションを指定するには、以下のフォーマットを使ってください: "-DOPTION=VALUE". よく利用されるオプションのリスト: [width="100%",cols="2m,2,5m,12",options="header"] -|======================================== +|=== | オプション | 値 | デフォルト値 | 説明 | CMAKE_BUILD_TYPE | `Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel` | | @@ -232,22 +232,22 @@ cmake に対するオプションを指定するには、以下のフォーマ | ENABLE_XFER | `ON`, `OFF` | ON | <<xfer_plugin,Xfer プラグイン>>のコンパイル -|======================================== +|=== その他のオプションは以下のコマンドで確認してください: ----------------------------------------- +---- $ cmake -LA ----------------------------------------- +---- Curses インターフェイスを使う場合は以下のコマンドを使ってください: ----------------------------------------- +---- $ ccmake .. ----------------------------------------- +---- [[compile_with_autotools]] -==== autotools によるコンパイル ==== +==== autotools によるコンパイル [WARNING] cmake 以外を用いた WeeChat のビルドは公式にサポートされません。cmake @@ -256,50 +256,50 @@ autotools を用いてビルドする場合、cmake よりも多くの依存パ * システムディレクトリにインストールする場合 ('root' 特権が必要です): ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure $ make % make install (as root) ----------------------------------------- +---- * 任意のディレクトリにインストールする場合: ----------------------------------------- +---- $ ./autogen.sh $ mkdir build $ cd build $ ../configure --prefix=/path/to/directory $ make $ make install ----------------------------------------- +---- 'configure' スクリプトに対してオプションを指定することができます、オプションを表示するには以下のコマンドを使ってください: ----------------------------------------- +---- $ ./configure --help ----------------------------------------- +---- [[git_sources]] -==== Git ソース ==== +==== Git ソース 警告: git ソースを用いる方法は上級者向けです。コンパイルに失敗したり、 不安定な可能性があります。警告しましたよ! git ソースを入手するには、以下のコマンドを使ってください: ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git ----------------------------------------- +---- その後は、ソースパッケージの説明に従ってください (<<source_package,ソースパッケージ>>を参照)。 [[report_crashes]] -==== クラッシュレポート ==== +==== クラッシュレポート WeeChat がクラッシュした場合、または WeeChat をクラッシュさせる操作を報告する場合、以下の手順に従ってください: @@ -309,45 +309,45 @@ WeeChat がクラッシュした場合、または WeeChat * gdb のインストール [[debug_info]] -==== デバッグ情報 ==== +==== デバッグ情報 cmake でコンパイルする場合: ----------------------------------------- +---- $ cmake .. -DCMAKE_BUILD_TYPE=Debug ----------------------------------------- +---- autotools でコンパイルする場合は、デバックはデフォルトで有効化されています(`--with-debug=1`)。 バイナリパッケージをインストールする場合は、'weechat-dbg' パッケージをインストールしてください。 [[core_files]] -==== Core ファイル ==== +==== Core ファイル 'core' ファイルを有効化するには、<<option_weechat.startup.sys_rlimit,weechat.startup.sys_rlimit>> オプションを使ってください: ----------------------------------------- +---- /set weechat.startup.sys_rlimit "core:-1" ----------------------------------------- +---- WeeChat バージョン 0.3.8 以下または WeeChat の実行前に core ファイルを有効化したい場合には、`ulimit` コマンドを使ってください。 Linux で 'bash' シェルを使っている場合、以下の内容を `~/.bashrc` に追加してください: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- サイズを指定する場合は: ----------------------------------------- +---- ulimit -c 200000 ----------------------------------------- +---- [[gdb_backtrace]] -==== gdb でバックトレースを得る ==== +==== gdb でバックトレースを得る WeeChat がクラッシュすると、'core' または 'core.12345' ファイルが作られます ('12345' はプロセス番号です)。 @@ -357,9 +357,9 @@ WeeChat がインストールされているディレクトリでは*ありま 例えば、'weechat' が '/usr/bin/' にインストールされ、'core' ファイルが '/home/xxx/' にある場合、以下のコマンドで gdb を起動してください: ----------------------------------------- +---- gdb /usr/bin/weechat /home/xxx/core ----------------------------------------- +---- [NOTE] バイナリパッケージ 'weechat-dbg' をインストールした場合 (例えば Debian で)、WeeChat @@ -368,7 +368,7 @@ gdb /usr/bin/weechat /home/xxx/core gdb の中で `bt full` コマンドを実行するとバックトレースが表示されます。 以下のような出力が得られるはずです: ----------------------------------------- +---- (gdb) set logging file /tmp/crash.txt (gdb) set logging on Copying output to /tmp/crash.txt. @@ -395,7 +395,7 @@ Copying output to /tmp/crash.txt. write_fds = {fds_bits = {0 <repeats 16 times>}} except_fds = {fds_bits = {0 <repeats 16 times>}} max_fd = <value optimized out> ----------------------------------------- +---- このバックトレースを開発者に報告し、 クラッシュを引き起こした動作を伝えてください。 @@ -403,26 +403,26 @@ Copying output to /tmp/crash.txt. お手伝いに感謝します! [[debug_running_weechat]] -==== 起動した WeeChat のデバッグ ==== +==== 起動した WeeChat のデバッグ 起動している WeeChat をデバッグするには (例えば WeeChat がフリーズしているような場合)、gdb の引数にプロセス番号を与えて起動します ('12345' は weechat プロセスの PID に変更してください): ----------------------------------------- +---- gdb /usr/bin/weechat 12345 ----------------------------------------- +---- クラッシュが起きた場合と同様に、`bt full` コマンドを使ってください: ----------------------------------------- +---- (gdb) bt full ----------------------------------------- +---- [[usage]] -== 使い方 == +== 使い方 [[running_weechat]] -=== WeeChat の起動 === +=== WeeChat の起動 コマンドライン引数: @@ -430,9 +430,9 @@ include::cmdline_options.ja.txt[] WeeChat を起動させるには、以下コマンドを実行: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- 初めて WeeChat を起動する場合、デフォルトのオプションで設定ファイルが作成されます。 このデフォルト設定ファイルは @@ -443,12 +443,12 @@ WeeChat 内で `/set` コマンドにパラメータを付けて設定します (<<weechat_commands,WeeChat コマンド>>を参照)。 [[screen_layout]] -=== スクリーンレイアウト === +=== スクリーンレイアウト WeeChat を起動したターミナルの例: // TRANSLATION MISSING -........................................ +.... ▼ bar "title" ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ @@ -473,7 +473,7 @@ WeeChat を起動したターミナルの例: │[@Flashy(i)] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ bars "status" and "input" bar "nicklist" ▲ -........................................ +.... スクリーンは以下のエリアから成ります: @@ -490,7 +490,7 @@ WeeChat を起動したターミナルの例: 状態 ('status') バーは以下の初期値を持っています: [width="100%",cols="^3,^3,10",options="header"] -|======================================== +|=== | アイテム | 例 | 説明 | time | `[12:55]` | 時刻 | buffer_count | `[6]` | 開いているバッファの数 @@ -504,12 +504,12 @@ WeeChat を起動したターミナルの例: | hotlist | `[H: 4:#abc(2,5), 6]` | 変化のあったバッファのリスト (未読メッセージ) (例では、'#abc' に 2 個のハイライトと 5 個の未読メッセージ、6 番目のバッファに 1 個の未読メッセージがあることを意味します。) | completion | `abc(2) def(5)` | 補完候補の単語リスト、各単語に対して適応される補完候補の数を含む。 | scroll | `-MORE(50)-` | スクロール表示、最後の行が表示されてから追加された行数を含む。 -|======================================== +|=== 入力 ('input') バーは以下の初期値を持っています: [width="100%",cols="^3,^6,8",options="header"] -|======================================== +|=== | アイテム | 例 | 説明 | input_paste | `[Paste 7 lines ? [ctrl-Y] Yes [ctrl-N] No]` | 行をペーストする場合にユーザへ行われる質問 // TRANSLATION MISSING @@ -517,10 +517,10 @@ WeeChat を起動したターミナルの例: | away | `(away)` | 離席状態表示 | input_search | `[Search (~ str,msg)]` | 検索インジケータ ("`~`": 大文字小文字を区別しない、"`==`": 大文字小文字を区別する、"`str`": 検索文字列、"`regex`": 検索正規表現、"`msg`": メッセージ部分から検索、"`pre`": プレフィックス部分から検索、"`pre\|msg`": プレフィックス部分とメッセージ部分から検索) | input_text | `hi peter!` | 入力テキスト -|======================================== +|=== [[buffers_and_windows]] -=== バッファとウィンドウ === +=== バッファとウィンドウ 'バッファ' は番号、名前、表示された行 (とその他の情報) で構成されています。 @@ -541,7 +541,7 @@ WeeChat を起動したターミナルの例: 水平方向分割の例 (`/window splith`): // TRANSLATION MISSING -........................................ +.... ▼ window #2 (buffer #4) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #abc │ @@ -569,12 +569,12 @@ WeeChat を起動したターミナルの例: │[@Flashy] hi peter!█ │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) -........................................ +.... 垂直方向分割の例 (`/window splitv`): // TRANSLATION MISSING -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #abc │ │12:54:15 peter | hey! │@Flashy│12:55:12 Max | hi │@Flashy│ @@ -598,12 +598,12 @@ WeeChat を起動したターミナルの例: │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... 垂直方向 + 水平方向分割の例: // TRANSLATION MISSING -........................................ +.... ▼ window #3 (buffer #5) ┌───────────────────────────────────────────────────────────────────────────┐ │Welcome to #test │Welcome to #def │ @@ -631,10 +631,10 @@ WeeChat を起動したターミナルの例: │[@Flashy] hi peter!█ │[@Flashy] │ └───────────────────────────────────────────────────────────────────────────┘ ▲ window #1 (buffer #3) ▲ window #2 (buffer #4) -........................................ +.... [[bars]] -=== バー === +=== バー 'バー' とは任意のテキストを含めることができるチャットエリア以外の場所です。 @@ -644,7 +644,7 @@ WeeChat を起動したターミナルの例: バーオプションのリスト: [width="100%",cols="2m,2,10",options="header"] -|======================================== +|=== | オプション名 | 値 | 説明 | type | `root`、`window` | @@ -708,10 +708,10 @@ WeeChat を起動したターミナルの例: | conditions | 文字列 | バーを表示する状態 (詳細は<<bar_conditions,状態>>を参照)。 -|======================================== +|=== [[bar_items]] -==== アイテム ==== +==== アイテム 'items' オプションはバーアイテムをコンマ (画面上のアイテム同士に間隔を空ける) または "+" (間隔を空けない) で区切った文字列。 @@ -724,11 +724,11 @@ WeeChat を起動したターミナルの例: アイテムを含むバーの例 "[time],buffer_number+:+buffer_plugin+.+buffer_name": -........................................ +.... ┌───────────────────────────────────────────────────────────────────────────┐ │[12:55] 3:irc/freenode.#weechat │ └───────────────────────────────────────────────────────────────────────────┘ -........................................ +.... 特殊構文を使うことで、バーアイテム: "@buffer:item" ("buffer" はバッファの完全な名前、"item" はバーアイテムの名前) @@ -740,12 +740,12 @@ WeeChat を起動したターミナルの例: 例: bitlbee のニックネームリストをルートバーに表示させる (バーが 'bitlist' で bitlbee サーバが 'bitlbee' の場合): ----------------------------------------- +---- /set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist" ----------------------------------------- +---- [[bar_filling]] -==== フィリング ==== +==== フィリング フィリングタイプには 4 つの種類があります: @@ -764,7 +764,7 @@ WeeChat を起動したターミナルの例: 'nicklist' バーに対するフィリングの例: -........................................ +.... ┌──────────────────────────────────────────────────┐ │Welcome to #test, this is a test channel │ │12:54:15 peter | hey! │@carl │ @@ -818,10 +818,10 @@ WeeChat を起動したターミナルの例: │───────────────────────────────────────────────────────────────────────│ │ │ filling_top_bottom = columns_horizontal ▲ -........................................ +.... [[bar_conditions]] -==== 状態 ==== +==== 状態 'conditions' オプションはバーをウィンドウ内に表示するか否かを評価する文字列です (このオプションは 'window' 型のバーだけに有効です)。 @@ -848,19 +848,19 @@ WeeChat を起動したターミナルの例: ニックネームリストを持ち、ウィンドウ幅が 100 より大きい全てのバッファにニックネームリストバーを表示する例: ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && ${window.win_width} > 100" ----------------------------------------- +---- 上と同じだが、'&bitlbee' バッファでは常にニックネームリストを表示 (ウィンドウ幅が狭くても): ----------------------------------------- +---- /set weechat.bar.nicklist.conditions "${nicklist} && (${window.win_width} > 100 || ${buffer.full_name} == irc.bitlbee.&bitlbee)" ----------------------------------------- +---- [[notify_levels]] -=== 通知レベル === +=== 通知レベル バッファに表示された各メッセージには 4 つのレベルが設定されています。レベルの低いものから順に: @@ -877,43 +877,43 @@ WeeChat を起動したターミナルの例: デフォルトは 'all' です。 [width="50%",cols="3m,10",options="header"] -|======================================== +|=== | 通知レベル | ホットリストに追加されるメッセージのレベル | none | (無効) | highlight | 'highlight' + 'private' | message | 'highlight' + 'private' + 'message' | all | 'highlight' + 'private' + 'message' + 'low' -|======================================== +|=== 通知レベルはバッファグループに対して設定することも可能で、例えば irc サーバ "freenode" に含まれる全てのバッファに対して設定する場合: ----------------------------------------- +---- /set weechat.notify.irc.freenode message ----------------------------------------- +---- "#weechat" チャンネルだけに対して、通知レベルを 'highlight' に設定する場合: ----------------------------------------- +---- /set weechat.notify.irc.freenode.#weechat highlight ----------------------------------------- +---- `/buffer` コマンドで、あるバッファに対する通知レベルを設定できます: ----------------------------------------- +---- /buffer notify highlight ----------------------------------------- +---- [[key_bindings]] -=== デフォルトのキー割り当て === +=== デフォルトのキー割り当て // 'C-' = ctrl, 'A-' = alt, 'S-' = shift [[key_bindings_command_line]] -==== コマンドライン用のキー ==== +==== コマンドライン用のキー [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | キー | 説明 | コマンド | @k(←) .2+| コマンドラインで前の文字に移動 .2+| `/input move_previous_char` | @k(C-)@k(b) @@ -958,13 +958,13 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定 | @k(A-)@k(k) | キー入力を奪って、コマンドラインにコード (キーが割り当てられていればコマンド) を入力 | `/input grab_key_command` | @k(A-)@k(r) | コマンドラインへの入力をすべて削除 | `/input delete_line` | @k(A-)@k(s) | aspell の有効無効を切り替え | `/mute aspell toggle` -|======================================== +|=== [[key_bindings_buffers_windows]] -==== バッファ / ウィンドウ用のキー ==== +==== バッファ / ウィンドウ用のキー [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | キー | 説明 | コマンド | @k(C-)@k(l) | 全ウィンドウを再描画 | `/window refresh` | @k(C-)@k(s) , @k(C-)@k(u) | すべてのバッファに未読マークをセット | `/input set_unread` @@ -1014,16 +1014,16 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定 | @k(A-)@k(>) | バッファ訪問履歴で次のバッファに移動 | `/input jump_next_visited_buffer` | @k(A-)@k(/) | 最後に表示したバッファに移動 (バッファ移動前に表示していたウィンドウ) | `/input jump_last_buffer_displayed` | @k(A-)@k(=) | フィルタの有効無効を切り替え | `/filter toggle` -|======================================== +|=== [[key_bindings_search_context]] -==== "検索" モード用のキー ==== +==== "検索" モード用のキー 以下のキーは "検索" モード (バッファ内のテキスト検索用に @k(C-)@k(r) が押された状態) でのみ有効です。 [width="100%",cols="^.^3,.^10,.^5",options="header"] -|======================================== +|=== | キー | 説明 | コマンド | @k(C-)@k(r) | 検索タイプを切り替え: 文字列 (デフォルト)、正規表現 | `/input search_switch_regex` | @k(A-)@k(c) | 大文字小文字を区別して検索 | `/input search_switch_case` @@ -1033,15 +1033,15 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定 | @k(Enter) .3+| 検索を終了 .3+| `/input search_stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_cursor_context]] -==== "カーソル" モード用のキー ==== +==== "カーソル" モード用のキー 以下のキーは "カーソル" モード (スクリーン上でカーソルを自由に動かせる状態) でのみ有効です。 [width="100%",cols="^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | キー | エリア | 説明 | コマンド | @k(↑) | - | カーソルを上の行に移動 | `/cursor move up` | @k(↓) | - | カーソルを下の行に移動 | `/cursor move down` @@ -1062,15 +1062,15 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定 | @k(Enter) .3+| - .3+| カーソルモードを終了 .3+| `/cursor stop` | @k(C-)@k(j) | @k(C-)@k(m) -|======================================== +|=== [[key_bindings_mouse_context]] -==== "マウス" モード用のキー ==== +==== "マウス" モード用のキー 以下のキーは "マウス" モード (マウスイベントが発生したとき) でのみ有効です。 [width="100%",cols="^.^3,^.^3,^.^3,.^10,.^8",options="header"] -|======================================== +|=== | ボタン^(1)^ | ジェスチャー| エリア| 説明 | コマンド | ◾◽◽ | - | チャット | ウィンドウに移動 | `/window ${_window_number}` | ◾◽◽ | 左 | チャット | 前のバッファに移動 | `/window ${_window_number};/buffer +1` @@ -1098,38 +1098,38 @@ irc サーバ "freenode" に含まれる全てのバッファに対して設定 | ⇑ | - | 任意のバー | バーを -20% スクロール | `/bar scroll ${_bar_name} ${_window_number} -20%` | ⇓ | - | 任意のバー | バーを +20% スクロール | `/bar scroll ${_bar_name} ${_window_number} +20%` | ◽◾◽ | - | 任意の場所 | この場所でカーソルモードを開始 | `/cursor go ${_x},${_y}` -|======================================== +|=== [NOTE] ^(1)^ "⇑" と "⇓" はホイールの上方向回転と下方向回転に対応します。 [[mouse]] -=== マウスサポート === +=== マウスサポート WeeChat はマウスクリックとマウスジェスチャーをサポートしています。 ローカル端末と screen/tmux の有無にかかわらず ssh 接続経由で利用可能です。 [[mouse_enable]] -==== マウスの有効化 ==== +==== マウスの有効化 起動時にマウスを有効化するには: ----------------------------------------- +---- /set weechat.look.mouse on ----------------------------------------- +---- マウスを有効化するには @k(A-)@k(m) を押すか、以下のコマンドを使います: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- キーにマウスの一時的な無効化を割り当てることができます。 例えば、 @k(A-)@k(x) キーにマウスを 10 秒間無効化する機能を割り当てるには: ----------------------------------------- +---- /key bind meta-x /mouse toggle 10 ----------------------------------------- +---- WeeChat でマウスが有効化されている場合、@k(-S-) 修飾キーで選択やクリックができます。これでマウスが無効化されている場合と同じ作業が行えます @@ -1139,7 +1139,7 @@ WeeChat でマウスが有効化されている場合、@k(-S-) マウスに関するトラブルがあれば 'WeeChat FAQ' を参照してください。 [[mouse_bind_events]] -==== コマンドに対してマウスイベントを割り当てる ==== +==== コマンドに対してマウスイベントを割り当てる WeeChat はデフォルトマウスイベントの多くを定義しています (<<key_bindings_mouse_context,"マウス" モード用のキー>>を参照)。 @@ -1153,17 +1153,17 @@ WeeChat はデフォルトマウスイベントの多くを定義しています 修飾キーリスト: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | 修飾キー | 説明 | ctrl | @k(-C-) キー | alt | @k(-A-) キー | ctrl-alt | @k(-C-) と @k(-A-) キー -|======================================== +|=== ボタン/ホイールのリスト: [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | ボタン/ホイール | 説明 | button1 | 左ボタンクリック | button2 | 右ボタンクリック @@ -1171,12 +1171,12 @@ WeeChat はデフォルトマウスイベントの多くを定義しています | button4 ... button9 | その他のボタンクリック | wheelup | ホイール (上方向) | wheeldown | ホイール (下方向) -|======================================== +|=== ジェスチャーのリスト (ボタンのみ対応、ホイール未対応): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | ジェスチャー | 距離 | gesture-up | 3 ... 19 | gesture-up-long | ≥ 20 @@ -1186,16 +1186,16 @@ WeeChat はデフォルトマウスイベントの多くを定義しています | gesture-left-long | ≥ 40 | gesture-right | 3 ... 39 | gesture-right-long | ≥ 40 -|======================================== +|=== 未完了イベントのリスト (ボタンのみ、プラグイン/スクリプトで便利): [width="50%",cols="3m,4",options="header"] -|======================================== +|=== | イベント | 説明 | event-down | マウスボタンが押され、離されていない状態 | event-drag | マウスボタンが押された状態でマウスが動かされた -|======================================== +|=== イベントの表記例: @@ -1219,37 +1219,37 @@ WeeChat はデフォルトマウスイベントの多くを定義しています これにより対応するイベントを確認できます。 [[command_line]] -=== コマンドライン === +=== コマンドライン WeeChat コマンドライン (ウィンドウの一番下にあります) はコマンドの実行やバッファにテキストを送信するために利用します。 [[command_line_syntax]] -==== 文法 ==== +==== 文法 コマンドは "/" 文字で始まり、コマンドの名前を続けます。 例えば、すべてのオプションを表示するには: ----------------------------------------- +---- /set ----------------------------------------- +---- "/" が最初に無い場合、そのテキストはバッファに送信されます。例えば、'hello' というテキストをバッファに送信するには: ----------------------------------------- +---- hello ----------------------------------------- +---- "/" 文字から始まるテキストを送信したい場合、は 2 重に "/" をつけます。例えば、'/set' というテキストを現在のバッファに送信するには: ----------------------------------------- +---- //set ----------------------------------------- +---- [[command_line_colors]] -=== 色コード === +=== 色コード IRC 等のプラグインでは、以下の色コードと属性を利用できます (@k(C-)@k(c) の後に、オプションとともに以下のキーを押してください): @@ -1283,7 +1283,7 @@ IRC 等のプラグインでは、以下の色コードと属性を利用でき @k(C-)@k(c) , @k(c) 用の色コード: [width="50%",cols="^1m,3,3",options="header"] -|======================================== +|=== | コード | IRC | WeeChat (curses) | 00 | 白 | white | 01 | 黒 | black @@ -1301,21 +1301,21 @@ IRC 等のプラグインでは、以下の色コードと属性を利用でき | 13 | 明るい赤紫色 | lightmagenta | 14 | 灰色 | gray | 15 | 明るい灰色 | white -|======================================== +|=== 例: "こんにちは皆さん!" の "こんにちは" を太字の明るい青、"皆さん" を下線付きの明るい赤に表示したい場合: ----------------------------------------- +---- ^Cc12^Cbこんにちは^Cb^Cc04^Cu皆さん^Cu^Cc! ----------------------------------------- +---- [NOTE] irc プラグインでは、<<option_irc.color.mirc_remap,irc.color.mirc_remap>> を使ってこれらの色を別の色に対応付けることができます。 [[colors]] -=== 色 === +=== 色 WeeChat ではバーやチャットエリアにおけるテキスト表示に 256 個の色ペアを利用できます (この機能を利用するには WeeChat が実行されているターミナルが 256 色表示に対応している必要があります)。 @@ -1324,13 +1324,13 @@ WeeChat ではバーやチャットエリアにおけるテキスト表示に 25 で利用できる色と色ペアに以下の制限があります: [width="50%",cols="8,>2,>2",options="header"] -|======================================== +|=== | $TERM | 色 | ペア ^(1)^ | "rxvt-unicode", "xterm",... | 88 | 256 | "rxvt-256color", "xterm-256color",... | 256 | 32767 | "screen" | 8 | 64 | "screen-256color" | 256 | 32767 -|======================================== +|=== [NOTE] ^(1)^ 端末が 256 ペア以上の表示をサポートしていても、WeeChat @@ -1350,25 +1350,25 @@ WeeChat ではバーやチャットエリアにおけるテキスト表示に 25 screen を使っている場合、'~/.screenrc' に以下の内容を追加してください: ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- 'TERM' 環境変数に間違った値が設定された状態で WeeChat を起動しても、あわてないでください! 'shell.py' スクリプトを使えば WeeChat を再起動せずに環境変数の値を変更できます。 ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- [[colors_basic]] -==== 基本色 ==== +==== 基本色 WeeChat における基本色とは: [width="50%",cols="^3m,8",options="header"] -|======================================== +|=== | 名前 | 色 | default | デフォルトの端末色 (背景色を透過色とする) | black | 黒 @@ -1387,10 +1387,10 @@ WeeChat における基本色とは: | lightcyan | 明るい青緑色 | gray | 灰色 | white | 白 -|======================================== +|=== [[colors_extended]] -==== 拡張色 ==== +==== 拡張色 WeeChat はスクリーンに色が表示された時点で色ペアを動的に割り当てます (バッファとバーを表示する時点で)。 @@ -1403,31 +1403,31 @@ WeeChat はスクリーンに色が表示された時点で色ペアを動的に 例えば、バッファ中のに表示される時刻をオレンジ色にしたい場合、以下のようにしてください: ----------------------------------------- +---- /set weechat.color.chat_time 214 ----------------------------------------- +---- ステータスバーの色を非常に暗い緑色にしたい場合: ----------------------------------------- +---- /set weechat.bar.status.color_bg 22 ----------------------------------------- +---- [[colors_aliases]] -==== 別名 ==== +==== 別名 `/color alias` コマンドを使えば色の別名を追加できます。 追加後は任意の色関連オプションで別名を使えます。 例: ----------------------------------------- +---- /color alias 214 orange /set weechat.color.chat_delimiters orange ----------------------------------------- +---- [[colors_attributes]] -==== 属性 ==== +==== 属性 色に対していくつかの属性を付加することができます。1 つ以上の属性を色名又は色番号の前に付加できます: @@ -1442,51 +1442,51 @@ WeeChat はスクリーンに色が表示された時点で色ペアを動的に 例えば、自分自身のニックネームの表示色を白にして、下線を引きたい場合: ----------------------------------------- +---- /set weechat.color.chat_nick_self _white ----------------------------------------- +---- ステータスバーの時刻の表示色を橙色にして、下線を引いて、太字にしたい場合: ----------------------------------------- +---- /set weechat.color.status_time *_214 ----------------------------------------- +---- デフォルト端末色 (-1) に対して属性を設定したい場合、端末色番号の最大値よりも大きな値を利用してください。 例えば、WeeChat における色番号の最大値は 99999 です。 端末の表示色に太字の属性を付加する例: ----------------------------------------- +---- /set weechat.color.status_time *99999 ----------------------------------------- +---- [[options_and_commands]] -=== オプションとコマンド === +=== オプションとコマンド [[sec_options]] -==== 保護データのオプション (sec.conf) ==== +==== 保護データのオプション (sec.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | crypt | /set sec.crypt.* | 暗号化に関するオプション | data | <<command_weechat_secure,/secure>> | 保護データ -|======================================== +|=== オプション: include::autogen/user/sec_options.txt[] [[weechat_options]] -==== WeeChat オプション (weechat.conf) ==== +==== WeeChat オプション (weechat.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | debug | <<command_weechat_debug,/debug set>> + /set weechat.debug.* | core とプラグインのデバッグレベル (オプションをセクションに追加/削除出来ます) @@ -1509,19 +1509,19 @@ include::autogen/user/sec_options.txt[] | key_search | <<command_weechat_key,/key>> | 検索コンテキストのキー | key_cursor | <<command_weechat_key,/key>> | カーソルコンテキストのキー | key_mouse | <<command_weechat_key,/key>> | マウスコンテキストのキー -|======================================== +|=== オプション: include::autogen/user/weechat_options.txt[] [[weechat_commands]] -==== WeeChat コマンド ==== +==== WeeChat コマンド include::autogen/user/weechat_commands.txt[] [[plugins]] -== プラグイン == +== プラグイン プラグインとは動的ライブラリのことで、C 言語で書かれてコンパイルされています。 プラグインは WeeChat によって読み込まれます。 @@ -1542,16 +1542,16 @@ GNU/Linux の場合、プラグインファイルは ".so" という拡張子を プラグインをロード、アンロード、ロード済みプラグインを表示する例: ----------------------------------------- +---- /plugin load irc /plugin unload irc /plugin list ----------------------------------------- +---- デフォルトプラグインのリスト: [width="50%",cols="^1,5",options="header"] -|======================================== +|=== | プラグイン | 説明 | alias | コマンドの別名を定義 | aspell | コマンドラインのスペルチェック @@ -1569,54 +1569,54 @@ GNU/Linux の場合、プラグインファイルは ".so" という拡張子を | tcl | Tcl スクリプト API | guile | Guile (scheme) スクリプト API | xfer | ファイル転送とダイレクトチャット -|======================================== +|=== API を使ったプラグインやスクリプトの開発についてより詳しく学ぶには、'WeeChat プラグイン API リファレンス' 又は 'WeeChat スクリプト製作ガイド' を参照してください。 [[alias_plugin]] -=== Alias プラグイン === +=== Alias プラグイン Alias プラグインを使うことで、コマンドの別名を定義できます (WeeChat だけでなく他のプラグインが提供するコマンドの別名を定義することもできます)。 [[alias_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/alias_commands.txt[] [[aspell_plugin]] -=== Aspell プラグイン === +=== Aspell プラグイン Aspell プラグインを使うことで、コマンドラインに入力した文字列のスペルチェックができます。 バッファごとに異なる言語に対するスペルチェックを実行できます。 [[aspell_options]] -==== オプション (aspell.conf) ==== +==== オプション (aspell.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | color | /set aspell.color.* | 色 | check | /set aspell.check.* | スペルチェックの操作コマンド | dict | <<command_aspell_aspell,/aspell setdict>> + /set aspell.dict.* | バッファが利用するディレクトリ (オプションをセクションに追加/削除出来ます) | option | /set aspell.option.* | <<aspell_speller_options,Speller オプション>> (オプションをセクションに追加/削除出来ます) -|======================================== +|=== オプション: include::autogen/user/aspell_options.txt[] [[aspell_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/aspell_commands.txt[] [[aspell_speller_options]] -==== Speller オプション ==== +==== Speller オプション Speller オプションは aspell 設定の "option" セクションにあるオプションを追加して定義します。 @@ -1624,18 +1624,18 @@ Speller オプションは aspell 設定の "option" ここで利用するオプション名は aspell 設定オプションと同じものです。 オプションのリストはシェルで以下のコマンドを実行することで確認できます: ----------------------------------------- +---- $ aspell config ----------------------------------------- +---- 例えば、"ignore-case" オプションを有効化するには: ----------------------------------------- +---- /set aspell.option.ignore-case "true" ----------------------------------------- +---- [[aspell_suggestions]] -==== 修正候補 ==== +==== 修正候補 "aspell_suggest" バーアイテム内に修正候補が表示されます。修正候補の数は 'aspell.check.suggestions' オプションで設定します。 @@ -1645,22 +1645,22 @@ $ aspell config 英語辞書 (`en`) を用いた修正候補の例: -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... 英語とフランス語辞書 (`en,fr`) を用いた修正候補の例: -........................................ +.... │[12:55] [6] [irc/freenode] 3:#test(+n){4} [print,prone,prune/prime,primer,primé] │ │[@Flashy] prinr █ │ └─────────────────────────────────────────────────────────────────────────────────┘ -........................................ +.... [[charset_plugin]] -=== Charset プラグイン === +=== Charset プラグイン Charset プラグインを使うことで、文字コードに従ってデータのデコードとエンコードができます。 @@ -1673,15 +1673,15 @@ Charset プラグインを使うことで、文字コードに従ってデータ Charset プラグインは WeeChat によって自動的にロードされるべきです。 プラグインがロードされていることを確認するには、以下のようにしてください: ----------------------------------------- +---- /charset ----------------------------------------- +---- コマンドが見つからない場合、以下のコマンドでプラグインをロードしてください: ----------------------------------------- +---- /plugin load charset ----------------------------------------- +---- プラグインが見つからない場合、文字コードサポートを有効化した状態で WeeChat を再コンパイルしてください。 @@ -1691,45 +1691,45 @@ Charset プラグインがロードされた場合、端末文字コードと内 例: -........................................ +.... charset: terminal: ISO-8859-15, internal: UTF-8 -........................................ +.... [[charset_options]] -==== オプション (charset.conf) ==== +==== オプション (charset.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | default | /set charset.default.* | デフォルトのデコード/エンコード文字セット | decode | <<command_charset_charset,/charset decode>> + /set charset.decode.* | バッファのデコード文字セット (オプションをセクションに追加/削除出来ます) | encode | <<command_charset_charset,/charset encode>> + /set charset.encode.* | バッファのエンコード文字セット (オプションをセクションに追加/削除出来ます) -|======================================== +|=== オプション: include::autogen/user/charset_options.txt[] [[charset_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/charset_commands.txt[] [[charset_set]] -==== 文字コードの設定 ==== +==== 文字コードの設定 グローバルデコード文字コードとエンコード文字コードを設定するには、`/set` コマンドを使ってください。 例: ----------------------------------------- +---- /set charset.default.decode ISO-8859-15 /set charset.default.encode ISO-8859-15 ----------------------------------------- +---- グローバルデコード文字コードが設定されていない場合 (例えば Charset プラグインを始めてロードした場合)、これは自動的に端末の文字コードか @@ -1743,33 +1743,33 @@ IRC サーバの文字コードを設定するには、サーババッファで 例: ----------------------------------------- +---- /charset ISO-8859-15 ----------------------------------------- +---- これは以下と等価です: ----------------------------------------- +---- /charset decode ISO-8859-15 /charset encode ISO-8859-15 ----------------------------------------- +---- IRC チャンネル (またはプライベートメッセージ) の文字コードを設定するには、 サーバの文字コード設定と同様のコマンドをチャンネル (またはプライベートメッセージ) バッファで使ってください。 すべての文字コード設定を確認するには、以下のコマンドを利用してください: ----------------------------------------- +---- /set charset.* ----------------------------------------- +---- [[charset_troubleshooting]] -==== トラブルシューティング ==== +==== トラブルシューティング 文字コードに関する問題があれば、'WeeChat FAQ' を参照してください。 [[fifo_plugin]] -=== Fifo プラグイン === +=== Fifo プラグイン 外部から WeeChat を操作するには、FIFO パイプにコマンドやテキストを書き込んでください ("plugins.var.fifo.fifo" オプションが有効化されている必要がありますが、デフォルトで有効化されているはずです)。 @@ -1779,43 +1779,43 @@ FIFO パイプは '~/.weechat/' の下にあり、'weechat_fifo_xxxx' FIFO パイプに書き込むコマンド/テキストの文法は以下の例の一つです: -........................................ +.... plugin.buffer *テキストまたはコマンド *テキストまたはコマンド -........................................ +.... 例: * IRC サーバ freenode のニックネームを "newnick" に変更する: ----------------------------------------- +---- $ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * IRC の #weechat チャンネルに対してテキストを送信: ----------------------------------------- +---- $ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * 現在のバッファに対してテキストを送信: ----------------------------------------- +---- $ echo '*hello!' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- * Python スクリプトのアンロードとロードを行う 2 つのコマンドを送信 (複数のコマンドは "\n" で分割してください): ----------------------------------------- +---- $ echo -e '*/python unload\n*/python autoload' >~/.weechat/weechat_fifo_12345 ----------------------------------------- +---- 実行中の WeeChat すべてに対してコマンドを送信するスクリプトは以下のように書けます。例えば: [source,shell] ----------------------------------------- +---- #!/bin/sh if [ $# -eq 1 ]; then for fifo in ~/.weechat/weechat_fifo_* @@ -1823,16 +1823,16 @@ if [ $# -eq 1 ]; then echo -e "$1" >$fifo done fi ----------------------------------------- +---- このスクリプトを "auto_weechat_command" というファイル名で保存した場合、以下のように実行できます: ----------------------------------------- +---- $ ./auto_weechat_command 'irc.freenode.#weechat *hello' ----------------------------------------- +---- [[irc_plugin]] -=== IRC プラグイン === +=== IRC プラグイン IRC プラグインは IRC プロトコルに従って他の人と会話を行うために設計されています。 @@ -1840,28 +1840,28 @@ IRC プラグインは IRC プロトコルに従って他の人と会話を行 <<xfer_plugin,Xfer プラグイン>> を参照) を含む全ての IRC コマンドをサポートしています。 [[irc_command_line_options]] -==== コマンドラインオプション ==== +==== コマンドラインオプション 以下のように 1 つ以上の IRC サーバに対応する URL を引数として与えることができます: ----------------------------------------- +---- irc[6][s]://[nick[:password]@]irc.example.org[:port][/channel][,channel[...]] ----------------------------------------- +---- 'nono' というニックネームを使って 'irc.freenode.net' ホストのデフォルトポート (6667) で稼働中の IRC サーバ上の '#weechat' と '#toto' チャンネルに参加する例: ----------------------------------------- +---- $ weechat irc://nono@irc.freenode.net/#weechat,#toto ----------------------------------------- +---- [[irc_options]] -==== オプション (irc.conf) ==== +==== オプション (irc.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set irc.look.* | 外観 | color | /set irc.color.* | 色 @@ -1872,19 +1872,19 @@ $ weechat irc://nono@irc.freenode.net/#weechat,#toto | server_default | /set irc.server_default.* | サーバに対するデフォルト値 (サーバオプションが定義されていない場合に利用されます) | server | <<command_irc_server,/server>> + /set irc.server.* | サーバ -|======================================== +|=== オプション: include::autogen/user/irc_options.txt[] [[irc_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/irc_commands.txt[] [[irc_ssl_certificates]] -==== SSL 証明書 ==== +==== SSL 証明書 SSL を使って IRC サーバに接続する場合、WeeChat はデフォルトで接続が完全に信頼できるものかどうかを確認します。 @@ -1910,46 +1910,46 @@ irc.server.xxx.ssl_verify:: より前のバージョンでは信頼性の確認に成功していたものが失敗する場合もあります。 [[irc_connect_oftc_with_certificate]] -===== 最初の例: oftc に接続して、証明書を確認 ===== +===== 最初の例: oftc に接続して、証明書を確認 * シェルを使って証明書をインポート: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ wget -O ~/.weechat/ssl/CAs.pem http://www.spi-inc.org/ca/spi-cacert.crt ----------------------------------------- +---- 注意: CAs.pem ファイル中で複数の証明書を連結することもできます。 * WeeChat で "oftc" サーバがすでに設定済みであれば: ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [[irc_connect_oftc_with_certfp]] -===== 2 番目の例: CertFP を使って oftc に接続 ===== +===== 2 番目の例: CertFP を使って oftc に接続 * シェルで証明書を作成: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout nick.pem -x509 -days 365 -out nick.pem ----------------------------------------- +---- * WeeChat で "oftc" サーバがすでに設定済みであれば: ----------------------------------------- +---- /set irc.server.oftc.ssl_cert "%h/ssl/nick.pem" /connect oftc /msg nickserv cert add ----------------------------------------- +---- より詳しい情報は http://www.oftc.net/oftc/NickServ/CertFP を確認してください。 [[irc_sasl_authentication]] -==== SASL 認証 ==== +==== SASL 認証 WeeChat は SASL 認証をサポートします、以下の認証メカニズムを利用できます: @@ -1967,16 +1967,16 @@ WeeChat は SASL 認証をサポートします、以下の認証メカニズム "dh-blowfish" メカニズムをデフォルトで全てのサーバに対して利用する場合: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish ----------------------------------------- +---- [NOTE] "dh-blowfish" メカニズムを利用する場合、"gcrypt" ライブラリが WeeChat のコンパイル時に必要です (<<dependencies,依存関係>> を参照)。 [[irc_tor_freenode]] -==== TOR/SASL を使って Freenode に接続する場合 ==== +==== TOR/SASL を使って Freenode に接続する場合 SSL に加えて、Freenode サーバは TOR (https://www.torproject.org/) 経由の接続をサポートしています。TOR とはバーチャルトンネルのネットワークで、 @@ -1988,47 +1988,47 @@ SSL に加えて、Freenode サーバは TOR (https://www.torproject.org/) 最初に、TOR をインストールしてください。Debian (とその派生ディストリビューション) の場合: ----------------------------------------- +---- $ sudo apt-get install tor ----------------------------------------- +---- WeeChat で TOR サービスを使った socks5 プロキシを作成してください (ホスト名/IP アドレス、ポート番号は TOR の設定に依存します): ----------------------------------------- +---- /proxy add tor socks5 127.0.0.1 9050 ----------------------------------------- +---- 次に新しいサーバを作成してください。例えば: ----------------------------------------- +---- /server add freenode-tor p4fsi4ockecnea7l.onion ----------------------------------------- +---- TOR プロキシを設定: ----------------------------------------- +---- /set irc.server.freenode-tor.proxy "tor" ----------------------------------------- +---- SASL 認証を設定: ----------------------------------------- +---- /set irc.server.freenode-tor.sasl_mechanism dh-blowfish /set irc.server.freenode-tor.sasl_username "your_nickname" /set irc.server.freenode-tor.sasl_password "your_password" ----------------------------------------- +---- 最後に、サーバに接続してください: ----------------------------------------- +---- /connect freenode-tor ----------------------------------------- +---- Freenode と TOR に関するより詳しい情報: http://freenode.net/irc_servers.shtml#tor [[irc_smart_filter_join_part_quit]] -==== 参加/退出/終了メッセージに対するスマートフィルタ ==== +==== 参加/退出/終了メッセージに対するスマートフィルタ チャンネル内での発言が過去 X 分間なかった場合に参加/退出/終了メッセージをフィルタリングするスマートフィルタが利用できます。 @@ -2036,78 +2036,78 @@ Freenode と TOR に関するより詳しい情報: http://freenode.net/irc_serv スマートフィルタはデフォルトで有効化されていますが、 バッファ内のメッセージを隠すにはフィルタを追加する必要があります。例えば: ----------------------------------------- +---- /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- 特定のチャンネルのみ、またはある名前で始まるチャンネルに対してフィルタを作成することもできます。 (`/help filter` を参照): ----------------------------------------- +---- /filter add irc_smart_weechat irc.freenode.#weechat irc_smart_filter * /filter add irc_smart_weechats irc.freenode.#weechat* irc_smart_filter * ----------------------------------------- +---- 以下のコマンドで参加メッセージだけ、又は退出/終了メッセージだけを隠すこともできます: ----------------------------------------- +---- /set irc.look.smart_filter_join on /set irc.look.smart_filter_quit on ----------------------------------------- +---- 遅延時間 (分単位) を設定することもできます: ----------------------------------------- +---- /set irc.look.smart_filter_delay 5 ----------------------------------------- +---- 過去 5 分間あるニックネームからの発言が無かった場合、 このニックネームに対する参加または退出/終了メッセージがチャンネルから隠されます。 [[irc_ctcp_replies]] -==== CTCP 応答 ==== +==== CTCP 応答 CTCP 応答をカスタマイズしたり、いくつかの CTCP 要求をブロック (無応答) することができます。 例えば、CTCP "VERSION" 要求に対する応答をカスタマイズするには、以下のコマンドを使ってください: ----------------------------------------- +---- /set irc.ctcp.version "I'm running WeeChat $version, it rocks!" ----------------------------------------- +---- CTCP "VERSION" 要求をブロックする (要求に対する応答を行わない) には、空文字列を設定してください: ----------------------------------------- +---- /set irc.ctcp.version "" ----------------------------------------- +---- 未定義の CTCP 要求に対する応答もカスタマイズできます。例えば CTCP "BLABLA" 要求に対する応答を以下のように設定できます: ----------------------------------------- +---- /set irc.ctcp.blabla "This is my answer to CTCP BLABLA" ----------------------------------------- +---- 特定のサーバに対して CTCP 応答をカスタマイズするには、CTCP 名の前に内部サーバ名をつけてください: ----------------------------------------- +---- /set irc.ctcp.freenode.version "WeeChat $version (for freenode)" ----------------------------------------- +---- 標準の CTCP 応答を復元するには、オプションを削除してください: ----------------------------------------- +---- /unset irc.ctcp.version ----------------------------------------- +---- 以下のコードを設定値に含めることが可能です。これらのコードは CTCP 応答時に自動的に WeeChat によって展開されます: [width="100%",cols="^2l,4,8",options="header"] -|======================================== +|=== | コード | 説明 | 値/例 | $clientinfo | サポートしている CTCP オプションのリスト | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | $version | WeeChat バージョン | `0.4.0-dev` @@ -2120,7 +2120,7 @@ CTCP 応答時に自動的に WeeChat によって展開されます: | $time | 現在の日時 | `Sun, 16 Dec 2012 10:40:48 +0100` | $username | IRC サーバのユーザネーム | `ログイン名` | $realname | IRC サーバのリアルネーム | `John Doe` -|======================================== +|=== [NOTE] ^(1)^ git バージョンとは `git describe` コマンドの出力です。git リポジトリで @@ -2129,7 +2129,7 @@ WeeChat をコンパイルし、git がインストールされている場合 CTCP オプションが設定されていない (デフォルトの) 場合、CTCP 応答は以下のようになります: [width="100%",cols="^2,4,8",options="header"] -|======================================== +|=== | CTCP | 応答フォーマット | 例 | CLIENTINFO | `$clientinfo` | `ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION` | FINGER | `WeeChat $versiongit` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4)` @@ -2137,10 +2137,10 @@ CTCP オプションが設定されていない (デフォルトの) 場合、CT | TIME | `$time` | `Sun, 16 Dec 2012 10:40:48 +0100` | USERINFO | `$username ($realname)` | `ログイン名 (John Doe)` | VERSION | `WeeChat $versiongit ($compilation)` | `WeeChat 0.4.0-dev (git: v0.3.9-104-g7eb5cc4) (Dec 16 2012)` -|======================================== +|=== [[irc_target_buffer]] -==== IRC メッセージのターゲットバッファ ==== +==== IRC メッセージのターゲットバッファ `irc.msgbuffer.*` オプションを使えば、IRC メッセージに対するターゲットバッファ (メッセージを表示するバッファ) をカスタマイズすることができます。 @@ -2166,7 +2166,7 @@ weechat:: カスタマイズできる一部の IRC メッセージ、別名のリストは以下です: [width="60%",cols="^1m,^3m,8",options="header"] -|======================================== +|=== | メッセージ | 別名 | 説明 | error | | エラー | invite | | チャンネルへの招待 @@ -2234,7 +2234,7 @@ weechat:: | 728 | quietlist | 発言禁止リスト | 729 | quietlist | 発言禁止リストの終了 | 901 | | ログインに成功 -|======================================== +|=== その他の数値コマンドも同様にカスタマイズできます。 @@ -2245,60 +2245,60 @@ weechat:: * `/whois` の結果をプライベートバッファに表示: ----------------------------------------- +---- /set irc.msgbuffer.whois private ----------------------------------------- +---- * whois に対する設定をデフォルトに戻す (サーババッファに表示): ----------------------------------------- +---- /unset irc.msgbuffer.whois ----------------------------------------- +---- * "freenode" サーバの場合、招待メッセージを現在のバッファに表示: ----------------------------------------- +---- /set irc.msgbuffer.freenode.invite current ----------------------------------------- +---- * "303" (ison) メッセージを WeeChat "core" バッファに表示: ----------------------------------------- +---- /set irc.msgbuffer.303 weechat ----------------------------------------- +---- [[logger_plugin]] -=== Logger プラグイン === +=== Logger プラグイン Logger プラグインを使うことで、バッファの内容をファイルに保存できます。 保存形式とその方法をオプションで設定できます。 [[logger_options]] -==== オプション (logger.conf) ==== +==== オプション (logger.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set logger.look.* | 外観 | color | /set logger.color.* | 色 | file | /set logger.file.* | ログファイルのオプション | level | /set logger.level.* | バッファのログレベル (オプションをセクションに追加/削除出来ます) | mask | /set logger.mask.* | バッファのファイル名マスク (オプションをセクションに追加/削除出来ます) -|======================================== +|=== オプション: include::autogen/user/logger_options.txt[] [[logger_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/logger_commands.txt[] [[logger_log_levels]] -==== ログレベル ==== +==== ログレベル ログ保存はそれぞれのバッファに対して設定されたログレベルに従って行われます。デフォルトのレベルは 9 (バッファに表示されたメッセージをすべて保存) です。 @@ -2322,64 +2322,64 @@ IRC プラグインに対しては以下のレベルが利用されます: * IRC チャンネル #weechat に対してレベル 3 を設定: ----------------------------------------- +---- /set logger.level.irc.freenode.#weechat 3 ----------------------------------------- +---- * freenode サーババッファに対してレベル 3 を設定: ----------------------------------------- +---- /set logger.level.irc.server.freenode 3 ----------------------------------------- +---- * freenode サーバの全てのチャンネルに対してレベル 3 を設定: ----------------------------------------- +---- /set logger.level.irc.freenode 3 ----------------------------------------- +---- * 全ての IRC バッファに対してレベル 2 を設定: ----------------------------------------- +---- /set logger.level.irc 2 ----------------------------------------- +---- [[logger_filenames_masks]] -==== ファイル名マスク ==== +==== ファイル名マスク バッファに対し個別にファイル名マスクを設定することができます、 ファイル名にはローカルバッファ変数が利用されます。現在のバッファに設定されたローカル変数を確認するには: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- 例えば "irc.freenode.#weechat" バッファの場合、WeeChat は以下の順番でオプションに設定されたファイル名マスクを検索します: ----------------------------------------- +---- logger.mask.irc.freenode.#weechat logger.mask.irc.freenode logger.mask.irc logger.file.mask ----------------------------------------- +---- 特定の IRC サーバ ("logger.mask.irc.freenode") またはプラグイン ("logger.mask.irc") のグループに対して共通のマスクを適用できます。 [[logger_files_by_date]] -===== ログファイルに日付を利用する ===== +===== ログファイルに日付を利用する ログファイルに日付を使うには、マスクに日時/時間指定子を利用できます (フォーマットに関しては `man strftime` を参照してください)。例えば: ----------------------------------------- +---- /set logger.file.mask "%Y/%m/$plugin.$name.weechatlog" ----------------------------------------- +---- 以下のファイルが作成されます: -........................................ +.... ~/.weechat/ |--- logs/ |--- 2010/ @@ -2390,20 +2390,20 @@ logger.file.mask |--- 12/ | irc.server.freenode.weechatlog | irc.freenode.#weechat.weechatlog -........................................ +.... [[logger_irc_files_by_server_channel]] -===== IRC ログファイルにサーバとチャンネル名を利用する ===== +===== IRC ログファイルにサーバとチャンネル名を利用する IRC サーバ名を使ったディレクトリに、チャンネル名を使ったファイルを作成する場合: ----------------------------------------- +---- /set logger.mask.irc "irc/$server/$channel.weechatlog" ----------------------------------------- +---- 以下のファイルが作成されます: -........................................ +.... ~/.weechat/ |--- logs/ |--- irc/ @@ -2415,10 +2415,10 @@ IRC サーバ名を使ったディレクトリに、チャンネル名を使っ | oftc.weechatlog | #chan1.weechatlog | #chan2.weechatlog -........................................ +.... [[relay_plugin]] -=== Relay プラグイン === +=== Relay プラグイン Relay プラグインはネットワークを介して異なるプロトコルを用いてデータを中継するために利用します: @@ -2428,12 +2428,12 @@ Relay プラグインはネットワークを介して異なるプロトコル (例えば QWeeChat) を使う場合に利用されるプロトコル [[relay_options]] -==== オプション (relay.conf) ==== +==== オプション (relay.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set relay.look.* | 外観 | color | /set relay.color.* | 色 @@ -2441,30 +2441,30 @@ Relay プラグインはネットワークを介して異なるプロトコル | irc | /set relay.irc.* | 特定の irc プロトコルのオプション (irc プロキシ) | port | <<command_relay_relay,/relay add>> + /set relay.port.* | リレーに使うポート(irc や weechat プロトコル) (オプションをセクションに追加/削除出来ます) -|======================================== +|=== オプション: include::autogen/user/relay_options.txt[] [[relay_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/relay_commands.txt[] [[relay_password]] -==== パスワード ==== +==== パスワード 以下のコマンドを利用して、リレー用のパスワードを設定することを強くお勧めします: ----------------------------------------- +---- /set relay.network.password "mypass" ----------------------------------------- +---- このパスワードは 'irc' と 'weechat' プロトコルで利用されます。 [[relay_ssl]] -==== SSL ==== +==== SSL 証明書と秘密鍵を作り、プロトコル名の最初に "ssl." を付けることで SSL 経由でリレーを利用することができます。 @@ -2474,21 +2474,21 @@ SSL 経由でリレーを利用することができます。 以下のコマンドを使って証明書と秘密鍵ファイルを作成します: ----------------------------------------- +---- $ mkdir -p ~/.weechat/ssl $ cd ~/.weechat/ssl $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----------------------------------------- +---- WeeChat が既に起動している場合、 以下のコマンドで証明書と秘密鍵を再読み込みできます: ----------------------------------------- +---- /relay sslcertkey ----------------------------------------- +---- [[relay_irc_proxy]] -==== IRC プロキシ ==== +==== IRC プロキシ Relay プラグインは IRC プロキシとしても使えます: Relay プラグインは IRC サーバのふりをして、他の IRC クライアント (WeeChat 自身も) は WeeChat に接続できます。 @@ -2498,41 +2498,41 @@ IRC サーバごとに異なるポート、もしくは全てのサーバに対 すべてのサーバに対して共通のポートを定義した場合には、クライアントからサーバの内部名を IRC の "PASS" コマンドに含めて送信するようにしてください、以下のフォーマットを使ってください: ----------------------------------------- +---- PASS server:mypass ----------------------------------------- +---- 例: SSL を使い、全てのサーバに対して共通の IRC プロキシを設定 (サーバはクライアントが選択): ----------------------------------------- +---- /relay add ssl.irc 8000 ----------------------------------------- +---- 例: SSL を使わず、内部名 "freenode" のサーバに対して IRC プロキシを設定: ----------------------------------------- +---- /relay add irc.freenode 8000 ----------------------------------------- +---- 任意の IRC クライアントからサーバパスワード "mypass" (全てのサーバに対して共通の IRC プロキシを設定した場合には "freenode:mypass") で 8000 番ポートに接続出来ます。 [[relay_weechat_protocol]] -==== WeeChat プロトコル ==== +==== WeeChat プロトコル Relay プラグインは WeeChat プロトコルを使ってリモートインターフェイスに対してデータを送信できます。 例: ----------------------------------------- +---- /relay add weechat 9000 ----------------------------------------- +---- この後、リモートインターフェイスを使って 9000 番ポートに対して、パスワード "mypass" で接続することができます。 [[relay_websocket]] -==== WebSocket ==== +==== WebSocket Relay プラグインはすべてのプロトコルに対して WebSocket プロトコル (http://tools.ietf.org/html/rfc6455[RFC 6455]) をサポートします。 @@ -2545,15 +2545,15 @@ origin が許可されていれば WebSocket 用のソケットが準備され HTML5 を使えばたった 1 行の JavaScript で WebSocket をオープンすることが可能です: [source,js] ----------------------------------------- +---- websocket = new WebSocket("ws://server.com:9000/weechat"); ----------------------------------------- +---- ポート番号 (例では 9000 番) は Relay プラグインで定義したものです。URI の最後には必ず "/weechat" をつけます ('irc' と 'weechat' プロトコルの場合)。 [[rmodifier_plugin]] -=== Rmodifier プラグイン === +=== Rmodifier プラグイン Rmodifier プラグインは正規表現を使って文字列を置換します。 パスワードの入力時やに入力文字列を隠すことや WeeChat @@ -2561,29 +2561,29 @@ Rmodifier プラグインは正規表現を使って文字列を置換します 例えば、パスワード文字列を `*` で置き換えることができます。 [[rmodifier_options]] -==== オプション (rmodifier.conf) ==== +==== オプション (rmodifier.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set rmodifier.look.* | 外観 | modifier | <<command_rmodifier_rmodifier,/rmodifier add>> + /set rmodifier.modifier.* | rmodifier -|======================================== +|=== オプション: include::autogen/user/rmodifier_options.txt[] [[rmodifier_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/rmodifier_commands.txt[] [[rmodifier_creation]] -==== Rmodifier の作成 ==== +==== Rmodifier の作成 rmodifier は 3 つの要素からなります: @@ -2621,7 +2621,7 @@ API リファレンス' の 'weechat_hook_modifier' 関数を参照してくだ `/oper nick ********` のように表示されます。 [[scripts_plugins]] -=== スクリプトプラグイン === +=== スクリプトプラグイン WeeChat は 6 種類のスクリプトプラグインを備えています: Python、Perl、Ruby、Lua、Tcl、Guile (scheme)。 @@ -2635,59 +2635,59 @@ WeeChat は 6 種類のスクリプトプラグインを備えています: Pyth 'WeeChat スクリプト製作ガイド' を参照してください。 [[script_options]] -==== スクリプトオプション (script.conf) ==== +==== スクリプトオプション (script.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set script.look.* | 外観 | color | /set script.color.* | 色 | scripts | /set script.scripts.* | スクリプトのダウンロードに関するオプション -|======================================== +|=== オプション: include::autogen/user/script_options.txt[] [[script_commands]] -==== Script コマンド ==== +==== Script コマンド include::autogen/user/script_commands.txt[] [[python_commands]] -==== Python コマンド ==== +==== Python コマンド include::autogen/user/python_commands.txt[] [[perl_commands]] -==== Perl コマンド ==== +==== Perl コマンド include::autogen/user/perl_commands.txt[] [[ruby_commands]] -==== Ruby コマンド ==== +==== Ruby コマンド include::autogen/user/ruby_commands.txt[] [[lua_commands]] -==== Lua コマンド ==== +==== Lua コマンド include::autogen/user/lua_commands.txt[] [[tcl_commands]] -==== Tcl コマンド ==== +==== Tcl コマンド include::autogen/user/tcl_commands.txt[] [[guile_commands]] -==== Guile コマンド ==== +==== Guile コマンド include::autogen/user/guile_commands.txt[] [[xfer_plugin]] -=== Xfer プラグイン === +=== Xfer プラグイン Xfer プラグインの機能: @@ -2696,30 +2696,30 @@ Xfer プラグインの機能: * ファイル転送、例えば IRC プラグイン経由の "DCC" [[xfer_options]] -==== オプション (xfer.conf) ==== +==== オプション (xfer.conf) セクション: [width="100%",cols="3m,6m,16",options="header"] -|======================================== +|=== | セクション | 操作コマンド | 説明 | look | /set xfer.look.* | 外観 | color | /set xfer.color.* | 色 | network | /set xfer.network.* | ネットワークオプション | file | /set xfer.file.* | ファイルの送信/受信に関するオプション -|======================================== +|=== オプション: include::autogen/user/xfer_options.txt[] [[xfer_commands]] -==== コマンド ==== +==== コマンド include::autogen/user/xfer_commands.txt[] [[support]] -== サポート == +== サポート サポートを依頼する前に、WeeChat に付属するドキュメントと FAQ を読んでください。 (ドキュメントとはこの文書のことで、ここまでの全ての内容を読んでいないのであれば、 diff --git a/doc/pl/weechat_faq.pl.txt b/doc/pl/weechat_faq.pl.txt index 56316870e..73a477fa9 100644 --- a/doc/pl/weechat_faq.pl.txt +++ b/doc/pl/weechat_faq.pl.txt @@ -1,5 +1,4 @@ -WeeChat FAQ (Często zadawane pytania) -===================================== += WeeChat FAQ (Często zadawane pytania) Sébastien Helleu <flashcode@flashtux.org> @@ -9,12 +8,10 @@ dla najnowszej stabilnej wersji. [[general]] -Ogólne ------- +== Ogólne [[weechat_name]] -Skąd się wzięła nazwa "WeeChat"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Skąd się wzięła nazwa "WeeChat"? "Wee" to akronim rekursywny oznaczającym "Wee Enhanced Environment". Stąd kompletna nazwa to "Wee Enhanced Environment for Chat". @@ -23,20 +20,17 @@ Stąd kompletna nazwa to "Wee Enhanced Environment for Chat". pasuje ono do WeeChat!). [[why_choose_weechat]] -Dlaczego wybrać WeeChat? X-Chat i Irssi są takie dobre... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Dlaczego wybrać WeeChat? X-Chat i Irssi są takie dobre... Ponieważ Weechat jest bardzo lekki i posiada innowacyjne funkcje. Więcej informacji na stronie: http://weechat.org/about/features [[compilation_install]] -Kompilacja / instalacja ------------------------ +== Kompilacja / instalacja [[gui]] -Słyszałem o wielu GUI dla WeeChat. Jak mogę je skompilować/użyć? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Słyszałem o wielu GUI dla WeeChat. Jak mogę je skompilować/użyć? Dostępne jest kilka zdalnych GUI: @@ -46,8 +40,7 @@ Dostępne jest kilka zdalnych GUI: * https://github.com/eirikb/weecloud[weecloud] (Web) [[compile_git]] -Nie mogę skompilować WeeChat po sklonowaniu repozytorium git, dlaczego? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Nie mogę skompilować WeeChat po sklonowaniu repozytorium git, dlaczego? Zalecaną metodą kompilacji WeeChat jest użycie cmake. @@ -60,8 +53,7 @@ git. Ten pakiet może odpowiadać dokładnie wersji z gita i jest mniej wygodny przy aktualizowaniu jak klonowanie z gita. [[lost]] -Uruchomiłem WeeChat, ale czuję się zagubiony, co robić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Uruchomiłem WeeChat, ale czuję się zagubiony, co robić? Dla pomocy wpisz `/help`. Aby uzyskać pomoc dla komendy wpisz `/help komenda`. Klawisze i komendy są wypisane w dokumentacji. @@ -70,12 +62,10 @@ Nowym użytkownikom zaleca się przeczytanie quickstart (szybki start) (zobacz stronę z dokumentacją na stronie www). [[display]] -Wyświetlanie ------------- +== Wyświetlanie [[charset]] -Nie widzę niektórych znaków diakrytycznych, co mogę zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Nie widzę niektórych znaków diakrytycznych, co mogę zrobić? Jest to częsty problem, przeczytaj i sprawdź *WSZYSTKIE* poniższe rozwiązania: @@ -103,8 +93,7 @@ sprawdź czy *wszystkie* twoje ustawienia (terminal, screen, ..) są ISO, a *nie* UTF-8. [[bars_background]] -Paski jak tytuł i status nie są filtrowane, kolor tła zatrzymuje się po tekście, czemu? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Paski jak tytuł i status nie są filtrowane, kolor tła zatrzymuje się po tekście, czemu? Może to być spowodowane złą wartością zmiennej środowiskowej TERM (spójrz na wynik `echo $TERM` w terminalu). @@ -119,8 +108,7 @@ W zależności, gdzie uruchamiasz WeeChat, powinieneś uzyskać: W razie potrzeby, popraw zmienna TERM: `export TERM="xxx"`. [[screen_weird_chars]] -Podczas używania WeeChat pod screenem/tmuxem pojawiają mi się dziwne, losowe znaki, jak to naprawić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Podczas używania WeeChat pod screenem/tmuxem pojawiają mi się dziwne, losowe znaki, jak to naprawić? Może to być spowodowane przez złą wartość zmiennej TERM w swojej powłoce (spójrz na wynik `echo $TERM` w swoim terminalu, *poza screenem/tmuxem*). @@ -131,8 +119,7 @@ który działa dobrze (jak wiele innych wartości). W razie potrzeby, popraw zmienna TERM: `export TERM="xxx"`. [[osx_display_broken]] -Skompilowałem WeeChat pod OS X i wszędzie na ekranie widzę "(null)", co jest nie tak? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Skompilowałem WeeChat pod OS X i wszędzie na ekranie widzę "(null)", co jest nie tak? Jeśli samodzielnie skompilowałeś ncursesw, spróbuj użyć domyślnej wersji (dostarczanej z systemem). @@ -141,8 +128,7 @@ Ponadto, pod OS X, zaleca się instalowanie WeeChat za pomocą managera pakietó Homebrew. [[buffer_vs_window]] -Słyszałem o "buforach" i "oknach", jaka jest między nimi różnica? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Słyszałem o "buforach" i "oknach", jaka jest między nimi różnica? 'bufor' jest określany przez numer, nazwę, wyświetlane linie (i trochę innych danych). @@ -154,42 +140,39 @@ Każde okno wyświetla jeden bufor. Bufor może być ukryty (nie wyświetlany pr okno) lub wyświetlany w jednym lub więcej oknach. [[buffers_list]] -Jak wyświetlić listę z buforami po lewej stronie? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak wyświetlić listę z buforami po lewej stronie? Użyj skryptu 'buffers.pl'. W celu ograniczenia rozmiaru paska: ----------------------------------------- +---- /set weechat.bar.buffers.size_max 15 ----------------------------------------- +---- Żeby przenieść pasek na dół: ----------------------------------------- +---- /set weechat.bar.buffers.position bottom ----------------------------------------- +---- [[customize_prefix]] -Jak mogę ograniczyć długość wyświetlanych nicków lub usunąć wyrównanie w oknie rozmowy? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę ograniczyć długość wyświetlanych nicków lub usunąć wyrównanie w oknie rozmowy? W celu ograniczenia długości nicków w oknie rozmowy: ----------------------------------------- +---- /set weechat.look.prefix_align_max 15 ----------------------------------------- +---- Żeby usunąć wyrównanie nicków: ----------------------------------------- +---- /set weechat.look.prefix_align none ----------------------------------------- +---- [[input_bar_size]] -Jak używać linii poleceń z więcej niż jednym wierszem? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak używać linii poleceń z więcej niż jednym wierszem? Opcja 'size' paska wprowadzania może zostać ustawiona na wartość wyższą niż 1 (dla ustalonej wartości, domyślny rozmiar to 1) lub 0 dla dynamicznego rozmiaru, @@ -197,72 +180,69 @@ następnie opcja 'size_max' ustali maksymalny rozmiar (0 = brak limitu). Przykład dynamicznego rozmiaru: ----------------------------------------- +---- /set weechat.bar.input.size 0 ----------------------------------------- +---- Maksymalny rozmiar równy 2: ----------------------------------------- +---- /set weechat.bar.input.size_max 2 ----------------------------------------- +---- [[one_input_root_bar]] -Czy jest możliwe wyświetlanie tylko jednego paska wejściowego dla wszystkich okien (po podzieleniu)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Czy jest możliwe wyświetlanie tylko jednego paska wejściowego dla wszystkich okien (po podzieleniu)? Tak, należy stworzyć pasek typu "root" (z elementem mówiącym, w którym oknie aktualnie jesteśmy), następnie usunąć obecny pasek wejściowy. Na przykład: ----------------------------------------- +---- /bar add rootinput root bottom 1 0 [buffer_name]+[input_prompt]+(away),[input_search],[input_paste],input_text /bar del input ----------------------------------------- +---- Jeśli kiedyś przestanie ci to odpowiadać, po prostu usuń ten pasek, WeeChat automatycznie stworzy nowy pasek "input" jeśli element "input_text" nie zostanie użyty w żadnym z pasków: ----------------------------------------- +---- /bar del rootinput ----------------------------------------- +---- [[terminal_copy_paste]] -Jak mogę kopiować/wklejać tekst bez wklejania listy nicków? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę kopiować/wklejać tekst bez wklejania listy nicków? Możesz użyć terminala z prostokątnym zaznaczaniem (jak rxvt-unicode, konsole, gnome-terminal, ...). Klawisze to zazwyczaj @k(C-)@k(A-) zaznaczenie myszką. Innym rozwiązaniem jest przesunięcie listy nicków na górę lub dół, na przykład: ----------------------------------------- +---- /set weechat.bar.nicklist.position top ----------------------------------------- +---- [[urls]] -Jak mogę kliknąć na długi URL (dłuższy niż linia)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę kliknąć na długi URL (dłuższy niż linia)? Domyślnie WeeChat wyświetla czas i przedrostki dla każdej linii i opcjonalne paski dookoła obszaru rozmowy. Aby usprawnić klikanie w urle można przesunąć listę nicków na górę oraz usunąć wyrównanie nicków: ----------------------------------------- +---- /set weechat.bar.nicklist.position top /set weechat.look.prefix_align none /set weechat.look.align_end_of_lines time ----------------------------------------- +---- W WeeChat ≥ 0.3.6 można włączyć opcję "eat_newline_glitch", dzięki której znaki nowej linii nie są dodawane na końcu każdej wyświetlanej linii (nie zakłóci to zaznaczania urli): ----------------------------------------- +---- /set weechat.look.eat_newline_glitch on ----------------------------------------- +---- [IMPORTANT] Ta opcja może spowodować pojawienie się błędów. Jeśli doświadczysz takich problemów @@ -271,23 +251,21 @@ wyłącz tą opcję. Innym rozwiązaniem jest użycie skryptu: http://weechat.org/scripts/stable/tag/url [[change_locale_without_quit]] -Chcę zmienić język komunikatów wyświetlanych przez WeeChat, ale bez jego zamykania, czy jest to możliwe? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Chcę zmienić język komunikatów wyświetlanych przez WeeChat, ale bez jego zamykania, czy jest to możliwe? Tak, musisz użyć pythonowego skryptu 'shell.py' (dostępny na stronie programu), oraz użyć tych komend po załadowaniu skryptu: ----------------------------------------- +---- /shell setenv LANG=pl_PL.UTF-8 /upgrade ----------------------------------------- +---- Aby otrzymać polskie komunikaty dla kodowania UTF-8 w terminalu, osoby używające ISO, mogą wykonać: `/shell setenv LANG=pl_PL`. [[use_256_colors]] -Jak mogę użyć 256 kolorów w WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę użyć 256 kolorów w WeeChat? 256 kolorów jest wspierane tylko w WeeChat ≥ 0.3.4. @@ -303,17 +281,17 @@ tych wartości w zmiennej 'TERM'. Jeśli używasz screena, możesz dodać to do swojego '~/.screenrc': ----------------------------------------- +---- term screen-256color ----------------------------------------- +---- Jeśli wartość zmiennej 'TERM' jest niepoprawna, oraz WeeChat został już uruchomiony nie należy panikować! Można to zmienić bez konieczności restartu, za pomocą skryptu 'shell.py': ----------------------------------------- +---- /shell setenv TERM=screen-256color /upgrade ----------------------------------------- +---- Dla wersji 0.3.4, musisz użyć komendy `/color` w celu dodania nowych kolorów. @@ -323,8 +301,7 @@ można stworzyć alias dla koloru za pomocą komendy `/color`). Więcej informacji na temat zarządzania kolorami można uzyskać w poradniku użytkownika. [[search_text]] -Jak mogę wyszukać tekst w buforze (jak za pomocą /lastlog w irssi)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę wyszukać tekst w buforze (jak za pomocą /lastlog w irssi)? Domyślny skrót klawiszowy to @k(C-)@k(r) (komenda: `/input search_text`). @@ -333,30 +310,27 @@ Poruszanie się między podświetleniami: @k(A-)@k(p)/@k(n). Po więcej informacji zajrzyj do poradnika użytkownika (domyślne skróty klawiszowe). [[key_bindings]] -Przypisania klawiszy --------------------- +== Przypisania klawiszy [[meta_keys]] -Niektóre skróty klawiszowe (alt + klawisz) nie działają, dlaczego? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Niektóre skróty klawiszowe (alt + klawisz) nie działają, dlaczego? Jeśli używasz terminali jak xterm lub uxterm, niektóre skróty domyślnie nie będą działać. Możesz dodać następujące linie do pliku '~/.Xresources': * dla xterm: ----------------------------------------- +---- XTerm*metaSendsEscape: true ----------------------------------------- +---- * dla uxterm: ----------------------------------------- +---- UXTerm*metaSendsEscape: true ----------------------------------------- +---- Następnie przeładować zasoby (`xrdb -override ~/.Xresources`) lub zrestartować X. [[customize_key_bindings]] -Jak mogę zmienić przypisania klawiszy? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zmienić przypisania klawiszy? Przypisania klawiszy można dostosować za pomocą komendy `/key`. @@ -364,53 +338,49 @@ Domyślnie @k(A-)@k(k) pozwala pobrać kod klawiszy i umieścić go w wierszu poleceń. [[jump_to_buffer_11_or_higher]] -Jakim skrótem można przejść do buforu 11 (lub o większym numerze)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jakim skrótem można przejść do buforu 11 (lub o większym numerze)? Skrót to @k(A-)@k(j) i dwie cyfry, na przykład @k(A-)@k(j) później @k(1), @k(1) przejdzie do buforu 11. Można również samemu stworzyć skrót, na przykład: ----------------------------------------- +---- /key bind meta-q /buffer *11 ----------------------------------------- +---- Lista domyślnych skrótów znajduje się w poradniku użytkownika. [[global_history]] -Jak używać globalnej historii (zamiast historii buforu) za pomocą strzałek góra/dół? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak używać globalnej historii (zamiast historii buforu) za pomocą strzałek góra/dół? Możesz przypisać strzałki w górę i dół do globalnej historii (domyślnie dla globalnej historii przypisane są klawisze @k(C-)@k(↑) oraz @k(C-)@k(↓)). Przykład: ----------------------------------------- +---- /key bind meta2-A /input history_global_previous /key bind meta2-B /input history_global_next ----------------------------------------- +---- [NOTE] Klawisze "meta2-A" i "meta2-B" mogą być inne dla twojego terminala. W celu znalezienia ich kodów wciśnij @k(A-)@k(k) następnie przycisk (góra lub dół). [[mouse]] -Obsługa myszy -------------- +== Obsługa myszy [[mouse_not_working]] -Obsługa myszy w ogóle nie działa, co mogę zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Obsługa myszy w ogóle nie działa, co mogę zrobić? Mysz nie jest obsługiwana w WeeChat ≥ 0.3.6. Na samym początku należy włączyć obsługę myszy: ----------------------------------------- +---- /mouse enable ----------------------------------------- +---- Jeśli to nie pomogło należy sprawdzić wartość zmiennej TERM w swojej powłoce (wynik komendy `echo $TERM` w swoim terminalu). @@ -418,21 +388,20 @@ W zależności od używanego terminfo, mysz może nie być wspierana. Możesz sprawdzić wsparcie myszy w terminalu: ----------------------------------------- +---- $ printf '\033[?1002h' ----------------------------------------- +---- Następnie kliknij pierwszy znak w terminalu (górny lewy róg). Powinieneś zobaczyć " !!#!!". Aby wyłączyć wsparcie dla myszy w terminalu: ----------------------------------------- +---- $ printf '\033[?1002l' ----------------------------------------- +---- [[mouse_coords]] -Mysz nic nie robi dla X lub Y większych od 94, dlaczego? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mysz nic nie robi dla X lub Y większych od 94, dlaczego? Niektóre terminale wysyłają tylko znaki ISO dla położenia myszy, dlatego nie działa to dla X/Y większych dla 94. @@ -441,71 +410,65 @@ Powinieneś użyć terminala wspierającego położenia UTF-8 dla myszy, jak rxvt-unicode. [[mouse_select_paste]] -Jak mogę zaznaczyć lub wkleić tekst w terminalu z włączoną obsługa myszy w WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zaznaczyć lub wkleić tekst w terminalu z włączoną obsługa myszy w WeeChat? Kiedy obsługa myszy jest włączona w WeeChat, można użyć modyfikatora @k(-S-) do zaznaczania lub kliknać w terminalu, tak jak w przypadku wyłączonej obsługi myszy (w niektórych terminalach jak iTerm należy użyć @k(-A-) zamiast @k(-S-)). [[irc]] -IRC ---- +== IRC [[irc_ssl_connection]] -Mam problemy podczas połączenia z serwerem używającym SSL, co mogę zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Mam problemy podczas połączenia z serwerem używającym SSL, co mogę zrobić? Jeśli widzisz błędy gnutls, możesz użyć innej wielkości klucza Diffie-Hellman (domyślnie 2048): ----------------------------------------- +---- /set irc.server.freenode.ssl_dhkey_size 1024 ----------------------------------------- +---- Jeśli widzisz błędy związanie z certyfikatami, możesz wyłączyć opcję "ssl_verify" (należy jednak uważać, ponieważ połączenie będzie mniej bezpieczne): ----------------------------------------- +---- /set irc.server.freenode.ssl_verify off ----------------------------------------- +---- [[irc_ssl_handshake_error]] -Podczas łączenia się z serwerem poprzez SSL widzę tylko błąd "TLS handshake failed", co mogę zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Podczas łączenia się z serwerem poprzez SSL widzę tylko błąd "TLS handshake failed", co mogę zrobić? Możesz spróbować innego ciągu priorytetu (tylko WeeChat ≥ 0.3.5), zamień "xxx" nazwą serwera: ----------------------------------------- +---- /set irc.server.xxx.ssl_priorities "NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT" ----------------------------------------- +---- [[irc_ssl_freenode]] -Jak mogę połączyć się z serwerem freenode używając SSL? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę połączyć się z serwerem freenode używając SSL? Ustaw opcję 'weechat.network.gnutls_ca_file' do pliku z certyfikatami: ----------------------------------------- +---- /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt" ----------------------------------------- +---- [NOTE] Należy sprawdzić czy plik znajduje się w systemie (zazwyczaj dostarczany przez pakiet "ca-certificates"). Ustaw port serwera, SSL, dhkey_size, następnie się połącz: ----------------------------------------- +---- /set irc.server.freenode.addresses "chat.freenode.net/7000" /set irc.server.freenode.ssl on /set irc.server.freenode.ssl_dhkey_size 1024 /connect freenode ----------------------------------------- +---- [[irc_oauth]] -Jak połączyć się z serwerem wymagającym "oauth"? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak połączyć się z serwerem wymagającym "oauth"? Niektóre serwery jak 'twitch' wymagają oauth do połączenia. @@ -514,34 +477,32 @@ Oauth to po prostu hasło w postaci "oauth:hasło". W celu dodania takiego serwera i połączenia się z nim należ wykonać nastepujące polecenia (należy zastąpić nazwę i adres odpowiednimi wartościami): ----------------------------------------- +---- /server add nazwa irc.server.org -password="oauth:hasło" /connect nazwa ----------------------------------------- +---- [[irc_sasl]] -Jak mogę się zidentyfikować przed wejściem na kanały? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę się zidentyfikować przed wejściem na kanały? Jeśli serwer wspiera SASL, możesz użyć tego zamiast wysyłać komendę do nickserva, na przykład: ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.freenode.sasl_username "nick" /set irc.server.freenode.sasl_password "xxxxxxx" ----------------------------------------- +---- Jeśli serwer nie wspiera SASL, możesz dodać odstęp pomiędzy komendą a wejściem na kanały): ----------------------------------------- +---- /set irc.server.freenode.command_delay 5 ----------------------------------------- +---- [[ignore_vs_filter]] -Jaka jest różnica między komendami/ignore i /filter ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jaka jest różnica między komendami/ignore i /filter ? Komenda `/ignore` jest komendą IRC, zatem odnosi się tylko do buforów IRC (serwery i kanały). @@ -557,38 +518,36 @@ Filtrowane linie są tylko ukrywane, nie usuwane, można je zobaczyć wyłączaj filtry (domyślnie @k(A-)@k(=) zmienia stan filtrów). [[filter_irc_join_part_quit]] -Jak mogę filtrować wiadomości o wejściu/opuszczeniu/wyjściu na kanałach IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę filtrować wiadomości o wejściu/opuszczeniu/wyjściu na kanałach IRC? Za pomocą inteligentnych filtrów (zachowuje wejścia/opuszczenia/wyjścia od osób piszących niedawno): ----------------------------------------- +---- /set irc.look.smart_filter on /filter add irc_smart * irc_smart_filter * ----------------------------------------- +---- Za pomocą globalnego filtru (ukrywa *wszystkie* wejścia/opuszczenia/wyjścia): ----------------------------------------- +---- /filter add joinquit * irc_join,irc_part,irc_quit * ----------------------------------------- +---- [NOTE] Więcej informacji: `/help filter` i `/help irc.look.smart_filter` [[filter_irc_join_channel_messages]] -Jak mogę filtrować wyświetlane wiadomości podczas wejścia na kanał IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę filtrować wyświetlane wiadomości podczas wejścia na kanał IRC? Dla WeeChat ≥ 0.4.1 można wyłączyć część wiadomości za pomocą opcji 'irc.look.display_join_message'. Na przykład, aby wyłączyć nazwy (wiadomość IRC o numerze '366'): ----------------------------------------- +---- /set irc.look.display_join_message "329,332,333" ----------------------------------------- +---- [NOTE] Więcej można znaleźć wpisując: `/help irc.look.display_join_message` @@ -605,17 +564,16 @@ Tagi innych wiadomości można znaleźć analizując nieprzetworzone dane IRC Przykłady: * filtrowanie użytkowników: ----------------------------------------- +---- /filter add irc_join_names * irc_366 * ----------------------------------------- +---- * filtrowanie tematu (i daty): ----------------------------------------- +---- /filter add irc_join_topic_date * irc_332,irc_333 * ----------------------------------------- +---- [[filter_voice_messages]] -Jak mogę filtrować informacje o przyznaniu voice (np na serwerze Bitlbee)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę filtrować informacje o przyznaniu voice (np na serwerze Bitlbee)? Filtrowanie wiadomości o przyznaniu voice nie jest proste, ponieważ może on zostać nadany wraz z innymi atrybutami w jednej wiadomości IRC. @@ -626,15 +584,15 @@ pozwolić WeeChat używać specjalnego koloru dla nieobecnych nicków. Dla Bitlbee ≥ 3, należy wykonać na kanale '&bitlbee': ----------------------------------------- +---- channel set show_users online,away ----------------------------------------- +---- Dla starszych wersji Bitlbee, należy wykonać na kanale '&bitlbee': ----------------------------------------- +---- set away_devoice false ----------------------------------------- +---- Aby dowiedzieć się jak sprawdzić nieobecność w WeeChat, spójrz na pytanie o <<color_away_nicks,nieobecnych osobach>>. @@ -642,13 +600,12 @@ Aby dowiedzieć się jak sprawdzić nieobecność w WeeChat, spójrz na pytanie Jeśli napewno chcesz filtrować wiadomości o statusie voice, możesz użyć tej komendy, nie jest ona jednak doskonała (działa tylko jeśli pierwszy z modyfikowanych trybów to voice): ----------------------------------------- +---- /filter add hidevoices * irc_mode (\+|\-)v ----------------------------------------- +---- [[color_away_nicks]] -Jak mogę zobaczyć kto jest aktualnie nieobecny ? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zobaczyć kto jest aktualnie nieobecny ? Należy ustawić opcję 'irc.server_default.away_check' na wartość większą od zera (minuty pomiędzy sprawdzaniem czy nick jest nieobecny). @@ -659,55 +616,50 @@ sprawdzania nieobecności dla małych kanałów. Na przykład, aby sprawdzać nieobecność nicków co 5, dla kanałów z maksymalnie 25 osobami: ----------------------------------------- +---- /set irc.server_default.away_check 5 /set irc.server_default.away_check_max_nicks 25 ----------------------------------------- +---- [NOTE] Dla WeeChat ≤ 0.3.3, opcje te to 'irc.network.away_check' oraz 'irc.network.away_check_max_nicks'. [[highlight_notification]] -Jak mogę zostać powiadomiony, jeśli ktoś będzie chciał przyciągnąć moją uwagę na kanale? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zostać powiadomiony, jeśli ktoś będzie chciał przyciągnąć moją uwagę na kanale? Możesz użyć skryptu jak 'beep.pl' lub 'launcher.pl'. Dla 'launcher.pl', należ przeprowadzić konfigurację: ----------------------------------------- +---- /set plugins.var.perl.launcher.signal.weechat_highlight "/ścieżka/do/komendy argumenty" ----------------------------------------- +---- Inne podobne skrypty: http://weechat.org/scripts/stable/tag/notify/ [[irc_target_buffer]] -Jak mogę zmienić docelowy bufor dla komendy w połączonym buforze (jak bufor z serwerami)? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zmienić docelowy bufor dla komendy w połączonym buforze (jak bufor z serwerami)? Domyślna kombinacja to @k(C-)@k(x) (komenda: `/input switch_active_buffer`). [[plugins_scripts]] -Pluginy / skrypty ------------------- +== Pluginy / skrypty [[openbsd_plugins]] -Używam OpenBSD, WeeChat nie ładuje żadnych pluginów, co jest nie tak? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Używam OpenBSD, WeeChat nie ładuje żadnych pluginów, co jest nie tak? Pod OpenBSD, nazwy wtyczek kończą się ".so.0.0" (".so" dla Linuksa). Musisz ustawić: ----------------------------------------- +---- /set weechat.plugin.extension ".so.0.0" /plugin autoload ----------------------------------------- +---- [[load_scripts]] -Jak załadować skrypty Perl/Python/Ruby/Lua/Tcl? Czy skrypty są kompatybilne z innymi klientami IRC? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak załadować skrypty Perl/Python/Ruby/Lua/Tcl? Czy skrypty są kompatybilne z innymi klientami IRC? Możesz użyć komend `/perl`, `/python`, `/ruby`, `/lua` oraz `/tcl`, aby załadować skrypt (domyślna lokalizacja skryptów to '~/.weechat/<język>/'). @@ -721,12 +673,10 @@ Uwagi: * wtyczka 'tcl' jest dostępna dla wersji ≥ 0.3.0. [[settings]] -Ustawienia ----------- +== Ustawienia [[memory_usage]] -Jak mogę zmusić WeeChat do zużywania mniejszej ilości pamięci? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak mogę zmusić WeeChat do zużywania mniejszej ilości pamięci? W celu zmniejszenia używanej pamięci możesz zastosować się do poniższych rad: @@ -742,12 +692,10 @@ W celu zmniejszenia używanej pamięci możesz zastosować się do poniższych r * zmniejszyć wartość opcji 'weechat.history.max_commands' [[development]] -Rozwój ------- +== Rozwój [[bug_task_patch]] -Jak zgłaszać błędy, prosić o nowe możliwości lub wysyłać patche? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jak zgłaszać błędy, prosić o nowe możliwości lub wysyłać patche? Są 3 możliwości: @@ -761,29 +709,27 @@ Są 3 możliwości: (możesz się zapisać na listę mailingową "support" i na niej pisać) [[gdb_error_threads]] -Kiedy uruchamiam WeeChat pod gdb dostaję komunikat o wątkach, co mogę z tym zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Kiedy uruchamiam WeeChat pod gdb dostaję komunikat o wątkach, co mogę z tym zrobić? Podczas uruchamiania WeeChat pod gdb, można spotkać się z takim błędem: ----------------------------------------- +---- $ gdb /scieżka/do/weechat (gdb) run [Thread debugging using libthread_db enabled] Cannot find new threads: generic error ----------------------------------------- +---- Żeby to naprawić, można użyć takiej komendy(należy zmienić ścieżki do libpthread oraz WeeChat na właściwe dla naszego systemu): ----------------------------------------- +---- $ LD_PRELOAD=/lib/libpthread.so.0 gdb /ścieżka/do/weechat (gdb) run ----------------------------------------- +---- [[supported_os]] -Jaka jest lista platform wspieranych przez WeeChat? Czy będzie przeportowany na inne systemy operacyjne? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Jaka jest lista platform wspieranych przez WeeChat? Czy będzie przeportowany na inne systemy operacyjne? Pełną listę można znaleźć na stronie: http://weechat.org/download @@ -791,8 +737,7 @@ Robimy co w naszej mocy, aby WeeChat działał na tylu platformach ile to tylko możliwe. Mile widziana jest pomoc w testowaniu dla systemów, których nie mamy. [[help_developers]] -Chcę pomóc programistą WeeChat. Co mogę zrobić? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Chcę pomóc programistą WeeChat. Co mogę zrobić? Jest wiele zadań do zrobienia (testowanie, kod, dokumentacja, ...) @@ -800,8 +745,7 @@ Skontaktuj się z nami na IRC lub mailowo, szczegóły: http://weechat.org/dev/support [[donate]] -Czy mogę dać pieniądze albo inne rzeczy deweloperom WeeChat? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Czy mogę dać pieniądze albo inne rzeczy deweloperom WeeChat? Tak możesz dać nam pieniądze, aby wspomóc rozwój. Szczegóły na http://weechat.org/about/donate diff --git a/doc/pl/weechat_quickstart.pl.txt b/doc/pl/weechat_quickstart.pl.txt index 657a0ec2c..ac61fbdcd 100644 --- a/doc/pl/weechat_quickstart.pl.txt +++ b/doc/pl/weechat_quickstart.pl.txt @@ -1,11 +1,9 @@ -WeeChat szybki start -==================== += WeeChat szybki start Sébastien Helleu <flashcode@flashtux.org> [[start]] -Uruchamianie WeeChat --------------------- +== Uruchamianie WeeChat Zalecanym emulatorem terminala dla X (ale nieobowiązkowym) jest rxvt-unicode (posiada dobre wsparcie UTF-8, oraz nie ma problemów z domyślnymi skrótami @@ -13,32 +11,31 @@ klawiszowymi). Wywołaj z terminala: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -Pomoc online / opcje --------------------- +== Pomoc online / opcje WeeChat posiada pomoc dla wszystkich komend, wystarczy wywołać: ----------------------------------------- +---- /help ----------------------------------------- +---- Aby otrzymać pomoc dla konkretnej komendy wpisz: ----------------------------------------- +---- /help komenda ----------------------------------------- +---- Do ustawiania opcji służy: ----------------------------------------- +---- /set config.sekcja.opcja wartość ----------------------------------------- +---- (gdzie `config` jest nazwą konfiguracyjną (`weechat` dla rdzenia, lub nazwa wtyczki), `sekcja` sekcja pliku konfiguracyjnego, oraz `opcja` nazwa opcji). @@ -52,27 +49,27 @@ Na przykład: * wyświetli wszystkie opcje (WeeChat oraz wtyczek): ----------------------------------------- +---- /set ----------------------------------------- +---- * wyświetli opcje WeeChat: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * wyświetli opcje wtyczki IRC: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- Możesz wyświetlić pomoc dla opcji dzięki `/help`, na przykład: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Wszystkie ustawienia są zapisywane podczas wyjścia z WeeChat (lub za pomocą komendy `/save`, która wymusza zapisanie opcji). @@ -82,8 +79,7 @@ komendy `/reload`, jeśli nie chcesz użyć komendy `/set`. [[core_vs_plugins]] -Rdzeń vs wtyczki ----------------- +== Rdzeń vs wtyczki "Rdzeń" WeeChat jest używany tylko do wyświetlania danych na ekranie oraz interakcji z użytkownikiem, oznacza to, że rdzeń weechat bez wtyczek jest @@ -96,25 +92,23 @@ na liście "irc" oraz inne wtyczki. [[create_irc_server]] -Tworzenie serwera IRC ---------------------- +== Tworzenie serwera IRC Możesz dodać serwer IRC za pomocą komendy `/server`, na przykład: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- Jak zawsze w razie wątpliwości dostępna jest pomoc: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Ustawianie własnych opcji dla serwerów IRC ------------------------------------------- +== Ustawianie własnych opcji dla serwerów IRC WeeChat używa domyślnych wartości dla wszystkich serwerów ("fall backs"), jeśli nie określisz konkretnej wartości dla opcji serwera. @@ -126,70 +120,69 @@ Dla każdej opcji serwera WeeChat używa jej wartości jeśli jest zdefiniowana Na przykład znajdują się tam domyślne nicki (bazujące na Twoim loginie un*x), możesz je zmienić dla serwera oftc następującą komendą: ----------------------------------------- +---- /set irc.server.oftc.nicks "mójnick,mójnick2,mójnick3,mójnick4,mójnick5" ----------------------------------------- +---- Ustawienie nazwy użytkownika i imienia: ----------------------------------------- +---- /set irc.server.oftc.username "Moja nazwa użytkownika" /set irc.server.oftc.realname "Moje imię" ----------------------------------------- +---- Aby włączyć automatyczne łączenie się z serwerem przy starcie: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- Jeśli SASL jest dostępny na serwerze, można użyć go do uwierzytelnienia (zostaniesz zidentyfikowany przed wejściem na kanał): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mójnick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- Żeby wykonać komendę po połączeniu z serwerem, na przykład uwierzytelnienie przez nickserv (tylko jeśli nie uwierzytelniasz się przez SASL): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] Wiele komend może być oddzielonych ';' (średnik). Aby automatycznie wejść na kanały po połączeniu z serwerem: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#kanał1,#kanał2" ----------------------------------------- +---- Aby usunąć wartość dla opcji serwera, używając w zamian wartości domyślnej, na przykład, aby używać domyślnych nicków (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Inne opcje: możesz ustawić pozostałe opcje za pomocą komendy ("xxx" to nazwa opcji): ----------------------------------------- +---- /set irc.server.oftc.xxx wartość ----------------------------------------- +---- [[connect_to_irc_server]] -Łączenie się z serwerem IRC i automatyczne wchodzenie na kanały ---------------------------------------------------------------- +== Łączenie się z serwerem IRC i automatyczne wchodzenie na kanały ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Ta komenda może być użyta do utworzenia i połączenia sie z nowym serwerem bez @@ -202,37 +195,35 @@ się pomiędzy biforem 'core' a buforami serwerów możesz użyć ctrl-X. Jest możliwe wyłączenie automatycznego łączenia buforów serwerów, aby mieć oddzielne bufory dla serwerów: ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Wchodzenie/wychodzenie z kanałów IRC ------------------------------------- +== Wchodzenie/wychodzenie z kanałów IRC Wejście na kanał: ----------------------------------------- +---- /join #kanał ----------------------------------------- +---- Wyjście z kanału (zostawiając otwarty bufor): ----------------------------------------- +---- /part [wiadomość pożegnalna] ----------------------------------------- +---- Zamknięcie bufora serwera lub kanału (`/close` jest aliasem `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Zarządzanie buforami/oknami ---------------------------- +== Zarządzanie buforami/oknami Bufor jest to element łączący wtyczkę z numerem, kategorią, oraz nazwą. Zawiera on dane wyświetlane na ekranie. @@ -242,24 +233,23 @@ Jeśli podzielisz ekran, ujrzysz wiele okien z wieloma buforami jednocześnie. Komendy do zarządzania buforami i oknami: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (Nie będę powtarzać, że możesz uzyskać pomoc za pomocą /help na tych komendach) Na przykład, aby pionowo podzielić ekran na małe okno (1/3 szerokości), oraz duże okno (2/3), użyj komendy: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Skróty klawiszowe ------------------ +== Skróty klawiszowe WeeChat używa domyślnie wiele klawiszy. Wszystkie z nich są w dokumentacji, ale powinieneś znać przynajmniej kilka najprzydatniejszych: @@ -278,26 +268,25 @@ Przydatnym skrótem jest meta-k (alt-k) do odnajdywania kodów klawiszy. Na przykład, aby przypisać meta-y (alt-y) do komendy `/buffer close`: ----------------------------------------- +---- /key bind (wciśnij meta-k) (wciśnij meta-y) /buffer close ----------------------------------------- +---- Otrzymasz w linii poleceń: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Aby usunąć klawisz: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Wtyczki/skrypty ---------------- +== Wtyczki/skrypty W niektórych dystrybucjach, jak np Debian, wtyczki są dostarczane jako oddzielne pakiety (jak weechat-plugins). @@ -313,8 +302,7 @@ po więcej informacji). [[more_doc]] -Więcej dokumentacji -------------------- +== Więcej dokumentacji Możesz teraz używać WeeChat oraz przeczytać FAQ/dokumentację w razie innych pytań: http://weechat.org/doc diff --git a/doc/pl/weechat_scripting.pl.txt b/doc/pl/weechat_scripting.pl.txt index dbb9c4a75..a5272ad94 100644 --- a/doc/pl/weechat_scripting.pl.txt +++ b/doc/pl/weechat_scripting.pl.txt @@ -1,5 +1,4 @@ -Poradnik pisania skryptów WeeChat -================================= += Poradnik pisania skryptów WeeChat Sébastien Helleu <flashcode@flashtux.org> @@ -10,8 +9,7 @@ http://weechat.org/doc [[introduction]] -Wprowadzenie ------------- +== Wprowadzenie WeeChat (Wee Enhanced Environment for Chat) jest darmowym klientem rozmów, szybkim i lekkim, zaprojektowanym dla wielu systemów operacyjnych. @@ -31,28 +29,23 @@ Prawie wszystkie przykłady umieszczone w tym dokumencie są napisane w Pythonie ale API jest takie same dla wszystkich języków. [[scripts_in_weechat]] -Skrypty w WeeChat ------------------- +== Skrypty w WeeChat [[languages_specifities]] -Specyfika języków -~~~~~~~~~~~~~~~~~ +=== Specyfika języków -Python -^^^^^^ +==== Python * Należy wykonać `import weechat` * Funkcje `print*` są nazwane `prnt*` w pythonie (ponieważ 'print' jest zastrzeżonym słowem kluczowym) * Funkcje są wywoływane za pomocą `weechat.xxx(arg1, arg2, ...)` -Perl -^^^^ +==== Perl * Funkcje są wywoływane za pomocą `weechat::xxx(arg1, arg2, ...);` -Ruby -^^^^ +==== Ruby * Trzeba zdefiniować 'weechat_init' i wywołać 'register' wewnątrz * Funkcje są wywoływane za pomocą `Weechat.xxx(arg1, arg2, ...)` @@ -61,23 +54,20 @@ Ruby (3 callbacki + 3 ciągi danych), wywołanie tej funkcji wygląda następująco: [source,ruby] ----------------------------------------- +---- Weechat.config_new_option(config, section, "nazwa", "ciąg", "opis opcji", "", 0, 0, "wartość", "wartość", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""]) ----------------------------------------- +---- -Lua -^^^ +==== Lua * Funkcje są wywoływane za pomocą `weechat.xxx(arg1, arg2, ...)` -Tcl -^^^ +==== Tcl * Funkcje są wywoływane za pomocą `weechat::xxx arg1 arg2 ...` -Guile (scheme) -^^^^^^^^^^^^^^ +==== Guile (scheme) * Funkcje są wywoływane za pomocą `(weechat:xxx arg1 arg2 ...)` * Następujące funkcje przyjmują pojedynczą listę argumentów (zamiast wielu @@ -88,8 +78,7 @@ Guile (scheme) ** bar_new [[register_function]] -Funkcja rejestrująca -~~~~~~~~~~~~~~~~~~~~ +=== Funkcja rejestrująca Wszystkie skrypty WeeChat muszą się "zarejestrować" w WeeChat, musi to być pierwsza z funkcji WeeChat wywołana w skrypcie. @@ -97,9 +86,9 @@ z funkcji WeeChat wywołana w skrypcie. Prototyp: [source,python] ----------------------------------------- +---- weechat.register(nazwa, autor, wersja, licencja, opis, funkcja_wyłączająca, kodowanie) ----------------------------------------- +---- Argumenty: @@ -118,99 +107,97 @@ Przykład dla skryptu w każdym z języków: * python: [source,python] ----------------------------------------- +---- import weechat weechat.register("test_python", "FlashCode", "1.0", "GPL3", "Skrypt testowy", "", "") weechat.prnt("", "Witaj z pythonowego skryptu!") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- weechat::register("test_perl", "FlashCode", "1.0", "GPL3", "Skrypt testowy", "", ""); weechat::print("", "Witaj z perlowego skryptu!"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def weechat_init Weechat.register("test_ruby", "FlashCode", "1.0", "GPL3", "Skrypt testowy", "", "") Weechat.print("", "Witaj ze skryptu ruby!") return Weechat::WEECHAT_RC_OK end ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- weechat.register("test_lua", "FlashCode", "1.0", "GPL3", "Skrypt testowy", "", "") weechat.print("", "Witaj ze skryptu lua!") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Skrypt testowy" "" "" weechat::print "" "Witaj ze skryptu tcl!" ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (weechat:register "test_scheme" "FlashCode" "1.0" "GPL3" "Skrypt testowy" "" "") (weechat:print "" "Witaj ze skryptu scheme!") ----------------------------------------- +---- [[load_script]] -Ładowanie skryptu -~~~~~~~~~~~~~~~~~ +=== Ładowanie skryptu Zaleca się używanie wtyczki "script" do ładowania skryptów, na przykład: ----------------------------------------- +---- /script load script.py /script load script.pl /script load script.rb /script load script.lua /script load script.tcl /script load script.scm ----------------------------------------- +---- Każdy język posiada również swoją własną komendę: ----------------------------------------- +---- /python load python/skrypt.py /perl load perl/skrypt.pl /ruby load ruby/skrypt.rb /lua load lua/skrypt.lua /tcl load tcl/skrypt.tcl /guile load guile/skrypt.scm ----------------------------------------- +---- Możesz zrobić dowiązanie w katalogu 'język/autoload' jeśli chcesz automatycznie ładować skrypt po uruchomieniu WeeChat. Na przykład dla Pythona: ----------------------------------------- +---- $ cd ~/.weechat/python/autoload $ ln -s ../skrypt.py ----------------------------------------- +---- [NOTE] Podczas instalacji skryptu za pomocą `/script install` automatycznie tworzone jest dowiązanie w katalogu 'autoload'. [[differences_with_c_api]] -Różnice pomiędzy API dla C --------------------------- +== Różnice pomiędzy API dla C API skryptów jest prawie takie same jak API dla wtyczek pisanych w C. Możesz zajrzeć do 'Opisu API wtyczek WeeChat' po więcej informacji na temat @@ -223,27 +210,26 @@ plikiem tekstowym załadowanym przez wtyczkę jak 'python' za pomocą komendy W momencie, kiedy Twój skrypt 'test.py' wywołuje funkcję z API Weechat, wygląda to tak: -........................................ +.... ┌────────────────────────┐ ╔══════════════════╗ │ wtyczka python │ ║ WeeChat "core" ║ ├──────────────┬─────────┤ ╟─────────┐ ║ test.py ─────► │ API skryptów │ C API │ ─────► ║ C API │ ║ └──────────────┴─────────┘ ╚═════════╧════════╝ -........................................ +.... Kiedy WeeChat odwołuje się do Twojego skryptu 'test.py' wygląda to tak: -........................................ +.... ╔══════════════════╗ ┌────────────────────────┐ ║ WeeChat "core" ║ │ wtyczka python │ ║ ┌─────────╢ ├─────────┬──────────────┤ ║ │ C API ║ ─────► │ C API │ API skryptów │ ─────► test.py ╚════════╧═════════╝ └─────────┴──────────────┘ -........................................ +.... [[pointers]] -Wskaźniki -~~~~~~~~~ +=== Wskaźniki Jak już zapewne wiecie nie ma prawdziwych "wskaźników" w skryptach. Dlatego kiedy funkcja API zwraca wskaźnik, jest on konwertowany na ciąg dla skryptu. @@ -259,9 +245,9 @@ Dozwolone są puste ciągi lub "0x0", oznaczają NULL w C. Na przykład, aby wyświetlić dane w rdzennym buforze (główny bufor WeeChat): [source,python] ----------------------------------------- +---- weechat.prnt("", "hi!") ----------------------------------------- +---- [WARNING] W wielu funkcjach, z powodów wydajności, WeeChat nie sprawdza poprawności wskaźników. @@ -269,8 +255,7 @@ Do ciebie należy sprawdzenie poprawności przekazywanych wskaźników, w innym wypadku możesz zobaczyć ładny raport o błędzie ;) [[callbacks]] -Callbacki -~~~~~~~~~ +=== Callbacki Prawie wszystkie callbacki muszą zwrócić WEECHAT_RC_OK lub WEECHAT_RC_ERROR (wyjątkiem jest callback modyfikujący, który zwraca ciąg). @@ -283,18 +268,18 @@ Przykłady callbacków dla każdego języka: * python: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): weechat.prnt("", "timer! data=%s" % data) return weechat.WEECHAT_RC_OK weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * perl: [source,perl] ----------------------------------------- +---- sub timer_cb { my ($data, $remaining_calls) = @_; weechat::print("", "timer! data=$data"); @@ -302,70 +287,68 @@ sub timer_cb { } weechat::hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * ruby: [source,ruby] ----------------------------------------- +---- def timer_cb(data, remaining_calls) Weechat.print("", "timer! data=#{data}"); return Weechat::WEECHAT_RC_OK end Weechat.hook_timer(1000, 0, 1, "timer_cb", "test"); ----------------------------------------- +---- * lua: [source,lua] ----------------------------------------- +---- function timer_cb(data, remaining_calls) weechat.print("", "timer! data="..data) return weechat.WEECHAT_RC_OK end weechat.hook_timer(1000, 0, 1, "timer_cb", "test") ----------------------------------------- +---- * tcl: [source,tcl] ----------------------------------------- +---- proc timer_cb { data remaining_calls } { weechat::print {} "timer! data=$data" return $::weechat::WEECHAT_RC_OK } weechat::hook_timer 1000 0 1 timer_cb test ----------------------------------------- +---- * guile (scheme): [source,lisp] ----------------------------------------- +---- (define (timer_cb data remaining_calls) (weechat:print "" (string-append "timer! data=" data)) weechat:WEECHAT_RC_OK ) (weechat:hook_timer 1000 0 1 "timer_cb" "test") ----------------------------------------- +---- [[script_api]] -API skryptów ------------- +== API skryptów Więcej informacji o funkcjach w API, znajdziesz w 'Opisie API wtyczek WeeChat'. [[script_api_functions]] -Fukcje -~~~~~~ +=== Fukcje Lista funkcji w API skryptów: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Kategoria | Funkcje | ogólne | register @@ -442,16 +425,15 @@ Lista funkcji w API skryptów: hdata_pointer, hdata_time, hdata_hashtable, hdata_update, hdata_get_string | uaktualnienie | upgrade_new, upgrade_write_object, upgrade_read, upgrade_close -|======================================== +|=== [[script_api_constants]] -Stałe -~~~~~ +=== Stałe Lista stałych w API skryptów: [width="100%",cols="^1,10",options="header"] -|======================================== +|=== | Kategoria | Stałe | zwracane kody | WEECHAT_RC_OK, WEECHAT_RC_OK_EAT, WEECHAT_RC_ERROR @@ -479,23 +461,20 @@ Lista stałych w API skryptów: WEECHAT_HOOK_CONNECT_SOCKET_ERROR | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER -|======================================== +|=== [[common_tasks]] -Częste zadania --------------- +== Częste zadania Ten rozdział przedstawia część częstych zadań z przykładami. Użyto tu tylko część rzeczy dostępnych w API, dokładne informacje można znaleźć w Opisie API wtyczek WeeChat'. [[buffers]] -Bufory -~~~~~~ +=== Bufory [[buffers_display_messages]] -Wyświetlanie wiadomości -^^^^^^^^^^^^^^^^^^^^^^^ +==== Wyświetlanie wiadomości Pusty ciąg jest często używany podczas pracy z głównym buforem WeeChat. Dla pozostałych buforów należy podać wskaźnik (jako ciąg, zobacz <<pointers,pointers>>). @@ -503,7 +482,7 @@ pozostałych buforów należy podać wskaźnik (jako ciąg, zobacz <<pointers,po Przykłady: [source,python] ----------------------------------------- +---- # wyświetl "witaj" w głównym buforze weechat.prnt("", "witaj") @@ -530,14 +509,13 @@ weechat.prnt(buffer, "wiadomość na kanale #weechat") # (zauważ, że serwer i kanał są oddzielone przecinkiem) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.prnt(buffer, "wiadomość na kanale #weechat") ----------------------------------------- +---- [NOTE] Funkcja drukująca nazywa się `print` w Perl/Ruby/Lua/Tcl i `prnt` w Pythonie. [[buffers_send_text]] -Wysyłanie tekstu do bufora -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Wysyłanie tekstu do bufora Możesz wysłać tekst lub komendę do bufora. Dokładnie tak jakby wpisać tekst w linii poleceń i wcisnąć [Enter]. @@ -545,18 +523,17 @@ w linii poleceń i wcisnąć [Enter]. Przykłady: [source,python] ----------------------------------------- +---- # wykona polecenie "/help" w obecnym buforze (wyświetli się w głównym buforze) weechat.command("", "/help") # wyśle "witaj" na kanał #weechat (użytkownicy na kanale zobaczą wiadomość) buffer = weechat.info_get("irc_buffer", "freenode,#weechat") weechat.command(buffer, "witaj") ----------------------------------------- +---- [[buffers_new]] -Tworzenie nowego buforu -^^^^^^^^^^^^^^^^^^^^^^^ +==== Tworzenie nowego buforu Możesz stworzyć nowy bufor w skrypcie, następnie użyć go do wyświetlania wiadomości. @@ -567,7 +544,7 @@ podczas zamykania bufora (na przykład przez `/buffer close`). Przykłady: [source,python] ----------------------------------------- +---- # callback dla danych otrzymanych na wejściu def buffer_input_cb(data, buffer, input_data): # ... @@ -586,29 +563,28 @@ weechat.buffer_set(buffer, "title", "To jest tytuł mojego buforu.") # wyłącza logowanie, przez ustawienie zmiennej lokalnej "no_log" na "1" weechat.buffer_set(buffer, "localvar_set_no_log", "1") ----------------------------------------- +---- [[buffers_properties]] -Właściwości buforów -^^^^^^^^^^^^^^^^^^^ +==== Właściwości buforów Możesz odczytać właściwości buforów jako ciąg, liczbę lub wskaźnik. Przykłady: [source,python] ----------------------------------------- +---- buffer = weechat.current_buffer() number = weechat.buffer_get_integer(buffer, "number") name = weechat.buffer_get_string(buffer, "name") short_name = weechat.buffer_get_string(buffer, "short_name") ----------------------------------------- +---- Możliwe jest dodanie, odczytanie lub kasowanie lokalnych zmiennych dla buforów: [source,python] ----------------------------------------- +---- # dodanie zmiennej lokalnej weechat.buffer_set(buffer, "localvar_set_myvar", "my_value") @@ -617,21 +593,19 @@ myvar = weechat.buffer_get_string(buffer, "localvar_myvar") # kasowanie zmiennej lokalnej weechat.buffer_set(buffer, "localvar_del_myvar", "") ----------------------------------------- +---- Aby zobaczyć lokalne zmienne danego bufora, należy wykonać tą komendę w WeeChat: ----------------------------------------- +---- /buffer localvar ----------------------------------------- +---- [[hooks]] -Hooks -~~~~~ +=== Hooks [[hook_command]] -Dodanie nowej komendy -^^^^^^^^^^^^^^^^^^^^^ +==== Dodanie nowej komendy Aby dodać nową komendę należy użyć `hook_command`. Można użyć własnego szablonu dopełnień dla uzupełniania argumentów własnej komendy. @@ -639,7 +613,7 @@ dopełnień dla uzupełniania argumentów własnej komendy. Przykład: [source,python] ----------------------------------------- +---- def my_command_cb(data, buffer, args): # ... return weechat.WEECHAT_RC_OK @@ -654,37 +628,35 @@ hook = weechat.hook_command("myfilter", "opis myfilter", " || add %(filters_names) %(buffers_plugins_names)|*" " || del %(filters_names)|-all", "my_command_cb", "") ----------------------------------------- +---- Następnie w WeeChat: ----------------------------------------- +---- /help myfilter /myfilter argumenty... ----------------------------------------- +---- [[hook_timer]] -Dodanie timera -^^^^^^^^^^^^^^ +==== Dodanie timera Do dodania timera służy `hook_timer`. Przykład: [source,python] ----------------------------------------- +---- def timer_cb(data, remaining_calls): # ... return weechat.WEECHAT_RC_OK # timer wywoływany co minutę, kiedy liczba sekund wynosi 00 weechat.hook_timer(60 * 1000, 60, 0, "timer_cb", "") ----------------------------------------- +---- [[hook_process]] -Wykonuje proces w tle -^^^^^^^^^^^^^^^^^^^^^ +==== Wykonuje proces w tle Do wykonywania procesów w tle służy `hook_process`. Twoje callbacki zostaną wywołane, kiedy dane będą gotowe. Może zostać wywołane wiele razy. @@ -695,7 +667,7 @@ dodatnią, jest to kod zwracany przez komendę. Przykład: [source,python] ----------------------------------------- +---- process_output = "" def my_process_cb(data, command, rc, out, err): @@ -707,11 +679,10 @@ def my_process_cb(data, command, rc, out, err): return weechat.WEECHAT_RC_OK weechat.hook_process("/bin/ls -l /etc", 10 * 1000, "my_process_cb", "") ----------------------------------------- +---- [[url_transfer]] -Transfer URL -^^^^^^^^^^^^ +==== Transfer URL _Nowe w wersji 0.3.7._ @@ -722,7 +693,7 @@ Przykład transferu URL bez opcji: strona HTML jest otrzymywana jako "out" (standardowe wyjście procesu): [source,python] ----------------------------------------- +---- # Wyświetla aktualną stabilną wersję WeeChat. weechat_version = "" @@ -736,7 +707,7 @@ def weechat_process_cb(data, command, rc, out, err): weechat.hook_process("url:http://weechat.org/dev/info/stable/", 30 * 1000, "weechat_process_cb", "") ----------------------------------------- +---- [TIP] Wszystkie informacje o WeeChat dostępne są na stronie http://weechat.org/dev/info @@ -745,7 +716,7 @@ Przykładowy transfer URL z opcją: pobranie najnowszej wersji rozwojowej WeeCha do pliku '/tmp/weechat-devel.tar.gz': [source,python] ----------------------------------------- +---- def my_process_cb(data, command, rc, out, err): if int(rc) >= 0: weechat.prnt("", "End of transfer (rc=%s)" % rc) @@ -754,18 +725,16 @@ def my_process_cb(data, command, rc, out, err): weechat.hook_process_hashtable("url:http://weechat.org/files/src/weechat-devel.tar.gz", { "file_out": "/tmp/weechat-devel.tar.gz" }, 30 * 1000, "my_process_cb", "") ----------------------------------------- +---- Więcej informacji o transferach URL i dostępnych opcjach dla funkcji `hook_process` oraz `hook_process_hashtable` można znaleźć w 'Opisie API wtyczek'. [[config_options]] -Konfiguracja / opcje -~~~~~~~~~~~~~~~~~~~~ +=== Konfiguracja / opcje [[config_options_set_script]] -Ustawianie opcji dla skryptu -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Ustawianie opcji dla skryptu Funkcja `config_is_set_plugin` używana jest do sprawdzenia czy opcja jest ustawiona, `config_set_plugin` ustawia opcję. @@ -773,7 +742,7 @@ Funkcja `config_is_set_plugin` używana jest do sprawdzenia czy opcja jest ustaw Example: [source,python] ----------------------------------------- +---- script_options = { "opcja1" : "wartość1", "opcja2" : "wartość2", @@ -782,18 +751,17 @@ script_options = { for option, default_value in script_options.items(): if not weechat.config_is_set_plugin(option): weechat.config_set_plugin(option, default_value) ----------------------------------------- +---- [[config_options_detect_changes]] -Wykrywanie zmian -^^^^^^^^^^^^^^^^ +==== Wykrywanie zmian Do wykrywania zmian opcji skryptu służy `hook_config`. Przykład: [source,python] ----------------------------------------- +---- SCRIPT_NAME = "myscript" # ... @@ -808,18 +776,17 @@ def config_cb(data, option, value): weechat.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_cb", "") # dla innych języków, zmień "python" na swój język ("perl", "ruby", "lua" or "tcl") ----------------------------------------- +---- [[config_options_weechat]] -Odczyt opcji WeeChat -^^^^^^^^^^^^^^^^^^^^ +==== Odczyt opcji WeeChat Funkcja `config_get` zwraca wskaźnik do opcji. Następnie, w zależności od typu opcji, należy wywołać `config_string`, `config_boolean`, `config_integer` lub `config_color`. [source,python] ----------------------------------------- +---- # string weechat.prnt("", "wartość opcji weechat.look.item_time_format to: %s" % (weechat.config_string(weechat.config_get("weechat.look.item_time_format")))) @@ -835,15 +802,13 @@ weechat.prnt("", "wartość opcji weechat.look.scroll_page_percent to: %d" # color weechat.prnt("", "wartość opcji weechat.color.chat_delimiters to: %s" % (weechat.config_color(weechat.config_get("weechat.color.chat_delimiters")))) ----------------------------------------- +---- [[irc]] -IRC -~~~ +=== IRC [[irc_catch_messages]] -Przechwytywanie wiadomości -^^^^^^^^^^^^^^^^^^^^^^^^^^ +==== Przechwytywanie wiadomości Wtyczka IRC wysyła dwa sygnały dla otrzymanej wiadomości (`xxx` jest wewnętrzną nazwą serwera IRC, `yyy` to komenda IRC jak JOIN, QUIT, PRIVMSG, 301, ..): @@ -855,7 +820,7 @@ xxx,irc_in2_yyy:: sygnał wysłany po przetworzeniu wiadomości [source,python] ----------------------------------------- +---- def join_cb(data, sygnał, signal_data): # sygnał to na przykład: "freenode,irc_in2_join" # signal_data to wiadomość IRC, na przykład: ":nick!user@host JOIN :#channel" @@ -870,53 +835,49 @@ def join_cb(data, sygnał, signal_data): # przydatne jest użycie "*" jako serwera, aby złapać wiadomość JOIN na wszystkich # serwerach IRC weechat.hook_signal("*,irc_in2_join", "join_cb", "") ----------------------------------------- +---- [[irc_modify_messages]] -Modyfikowanie wiadomości -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Modyfikowanie wiadomości Wtyczka IRC wysyła "modyfikator" nazwany "irc_in_xxx" ("xxx" to komenda IRC) dla otrzymanej wiadomości, żeby można było ją zmodyfikować. [source,python] ----------------------------------------- +---- def modifier_cb(data, modifier, modifier_data, string): # dodaje nazwę serwera do wszystkich otrzymanych wiadomości # (nie jest to może bardzo przydatne, ale to tylko przykład!) return "%s %s" % (string, modifier_data) weechat.hook_modifier("irc_in_privmsg", "modifier_cb", "") ----------------------------------------- +---- [WARNING] Zniekształcone wiadomości mogą uszkodzić WeeChat, lub spowodować wiele problemów! [[irc_message_parse]] -Przetwarzanie wiadomości -^^^^^^^^^^^^^^^^^^^^^^^^ +==== Przetwarzanie wiadomości _Nowe w wersji 0.3.4._ Można przetwarzać wiadomości IRC za pomocą info_hashtable zwanej "irc_message_parse". [source,python] ----------------------------------------- +---- dict = weechat.info_get_hashtable("irc_message_parse", { "message": ":nick!user@host PRIVMSG #weechat :message here" }) weechat.prnt("", "dict: %s" % dict) # wyjście: # dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'} ----------------------------------------- +---- [[infos]] -Informacje -~~~~~~~~~~ +=== Informacje [[infos_weechat_version]] -Wersja WeeChat -^^^^^^^^^^^^^^^ +==== Wersja WeeChat Najprostszym sposobem na sprawdzenie wersji to pozyskanie "version_number" i wykonanie porównania między liczbą całkowitą a heksadecymalnym numerem wersji. @@ -924,13 +885,13 @@ i wykonanie porównania między liczbą całkowitą a heksadecymalnym numerem we Przykład: [source,python] ----------------------------------------- +---- version = weechat.info_get("version_number", "") or 0 if int(version) >= 0x00030200: weechat.prnt("", "This is WeeChat 0.3.2 or newer") else: weechat.prnt("", "This is WeeChat 0.3.1 or older") ----------------------------------------- +---- [NOTE] Wersje ≤ 0.3.1.1 zwracają pusty ciąg dla 'info_get("version_number")' należy @@ -939,38 +900,35 @@ sprawdzić, czy zwracana wartość *nie* jest pusta. Aby otrzymać ciąg z numerem wersji: [source,python] ----------------------------------------- +---- # wyświetli to na przykład "Version 0.3.2" weechat.prnt("", "Version %s" % weechat.info_get("version", "")) ----------------------------------------- +---- [[infos_other]] -Inne informacje -^^^^^^^^^^^^^^^ +==== Inne informacje [source,python] ----------------------------------------- +---- # katalog domowy WeeChat, na przykład: "/home/xxxx/.weechat" weechat.prnt("", "Katalog domowy WeeChat: %s" % weechat.info_get("weechat_dir", "")) # nieaktywność klawiatury weechat.prnt("", "Nieaktywny od %s sekund" % weechat.info_get("inactivity", "")) ----------------------------------------- +---- [[infolists]] -Infolisty -~~~~~~~~~ +=== Infolisty [[infolists_read]] -Odczytanie infolisty -^^^^^^^^^^^^^^^^^^^^ +==== Odczytanie infolisty Można odczytać infolisty wbudowane w WeeChat lub inne wtyczki. Przykład: [source,python] ----------------------------------------- +---- # odczyta infolistę "buffer", aby otrzymać listę buforów infolist = weechat.infolist_get("buffer", "", "") if infolist: @@ -978,7 +936,7 @@ if infolist: name = weechat.infolist_string(infolist, "name") weechat.prnt("", "buffer: %s" % name) weechat.infolist_free(infolist) ----------------------------------------- +---- [IMPORTANT] Nie zapomnij wywołać `infolist_free`, aby zwolnić pamięć użyta przez infolistę, diff --git a/doc/pl/weechat_tester.pl.txt b/doc/pl/weechat_tester.pl.txt index 6ec412941..f184e7a0d 100644 --- a/doc/pl/weechat_tester.pl.txt +++ b/doc/pl/weechat_tester.pl.txt @@ -1,11 +1,9 @@ -Poradnik testera WeeChat -======================== += Poradnik testera WeeChat Sébastien Helleu <flashcode@flashtux.org> [[purpose]] -Cel ---- +== Cel Wielu wdzięcznych użytkowników pyta nas jak mogą pomóc w rozwoju WeeChat. Najłatwiejszym (a zarazem najtrudniejszym) sposobem jest testowanie! @@ -27,8 +25,7 @@ zajęci cały czas implementowaniem nowych rzeczy (oraz poprawianiem błędów). [[prepare_system]] -Przygotuj swój system ---------------------- +== Przygotuj swój system Bardzo nam pomoże, jeśli włączysz linuksowe pliki 'core': jeśli WeeChat zawiesi się Linux zapisze plik zwany 'core'. Plik ten zawiera użyteczne informacje @@ -36,14 +33,13 @@ pozwalające dokładnie zlokalizować błąd w WeeChat. Jeśli korzystasz z powłoki 'bash', dodaj następującą linijkę do `~/.bashrc`: ----------------------------------------- +---- ulimit -c unlimited ----------------------------------------- +---- [[download]] -Pobieranie wersji rozwojowej ----------------------------- +== Pobieranie wersji rozwojowej Świeży kod (z najnowszymi błędami i funkcjami) przechowywany jest w repozytorium GIT. @@ -54,57 +50,55 @@ Możesz się zdecydować na własnoręczne zbudowanie (zalecana metoda): wersji WeeChat. [[get_sources]] -Pobierz i zbuduj źródła -~~~~~~~~~~~~~~~~~~~~~~~ +=== Pobierz i zbuduj źródła Najpierw stwórz katalog, na przykład 'weechat-git': ----------------------------------------- +---- $ mkdir ~/weechat-git $ cd ~/weechat-git ----------------------------------------- +---- Jeśli masz zainstalowanego gita, po prostu sklonuj repozytorium (zalecana metoda): ----------------------------------------- +---- $ git clone git://git.sv.gnu.org/weechat.git $ cd weechat ----------------------------------------- +---- UWAGA: Później możesz wykonać w tym katalogu "`git pull`", aby pobrać najnowsze poprawki. Oczywiście możesz pobrać paczkę oznaczoną jako 'devel': ----------------------------------------- +---- $ wget http://www.weechat.org/files/src/weechat-devel.tar.bz2 $ tar xvjf weechat-devel.tar.bz2 $ cd weechat-devel ----------------------------------------- +---- Do zbudowania źródeł zaleca się cmake: ----------------------------------------- +---- $ mkdir build $ cd build $ cmake .. -DPREFIX=$HOME/weechat-git -DWEECHAT_HOME=~/.weechat-dev -DCMAKE_BUILD_TYPE=Debug $ make $ make install ----------------------------------------- +---- Jeśli nie posiadasz cmake, nadal jest możliwe użycie autotools: ----------------------------------------- +---- $ ./autogen.sh $ ./configure --prefix=$HOME/weechat-git WEECHAT_HOME=~/.weechat-dev $ make $ make install ----------------------------------------- +---- [[install_binary_package]] -Instalowanie pakietów binarnych -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +=== Instalowanie pakietów binarnych W zależności od dystrybucji Linuksa: @@ -115,17 +109,16 @@ W zależności od dystrybucji Linuksa: [[run]] -Uruchomienie WeeChat --------------------- +== Uruchomienie WeeChat Zaleca się uruchomianie WeeChat z innym katalogiem (różnym od wersji stabilnej), za pomocą opcji `--dir`. Komenda to: ----------------------------------------- +---- $ ~/weechat-git/bin/weechat ----------------------------------------- +---- Jeśli nadal nie śpisz powinieneś ujrzeć znajomy interfejs i chwalić się z posiadania najnowszej możliwej wersji WeeChat. ;) @@ -138,8 +131,7 @@ Jeśli wszystko będzie w porządku - też nam o tym powiedz, potrzebujemy Twoje [[links]] -Przydatne linki ---------------- +== Przydatne linki * Repozytorium GIT: http://git.savannah.gnu.org/gitweb/?p=weechat.git * System śledzenia błędów: https://savannah.nongnu.org/bugs/?group=weechat diff --git a/doc/ru/weechat_quickstart.ru.txt b/doc/ru/weechat_quickstart.ru.txt index d96053e42..0f7ab4308 100644 --- a/doc/ru/weechat_quickstart.ru.txt +++ b/doc/ru/weechat_quickstart.ru.txt @@ -1,43 +1,41 @@ -WeeChat Quick Start Guide -========================= += WeeChat Quick Start Guide Sébastien Helleu <flashcode@flashtux.org> [[start]] -Запуск WeeChat --------------- +== Запуск WeeChat + Рекомендованый эмулятор терминала для X сессии это rxvt-unicode. (в нем хорошая поддержка UTF-8, и отсутствуют проблемы с хоткеями). // TRANSLATION MISSING Run from your shell: ----------------------------------------- +---- $ weechat ----------------------------------------- +---- [[help_options]] -помощь \ настройки ------------------- +== помощь \ настройки В WeeChat есть справка по командам, просто наберите: ----------------------------------------- +---- /help ----------------------------------------- +---- Что бы получить справку по определенной команде, наберите: ----------------------------------------- +---- /help команда ----------------------------------------- +---- Для задания настроек используйте: ----------------------------------------- +---- /set config.section.option value ----------------------------------------- +---- (где `config` имя конфигурации (`weechat` или имя плагина для настройки), `section` группа в которой настройка и `option` как @@ -52,27 +50,27 @@ WeeChat после изменений в настройках) * Показать все опции (WeeChat, и плагинов): ----------------------------------------- +---- /set ----------------------------------------- +---- * Показать опции WeeChat: ----------------------------------------- +---- /set weechat.* ----------------------------------------- +---- * Показать опции IRC плагина: ----------------------------------------- +---- /set irc.* ----------------------------------------- +---- Вы можете получить справку по любой опции используя `/help`, на пример: ----------------------------------------- +---- /help weechat.look.highlight ----------------------------------------- +---- Все настройки WeeChat сохраняются при выходе (или используя команду `/save` для немедленного сохранения) @@ -82,8 +80,7 @@ WeeChat после изменений в настройках) [[core_vs_plugins]] -Ядро vs плагины ---------------- +== Ядро vs плагины Ядро WeeChat используется только для вывода информации на экран пользователя. Это значит что само по себе ядро, без плагинов, бесполезно @@ -96,25 +93,23 @@ WeeChat после изменений в настройках) [[create_irc_server]] -Добавление IRC сервера ----------------------- +== Добавление IRC сервера Вы можете добавить сервер используя команду `/server`, на пример: ----------------------------------------- +---- /server add oftc irc.oftc.net/6667 ----------------------------------------- +---- Вы всегда можете обратиться к справке набрав: ----------------------------------------- +---- /help server ----------------------------------------- +---- [[irc_server_options]] -Дополнительные опции сервера ----------------------------- +== Дополнительные опции сервера WeeChat использует стандартные значения для всех серверов ("fall backs") если вы не установили их в ручную. @@ -126,72 +121,71 @@ WeeChat использует стандартные значения для вс На пример: есть ники по умолчанию (базируются на логине un*x системы), и вы можете переназначить их для сервера oftc используя команду: ----------------------------------------- +---- /set irc.server.oftc.nicks "mynick,mynick2,mynick3,mynick4,mynick5" ----------------------------------------- +---- Что бы установить имя, и реальное Имя: ----------------------------------------- +---- /set irc.server.oftc.username "My user name" /set irc.server.oftc.realname "My real name" ----------------------------------------- +---- Для соединения с сервером при старте программы: ----------------------------------------- +---- /set irc.server.oftc.autoconnect on ----------------------------------------- +---- // TRANSLATION MISSING If SASL is available on server, you can use it for authentication (you will be identified before you join channels): ----------------------------------------- +---- /set irc.server_default.sasl_mechanism dh-blowfish /set irc.server.oftc.sasl_username "mynick" /set irc.server.oftc.sasl_password "xxxxxxx" ----------------------------------------- +---- // TRANSLATION MISSING To run a command after connection to server, for example to authenticate with nickserv (only if you don't use SASL for authentication): ----------------------------------------- +---- /set irc.server.oftc.command "/msg nickserv identify xxxxxxx" ----------------------------------------- +---- [NOTE] команды могут быть разделены используя ';' (двоеточия). Для автовхода на каналы при подключении используйте: ----------------------------------------- +---- /set irc.server.oftc.autojoin "#channel1,#channel2" ----------------------------------------- +---- Что бы удалить значение опции, и использовать ее стандартное значение на пример для ников по умолчанию (irc.server_default.nicks): ----------------------------------------- +---- /set irc.server.oftc.nicks null ----------------------------------------- +---- Другие настройки вы можете изменить используя следующую команду (заменяя "xxx" соответствующей опцией) ----------------------------------------- +---- /set irc.server.oftc.xxx value ----------------------------------------- +---- [[connect_to_irc_server]] -Подключение к серверу, и автовход на каналы -------------------------------------------- +== Подключение к серверу, и автовход на каналы ----------------------------------------- +---- /connect oftc ----------------------------------------- +---- [NOTE] Эту команду можно использовать для подключения к серверу без его @@ -204,37 +198,35 @@ with nickserv (only if you don't use SASL for authentication): Можно отключить это совмещение, что бы получить раздельные буферы серверов. ----------------------------------------- +---- /set irc.look.server_buffer independent ----------------------------------------- +---- [[join_part_irc_channels]] -Подключение\разделение IRC каналов ----------------------------------- +== Подключение\разделение IRC каналов зайти на канал: ----------------------------------------- +---- /join #channel ----------------------------------------- +---- разделить канал(оставить буфер открытым): ----------------------------------------- +---- /part [quit message] ----------------------------------------- +---- закрыть буфер сервера, или канала (`/close` это алиас `/buffer close`): ----------------------------------------- +---- /close ----------------------------------------- +---- [[buffer_window]] -Управление буферами\окнами --------------------------- +== Управление буферами\окнами Буфер это компонент привязанный к плагины номером, категорией и именем. Буфер содержит данные которые выводятся на экран. @@ -245,24 +237,23 @@ with nickserv (only if you don't use SASL for authentication): Команды для управления буферами и окнами: ----------------------------------------- +---- /buffer /window ----------------------------------------- +---- (Я не буду повторять что вы можете получить помощь набрав /help) На пример, что бы разделить окно на маленькое (1/3 ширины) и большое (2/3), используйте команду: ----------------------------------------- +---- /window splitv 33 ----------------------------------------- +---- [[key_bindings]] -Комбинации клавиш ------------------ +== Комбинации клавиш В WeeChat по умолчанию много горячих клавиш. Все из них задокументированы, но необходимо знать жизненно важные: @@ -281,26 +272,25 @@ with nickserv (only if you don't use SASL for authentication): На пример, что бы назначить на meta-y (alt-y) команду `/buffer close`: ----------------------------------------- +---- /key bind (press meta-k) (press meta-y) /buffer close ----------------------------------------- +---- Команда должна выглядеть так: ----------------------------------------- +---- /key bind meta-y /buffer close ----------------------------------------- +---- Что бы удалить: ----------------------------------------- +---- /key unbind meta-y ----------------------------------------- +---- [[plugins_scripts]] -Плагины/Скрипты ---------------- +== Плагины/Скрипты В некоторых дистрибутивах, на пример в Debian. Плагины доступны как пакеты (на пример weechat-plugins) @@ -316,8 +306,7 @@ for more info). [[more_doc]] -Больше документации -------------------- +== Больше документации Для остальных вопросов вы можете прочитать FAQ или документацию: http://weechat.org/doc |