36 |
|
|
37 |
@title WeeChat - Gui@'on de usuario. |
@title WeeChat - Gui@'on de usuario. |
38 |
@subtitle Cliente IRC r@'apido, peque@~no y extensible |
@subtitle Cliente IRC r@'apido, peque@~no y extensible |
39 |
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 30 de octubre de 2005 |
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 4 de noviembre de 2005 |
40 |
|
|
41 |
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}> |
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}> |
42 |
|
|
298 |
@item look_color_actions |
@item look_color_actions |
299 |
Mostrar acciones con colores diferentes@* |
Mostrar acciones con colores diferentes@* |
300 |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
|
@item look_remove_colors_from_msgs |
|
|
Quitar colores en los mensajes entrantes@* |
|
|
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
|
301 |
@item look_nicklist |
@item look_nicklist |
302 |
Mostrar ventana de usuarios (para las ventanas de canal)@* |
Mostrar ventana de usuarios (para las ventanas de canal)@* |
303 |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
450 |
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@* |
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightcyan'@* |
451 |
@item col_input_delimiters |
@item col_input_delimiters |
452 |
Color for input text (delimiters)@* |
Color for input text (delimiters)@* |
453 |
Typo: color (color Curses @'o Gtk), valor por defecto: 'white'@* |
Typo: color (color Curses @'o Gtk), valor por defecto: 'cyan'@* |
454 |
@item col_input_bg |
@item col_input_bg |
455 |
Color de fondo para la ventana de entrada@* |
Color de fondo para la ventana de entrada@* |
456 |
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@* |
Typo: color (color Curses @'o Gtk), valor por defecto: 'default'@* |
601 |
@item irc_highlight |
@item irc_highlight |
602 |
Comma separated list of words to highlight (case insensitive comparison, words may begin or end with "*" for partial match)@* |
Comma separated list of words to highlight (case insensitive comparison, words may begin or end with "*" for partial match)@* |
603 |
Typo: cadena (cualquier cadena), valor por defecto: ''@* |
Typo: cadena (cualquier cadena), valor por defecto: ''@* |
604 |
|
@item irc_colors_receive |
605 |
|
Keep colors from incoming messages@* |
606 |
|
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
607 |
|
@item irc_colors_send |
608 |
|
Allow user to send colors with special codes (%B=bold, %Cxx,yy=color, %U=underline, %R=reverse)@* |
609 |
|
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'on'@* |
610 |
@item dcc_auto_accept_files |
@item dcc_auto_accept_files |
611 |
Aceptar autom@'aticamente los ficheros dcc entrantes@* |
Aceptar autom@'aticamente los ficheros dcc entrantes@* |
612 |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@* |
Typo: booleano (valores: 'on' u 'off'), valor por defecto: 'off'@* |
1837 |
@* |
@* |
1838 |
@emph{Notes:}@* |
@emph{Notes:}@* |
1839 |
@* |
@* |
1840 |
Function called when message is received has to return one of these values:@* |
Function called when message is received has to return one of these |
1841 |
@itemize @minus |
values (prefixed by ``weechat::'' for Perl and ``weechat.'' for |
1842 |
@item @option{PLUGIN_RC_KO or -1}: function failed |
Python):@* |
1843 |
@item @option{PLUGIN_RC_OK or 0}: function successfully completed |
@itemize @minus |
1844 |
@item @option{PLUGIN_RC_OK_IGNORE_WEECHAT or 1}: message will not be sent to |
@item @option{PLUGIN_RC_KO}: function failed |
1845 |
|
@item @option{PLUGIN_RC_OK}: function successfully completed |
1846 |
|
@item @option{PLUGIN_RC_OK_IGNORE_WEECHAT}: message will not be sent to |
1847 |
WeeChat |
WeeChat |
1848 |
@item @option{PLUGIN_RC_OK_IGNORE_PLUGINS or 2}: message will not be sent to |
@item @option{PLUGIN_RC_OK_IGNORE_PLUGINS}: message will not be sent to |
1849 |
other plugins |
other plugins |
1850 |
@item @option{PLUGIN_RC_OK_IGNORE_ALL or 3}: message will not be sent to |
@item @option{PLUGIN_RC_OK_IGNORE_ALL}: message will not be sent to |
1851 |
WeeChat neither other plugins |
WeeChat neither other plugins |
1852 |
@end itemize |
@end itemize |
1853 |
@* |
@* |
1896 |
@* |
@* |
1897 |
@emph{Notes:}@* |
@emph{Notes:}@* |
1898 |
@* |
@* |
1899 |
Function called when message is received has to return one of these values:@* |
Function called when message is received has to return one of these |
1900 |
|
values (prefixed by ``weechat::'' for Perl and ``weechat.'' for |
1901 |
|
Python):@* |
1902 |
@itemize @minus |
@itemize @minus |
1903 |
@item @option{PLUGIN_RC_KO or -1}: function failed |
@item @option{PLUGIN_RC_KO}: function failed |
1904 |
@item @option{PLUGIN_RC_OK or 0}: function successfully completed |
@item @option{PLUGIN_RC_OK}: function successfully completed |
1905 |
@end itemize |
@end itemize |
1906 |
@* |
@* |
1907 |
|
|
2221 |
Three plugins are provided with WeeChat to load scripts: Perl, |
Three plugins are provided with WeeChat to load scripts: Perl, |
2222 |
Python and Ruby. |
Python and Ruby. |
2223 |
|
|
2224 |
@subsection Perl scripts |
@subsection Load/unload scripts |
2225 |
|
|
2226 |
@subsubsection Cargar/descargar programas Perl |
Perl scripts are loaded and unloaded with @command{/perl}, |
2227 |
|
@command{/python} and @command{/ruby} commands. |
2228 |
|
(type @kbd{/help} within WeeChat to get help about commands).@* |
2229 |
|
|
2230 |
Los programas Perl se cargan y descargan con el comando @command{/perl} |
@emph{Examples:}@* |
|
(escribiendo @kbd{/help perl} en WeeChat para obtener la ayuda acerca del comando).@* |
|
|
|
|
|
@emph{Ejemplos:}@* |
|
2231 |
@itemize @bullet |
@itemize @bullet |
2232 |
@item |
@item |
2233 |
Cargar un programa Perl: @kbd{/perl load /tmp/ejemplo.pl}@* |
Load a Perl script: @kbd{/perl load /tmp/sample.pl}@* |
|
@item Descargar todos los programas Perl: @kbd{/perl unload}@* |
|
2234 |
@item |
@item |
2235 |
Listar los programas Perl cargados: @kbd{/perl}@* |
Unload all Perl scripts: @kbd{/perl unload}@* |
|
@end itemize |
|
|
|
|
|
@subsubsection Interfaz WeeChat / Perl |
|
|
|
|
|
@itemize @bullet |
|
2236 |
@item |
@item |
2237 |
@command{weechat::register ( nombre, versi@'on, funci@'on_final, descripci@'on );}@* |
List all Perl scripts: @kbd{/perl}@* |
|
@* |
|
|
Es la primera funci@'on a la que llamar en el programa Perl.@* |
|
|
Todos los programas en Perl para WeeChat deben llamar esta funci@'on.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{nombre}: nombre @'unico para identificar el programa (cada programa debe |
|
|
tener un nombre distinto) |
|
|
@item @option{versi@'on}: versi@'on del programa |
|
|
@item @option{funci@'on_final}: funci@'on Perl llamada cuando el programa finaliza |
|
|
(par@'ametro facultativo, una cadena llena significa que no hay ninguna funci@'on que llamar) |
|
|
@item @option{descripci@'on}: descripci@'on breve del programa |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if script was registered, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplo:}@* |
|
|
@* |
|
|
@code{weechat::register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@* |
|
|
@* |
|
|
|
|
2238 |
@item |
@item |
2239 |
@command{weechat::print ( mensaje, [canal, [servidor]] );}@* |
Load a Python script: @kbd{/python load /tmp/sample.py}@* |
|
@* |
|
|
Escribe un mensaje en un canal.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{mensaje}: mensaje a escribir |
|
|
@item @option{canal}: nombre del canal |
|
|
@item @option{servidor}: (opcional) nombre interno del servidor |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if successful, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplos:}@* |
|
|
@* |
|
|
@code{weechat::print ("mensaje");}@* |
|
|
@code{weechat::print ("mensaje", "#weechat");}@* |
|
|
@code{weechat::print ("mensaje", "#weechat", "freenode");}@* |
|
|
@* |
|
|
|
|
2240 |
@item |
@item |
2241 |
@command{weechat::print_infobar ( retraso, mensaje );}@* |
Unload all Python scripts: @kbd{/python unload}@* |
|
@* |
|
|
Escribir un mensaje en la barra de informaciones.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{plazo}: periodo en segundo durante el cual se mostrar@'a el mensaje |
|
|
(si es 0, el mensaje no se borrar@'a). |
|
|
@item @option{message}: mensaje que se escribir@'a en la barra de informaciones. |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if successful, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplo:}@* |
|
|
@* |
|
|
@code{weechat::print_infobar (5, "mensaje");}@* |
|
|
@* |
|
|
|
|
2242 |
@item |
@item |
2243 |
@command{weechat::add_message_handler ( nombre, funci@'on );}@* |
List all Python scripts: @kbd{/python}@* |
|
@* |
|
|
Adjunta una funci@'on Perl a un mensaje IRC.@* |
|
|
Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{nombre}: nombre del mensaje IRC que producir@'a la llamada a la funci@'on.@* |
|
|
Para saber qu@'e tipo de mensajes IRC existen puede leer las |
|
|
RFC 1459 y/o 2812:@* |
|
|
RFC 1459: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc1459.txt}@* |
|
|
RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt} |
|
|
@item @option{funci@'on}: funci@'on en Perl llamada cuando se reciba el mensaje. |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if Perl function was attached, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplo:}@* |
|
|
@* |
|
|
@code{weechat::add_message_handler ("privmsg", mi_funcion);}@* |
|
|
@code{sub mi_funcion}@* |
|
|
@code{@{ }@* |
|
|
@code{@ @ @ @ weechat::print ("serveur=$_[0]\n");}@* |
|
|
@code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@* |
|
|
@code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@* |
|
|
@code{@ @ @ @ weechat::print ("masc=$mascara, canal=$canal, msj=$mensaje\n");}@* |
|
|
@code{@ @ @ @ return 0;}@* |
|
|
@code{@} }@* |
|
|
@* |
|
|
@emph{Notes:}@* |
|
|
@* |
|
|
Function called when message is received has to return one of these values:@* |
|
|
@itemize @minus |
|
|
@item @option{-1}: function failed |
|
|
@item @option{0}: function successfully completed |
|
|
@item @option{1}: message will not be sent to WeeChat |
|
|
@item @option{2}: message will not be sent to other plugins |
|
|
@item @option{3}: message will not be sent to WeeChat neither other plugins |
|
2244 |
@end itemize |
@end itemize |
|
@* |
|
2245 |
|
|
2246 |
@item |
@subsection WeeChat / Scripts API |
|
@command{weechat::add_command_handler ( nombre, funci@'on );}@* |
|
|
@* |
|
|
A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Perl.@* |
|
|
Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{nombre}: nombre del nuevo comando@* |
|
|
Puede ser un comando que ya existe, y en este caso el nuevo comando sustituir@'a |
|
|
el antiguo. Ten cuidado cuando sustituyas a un comando de WeeChat, no podr@'a acceder |
|
|
al antiguo comando si el script Perl est@'a cargado. |
|
|
@item @option{funcion}: funci@'on Perl assiciada al comando. |
|
|
@item @option{description}: command description (displayed by /help |
|
|
command) |
|
|
@item @option{arguments}: short description of command arguments |
|
|
(displayed by /help command) |
|
|
@item @option{arguments_description}: long description of command |
|
|
arguments (displayed by /help command) |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if Perl function was attached, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplo:}@* |
|
|
@* |
|
|
@code{weechat::add_command_handler ("comando", mi_comando);}@* |
|
|
@code{sub mi_comando}@* |
|
|
@code{@{ }@* |
|
|
@code{@ @ @ @ weechat::print("Servidor: $_[0], Par@'ametros: $_[1]\n");}@* |
|
|
@code{@ @ @ @ return 0;}@* |
|
|
@code{@} }@* |
|
|
@* |
|
|
@emph{Notes:}@* |
|
|
@* |
|
|
Function called when command is executed has to return one of these values:@* |
|
|
@itemize @minus |
|
|
@item @option{-1}: function failed |
|
|
@item @option{0}: function successfully completed |
|
|
@end itemize |
|
|
@* |
|
2247 |
|
|
2248 |
|
@itemize @bullet |
2249 |
@item |
@item |
2250 |
@command{weechat::remove_handler ( name, function );}@* |
Perl: @command{weechat::register ( name, version, shutdown_function, |
2251 |
@* |
description );}@* |
2252 |
Remove a message or command handler.@* |
Python: @command{weechat.register ( name, version, shutdown_function, |
2253 |
|
description )}@* |
2254 |
|
@* |
2255 |
|
This is first function to call in script.@* |
2256 |
|
All scripts for WeeChat should call this function.@* |
2257 |
|
|
2258 |
@emph{Arguments:} |
@emph{Arguments:} |
2259 |
@itemize @minus |
@itemize @minus |
2260 |
@item @option{name}: name of IRC message or command handler |
@item @option{name}: unique name to identify script (each script must have |
2261 |
@item @option{function}: Perl function |
unique name) |
2262 |
|
@item @option{version}: script's version |
2263 |
|
@item @option{shutdown_function}: function called when script is |
2264 |
|
unloaded (optional parameter, empty string means nothing is called at the end) |
2265 |
|
@item @option{description}: short description of script. |
2266 |
@end itemize |
@end itemize |
2267 |
@* |
@* |
2268 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2269 |
@* |
@* |
2270 |
1 if successful, 0 if error occured.@* |
1 if script was registered, 0 if error occured.@* |
2271 |
@* |
@* |
2272 |
@emph{Example:}@* |
@emph{Perl example:}@* |
2273 |
@* |
@* |
2274 |
@code{weechat::remove_handler ("command", my_command);}@* |
@code{weechat::register ("sample", "1.0", "sample_end", "Sample |
2275 |
|
script!");}@* |
2276 |
|
@* |
2277 |
|
@emph{Python example:}@* |
2278 |
|
@* |
2279 |
|
@code{weechat.register ("sample", "1.0", "sample_end", "Sample |
2280 |
|
script!")}@* |
2281 |
@* |
@* |
2282 |
|
|
2283 |
@item |
@item |
2284 |
@command{weechat::command ( command, [channel, [server]] );}@* |
Perl: @command{weechat::print ( message, [channel, [server]] );}@* |
2285 |
|
Python: @command{weechat.prnt ( message, [channel, [server]] )}@* |
2286 |
@* |
@* |
2287 |
Execute a command or send a message to a channel.@* |
Print message in a channel.@* |
2288 |
|
|
2289 |
@emph{Arguments:} |
@emph{Arguments:} |
2290 |
@itemize @minus |
@itemize @minus |
2291 |
@item @option{command}: command to execute (or message to send in a channel) |
@item @option{message}: message to display |
2292 |
@item @option{channel}: name of channel |
@item @option{channel}: name of channel |
2293 |
@item @option{server}: internal name of server |
@item @option{server}: internal name of server |
2294 |
@end itemize |
@end itemize |
2297 |
@* |
@* |
2298 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2299 |
@* |
@* |
2300 |
@emph{Examples:}@* |
@emph{Perl examples:}@* |
|
@* |
|
|
@code{weechat::command ("hello world!");}@* |
|
|
@code{weechat::command ("/kick toto please leave this chan", "#weechat");}@* |
|
|
@code{weechat::command ("/nick newnick", "", "freenode");}@* |
|
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat::get_info ( nombre, [servidor, [canal] ] );}@* |
|
|
@* |
|
|
Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{nombre}: nombre de la informaci@'on que se quiere obtener: |
|
|
@itemize @minus |
|
|
@item @option{version}: obtener la versi@'on de WeeChat |
|
|
@item @option{nick}: obtener el seud@'onimo |
|
|
@item @option{channel}: obtener el nombre del canal |
|
|
@item @option{server}: obtener el nombre del servidor |
|
|
@item @option{away}: get ``away'' flag |
|
|
@item @option{weechat_dir}: get WeeChat home dir |
|
|
@item @option{weechat_libdir}: get WeeChat system lib dir |
|
|
@item @option{weechat_sharedir}: get WeeChat system share dir |
|
|
@end itemize |
|
|
@item @option{servidor}: nombre interno del servidor |
|
|
@item @option{canal}: nombre del canal |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
Asked info, empty if error occured or info was not found.@* |
|
|
@* |
|
|
@emph{Ejemplos:}@* |
|
|
@* |
|
|
@code{$version = weechat::get_info("version");}@* |
|
|
@code{$nick = weechat::get_info("nick", "freenode");}@* |
|
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat::get_dcc_info ( );}@* |
|
|
@* |
|
|
Get DCC list.@* |
|
|
|
|
|
Returned array has following fields: |
|
|
@itemize @minus |
|
|
@item server: IRC server |
|
|
@item channel: IRC channel |
|
|
@item type: DCC type: |
|
|
@itemize @minus |
|
|
@item 0: chat (received) |
|
|
@item 1: chat (sent) |
|
|
@item 2: file (receiving) |
|
|
@item 3: file (sending) |
|
|
@end itemize |
|
|
@item status: DCC status: |
|
|
@itemize @minus |
|
|
@item 0: waiting |
|
|
@item 1: connecting |
|
|
@item 2: active |
|
|
@item 3: done |
|
|
@item 4: failed |
|
|
@item 5: aborted |
|
|
@end itemize |
|
|
@item start_time: date/time of DCC creation |
|
|
@item start_transfer: date/time of transfer start |
|
|
@item addr: remote address |
|
|
@item port: port used for DCC |
|
|
@item nick: remote nick |
|
|
@item filename: filename |
|
|
@item local_filename: local filename |
|
|
@item size: file size |
|
|
@item pos: current position in file |
|
|
@item start_resume: restart position after interruption |
|
|
@item bytes_per_sec: bytes sent/received per second |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
2301 |
@* |
@* |
2302 |
DCC list, 0 if error occured.@* |
@code{weechat::print ("message");}@* |
2303 |
|
@code{weechat::print ("message", "#weechat");}@* |
2304 |
|
@code{weechat::print ("message", "#weechat", "freenode");}@* |
2305 |
@* |
@* |
2306 |
|
@emph{Python examples:}@* |
|
@item |
|
|
@command{weechat::get_config ( option );}@* |
|
2307 |
@* |
@* |
2308 |
Get WeeChat config option value.@* |
@code{weechat.prnt ("message")}@* |
2309 |
|
@code{weechat.prnt ("message", "#weechat")}@* |
2310 |
@emph{Arguments:} |
@code{weechat.prnt ("message", "#weechat", "freenode")}@* |
|
@itemize @minus |
|
|
@item @option{option}: name of option |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
Value of option, empty if error occured or option was not found.@* |
|
|
@* |
|
|
@emph{Examples:}@* |
|
|
@* |
|
|
@code{$value1 = weechat::get_config ("look_nicklist");}@* |
|
|
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@* |
|
2311 |
@* |
@* |
2312 |
|
|
2313 |
@item |
@item |
2314 |
@command{weechat::set_config ( option, value );}@* |
Perl: @command{weechat::print_infobar ( delay, message );}@* |
2315 |
|
Python: @command{weechat.print_infobar ( delay, message )}@* |
2316 |
@* |
@* |
2317 |
Get WeeChat config option value.@* |
Print message in infobar.@* |
2318 |
|
|
2319 |
@emph{Arguments:} |
@emph{Arguments:} |
2320 |
@itemize @minus |
@itemize @minus |
2321 |
@item @option{option}: name of option |
@item @option{delay}: after this delay (in seconds), message will be erased |
2322 |
@item @option{value}: new value for option |
(if 0, message will not be erased). |
2323 |
|
@item @option{message}: message to display |
2324 |
@end itemize |
@end itemize |
2325 |
@* |
@* |
2326 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2327 |
@* |
@* |
2328 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2329 |
@* |
@* |
2330 |
@emph{Examples:}@* |
@emph{Perl example:}@* |
|
@* |
|
|
@code{weechat::set_config ("look_nicklist", "off");}@* |
|
|
@code{weechat::set_config ("freenode.server_autojoin"", "#weechat");}@* |
|
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat::get_plugin_config ( option );}@* |
|
|
@* |
|
|
Return value of a plugin option.@* |
|
|
Option is read from file ~/.weechat/plugins.rc and is like:@* |
|
|
@code{plugin.script.option=value}@* |
|
|
Note: plugin and script names are automatically added.@* |
|
|
|
|
|
@emph{Arguments:} |
|
|
@itemize @minus |
|
|
@item @option{option}: name of option |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
2331 |
@* |
@* |
2332 |
Value of option, empty if error occured or option was not found.@* |
@code{weechat::print_infobar (5, "message");}@* |
2333 |
@* |
@* |
2334 |
@emph{Example:}@* |
@emph{Python example:}@* |
2335 |
@* |
@* |
2336 |
@code{$value = weechat::get_plugin_config ("my_var");}@* |
@code{weechat.print_infobar (5, "message")}@* |
2337 |
@* |
@* |
2338 |
|
|
2339 |
@item |
@item |
2340 |
@command{weechat::set_plugin_config ( option, value );}@* |
Perl: @command{weechat::add_message_handler ( name, function );}@* |
2341 |
|
Python: @command{weechat.add_message_handler ( name, function )}@* |
2342 |
@* |
@* |
2343 |
Update value of a plugin option.@* |
Attach a script function to an IRC message.@* |
2344 |
Option is written in file ~/.weechat/plugins.rc and is like:@* |
Function will be called each time IRC message will be received.@* |
|
@code{plugin.script.option=value}@* |
|
|
Note: plugin and script names are automatically added.@* |
|
2345 |
|
|
2346 |
@emph{Arguments:} |
@emph{Arguments:} |
2347 |
@itemize @minus |
@itemize @minus |
2348 |
@item @option{option}: name of option |
@item @option{name}: name of IRC message@* |
2349 |
@item @option{value}: new value for option |
To know list of IRC messages, please refer to RFC 1459 and/or 2812:@* |
2350 |
@end itemize |
RFC 1459: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc1459.txt}@* |
2351 |
@* |
RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt} |
2352 |
@emph{Return value:}@* |
@item @option{function}: function called when message is received |
|
@* |
|
|
1 if successful, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Example:}@* |
|
|
@* |
|
|
@code{weechat::set_plugin_config ("my_var", "value");}@* |
|
|
@* |
|
|
|
|
|
@end itemize |
|
|
|
|
|
@subsection Python scripts |
|
|
|
|
|
@subsubsection Cargar/descargar programas Python |
|
|
|
|
|
Los programas Python se cargan y descargan con el comando @command{/python} |
|
|
(escribiendo @kbd{/help python} en WeeChat para obtener la ayuda acerca del comando).@* |
|
|
|
|
|
@emph{Ejemplos:}@* |
|
|
@itemize @bullet |
|
|
@item |
|
|
Cargar un programa Python: @kbd{/python load /tmp/ejemplo.py}@* |
|
|
@item Descargar todos los programas Python: @kbd{/python unload}@* |
|
|
@item |
|
|
Listar los programas Python cargados: @kbd{/python}@* |
|
|
@end itemize |
|
|
|
|
|
@subsubsection Interfaz WeeChat / Python |
|
|
|
|
|
@itemize @bullet |
|
|
@item |
|
|
@command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on )}@* |
|
|
@* |
|
|
Es la primera funci@'on a la que llamar en el programa Python.@* |
|
|
Todos los programas en Python para WeeChat deben llamar esta funci@'on.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{nombre}: nombre @'unico para identificar el programa (cada programa debe |
|
|
tener un nombre distinto) |
|
|
@item @option{versi@'on}: versi@'on del programa |
|
|
@item @option{funci@'on_final}: funci@'on Python llamada cuando el programa finaliza |
|
|
(par@'ametro facultativo, una cadena llena significa que no hay ninguna funci@'on que llamar) |
|
|
@item @option{descripci@'on}: descripci@'on breve del programa |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if script was registered, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplo:}@* |
|
|
@* |
|
|
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@* |
|
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat.prnt ( mensaje, [canal, [servidor]] )}@* |
|
|
@* |
|
|
Escribe un mensaje en un canal.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{mensaje}: mensaje a escribir |
|
|
@item @option{canal}: nombre del canal |
|
|
@item @option{servidor}: (opcional) nombre interno del servidor |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
|
@* |
|
|
1 if successful, 0 if error occured.@* |
|
|
@* |
|
|
@emph{Ejemplos:}@* |
|
|
@* |
|
|
@code{weechat.prnt ("mensaje")}@* |
|
|
@code{weechat.prnt ("mensaje", "#weechat")}@* |
|
|
@code{weechat.prnt ("mensaje", "#weechat", "freenode")}@* |
|
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat.print_infobar ( retraso, mensaje )}@* |
|
|
@* |
|
|
Escribir un mensaje en la barra de informaciones.@* |
|
|
|
|
|
@emph{Par@'ametros:} |
|
|
@itemize @minus |
|
|
@item @option{retraso}: periodo en segundo durante el cual se mostrar@'a el mensaje |
|
|
(si es 0, el mensaje no se borrar@'a). |
|
|
@item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones. |
|
2353 |
@end itemize |
@end itemize |
2354 |
@* |
@* |
2355 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2356 |
@* |
@* |
2357 |
1 if successful, 0 if error occured.@* |
1 if function was attached, 0 if error occured.@* |
|
@* |
|
|
@emph{Ejemplo:}@* |
|
2358 |
@* |
@* |
2359 |
@code{weechat.print_infobar (5, "mensaje")}@* |
@emph{Perl example:}@* |
|
@* |
|
|
|
|
|
@item |
|
|
@command{weechat.add_message_handler ( nombre, funci@'on )}@* |
|
2360 |
@* |
@* |
2361 |
Adjunta una funci@'on Python a un mensaje IRC.@* |
@code{weechat::add_message_handler ("privmsg", my_function);}@* |
2362 |
Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@* |
@code{sub my_function}@* |
2363 |
|
@code{@{ }@* |
2364 |
@emph{Par@'ametros:} |
@code{@ @ @ @ weechat::print ("server=$_[0]\n");}@* |
2365 |
@itemize @minus |
@code{@ @ @ @ ($null, $channel, $message) = split ":",$_[1],3;}@* |
2366 |
@item @option{nombre}: nombre del mensaje IRC que producir@'a la llamada a la funci@'on.@* |
@code{@ @ @ @ ($hostmask, $null, $channel) = split " ", $channel;}@* |
2367 |
Para saber qu@'e tipo de mensajes IRC existen puede leer las |
@code{@ @ @ @ weechat::print ("host=$hostmask, chan=$channel, msg=$message\n");}@* |
2368 |
RFC 1459 y/o 2812:@* |
@code{@ @ @ @ return 0;}@* |
2369 |
RFC 1459: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc1459.txt}@* |
@code{@} }@* |
|
RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt} |
|
|
@item @option{funci@'on}: funci@'on en Python llamada cuando se reciba el mensaje. |
|
|
@end itemize |
|
|
@* |
|
|
@emph{Return value:}@* |
|
2370 |
@* |
@* |
|
1 if Python function was attached, 0 if error occured.@* |
|
2371 |
@* |
@* |
2372 |
@emph{Ejemplo:}@* |
@emph{Python example:}@* |
2373 |
@* |
@* |
2374 |
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@* |
@code{weechat.add_message_handler ("privmsg", my_function)}@* |
2375 |
@code{def mi_funcion(servidor, args):}@* |
@code{def my_function(server, args):}@* |
2376 |
@code{@ @ @ @ weechat.prnt("servidor="+servidor)}@* |
@code{@ @ @ @ weechat.prnt("server="+server)}@* |
2377 |
@code{@ @ @ @ null, canal, mensaje = string.split(args, ":", 2)}@* |
@code{@ @ @ @ null, channel, message = string.split(args, ":", 2)}@* |
2378 |
@code{@ @ @ @ mascara, null, canal = string.split(string.strip(canal), " ", 2)}@* |
@code{@ @ @ @ hostmask, null, channel = string.split(string.strip(channel), " ", 2)}@* |
2379 |
@code{@ @ @ @ weechat.prnt("masc="+mascara+", canal="+canal+", msj="+mensaje)}@* |
@code{@ @ @ @ weechat.prnt("host="+hostmask+", channel="+channel+", message="+message)}@* |
2380 |
@code{@ @ @ @ return 0}@* |
@code{@ @ @ @ return 0}@* |
2381 |
@* |
@* |
2382 |
@emph{Notes:}@* |
@emph{Notes:}@* |
2383 |
@* |
@* |
2384 |
Function called when message is received has to return one of these values:@* |
Function called when message is received has to return one of these |
2385 |
@itemize @minus |
values (prefixed by ``weechat::'' for Perl and ``weechat.'' for |
2386 |
@item @option{-1}: function failed |
Python):@* |
2387 |
@item @option{0}: function successfully completed |
@itemize @minus |
2388 |
@item @option{1}: message will not be sent to WeeChat |
@item @option{PLUGIN_RC_KO}: function failed |
2389 |
@item @option{2}: message will not be sent to other plugins |
@item @option{PLUGIN_RC_OK}: function successfully completed |
2390 |
@item @option{3}: message will not be sent to WeeChat neither other plugins |
@item @option{PLUGIN_RC_OK_IGNORE_WEECHAT}: message will not be sent |
2391 |
|
to WeeChat |
2392 |
|
@item @option{PLUGIN_RC_OK_IGNORE_PLUGINS}: message will not be sent |
2393 |
|
to other plugins |
2394 |
|
@item @option{PLUGIN_RC_OK_IGNORE_ALL}: message will not be sent to |
2395 |
|
WeeChat neither other plugins |
2396 |
@end itemize |
@end itemize |
2397 |
@* |
@* |
2398 |
|
|
2399 |
@item |
@item |
2400 |
@command{weechat.add_command_handler ( nombre, funci@'on )}@* |
Perl: @command{weechat::add_command_handler ( name, function );}@* |
2401 |
|
Python: @command{weechat.add_command_handler ( name, function )}@* |
2402 |
@* |
@* |
2403 |
A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Python.@* |
Create new WeeChat command, linked with script function.@* |
2404 |
Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@* |
Function will be called when user will launch command with @kbd{/name}.@* |
2405 |
|
|
2406 |
@emph{Par@'ametros:} |
@emph{Arguments:} |
2407 |
@itemize @minus |
@itemize @minus |
2408 |
@item @option{nombre}: nombre del nuevo comando@* |
@item @option{name}: name of new command@* |
2409 |
Puede ser un comando que ya existe, y en este caso el nuevo comando sustituir@'a |
This name may be existing command, so that the command is overrided by |
2410 |
el antiguo. Ten cuidado cuando sustituyas a un comando de WeeChat, no podr@'a acceder |
script function. Be careful when overriding WeeChat commands, they'll not be |
2411 |
al antiguo comando si el script Python est@'a cargado. |
available until your script will be unloaded. |
2412 |
@item @option{funcion}: funci@'on Python assiciada al comando. |
@item @option{function}: function linked with command |
2413 |
@item @option{description}: command description (displayed by /help |
@item @option{description}: command description (displayed by /help |
2414 |
command) |
command) |
2415 |
@item @option{arguments}: short description of command arguments |
@item @option{arguments}: short description of command arguments |
2420 |
@* |
@* |
2421 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2422 |
@* |
@* |
2423 |
1 if Python function was attached, 0 if error occured.@* |
1 if function was attached, 0 if error occured.@* |
2424 |
@* |
@* |
2425 |
@emph{Ejemplo:}@* |
@emph{Perl example:}@* |
2426 |
@* |
@* |
2427 |
@code{weechat.add_command_handler ("comando", mi_comando)}@* |
@code{weechat::add_command_handler ("command", my_command);}@* |
2428 |
@code{def mi_comando(servidor, args):}@* |
@code{sub my_command}@* |
2429 |
@code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@* |
@code{@{ }@* |
2430 |
|
@code{@ @ @ @ weechat::print("Server: $_[0], arguments: $_[1]\n");}@* |
2431 |
|
@code{@ @ @ @ return 0;}@* |
2432 |
|
@code{@} }@* |
2433 |
|
@* |
2434 |
|
@emph{Python example:}@* |
2435 |
|
@* |
2436 |
|
@code{weechat.add_command_handler ("command", my_command)}@* |
2437 |
|
@code{def my_command(server, args):}@* |
2438 |
|
@code{@ @ @ @ weechat.prnt("server:"+server+" arguments:"+args)}@* |
2439 |
@code{@ @ @ @ return 0}@* |
@code{@ @ @ @ return 0}@* |
2440 |
@* |
@* |
2441 |
@emph{Notes:}@* |
@emph{Notes:}@* |
2442 |
@* |
@* |
2443 |
Function called when command is executed has to return one of these values:@* |
Function called when command is executed has to return one of these |
2444 |
|
values (prefixed by ``weechat::'' for Perl and ``weechat.'' for |
2445 |
|
Python):@* |
2446 |
@itemize @minus |
@itemize @minus |
2447 |
@item @option{-1}: function failed |
@item @option{PLUGIN_RC_KO}: function failed |
2448 |
@item @option{0}: function successfully completed |
@item @option{PLUGIN_RC_OK}: function successfully completed |
2449 |
@end itemize |
@end itemize |
2450 |
@* |
@* |
2451 |
|
|
2452 |
@item |
@item |
2453 |
@command{weechat.remove_handler ( name, function );}@* |
Perl: @command{weechat::remove_handler ( name, function );}@* |
2454 |
|
Python: @command{weechat.remove_handler ( name, function )}@* |
2455 |
@* |
@* |
2456 |
Remove a message or command handler.@* |
Remove a message or command handler.@* |
2457 |
|
|
2458 |
@emph{Arguments:} |
@emph{Arguments:} |
2459 |
@itemize @minus |
@itemize @minus |
2460 |
@item @option{name}: name of IRC message or command handler |
@item @option{name}: name of IRC message or command handler |
2461 |
@item @option{function}: Python function |
@item @option{function}: function |
2462 |
@end itemize |
@end itemize |
2463 |
@* |
@* |
2464 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2465 |
@* |
@* |
2466 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2467 |
@* |
@* |
2468 |
@emph{Example:}@* |
@emph{Perl example:}@* |
2469 |
|
@* |
2470 |
|
@code{weechat::remove_handler ("command", my_command);}@* |
2471 |
@* |
@* |
2472 |
@code{weechat.remove_handler ("command", my_command);}@* |
@emph{Python example:}@* |
2473 |
|
@* |
2474 |
|
@code{weechat.remove_handler ("command", my_command)}@* |
2475 |
@* |
@* |
2476 |
|
|
2477 |
@item |
@item |
2478 |
@command{weechat.command ( command, [channel, [server]] )}@* |
Perl: @command{weechat::command ( command, [channel, [server]] );}@* |
2479 |
|
Python: @command{weechat.command ( command, [channel, [server]] )}@* |
2480 |
@* |
@* |
2481 |
Execute a command or send a message to a channel.@* |
Execute a command or send a message to a channel.@* |
2482 |
|
|
2491 |
@* |
@* |
2492 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2493 |
@* |
@* |
2494 |
@emph{Examples:}@* |
@emph{Perl examples:}@* |
2495 |
|
@* |
2496 |
|
@code{weechat::command ("hello world!");}@* |
2497 |
|
@code{weechat::command ("/kick toto please leave this chan", "#weechat");}@* |
2498 |
|
@code{weechat::command ("/nick newnick", "", "freenode");}@* |
2499 |
|
@* |
2500 |
|
@emph{Python examples:}@* |
2501 |
@* |
@* |
2502 |
@code{weechat.command ("hello world!")}@* |
@code{weechat.command ("hello world!")}@* |
2503 |
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@* |
@code{weechat.command ("/kick toto please leave this chan", "#weechat")}@* |
2505 |
@* |
@* |
2506 |
|
|
2507 |
@item |
@item |
2508 |
@command{weechat.get_info ( nombre, [servidor] )}@* |
Perl: @command{weechat::get_info ( name, [server, [channel] ] );}@* |
2509 |
|
Python: @command{weechat.get_info ( name, [server, [channel] ] )}@* |
2510 |
@* |
@* |
2511 |
Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@* |
Get various info about WeeChat, server or user.@* |
2512 |
|
|
2513 |
@emph{Par@'ametros:} |
@emph{Arguments:} |
2514 |
@itemize @minus |
@itemize @minus |
2515 |
@item @option{nombre}: nombre de la informaci@'on que se quiere obtener: |
@item @option{name}: name of info to retrieve: |
2516 |
@itemize @minus |
@itemize @minus |
2517 |
@item @option{version}: obtener la versi@'on de WeeChat |
@item @option{version}: get WeeChat version |
2518 |
@item @option{nick}: obtener el seud@'onimo |
@item @option{nick}: get nickname |
2519 |
@item @option{channel}: obtener el nombre del canal |
@item @option{channel}: get channel name |
2520 |
@item @option{server}: obtener el nombre del servidor |
@item @option{server}: get server name |
2521 |
@item @option{away}: get ``away'' flag |
@item @option{away}: get ``away'' flag |
2522 |
@item @option{weechat_dir}: get WeeChat home dir |
@item @option{weechat_dir}: get WeeChat home dir |
2523 |
@item @option{weechat_libdir}: get WeeChat system lib dir |
@item @option{weechat_libdir}: get WeeChat system lib dir |
2524 |
@item @option{weechat_sharedir}: get WeeChat system share dir |
@item @option{weechat_sharedir}: get WeeChat system share dir |
2525 |
|
|
2526 |
@end itemize |
@end itemize |
2527 |
@item @option{servidor}: nombre interno del servidor |
@item @option{server}: internal name of server |
2528 |
|
@item @option{channel}: channel name |
2529 |
@end itemize |
@end itemize |
2530 |
@* |
@* |
2531 |
@emph{Return value:}@* |
@emph{Return value:}@* |
2532 |
@* |
@* |
2533 |
Asked info, empty if error occured or info was not found.@* |
Asked info, empty if error occured or info was not found.@* |
2534 |
@* |
@* |
2535 |
@emph{Ejemplos:}@* |
@emph{Perl examples:}@* |
2536 |
|
@* |
2537 |
|
@code{$version = weechat::get_info("version");}@* |
2538 |
|
@code{$nick = weechat::get_info("nick", "freenode");}@* |
2539 |
|
@* |
2540 |
|
@emph{Python examples:}@* |
2541 |
@* |
@* |
2542 |
@code{$version = weechat.get_info("version")}@* |
@code{$version = weechat.get_info("version")}@* |
2543 |
@code{$nick = weechat.get_info("nick", "freenode")}@* |
@code{$nick = weechat.get_info("nick", "freenode")}@* |
2544 |
@* |
@* |
2545 |
|
|
2546 |
@item |
@item |
2547 |
@command{weechat.get_dcc_info ( );}@* |
Perl: @command{weechat::get_dcc_info ( );}@* |
2548 |
|
Python: @command{weechat.get_dcc_info ( );}@* |
2549 |
@* |
@* |
2550 |
Get DCC list.@* |
Get DCC list.@* |
2551 |
|
|
2588 |
@* |
@* |
2589 |
|
|
2590 |
@item |
@item |
2591 |
@command{weechat.get_config ( option );}@* |
Perl: @command{weechat::get_config ( option );}@* |
2592 |
|
Python: @command{weechat.get_config ( option )}@* |
2593 |
@* |
@* |
2594 |
Get WeeChat config option value.@* |
Get WeeChat config option value.@* |
2595 |
|
|
2602 |
@* |
@* |
2603 |
Value of option, empty if error occured or option was not found.@* |
Value of option, empty if error occured or option was not found.@* |
2604 |
@* |
@* |
2605 |
@emph{Examples:}@* |
@emph{Perl examples:}@* |
2606 |
|
@* |
2607 |
|
@code{$value1 = weechat::get_config ("look_nicklist");}@* |
2608 |
|
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@* |
2609 |
@* |
@* |
2610 |
@code{$value1 = weechat.get_config ("look_nicklist");}@* |
@emph{Python examples:}@* |
2611 |
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@* |
@* |
2612 |
|
@code{$value1 = weechat.get_config ("look_nicklist")}@* |
2613 |
|
@code{$value2 = weechat.get_config ("freenode.server_autojoin")}@* |
2614 |
@* |
@* |
2615 |
|
|
2616 |
@item |
@item |
2617 |
@command{weechat.set_config ( option, value );}@* |
Perl: @command{weechat::set_config ( option, value );}@* |
2618 |
|
Python: @command{weechat.set_config ( option, value )}@* |
2619 |
@* |
@* |
2620 |
Get WeeChat config option value.@* |
Get WeeChat config option value.@* |
2621 |
|
|
2629 |
@* |
@* |
2630 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2631 |
@* |
@* |
2632 |
@emph{Examples:}@* |
@emph{Perl examples:}@* |
2633 |
|
@* |
2634 |
|
@code{weechat::set_config ("look_nicklist", "off");}@* |
2635 |
|
@code{weechat::set_config ("freenode.server_autojoin"", |
2636 |
|
"#weechat");}@* |
2637 |
|
@* |
2638 |
|
@emph{Python examples:}@* |
2639 |
@* |
@* |
2640 |
@code{weechat.set_config ("look_nicklist", "off");}@* |
@code{weechat.set_config ("look_nicklist", "off")}@* |
2641 |
@code{weechat.set_config ("freenode.server_autojoin"", "#weechat");}@* |
@code{weechat.set_config ("freenode.server_autojoin"", "#weechat")}@* |
2642 |
@* |
@* |
2643 |
|
|
2644 |
@item |
@item |
2645 |
@command{weechat.get_plugin_config ( option );}@* |
Perl: @command{weechat::get_plugin_config ( option );}@* |
2646 |
|
Python: @command{weechat.get_plugin_config ( option )}@* |
2647 |
@* |
@* |
2648 |
Return value of a plugin option.@* |
Return value of a plugin option.@* |
2649 |
Option is read from file ~/.weechat/plugins.rc and is like:@* |
Option is read from file ~/.weechat/plugins.rc and is like:@* |
2659 |
@* |
@* |
2660 |
Value of option, empty if error occured or option was not found.@* |
Value of option, empty if error occured or option was not found.@* |
2661 |
@* |
@* |
2662 |
@emph{Example:}@* |
@emph{Perl example:}@* |
2663 |
|
@* |
2664 |
|
@code{$value = weechat::get_plugin_config ("my_var");}@* |
2665 |
@* |
@* |
2666 |
@code{$value = weechat.get_plugin_config ("my_var");}@* |
@emph{Python example:}@* |
2667 |
|
@* |
2668 |
|
@code{$value = weechat.get_plugin_config ("my_var")}@* |
2669 |
@* |
@* |
2670 |
|
|
2671 |
@item |
@item |
2672 |
@command{weechat.set_plugin_config ( option, value );}@* |
Perl: @command{weechat::set_plugin_config ( option, value );}@* |
2673 |
|
Python: @command{weechat.set_plugin_config ( option, value )}@* |
2674 |
@* |
@* |
2675 |
Update value of a plugin option.@* |
Update value of a plugin option.@* |
2676 |
Option is written in file ~/.weechat/plugins.rc and is like:@* |
Option is written in file ~/.weechat/plugins.rc and is like:@* |
2687 |
@* |
@* |
2688 |
1 if successful, 0 if error occured.@* |
1 if successful, 0 if error occured.@* |
2689 |
@* |
@* |
2690 |
@emph{Example:}@* |
@emph{Perl example:}@* |
2691 |
@* |
@* |
2692 |
@code{weechat.set_plugin_config ("my_var", "value");}@* |
@code{weechat::set_plugin_config ("my_var", "value");}@* |
2693 |
|
@* |
2694 |
|
@emph{Python example:}@* |
2695 |
|
@* |
2696 |
|
@code{weechat.set_plugin_config ("my_var", "value")}@* |
2697 |
@* |
@* |
2698 |
|
|
2699 |
@end itemize |
@end itemize |
2700 |
|
|
|
@subsection Ruby scripts |
|
|
|
|
|
@exclamdown{}No desarrollado! |
|
|
|
|
2701 |
|
|
2702 |
@c **************************** Autores / Soporte ***************************** |
@c **************************** Autores / Soporte ***************************** |
2703 |
|
|