1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

- Added options for /plugin command: autoload, reload, unload

- Added new plugin functions, for C plugins and scripts: set_config, get_plugin_config, set_plugin_config
- Added new script function: remove_handler
This commit is contained in:
Sebastien Helleu
2005-10-25 17:37:13 +00:00
parent 0e531f5e6a
commit 0f055b087a
42 changed files with 5638 additions and 2100 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
AC_MSG_WARN([
*** ncursesw library not found! Falling back to "ncurses"
*** Be careful, UTF-8 display will not work properly.])
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
NCURSES_LIBS="-lncurses"
else
NCURSES_LIBS="-lncursesw"
+262 -10
View File
@@ -35,7 +35,7 @@
@title WeeChat - User guide
@subtitle Fast, light and extensible IRC client
@subtitle Documentation for WeeChat v0.1.6-cvs - October, 24 2005
@subtitle Documentation for WeeChat v0.1.6-cvs - October, 25 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1557,8 +1557,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2062,7 +2064,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2093,6 +2095,9 @@ Update value of a WeeChat config option.@*
*plugin, char *option)}@*
@*
Return value of a plugin option.@*
Option is read from file ~/.weechat/plugins.rc and is like:@*
@code{plugin.option=value}@*
Note: plugin name is automatically added.@*
@emph{Arguments:}
@itemize @minus
@@ -2116,6 +2121,9 @@ use.@*
*plugin, char *option, char *value)}@*
@*
Update value of a plugin option.@*
Option is written in file ~/.weechat/plugins.rc and is like:@*
@code{plugin.option=value}@*
Note: plugin name is automatically added.@*
@emph{Arguments:}
@itemize @minus
@@ -2244,6 +2252,10 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@item @option{description}: short description of script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::register ("sample", "1.0", "sample_end", "Sample script!");}@*
@@ -2261,6 +2273,10 @@ Print message in a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::print ("message");}@*
@@ -2280,6 +2296,10 @@ Print message in infobar.@*
@item @option{message}: message to display
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::print_infobar (5, "message");}@*
@@ -2300,6 +2320,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{function}: Perl function called when message is received
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::add_message_handler ("privmsg", my_function);}@*
@@ -2333,6 +2357,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::add_command_handler ("command", my_command);}@*
@@ -2343,6 +2371,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2355,6 +2403,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2385,6 +2437,10 @@ Get various info about WeeChat, server or user.@*
@item @option{channel}: channel name
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Examples:}@*
@*
@code{$version = weechat::get_info("version");}@*
@@ -2429,23 +2485,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2484,6 +2614,10 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@item @option{description}: short description of script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@@ -2501,6 +2635,10 @@ Print message in a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.prnt ("message")}@*
@@ -2520,6 +2658,10 @@ Print message in infobar.@*
@item @option{message}: message to display
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.print_infobar (5, "message")}@*
@@ -2540,6 +2682,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{function}: Python function called when message is received
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@@ -2571,6 +2717,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.add_command_handler ("command", my_command)}@*
@@ -2578,6 +2728,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("server:"+server+" arguments:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2590,6 +2760,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2619,6 +2793,10 @@ Get various info about WeeChat, server or user.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Examples:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2663,23 +2841,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+256 -10
View File
@@ -36,7 +36,7 @@
@title WeeChat - Gui@'on de usuario.
@subtitle Cliente IRC r@'apido, peque@~no y extensible
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 24 de octubre de 2005
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 25 de octubre de 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1560,8 +1560,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2065,7 +2067,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2246,6 +2248,10 @@ tener un nombre distinto)
@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...");}@*
@@ -2263,6 +2269,10 @@ Escribe un mensaje en un 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");}@*
@@ -2282,6 +2292,10 @@ Escribir un mensaje en la barra de informaciones.@*
@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");}@*
@@ -2303,6 +2317,10 @@ 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);}@*
@@ -2336,6 +2354,10 @@ 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);}@*
@@ -2346,6 +2368,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2358,6 +2400,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2387,6 +2433,10 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@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");}@*
@@ -2431,23 +2481,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2485,6 +2609,10 @@ tener un nombre distinto)
@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...")}@*
@@ -2502,6 +2630,10 @@ Escribe un mensaje en un 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")}@*
@@ -2521,6 +2653,10 @@ Escribir un mensaje en la barra de informaciones.@*
@item @option{mensaje}: 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")}@*
@@ -2542,6 +2678,10 @@ 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:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Ejemplo:}@*
@*
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@*
@@ -2573,6 +2713,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Ejemplo:}@*
@*
@code{weechat.add_command_handler ("comando", mi_comando)}@*
@@ -2580,6 +2724,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2592,6 +2756,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2620,6 +2788,10 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@item @option{servidor}: nombre interno del servidor
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Ejemplos:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2664,23 +2836,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+271 -7
View File
@@ -36,7 +36,7 @@
@title WeeChat - Guide utilisateur
@subtitle Client IRC rapide, l@'eger et extensible
@subtitle Documentation pour WeeChat v0.1.6-cvs - 24 octobre 2005
@subtitle Documentation pour WeeChat v0.1.6-cvs - 25 octobre 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1564,8 +1564,10 @@ obligatoires (sans quoi l'extension ne peut
@end itemize
@item fonctions d'initialisation et fin de l'extension :
@itemize @minus
@item weechat_plugin_init: fonction appel@'ee au chargement de l'extension
@item weechat_plugin_end: fonction appel@'ee au d@'echargement de l'extension
@item weechat_plugin_init: fonction appel@'ee au chargement de l'extension,
qui doit renvoyer 1 en cas de succ@`es, 0 en cas d'erreur
@item weechat_plugin_end: fonction appel@'ee au d@'echargement de l'extension,
qui doit renvoyer 1 en cas de succ@`es, 0 en cas d'erreur
@end itemize
@end itemize
@@ -2118,6 +2120,10 @@ s'est produite.@*
*plugin, char *option)}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.option=valeur}@*
NB: le nom de l'extension est ajout@'e automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@@ -2141,6 +2147,10 @@ NB: le r@'esultat doit @^etre lib@'er@'e par un appel @`a la fonction
*plugin, char *option, char *value)}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.option=valeur}@*
NB: le nom de l'extension est ajout@'e automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@@ -2271,6 +2281,10 @@ de fonction @`a appeler)
@item @option{description}: description br@`eve du script.
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si le script a @'et@'e enregistr@'e, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::register ("essai", "1.0", "fin_essai", "Script d'essai !");}@*
@@ -2288,6 +2302,10 @@ Affiche un message dans un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::print ("message");}@*
@@ -2307,6 +2325,10 @@ Affiche un message dans la barre d'infos.@*
@item @option{message}: message @`a afficher
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::print_infobar (5, "message");}@*
@@ -2328,6 +2350,10 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fonction}: fonction Perl appel@'ee lorsque le message est re@,{c}u
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Perl a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::add_message_handler ("privmsg", ma_fonction);}@*
@@ -2362,6 +2388,10 @@ commande (affich@'ee par /help commande)
param@`etres de la commande (affich@'ee par /help commande)
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Perl a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::add_command_handler ("commande", ma_commande);}@*
@@ -2372,6 +2402,26 @@ param@`etres de la commande (affich@'ee par /help commande)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( nom, fonction );}@*
@*
Supprime un gestionnaire de message ou de commande.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom du message IRC ou de la commande
@item @option{fonction}: fonction Perl associ@'ee
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::remove_handler ("commande", ma_commande);}@*
@*
@item
@command{weechat::command ( commande, [canal, [serveur]] );}@*
@*
@@ -2384,6 +2434,10 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::command ("bonjour tout le monde !");}@*
@@ -2415,6 +2469,11 @@ syst@`eme de partage WeeChat
@item @option{canal}: nom du canal
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
L'information demand@'e, blanc si une erreur s'est produite ou que
l'information n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$version = get_info("version");}@*
@@ -2459,23 +2518,101 @@ Le tableau renvoy@'e contient les champs suivants :
@item bytes_per_sec: nombre d'octets transmis par seconde depuis le d@'ebut
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La liste des DCC, 0 si une erreur s'est produite.@*
@*
@item
@command{weechat::get_config ( nom );}@*
@command{weechat::get_config ( option );}@*
@*
Obtenir la valeur d'une option de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom de l'option
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$value1 = weechat::get_config ("look_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, valeur );}@*
@*
Modifier une otion de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::set_config ("look_nicklist", "off");}@*
@code{weechat::set_config ("freenode.server_autojoin, "#weechat");}@*
@*
@item
@command{weechat::get_plugin_config ( option );}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemple :}@*
@*
@code{$value = weechat::get_plugin_config ("ma_variable");}@*
@*
@item
@command{weechat::set_plugin_config ( option, valeur );}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::set_plugin_config ("ma_variable", "valeur");}@*
@*
@end itemize
@subsection Scripts Python
@@ -2514,6 +2651,10 @@ de fonction @`a appeler)
@item @option{description}: description br@`eve du script.
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si le script a @'et@'e enregistr@'e, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !")}@*
@@ -2531,6 +2672,10 @@ Affiche un message dans un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.prnt ("message")}@*
@@ -2550,6 +2695,10 @@ Affiche un message dans la barre d'infos.@*
@item @option{message}: message @`a afficher
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.print_infobar (5, "message")}@*
@@ -2571,6 +2720,10 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fonction}: fonction Python appel@'ee lorsque le message est re@,{c}u
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Python a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.add_message_handler ("privmsg", ma_fonction)}@*
@@ -2602,6 +2755,10 @@ commande (affich@'ee par /help commande)
param@`etres de la commande (affich@'ee par /help commande)
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Python a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.add_command_handler ("commande", ma_commande)}@*
@@ -2609,6 +2766,26 @@ param@`etres de la commande (affich@'ee par /help commande)
@code{@ @ @ @ weechat.prnt("serveur:"+serveur+" param@`etres:"+args)}@*
@*
@item
@command{weechat.remove_handler ( nom, fonction );}@*
@*
Supprime un gestionnaire de message ou de commande.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom du message IRC ou de la commande
@item @option{fonction}: fonction Python associ@'ee
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.remove_handler ("commande", ma_commande);}@*
@*
@item
@command{weechat.command ( commande, [canal, [serveur]] )}@*
@*
@@ -2621,6 +2798,10 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.command ("bonjour tout le monde !")}@*
@@ -2651,6 +2832,11 @@ syst@`eme de partage WeeChat
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
L'information demand@'e, blanc si une erreur s'est produite ou que
l'information n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$version = weechat.get_info ("version")}@*
@@ -2695,6 +2881,10 @@ Le tableau renvoy@'e contient les champs suivants :
@item bytes_per_sec: nombre d'octets transmis par seconde depuis le d@'ebut
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La liste des DCC, 0 si une erreur s'est produite.@*
@*
@item
@command{weechat.get_config ( nom );}@*
@@ -2706,12 +2896,86 @@ Obtenir la valeur d'une option de configuration WeeChat.@*
@item @option{nom}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$value1 = weechat.get_config ("look_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( nom, valeur );}@*
@*
Modifier une otion de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.set_config ("look_nicklist", "off");}@*
@code{weechat.set_config ("freenode.server_autojoin, "#weechat");}@*
@*
@item
@command{weechat.get_plugin_config ( option );}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemple :}@*
@*
@code{$value = weechat.get_plugin_config ("ma_variable");}@*
@*
@item
@command{weechat.set_plugin_config ( option, valeur );}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.set_plugin_config ("ma_variable", "valeur");}@*
@*
@end itemize
@subsection Scripts Ruby
+256 -10
View File
@@ -36,7 +36,7 @@
@title WeeChat - Guia do Utilizador
@subtitle Cliente de IRC rapido, leve e extencivel
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.6-cvs - 24 de outubro de 2005
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.6-cvs - 25 de outubro de 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1555,8 +1555,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2060,7 +2062,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2240,6 +2242,10 @@ Todos os Scripts Perl para o Weechat devem invocar esta fun@,{c}@~ao.@*
@item @option{descri@,{c}@~ao}: breve descri@,{c}@~ao do script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::register ("sample", "1.0", "sample_end", "Sample script!");}@*
@@ -2257,6 +2263,10 @@ Imprimne uma mensagem na canal.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplos:}@*
@*
@code{weechat::print ("mensagem");}@*
@@ -2276,6 +2286,10 @@ Imprimne uma mensagem na barra do info.@*
@item @option{mensagem}: mensagem a mostrar
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::print_infobar (5, "mensagem");}@*
@@ -2296,6 +2310,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fun@,{c}@~ao}: fun@,{c}@~ao Perl invocada quando a mensagem é recebida
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::add_message_handler ("privmsg", my_function);}@*
@@ -2326,6 +2344,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::add_command_handler ("command", my_command);}@*
@@ -2336,6 +2358,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2348,6 +2390,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2377,6 +2423,10 @@ Comece o v@'ario info sobre WeeChat, servidor ou usu@'ario.@*
@item @option{canal}: nome da canal
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Exemplos:}@*
@*
@code{$version = get_info("version");}@*
@@ -2421,23 +2471,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2474,6 +2598,10 @@ Todos os Scripts Python para o Weechat devem invocar esta fun@,{c}@~ao.@*
@item @option{descri@,{c}@~ao}: breve descri@,{c}@~ao do script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@@ -2491,6 +2619,10 @@ Imprimne uma mensagem na canal.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplos:}@*
@*
@code{weechat.prnt ("mensagem")}@*
@@ -2510,6 +2642,10 @@ Imprimne uma mensagem na barra do info.@*
@item @option{mensagem}: mensagem a mostrar
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.print_infobar (5, "mensagem")}@*
@@ -2530,6 +2666,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fun@,{c}@~ao}: fun@,{c}@~ao Python invocada quando a mensagem é recebida
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@@ -2559,6 +2699,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.add_command_handler ("command", my_command)}@*
@@ -2566,6 +2710,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("Servidor:"+server+" Argumentos:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2578,6 +2742,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2606,6 +2774,10 @@ Comece o v@'ario info sobre WeeChat, servidor ou usu@'ario.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Exemplos:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2650,23 +2822,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+3
View File
@@ -10,6 +10,9 @@
./src/irc/irc.h
./src/plugins/plugins.c
./src/plugins/plugins.h
./src/plugins/plugins-config.c
./src/plugins/plugins-config.h
./src/plugins/plugins-interface.c
./src/plugins/weechat-plugin.h
./src/gui/curses/gui-input.c
./src/gui/curses/gui-display.c
+130 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:31+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1405,8 +1405,8 @@ msgstr "%s \"%s\" příkaz může být spuštěn pouze v okně kanálu\n"
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s špatný počet parametrů pro příkaz \"%s\"\n"
@@ -1466,7 +1466,7 @@ msgstr " se připojil "
msgid " has kicked "
msgstr " byl vykopnut "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " z "
@@ -1821,7 +1821,7 @@ msgstr "%s nemohu identifikovat přezdívku pro příkaz \"%s\"\n"
msgid "has invited"
msgstr "pozval"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "na"
@@ -2108,7 +2108,7 @@ msgstr "%s nedostatek paměti pro vytvoření ignorování\n"
msgid "Removing ignore:"
msgstr "Odebírám ignorování:"
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
@@ -2117,14 +2117,14 @@ msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro IRC příkaz \"%s\" (nedostatek "
"paměti)\n"
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro \"%s\" příkaz (již existuje)\n"
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
@@ -2132,25 +2132,25 @@ msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro \"%s\" příkaz (nedostatek "
"paměti)\n"
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr "%s nemůžu načist plugin \"%s\": %s\n"
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
"%s symbol \"plugin_name\" nebyl v pluginu \"%s\" nalezen, načtení selhalo\n"
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
"%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n"
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
@@ -2158,7 +2158,7 @@ msgstr ""
"%s symbol \"plugin_description\" nebyl v pluginu \"%s\" nalezen, načtení "
"selhalo\n"
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
@@ -2166,7 +2166,7 @@ msgstr ""
"%s symbol \"plugin_version\" nebyl v pluginu \"%s\" nalezen, načtení "
"selhalo\n"
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
@@ -2175,100 +2175,126 @@ msgstr ""
"%s funkce \"weechat_plugin_init\" nebyla v pluginu \"%s\" nalezena, načtení "
"selhalo\n"
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr "Inicializuji plugin \"%s\" %s\n"
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr "%s nemohu načíst plugin \"%s\"\n"
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr "%s nemohu načíst plugin \"%s\" (nedostatek paměti)\n"
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr "Plugin \"%s\" (%s) načten.\n"
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr "Plugin \"%s\" odebrán.\n"
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr "%s plugin \"%s\" nenalezen\n"
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, řádek %d: nevalidní syntax, chybí \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s nemohu vytvořit soubor \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr "Změnil se den na %s\n"
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s zpoždění je veliké, odpojuji se od serveru...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "bajtů"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "Kb"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "Mb"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "Gb"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(pryč)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[nepřipojen]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Aktivní: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Zpoždění: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-VÍCE-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Akceptovat"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Storno"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Odebrat"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Pročistit staré DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Zavřít DCC pohled"
@@ -2432,7 +2458,7 @@ msgstr "vyčisti hotlist"
msgid "grab a key"
msgstr "zachytit klávesu"
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s nemohu napojit kalávesu \"%s\"\n"
@@ -2925,8 +2951,8 @@ msgstr "%s zrovna připojuji k serveru \"%s\"!\n"
msgid "%s server not found\n"
msgstr "%s server nenalezen\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s neznámá volba pro příkaz \"%s\"\n"
@@ -2954,121 +2980,121 @@ msgstr "IRC příkazy:\n"
msgid "Plugin commands:\n"
msgstr "Příkazy pluginu:\n"
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Není dostupná žádná nápověda, \"%s\" je neznámý příkaz\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr " ignoruji "
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr "Seznam ignorování:\n"
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr "Žádné ignorování není definováno.\n"
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr "Nové ignorování:"
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nová klávesová zkratka:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Klávesové zkratky:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Klávesa \"%s\" odpojena\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s nemohu odpojit klávesu \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Vnitřní klávesové funkce:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Výchozí klávesové zkratky obnoveny\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s \"-yes\" argument je požadován pro reset kaláves (bezpečnostní opatření)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr "Načtené pluginy:\n"
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr " obsluhovače zpráv:\n"
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr " IRC(%s)\n"
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr " (není obsluhovač zprávy)\n"
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr " obsluhovače příkazu:\n"
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr " (není obsluhovač příkazu)\n"
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr " (není plugin)\n"
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
"Příkaz \"plugin\" není dostupný, WeeChat byl přeložen bez podpory pluginů.\n"
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "žádný server.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Server '%s' nenalezen.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s chybí jméno serveru pro příkaz \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s příliž mnoho argumentů pro příkaz \"%s\", ignoruji argumety\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s server \"%s\" nenalezen pro příkaz \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3077,172 +3103,172 @@ msgstr ""
"%s nemůžete odebrat server \"%s\", protože jste k němu připojent. Skuste "
"nejprve /dissconnect %s.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Server"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "byl odebrán\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s chybí parametry pro příkaz \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s server \"%s\" již existuje, nemohu jej vytvořít!\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s chybí heslo pro parametr \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s chybí přezdívka/přezdívky pro parametr \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s chybí příkaz pro parametr \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "vytvořeno\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s nemohu vytvořit server\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(neznámý)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(heslo schováno) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s server \"%s\" nenalezen\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s volba nastavení \"%s\" nenalezena\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s nekorektní hodnota pro volbu \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s volba \"%s\" nemůže být změněna dokud WeeChat běží\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Nebyla nalezena žádná volba nastavení s \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Nebyla nalezena žádná volba nastavení\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr "Detail:\n"
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . typ boolean (hodnota: 'on' nebo 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . výchozí hodnota: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . typ celočíselný (hodnoty: mezi %d a %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . výchozí hodnota: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . typ řetězec (hodnoty: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "prázdný"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . typ barva (Curses nebo Gtk barva, viz WeeChat dokumentace)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . typ řetězec (jakýkoliv řetězec)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . popis: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "volba/volby nastavení nalezeny s \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "volba/volby nastavení nalezeny\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias nebo příkaz \"%s\" nenalezen\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" odebrán\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr "ignorování bylo odebráno.\n"
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr "ignorování bylo odebrán\n"
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr "%s žádné ignorování nenaleyeno\n"
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Otevřené okna:\n"
@@ -4415,11 +4441,6 @@ msgstr "%s %s, řádek %d: neznámý identifikátor sekce (\"%s\")\n"
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, řádek %d: nevalidní sekce pro volbu, řádek je ignorován\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, řádek %d: nevalidní syntax, chybí \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4462,11 +4483,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, řádek %d: nevalidní jméno barvy pro hodnotu '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s nemohu vytvořit soubor \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+130 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:31+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1412,8 +1412,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s número de argumentos incorrecto para el comando \"%s\"\n"
@@ -1474,7 +1474,7 @@ msgstr " se ha unido "
msgid " has kicked "
msgstr " se ha expulsado "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " de "
@@ -1830,7 +1830,7 @@ msgstr ""
msgid "has invited"
msgstr "ha invitado"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "en"
@@ -2118,154 +2118,180 @@ msgstr ""
msgid "Removing ignore:"
msgstr ""
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
"memory)\n"
msgstr ""
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr ""
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
"load\n"
msgstr ""
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr ""
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr ""
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr ""
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr ""
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr ""
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, línea %d: sintaxis inválida, falta \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s no es posible crear el fichero \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr ""
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s el lag (retraso) es alto, desconectando del servidor...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "bytes"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "KB"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "MB"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "GB"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(ausente)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[no conectado]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Act: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Lag: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-MÁS-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Aceptar"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Cancelar"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Eliminar"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Purgar los viejos DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Cerrar la vista DCC"
@@ -2429,7 +2455,7 @@ msgstr "limpiar hotlist"
msgid "grab a key"
msgstr ""
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s No ha sido posible atar la clave \"%s\"\n"
@@ -2910,8 +2936,8 @@ msgstr "%s actualmente conectando al servidor \"%s\"!\n"
msgid "%s server not found\n"
msgstr "%s servidor no encontrado\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s opción desconocida para el comando \"%s\"\n"
@@ -2939,122 +2965,122 @@ msgstr "Comandos IRC :\n"
msgid "Plugin commands:\n"
msgstr ""
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "No hay ayuda disponible, el comando \"%s\" es desconocido\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr ""
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr ""
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr ""
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr ""
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nuevo anclaje de clave:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Anclajes de clave:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Clave \"%s\" desatada\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s No ha sido posible desatar la clave \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Funciones de clave internas:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Anclajes de clave por defecto restaurados\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s \"-yes\" se requiere argumento para resetear las claves (por razones de "
"seguridad)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr ""
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr ""
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr ""
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr ""
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr ""
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr ""
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "Ningún servidor.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Servidor '%s' no encontrado.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s falta el nombre de servidor para el comando \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
"%s demasiados argumentos para el comando \"%s\", ignorando parámetros\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s servidor \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3063,174 +3089,174 @@ msgstr ""
"%s usted no puede eliminar el servidor \"%s\" ya que está usted conectado a "
"él. Pruebe /disconnect %s antes.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Servidor"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "ha sido eliminado\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s faltan parámetros para el comando \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s el servidor \"%s\" ya existe, ¡no se puede crear!\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s falta contraseña para el comando \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s falta(n) usuario(s) para el parámetro \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s falta comando para el parámetro \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "creado\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s no es posible crear el servidor\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(desconocido)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(contraseña oculta) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s servidor \"%s\" no encontrado\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s opción de configuración \"%s\" no encontrada\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
"%s la opción \"%s\" no puede ser modificada mientras WeeChat esté en "
"ejecución\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Ninguna opción de configuración encontrada con \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Ninguna opción de configuración encontrada\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr ""
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . tipo booleano (valores: 'on' u 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . valor por defecto: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . tipo entero (valores: entre %d y %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . valor por defecto: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . tipo cadena (valores: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "vacío"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . tipo color (color Curses ó Gtk, ver la documentación de WeeChat)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . tipo cadena (cualquier cadena)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . descripción: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "opción/opciones de configuración encontrada(s) con \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "opción/opciones de configuración encontrada(s)\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias o comando \"%s\" no encontrado\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" eliminado\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr ""
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr ""
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr ""
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Ventanas abiertas:\n"
@@ -4401,11 +4427,6 @@ msgstr "%s %s, l
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, línea %d: sección inválida para la opción, línea ignorada\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, línea %d: sintaxis inválida, falta \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4448,11 +4469,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, línea %d: nombre de color inválido para la opción '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s no es posible crear el fichero \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+135 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:30+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1415,8 +1415,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@@ -1477,7 +1477,7 @@ msgstr " a rejoint "
msgid " has kicked "
msgstr " a poussé dehors "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " de "
@@ -1833,7 +1833,7 @@ msgstr ""
msgid "has invited"
msgstr "a invité"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "sur"
@@ -2127,7 +2127,7 @@ msgstr "%s pas assez de m
msgid "Removing ignore:"
msgstr "Suppression du ignore:"
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
@@ -2136,7 +2136,7 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande IRC \"%s"
"\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
@@ -2144,7 +2144,7 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande \"%s"
"\" (existe déjà)\n"
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
@@ -2152,19 +2152,19 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande \"%s"
"\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr "%s impossible de charger l'extension \"%s\": %s\n"
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
"%s le symbole \"plugin_name\" est introuvable dans l'extension \"%s\", échec "
"de chargement\n"
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
@@ -2172,7 +2172,7 @@ msgstr ""
"%s impossible de charger l'extension \"%s\": une extension avec le même nom "
"existe déjà\n"
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
@@ -2180,7 +2180,7 @@ msgstr ""
"%s le symbole \"plugin_description\" est introuvable dans l'extension \"%s"
"\", échec de chargement\n"
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
@@ -2188,7 +2188,7 @@ msgstr ""
"%s le symbole \"plugin_version\" est introuvable dans l'extension \"%s\", "
"échec de chargement\n"
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
@@ -2197,100 +2197,131 @@ msgstr ""
"%s la fonction \"weechat_plugin_init\" est introuvable dans l'extension \"%s"
"\", échec de chargement\n"
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr "Initialisation de l'extension \"%s\" %s\n"
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr "%s impossible d'initialiser l'extension \"%s\"\n"
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr "%s impossible de charger l'extension \"%s\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr "Extension \"%s\" (%s) chargée.\n"
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr "Extension \"%s\" déchargée.\n"
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr "%s extension \"%s\" non trouvée\n"
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s impossible de créer le fichier \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
"#\n"
"# %s: fichier de configuration des extensions, créé par %s v%s le %s"
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
"# ATTENTION ! Soyez prudents en modifiant ce fichier, WeeChat l'écrit quand "
"des options sont modifiées.\n"
"#\n"
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr "Jour changé: %s\n"
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s le lag est élevé, déconnexion du serveur...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "octets"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "Ko"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "Mo"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "Go"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(absent)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[non connecté]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Act: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Lag: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-PLUS-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Accepter"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Annuler"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Retirer"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Purger anciens DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Fermer la vue DCC"
@@ -2454,7 +2485,7 @@ msgstr "effacer la liste d'activit
msgid "grab a key"
msgstr "capturer une touche"
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s impossible de créer la touche \"%s\"\n"
@@ -2956,8 +2987,8 @@ msgstr "%s une connexion vers le serveur \"%s\" est en cours !\n"
msgid "%s server not found\n"
msgstr "%s serveur non trouvé\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
@@ -2985,91 +3016,91 @@ msgstr "Commandes IRC :\n"
msgid "Plugin commands:\n"
msgstr "Commandes d'extension :\n"
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr " ignore "
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr "Liste des ignore:\n"
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr "Aucun ignore défini.\n"
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr "Nouveau ignore:"
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nouvelle touche:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Associations de touches:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Touche \"%s\" supprimée\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s impossible de supprimer la touche \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Fonctions internes pour les touches:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Touches par défaut restaurées\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s le paramètre \"-yes\" est requis pour la réinitialisation des touches "
"(raison de sécurité)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr "Extensions chargées :\n"
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr " fonctions de message :\n"
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr " IRC(%s)\n"
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr " (aucunne fonction de message)\n"
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr " commandes :\n"
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr " (aucune commande)\n"
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr " (aucune extension)\n"
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
@@ -3077,31 +3108,31 @@ msgstr ""
"La commande \"plugin\" n'est pas disponible, WeeChat a été compilé sans le "
"support des extensions.\n"
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Serveur '%s' non trouvé.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3110,172 +3141,172 @@ msgstr ""
"%s vous ne pouvez pas supprimer le server \"%s\" car vous êtes connecté "
"dessus. Essayez /disconnect %s avant.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(mot de passe caché) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Aucune option de configuration trouvée\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr "Détail :\n"
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . type booléen (valeurs: 'on' ou 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . valeur par défaut: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . type entier (valeurs: entre %d et %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . valeur par défaut: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . type chaîne (valeurs: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "vide"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . type couleur (couleur Curses ou Gtk, voir la doc WeeChat)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . type chaîne (toute chaîne)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . description: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "option(s) de configuration trouvée(s)\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr "ignore ont été supprimés.\n"
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr "ignore a été supprimé.\n"
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr "%s aucun ignore trouvé\n"
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Fenêtres ouvertes:\n"
@@ -4480,11 +4511,6 @@ msgstr "%s %s, ligne %d: section inconnue (\"%s\")\n"
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, ligne %d: section invalide pour l'option, ligne ignorée\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4527,11 +4553,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, ligne %d: nom de couleur invalide pour l'option '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s impossible de créer le fichier \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+129 -113
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1300,8 +1300,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@@ -1361,7 +1361,7 @@ msgstr ""
msgid " has kicked "
msgstr ""
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr ""
@@ -1716,7 +1716,7 @@ msgstr ""
msgid "has invited"
msgstr ""
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr ""
@@ -1992,154 +1992,180 @@ msgstr ""
msgid "Removing ignore:"
msgstr ""
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
"memory)\n"
msgstr ""
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr ""
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
"load\n"
msgstr ""
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr ""
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr ""
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr ""
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr ""
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr ""
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr ""
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr ""
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr ""
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr ""
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr ""
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr ""
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr ""
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr ""
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr ""
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr ""
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr ""
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr ""
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr ""
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr ""
@@ -2303,7 +2329,7 @@ msgstr ""
msgid "grab a key"
msgstr ""
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr ""
@@ -2722,8 +2748,8 @@ msgstr ""
msgid "%s server not found\n"
msgstr ""
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
@@ -2751,291 +2777,291 @@ msgstr ""
msgid "Plugin commands:\n"
msgstr ""
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr ""
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr ""
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr ""
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr ""
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr ""
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr ""
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr ""
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr ""
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr ""
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr ""
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr ""
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr ""
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr ""
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr ""
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr ""
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr ""
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr ""
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
"disconnect %s before.\n"
msgstr ""
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr ""
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr ""
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr ""
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr ""
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr ""
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr ""
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr ""
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr ""
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr ""
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr ""
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr ""
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr ""
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr ""
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr ""
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr ""
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr ""
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr ""
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr ""
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr ""
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr ""
@@ -4151,11 +4177,6 @@ msgstr ""
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr ""
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr ""
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4192,11 +4213,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr ""
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr ""
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+61 -55
View File
@@ -1292,7 +1292,7 @@ weechat_cmd_help (int argc, char **argv)
int i;
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
#endif
switch (argc)
@@ -1325,16 +1325,19 @@ weechat_cmd_help (int argc, char **argv)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->description
&& ptr_cmd_handler->description[0])
gui_printf (NULL, " - %s",
ptr_cmd_handler->description);
gui_printf (NULL, "\n");
if (ptr_handler->type == HANDLER_COMMAND)
{
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
ptr_handler->command);
if (ptr_handler->description
&& ptr_handler->description[0])
gui_printf (NULL, " - %s",
ptr_handler->description);
gui_printf (NULL, "\n");
}
}
}
#endif
@@ -1395,29 +1398,30 @@ weechat_cmd_help (int argc, char **argv)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_cmd_handler->command, argv[0]) == 0)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, argv[0]) == 0))
{
gui_printf (NULL, "\n");
gui_printf (NULL, "[p]");
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " /%s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->arguments &&
ptr_cmd_handler->arguments[0])
ptr_handler->command);
if (ptr_handler->arguments &&
ptr_handler->arguments[0])
gui_printf (NULL, " %s\n",
ptr_cmd_handler->arguments);
ptr_handler->arguments);
else
gui_printf (NULL, "\n");
if (ptr_cmd_handler->description &&
ptr_cmd_handler->description[0])
if (ptr_handler->description &&
ptr_handler->description[0])
gui_printf (NULL, "\n%s\n",
ptr_cmd_handler->description);
if (ptr_cmd_handler->arguments_description &&
ptr_cmd_handler->arguments_description[0])
ptr_handler->description);
if (ptr_handler->arguments_description &&
ptr_handler->arguments_description[0])
gui_printf (NULL, "\n%s\n",
ptr_cmd_handler->arguments_description);
ptr_handler->arguments_description);
return 0;
}
}
@@ -1661,8 +1665,8 @@ weechat_cmd_plugin (int argc, char **argv)
{
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
int handler_found;
switch (argc)
{
@@ -1685,15 +1689,19 @@ weechat_cmd_plugin (int argc, char **argv)
/* message handlers */
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" message handlers:\n"));
for (ptr_msg_handler = ptr_plugin->msg_handlers;
ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
handler_found = 0;
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s)\n"),
ptr_msg_handler->irc_command);
if (ptr_handler->type == HANDLER_MESSAGE)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s)\n"),
ptr_handler->irc_command);
}
}
if (!ptr_plugin->msg_handlers)
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (no message handler)\n"));
@@ -1702,20 +1710,24 @@ weechat_cmd_plugin (int argc, char **argv)
/* command handlers */
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" command handlers:\n"));
for (ptr_cmd_handler = ptr_plugin->cmd_handlers;
ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
handler_found = 0;
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " /%s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->description
&& ptr_cmd_handler->description[0])
gui_printf (NULL, " (%s)",
ptr_cmd_handler->description);
gui_printf (NULL, "\n");
if (ptr_handler->type == HANDLER_COMMAND)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " /%s",
ptr_handler->command);
if (ptr_handler->description
&& ptr_handler->description[0])
gui_printf (NULL, " (%s)",
ptr_handler->description);
gui_printf (NULL, "\n");
}
}
if (!ptr_plugin->cmd_handlers)
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (no command handler)\n"));
@@ -1728,27 +1740,21 @@ weechat_cmd_plugin (int argc, char **argv)
}
break;
case 1:
/*if (ascii_strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
if (ascii_strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load ();
else if (ascii_strcasecmp (argv[0], "reload") == 0)
{
plugin_unload (PLUGIN_TYPE_PERL, NULL);
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
plugin_unload_all ();
plugin_auto_load ();
}
else if (ascii_strcasecmp (argv[0], "unload") == 0)
plugin_unload (PLUGIN_TYPE_PERL, NULL);*/
plugin_unload_all ();
break;
case 2:
if (ascii_strcasecmp (argv[0], "load") == 0)
{
/* load plugin */
plugin_load (argv[1]);
}
else if (ascii_strcasecmp (argv[0], "unload") == 0)
{
/* unload plugin */
plugin_unload_name (argv[1]);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
+7 -7
View File
@@ -115,7 +115,7 @@ completion_build_list (t_completion *completion, void *channel)
char option_string[2048];
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
#endif
/* WeeChat internal commands */
@@ -213,13 +213,13 @@ completion_build_list (t_completion *completion, void *channel)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers;
ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
weelist_add (&completion->completion_list,
&completion->last_completion,
ptr_cmd_handler->command);
if (ptr_handler->type == HANDLER_COMMAND)
weelist_add (&completion->completion_list,
&completion->last_completion,
ptr_handler->command);
}
}
#endif
+10 -33
View File
@@ -216,7 +216,7 @@ weechat_plugin_infobar_printf (t_weechat_plugin *plugin, int time_displayed, cha
* weechat_plugin_msg_handler_add: add a message handler
*/
t_plugin_msg_handler *
t_plugin_handler *
weechat_plugin_msg_handler_add (t_weechat_plugin *plugin, char *message,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
@@ -228,34 +228,11 @@ weechat_plugin_msg_handler_add (t_weechat_plugin *plugin, char *message,
return NULL;
}
/*
* weechat_plugin_msg_handler_remove: remove a WeeChat message handler
*/
void
weechat_plugin_msg_handler_remove (t_weechat_plugin *plugin,
t_plugin_msg_handler *msg_handler)
{
if (plugin && msg_handler)
plugin_msg_handler_remove (plugin, msg_handler);
}
/*
* weechat_plugin_msg_handler_remove_all: remove all WeeChat message handlers
*/
void
weechat_plugin_msg_handler_remove_all (t_weechat_plugin *plugin)
{
if (plugin)
plugin_msg_handler_remove_all (plugin);
}
/*
* weechat_plugin_cmd_handler_add: add a command handler
*/
t_plugin_cmd_handler *
t_plugin_handler *
weechat_plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
char *description, char *arguments,
char *arguments_description,
@@ -272,26 +249,26 @@ weechat_plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
}
/*
* weechat_cmd_plugin_handler_remove: remove a WeeChat command handler
* weechat_plugin_handler_remove: remove a WeeChat handler
*/
void
weechat_plugin_cmd_handler_remove (t_weechat_plugin *plugin,
t_plugin_cmd_handler *cmd_handler)
weechat_plugin_handler_remove (t_weechat_plugin *plugin,
t_plugin_handler *handler)
{
if (plugin && cmd_handler)
plugin_cmd_handler_remove (plugin, cmd_handler);
if (plugin && handler)
plugin_handler_remove (plugin, handler);
}
/*
* weechat_plugin_cmd_handler_remove_all: remove all WeeChat command handlers
* weechat_plugin_handler_remove_all: remove all WeeChat handlers
*/
void
weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *plugin)
weechat_plugin_handler_remove_all (t_weechat_plugin *plugin)
{
if (plugin)
plugin_cmd_handler_remove_all (plugin);
plugin_handler_remove_all (plugin);
}
/*
+117 -153
View File
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <dlfcn.h>
#include "../common/weechat.h"
#include "plugins.h"
#include "plugins-config.h"
@@ -160,21 +161,21 @@ plugin_search (char *name)
* return: pointer to handler, NULL if not found
*/
t_plugin_cmd_handler *
t_plugin_handler *
plugin_cmd_handler_search (char *command)
{
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_plugin_cmd_handler;
t_plugin_handler *ptr_handler;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_cmd_handler = ptr_plugin->cmd_handlers;
ptr_plugin_cmd_handler;
ptr_plugin_cmd_handler = ptr_plugin_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_cmd_handler->command, command) == 0)
return ptr_plugin_cmd_handler;
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, command) == 0))
return ptr_handler;
}
}
@@ -194,30 +195,35 @@ plugin_cmd_handler_search (char *command)
* handler when called (used by scripts)
*/
t_plugin_msg_handler *
t_plugin_handler *
plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
{
t_plugin_msg_handler *new_plugin_msg_handler;
t_plugin_handler *new_handler;
new_plugin_msg_handler = (t_plugin_msg_handler *)malloc (sizeof (t_plugin_msg_handler));
if (new_plugin_msg_handler)
new_handler = (t_plugin_handler *)malloc (sizeof (t_plugin_handler));
if (new_handler)
{
new_plugin_msg_handler->irc_command = strdup (irc_command);
new_plugin_msg_handler->msg_handler = handler_func;
new_plugin_msg_handler->msg_handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_plugin_msg_handler->msg_handler_pointer = handler_pointer;
new_plugin_msg_handler->running = 0;
new_handler->type = HANDLER_MESSAGE;
new_handler->irc_command = strdup (irc_command);
new_handler->command = NULL;
new_handler->description = NULL;
new_handler->arguments = NULL;
new_handler->arguments_description = NULL;
new_handler->handler = handler_func;
new_handler->handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_handler->handler_pointer = handler_pointer;
new_handler->running = 0;
/* add new handler to list */
new_plugin_msg_handler->prev_handler = plugin->last_msg_handler;
new_plugin_msg_handler->next_handler = NULL;
if (plugin->msg_handlers)
(plugin->last_msg_handler)->next_handler = new_plugin_msg_handler;
new_handler->prev_handler = plugin->last_handler;
new_handler->next_handler = NULL;
if (plugin->handlers)
(plugin->last_handler)->next_handler = new_handler;
else
plugin->msg_handlers = new_plugin_msg_handler;
plugin->last_msg_handler = new_plugin_msg_handler;
plugin->handlers = new_handler;
plugin->last_handler = new_handler;
}
else
{
@@ -227,7 +233,7 @@ plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
WEECHAT_ERROR, plugin->name, irc_command);
return NULL;
}
return new_plugin_msg_handler;
return new_handler;
}
/*
@@ -245,14 +251,14 @@ plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
* handler when called (used by scripts)
*/
t_plugin_cmd_handler *
t_plugin_handler *
plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
char *description, char *arguments,
char *arguments_description,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
{
t_plugin_cmd_handler *new_plugin_cmd_handler;
t_plugin_handler *new_handler;
if (plugin_cmd_handler_search (command))
{
@@ -264,26 +270,28 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
return NULL;
}
new_plugin_cmd_handler = (t_plugin_cmd_handler *)malloc (sizeof (t_plugin_cmd_handler));
if (new_plugin_cmd_handler)
new_handler = (t_plugin_handler *)malloc (sizeof (t_plugin_handler));
if (new_handler)
{
new_plugin_cmd_handler->command = strdup (command);
new_plugin_cmd_handler->description = (description) ? strdup (description) : NULL;
new_plugin_cmd_handler->arguments = (arguments) ? strdup (arguments) : NULL;
new_plugin_cmd_handler->arguments_description = (arguments_description) ? strdup (arguments_description) : NULL;
new_plugin_cmd_handler->cmd_handler = handler_func;
new_plugin_cmd_handler->cmd_handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_plugin_cmd_handler->cmd_handler_pointer = handler_pointer;
new_plugin_cmd_handler->running = 0;
new_handler->type = HANDLER_COMMAND;
new_handler->irc_command = NULL;
new_handler->command = strdup (command);
new_handler->description = (description) ? strdup (description) : NULL;
new_handler->arguments = (arguments) ? strdup (arguments) : NULL;
new_handler->arguments_description = (arguments_description) ? strdup (arguments_description) : NULL;
new_handler->handler = handler_func;
new_handler->handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_handler->handler_pointer = handler_pointer;
new_handler->running = 0;
/* add new handler to list */
new_plugin_cmd_handler->prev_handler = plugin->last_cmd_handler;
new_plugin_cmd_handler->next_handler = NULL;
if (plugin->cmd_handlers)
(plugin->last_cmd_handler)->next_handler = new_plugin_cmd_handler;
new_handler->prev_handler = plugin->last_handler;
new_handler->next_handler = NULL;
if (plugin->handlers)
(plugin->last_handler)->next_handler = new_handler;
else
plugin->cmd_handlers = new_plugin_cmd_handler;
plugin->last_cmd_handler = new_plugin_cmd_handler;
plugin->handlers = new_handler;
plugin->last_handler = new_handler;
/* add command to WeeChat commands list */
if (!weelist_search (index_commands, command))
@@ -297,7 +305,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
WEECHAT_ERROR, plugin->name, command);
return NULL;
}
return new_plugin_cmd_handler;
return new_handler;
}
/*
@@ -309,30 +317,30 @@ int
plugin_msg_handler_exec (char *server, char *irc_command, char *irc_message)
{
t_weechat_plugin *ptr_plugin;
t_plugin_msg_handler *ptr_plugin_msg_handler;
t_plugin_handler *ptr_handler;
int count;
count = 0;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_msg_handler = ptr_plugin->msg_handlers;
ptr_plugin_msg_handler;
ptr_plugin_msg_handler = ptr_plugin_msg_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_msg_handler->irc_command, irc_command) == 0)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ascii_strcasecmp (ptr_handler->irc_command, irc_command) == 0))
{
if (ptr_plugin_msg_handler->running == 0)
if (ptr_handler->running == 0)
{
ptr_plugin_msg_handler->running = 1;
if ((int) (ptr_plugin_msg_handler->msg_handler) (ptr_plugin,
server,
irc_command,
irc_message,
ptr_plugin_msg_handler->msg_handler_args,
ptr_plugin_msg_handler->msg_handler_pointer))
ptr_handler->running = 1;
if ((int) (ptr_handler->handler) (ptr_plugin,
server,
irc_command,
irc_message,
ptr_handler->handler_args,
ptr_handler->handler_pointer))
count++;
ptr_plugin_msg_handler->running = 0;
ptr_handler->running = 0;
}
}
}
@@ -350,28 +358,28 @@ int
plugin_cmd_handler_exec (char *server, char *command, char *arguments)
{
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_plugin_cmd_handler;
t_plugin_handler *ptr_handler;
int return_code;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_cmd_handler = ptr_plugin->cmd_handlers;
ptr_plugin_cmd_handler;
ptr_plugin_cmd_handler = ptr_plugin_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_cmd_handler->command, command) == 0)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, command) == 0))
{
if (ptr_plugin_cmd_handler->running == 0)
if (ptr_handler->running == 0)
{
ptr_plugin_cmd_handler->running = 1;
return_code = (int) (ptr_plugin_cmd_handler->cmd_handler) (ptr_plugin,
server,
command,
arguments,
ptr_plugin_cmd_handler->cmd_handler_args,
ptr_plugin_cmd_handler->cmd_handler_pointer);
ptr_plugin_cmd_handler->running = 0;
ptr_handler->running = 1;
return_code = (int) (ptr_handler->handler) (ptr_plugin,
server,
command,
arguments,
ptr_handler->handler_args,
ptr_handler->handler_pointer);
ptr_handler->running = 0;
return (return_code) ? 1 : 0;
}
}
@@ -382,99 +390,60 @@ plugin_cmd_handler_exec (char *server, char *command, char *arguments)
}
/*
* plugin_msg_handler_remove: remove a message handler for a plugin
* plugin_handler_remove: remove a handler for a plugin
*/
void
plugin_msg_handler_remove (t_weechat_plugin *plugin,
t_plugin_msg_handler *plugin_msg_handler)
plugin_handler_remove (t_weechat_plugin *plugin,
t_plugin_handler *handler)
{
t_plugin_msg_handler *new_plugin_msg_handlers;
t_plugin_handler *new_handlers;
/* remove handler from list */
if (plugin->last_msg_handler == plugin_msg_handler)
plugin->last_msg_handler = plugin_msg_handler->prev_handler;
if (plugin_msg_handler->prev_handler)
if (plugin->last_handler == handler)
plugin->last_handler = handler->prev_handler;
if (handler->prev_handler)
{
(plugin_msg_handler->prev_handler)->next_handler = plugin_msg_handler->next_handler;
new_plugin_msg_handlers = plugin->msg_handlers;
(handler->prev_handler)->next_handler = handler->next_handler;
new_handlers = plugin->handlers;
}
else
new_plugin_msg_handlers = plugin_msg_handler->next_handler;
new_handlers = handler->next_handler;
if (plugin_msg_handler->next_handler)
(plugin_msg_handler->next_handler)->prev_handler = plugin_msg_handler->prev_handler;
/* free data */
if (plugin_msg_handler->irc_command)
free (plugin_msg_handler->irc_command);
if (plugin_msg_handler->msg_handler_args)
free (plugin_msg_handler->msg_handler_args);
plugin->msg_handlers = new_plugin_msg_handlers;
}
/*
* plugin_cmd_handler_remove: remove a command handler for a plugin
*/
void
plugin_cmd_handler_remove (t_weechat_plugin *plugin,
t_plugin_cmd_handler *plugin_cmd_handler)
{
t_plugin_cmd_handler *new_plugin_cmd_handlers;
if (handler->next_handler)
(handler->next_handler)->prev_handler = handler->prev_handler;
/* remove handler from list */
if (plugin->last_cmd_handler == plugin_cmd_handler)
plugin->last_cmd_handler = plugin_cmd_handler->prev_handler;
if (plugin_cmd_handler->prev_handler)
{
(plugin_cmd_handler->prev_handler)->next_handler = plugin_cmd_handler->next_handler;
new_plugin_cmd_handlers = plugin->cmd_handlers;
}
else
new_plugin_cmd_handlers = plugin_cmd_handler->next_handler;
if (plugin_cmd_handler->next_handler)
(plugin_cmd_handler->next_handler)->prev_handler = plugin_cmd_handler->prev_handler;
/* remove command from WeeChat command list */
weelist_remove (&index_commands, &last_index_command,
weelist_search (index_commands, plugin_cmd_handler->command));
/* remove command from WeeChat command list, if command handler */
if (handler->type == HANDLER_COMMAND)
weelist_remove (&index_commands, &last_index_command,
weelist_search (index_commands, handler->command));
/* free data */
if (plugin_cmd_handler->command)
free (plugin_cmd_handler->command);
if (plugin_cmd_handler->description)
free (plugin_cmd_handler->description);
if (plugin_cmd_handler->arguments)
free (plugin_cmd_handler->arguments);
if (plugin_cmd_handler->arguments_description)
free (plugin_cmd_handler->arguments_description);
if (plugin_cmd_handler->cmd_handler_args)
free (plugin_cmd_handler->cmd_handler_args);
plugin->cmd_handlers = new_plugin_cmd_handlers;
if (handler->irc_command)
free (handler->irc_command);
if (handler->command)
free (handler->command);
if (handler->description)
free (handler->description);
if (handler->arguments)
free (handler->arguments);
if (handler->arguments_description)
free (handler->arguments_description);
if (handler->handler_args)
free (handler->handler_args);
plugin->handlers = new_handlers;
}
/*
* plugin_msg_handler_remove_all: remove all message handlers for a plugin
* plugin_handler_remove_all: remove all handlers for a plugin
*/
void
plugin_msg_handler_remove_all (t_weechat_plugin *plugin)
plugin_handler_remove_all (t_weechat_plugin *plugin)
{
while (plugin->msg_handlers)
plugin_msg_handler_remove (plugin, plugin->msg_handlers);
}
/*
* plugin_cmd_handler_remove_all: remove all command handlers for a plugin
*/
void
plugin_cmd_handler_remove_all (t_weechat_plugin *plugin)
{
while (plugin->cmd_handlers)
plugin_cmd_handler_remove (plugin, plugin->cmd_handlers);
while (plugin->handlers)
plugin_handler_remove (plugin, plugin->handlers);
}
/*
@@ -650,11 +619,9 @@ plugin_load (char *filename)
new_plugin->mkdir_home = &weechat_plugin_mkdir_home;
new_plugin->exec_on_files = &weechat_plugin_exec_on_files;
new_plugin->msg_handler_add = &weechat_plugin_msg_handler_add;
new_plugin->msg_handler_remove = &weechat_plugin_msg_handler_remove;
new_plugin->msg_handler_remove_all = &weechat_plugin_msg_handler_remove_all;
new_plugin->cmd_handler_add = &weechat_plugin_cmd_handler_add;
new_plugin->cmd_handler_remove = &weechat_plugin_cmd_handler_remove;
new_plugin->cmd_handler_remove_all = &weechat_plugin_cmd_handler_remove_all;
new_plugin->handler_remove = &weechat_plugin_handler_remove;
new_plugin->handler_remove_all = &weechat_plugin_handler_remove_all;
new_plugin->printf = &weechat_plugin_printf;
new_plugin->printf_server = &weechat_plugin_printf_server;
new_plugin->infobar_printf = &weechat_plugin_infobar_printf;
@@ -668,10 +635,8 @@ plugin_load (char *filename)
new_plugin->set_plugin_config = &weechat_plugin_set_plugin_config;
/* handlers */
new_plugin->msg_handlers = NULL;
new_plugin->last_msg_handler = NULL;
new_plugin->cmd_handlers = NULL;
new_plugin->last_cmd_handler = NULL;
new_plugin->handlers = NULL;
new_plugin->last_handler = NULL;
/* add new plugin to list */
new_plugin->prev_plugin = last_weechat_plugin;
@@ -807,8 +772,7 @@ plugin_remove (t_weechat_plugin *plugin)
(plugin->next_plugin)->prev_plugin = plugin->prev_plugin;
/* free data */
plugin_msg_handler_remove_all (plugin);
plugin_cmd_handler_remove_all (plugin);
plugin_handler_remove_all (plugin);
if (plugin->filename)
free (plugin->filename);
dlclose (plugin->handle);
+11 -13
View File
@@ -34,22 +34,20 @@ extern t_gui_buffer *plugin_find_buffer (char *, char *);
extern void plugin_exec_on_files (t_weechat_plugin *, char *,
int (*)(t_weechat_plugin *, char *));
extern t_weechat_plugin *plugin_search (char *);
extern t_plugin_msg_handler *plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_cmd_handler *plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern int plugin_msg_handler_exec (char *, char *, char *);
extern int plugin_cmd_handler_exec (char *, char *, char *);
extern void plugin_msg_handler_remove (t_weechat_plugin *,
t_plugin_msg_handler *);
extern void plugin_cmd_handler_remove (t_weechat_plugin *,
t_plugin_cmd_handler *);
extern void plugin_msg_handler_remove_all (t_weechat_plugin *);
extern void plugin_cmd_handler_remove_all (t_weechat_plugin *);
extern void plugin_handler_remove (t_weechat_plugin *,
t_plugin_handler *);
extern void plugin_handler_remove_all (t_weechat_plugin *);
extern t_weechat_plugin *plugin_load (char *);
extern void plugin_auto_load ();
extern void plugin_remove (t_weechat_plugin *);
extern void plugin_unload (t_weechat_plugin *);
extern void plugin_unload_name (char *);
+299 -79
View File
@@ -139,7 +139,6 @@ static XS (XS_weechat_register)
"Perl error: wrong parameters for "
"\"register\" function");
XSRETURN (0);
return;
}
name = SvPV (ST (0), integer);
@@ -156,7 +155,6 @@ static XS (XS_weechat_register)
"already exists with this name)",
name);
XSRETURN (0);
return;
}
/* register script */
@@ -179,8 +177,8 @@ static XS (XS_weechat_register)
"\"%s\" (not enough memory)",
name);
XSRETURN (0);
return;
}
XSRETURN (1);
}
@@ -197,13 +195,20 @@ static XS (XS_weechat_print)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to print message, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"print\" function");
XSRETURN_NO;
return;
XSRETURN (0);
}
channel_name = NULL;
@@ -220,7 +225,8 @@ static XS (XS_weechat_print)
perl_plugin->printf (perl_plugin,
server_name, channel_name,
"%s", message);
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -235,18 +241,27 @@ static XS (XS_weechat_print_infobar)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to print infobar message, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"print_infobar\" function");
XSRETURN_NO;
XSRETURN (0);
}
perl_plugin->infobar_printf (perl_plugin,
SvIV (ST (0)),
SvPV (ST (1), integer));
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -262,13 +277,20 @@ static XS (XS_weechat_command)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to run command, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"command\" function");
XSRETURN_NO;
return;
XSRETURN (0);
}
channel_name = NULL;
@@ -284,7 +306,8 @@ static XS (XS_weechat_command)
perl_plugin->exec_command (perl_plugin,
server_name, channel_name,
SvPV (ST (0), integer));
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -293,37 +316,38 @@ static XS (XS_weechat_command)
static XS (XS_weechat_add_message_handler)
{
char *name, *function;
char *irc_command, *function;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add message handler, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"add_message_handler\" function");
XSRETURN_NO;
XSRETURN (0);
}
name = SvPV (ST (0), integer);
irc_command = SvPV (ST (0), integer);
function = SvPV (ST (1), integer);
if (perl_current_script)
perl_plugin->msg_handler_add (perl_plugin, name,
weechat_perl_handler, function,
(void *)perl_current_script);
else
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add message handler, "
"script not initialized");
XSRETURN_NO;
}
if (perl_plugin->msg_handler_add (perl_plugin, irc_command,
weechat_perl_handler, function,
(void *)perl_current_script))
XSRETURN (1);
XSRETURN_YES;
XSRETURN (0);
}
/*
@@ -339,12 +363,20 @@ static XS (XS_weechat_add_command_handler)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add command handler, "
"script not initialized");
XSRETURN (0);
}
if (items < 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"add_command_handler\" function");
XSRETURN_NO;
XSRETURN (0);
}
command = SvPV (ST (0), integer);
@@ -353,24 +385,55 @@ static XS (XS_weechat_add_command_handler)
arguments = (items >= 4) ? SvPV (ST (3), integer) : NULL;
arguments_description = (items >= 5) ? SvPV (ST (4), integer) : NULL;
if (perl_current_script)
perl_plugin->cmd_handler_add (perl_plugin,
command,
description,
arguments,
arguments_description,
weechat_perl_handler,
function,
(void *)perl_current_script);
else
if (perl_plugin->cmd_handler_add (perl_plugin,
command,
description,
arguments,
arguments_description,
weechat_perl_handler,
function,
(void *)perl_current_script))
XSRETURN (1);
XSRETURN (0);
}
/*
* weechat::remove_handler: remove a handler
*/
static XS (XS_weechat_remove_handler)
{
char *command, *function;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add command handler, "
"script not initialized");
XSRETURN_NO;
"Perl error: unable to remove handler, "
"script not initialized");
XSRETURN (0);
}
XSRETURN_YES;
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"remove_handler\" function");
XSRETURN (0);
}
command = SvPV (ST (0), integer);
function = SvPV (ST (1), integer);
weechat_script_remove_handler (perl_plugin, perl_current_script,
command, function);
XSRETURN (1);
}
/*
@@ -386,12 +449,20 @@ static XS (XS_weechat_get_info)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get info, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_info\" function");
XSRETURN_NO;
XSRETURN (0);
}
server_name = NULL;
@@ -411,12 +482,11 @@ static XS (XS_weechat_get_info)
{
XST_mPV (0, info);
free (info);
return;
}
else
XST_mPV (0, "");
}
XSRETURN (1);
XST_mPV (0, "");
}
/*
@@ -433,14 +503,19 @@ static XS (XS_weechat_get_dcc_info)
(void) cv;
(void) items;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get DCC info, "
"script not initialized");
XSRETURN (0);
}
dcc_info = perl_plugin->get_dcc_info (perl_plugin);
dcc_count = 0;
if (!dcc_info)
{
XSRETURN (0);
return;
}
for (ptr_dcc = dcc_info; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
{
@@ -473,10 +548,56 @@ static XS (XS_weechat_get_dcc_info)
}
/*
* weechat::get_config: get value of a config option
* weechat::get_config: get value of a WeeChat config option
*/
static XS (XS_weechat_get_config)
{
char *option, *return_value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 1)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
if (option)
{
return_value = perl_plugin->get_config (perl_plugin, option);
if (return_value)
{
XST_mPV (0, return_value);
free (return_value);
return;
}
}
XST_mPV (0, "");
}
/*
* weechat::set_config: set value of a WeeChat config option
*/
static XS (XS_weechat_set_config)
{
char *option, *value;
unsigned int integer;
@@ -485,29 +606,123 @@ static XS (XS_weechat_get_config)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to set config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"set_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
value = SvPV (ST (1), integer);
if (option && value)
{
if (perl_plugin->set_config (perl_plugin, option, value))
XSRETURN (1);
}
XSRETURN (0);
}
/*
* weechat::get_plugin_config: get value of a plugin config option
*/
static XS (XS_weechat_get_plugin_config)
{
char *option, *return_value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get plugin config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 1)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_config\" function");
XSRETURN_NO;
"\"get_plugin_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
if (option)
{
value = perl_plugin->get_config (perl_plugin, option);
return_value = weechat_script_get_plugin_config (perl_plugin,
perl_current_script,
option);
if (value)
if (return_value)
{
XST_mPV (0, value);
free (value);
XST_mPV (0, return_value);
free (return_value);
return;
}
else
XST_mPV (0, "");
}
XST_mPV (0, "");
}
/*
* weechat::set_plugin_config: set value of a WeeChat config option
*/
static XS (XS_weechat_set_plugin_config)
{
char *option, *value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to set plugin config option, "
"script not initialized");
XSRETURN (0);
}
XSRETURN (1);
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"set_plugin_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
value = SvPV (ST (1), integer);
if (option && value)
{
if (weechat_script_set_plugin_config (perl_plugin,
perl_current_script,
option, value))
XSRETURN (1);
}
XSRETURN (0);
}
/*
@@ -525,13 +740,17 @@ weechat_perl_xs_init (pTHX)
newXS ("weechat::command", XS_weechat_command, "weechat");
newXS ("weechat::add_message_handler", XS_weechat_add_message_handler, "weechat");
newXS ("weechat::add_command_handler", XS_weechat_add_command_handler, "weechat");
newXS ("weechat::remove_handler", XS_weechat_remove_handler, "weechat");
newXS ("weechat::get_info", XS_weechat_get_info, "weechat");
newXS ("weechat::get_dcc_info", XS_weechat_get_dcc_info, "weechat");
newXS ("weechat::get_config", XS_weechat_get_config, "weechat");
newXS ("weechat::set_config", XS_weechat_set_config, "weechat");
newXS ("weechat::get_plugin_config", XS_weechat_get_plugin_config, "weechat");
newXS ("weechat::set_plugin_config", XS_weechat_set_plugin_config, "weechat");
}
/*
* wee_perl_load: load a Perl script
* weechat_perl_load: load a Perl script
*/
int
@@ -689,9 +908,8 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -715,14 +933,14 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Perl scripts:");
if (perl_scripts)
{
for (ptr_plugin_script = perl_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = perl_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -732,15 +950,16 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Perl message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Perl(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -750,15 +969,16 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Perl command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Perl(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
+292 -80
View File
@@ -118,7 +118,7 @@ weechat_python_register (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"register\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (weechat_script_search (python_plugin, &python_scripts, name))
@@ -129,7 +129,7 @@ weechat_python_register (PyObject *self, PyObject *args)
"\"%s\" script (another script "
"already exists with this name)",
name);
return NULL;
return Py_BuildValue ("i", 0);
}
/* register script */
@@ -152,11 +152,10 @@ weechat_python_register (PyObject *self, PyObject *args)
"Python error: unable to load script "
"\"%s\" (not enough memory)",
name);
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
return Py_BuildValue ("i", 1);
}
/*
@@ -171,6 +170,14 @@ weechat_python_print (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to print message, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
message = NULL;
channel_name = NULL;
server_name = NULL;
@@ -180,12 +187,13 @@ weechat_python_print (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"print\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->printf (python_plugin,
server_name, channel_name,
"%s", message);
return Py_BuildValue ("i", 1);
}
@@ -202,6 +210,14 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to print infobar message, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
delay = 1;
message = NULL;
@@ -210,13 +226,12 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"print_infobar\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->infobar_printf (python_plugin, delay, message);
Py_INCREF (Py_None);
return Py_None;
return Py_BuildValue ("i", 1);
}
/*
@@ -231,6 +246,14 @@ weechat_python_command (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to run command, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
command = NULL;
channel_name = NULL;
server_name = NULL;
@@ -240,12 +263,13 @@ weechat_python_command (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"command\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->exec_command (python_plugin,
server_name, channel_name,
command);
return Py_BuildValue ("i", 1);
}
@@ -256,36 +280,36 @@ weechat_python_command (PyObject *self, PyObject *args)
static PyObject *
weechat_python_add_message_handler (PyObject *self, PyObject *args)
{
char *message, *function;
char *irc_command, *function;
/* make gcc happy */
(void) self;
message = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &message, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_message_handler\" function");
return NULL;
}
if (python_current_script)
python_plugin->msg_handler_add (python_plugin, message,
weechat_python_handler, function,
(void *)python_current_script);
else
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add message handler, "
"script not initialized");
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
irc_command = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &irc_command, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_message_handler\" function");
return Py_BuildValue ("i", 0);
}
if (python_plugin->msg_handler_add (python_plugin, irc_command,
weechat_python_handler, function,
(void *)python_current_script))
return Py_BuildValue ("i", 1);
return Py_BuildValue ("i", 0);
}
/*
@@ -299,7 +323,15 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add command handler, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
command = NULL;
function = NULL;
description = NULL;
@@ -312,28 +344,57 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_command_handler\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (python_current_script)
python_plugin->cmd_handler_add (python_plugin,
if (python_plugin->cmd_handler_add (python_plugin,
command,
description,
arguments,
arguments_description,
weechat_python_handler,
function,
(void *)python_current_script);
else
(void *)python_current_script))
return Py_BuildValue ("i", 1);
return Py_BuildValue ("i", 0);
}
/*
* weechat.remove_handler: remove a handler
*/
static PyObject *
weechat_python_remove_handler (PyObject *self, PyObject *args)
{
char *command, *function;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add command handler, "
"Python error: unable to remove handler, "
"script not initialized");
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
command = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &command, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"remove_handler\" function");
return Py_BuildValue ("i", 0);
}
weechat_script_remove_handler (python_plugin, python_current_script,
command, function);
return Py_BuildValue ("i", 1);
}
/*
@@ -349,6 +410,14 @@ weechat_python_get_info (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get info, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
arg = NULL;
server_name = NULL;
channel_name = NULL;
@@ -358,7 +427,7 @@ weechat_python_get_info (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_info\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (arg)
@@ -371,11 +440,9 @@ weechat_python_get_info (PyObject *self, PyObject *args)
free (info);
return object;
}
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
return Py_BuildValue ("s", "");
}
/*
@@ -393,11 +460,19 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
(void) self;
(void) args;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get DCC info, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
dcc_info = python_plugin->get_dcc_info (python_plugin);
dcc_count = 0;
if (!dcc_info)
return Py_None;
return Py_BuildValue ("i", 0);
for (ptr_dcc = dcc_info; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
{
@@ -409,7 +484,7 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
if (!list)
{
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
dcc_count = 0;
@@ -440,14 +515,14 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
PyMem_Free (listvalue);
PyMem_Free (list);
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
PyMem_Free (listvalue);
}
else
{
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
dcc_count++;
}
@@ -458,18 +533,26 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
}
/*
* weechat.get_config: get value of a config option
* weechat.get_config: get value of a WeeChat config option
*/
static PyObject *
weechat_python_get_config (PyObject *self, PyObject *args)
{
char *option, *value;
PyObject *object;
char *option, *return_value;
PyObject *python_return_value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
if (!PyArg_ParseTuple (args, "s", &option))
@@ -477,26 +560,150 @@ weechat_python_get_config (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_config\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (option)
{
value = python_plugin->get_config (python_plugin, option);
return_value = python_plugin->get_config (python_plugin, option);
if (value)
if (return_value)
{
object = Py_BuildValue ("s", value);
free (value);
return object;
python_return_value = Py_BuildValue ("s", return_value);
free (return_value);
return python_return_value;
}
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
return Py_BuildValue ("s", "");
}
/*
* weechat.set_config: set value of a WeeChat config option
*/
static PyObject *
weechat_python_set_config (PyObject *self, PyObject *args)
{
char *option, *value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to set config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
value = NULL;
if (!PyArg_ParseTuple (args, "ss", &option, &value))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"set_config\" function");
return Py_BuildValue ("i", 0);
}
if (option && value)
{
if (python_plugin->set_config (python_plugin, option, value))
return Py_BuildValue ("i", 1);
}
return Py_BuildValue ("i", 0);
}
/*
* weechat.get_plugin_config: get value of a plugin config option
*/
static PyObject *
weechat_python_get_plugin_config (PyObject *self, PyObject *args)
{
char *option, *return_value;
PyObject *python_return_value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get plugin config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
if (!PyArg_ParseTuple (args, "s", &option))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_plugin_config\" function");
return Py_BuildValue ("i", 0);
}
if (option)
{
return_value = python_plugin->get_config (python_plugin, option);
if (return_value)
{
python_return_value = Py_BuildValue ("s", return_value);
free (return_value);
return python_return_value;
}
}
return Py_BuildValue ("s", "");
}
/*
* weechat.set_plugin_config: set value of a plugin config option
*/
static PyObject *
weechat_python_set_plugin_config (PyObject *self, PyObject *args)
{
char *option, *value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to set plugin config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
value = NULL;
if (!PyArg_ParseTuple (args, "ss", &option, &value))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"set_plugin_config\" function");
return Py_BuildValue ("i", 0);
}
if (option && value)
{
if (python_plugin->set_config (python_plugin, option, value))
return Py_BuildValue ("i", 1);
}
return Py_BuildValue ("i", 0);
}
/*
* Python subroutines
*/
@@ -509,9 +716,13 @@ PyMethodDef weechat_python_funcs[] = {
{ "command", weechat_python_command, METH_VARARGS, "" },
{ "add_message_handler", weechat_python_add_message_handler, METH_VARARGS, "" },
{ "add_command_handler", weechat_python_add_command_handler, METH_VARARGS, "" },
{ "remove_handler", weechat_python_remove_handler, METH_VARARGS, "" },
{ "get_info", weechat_python_get_info, METH_VARARGS, "" },
{ "get_dcc_info", weechat_python_get_dcc_info, METH_VARARGS, "" },
{ "get_config", weechat_python_get_config, METH_VARARGS, "" },
{ "set_config", weechat_python_set_config, METH_VARARGS, "" },
{ "get_plugin_config", weechat_python_get_plugin_config, METH_VARARGS, "" },
{ "set_plugin_config", weechat_python_set_plugin_config, METH_VARARGS, "" },
{ NULL, NULL, 0, NULL }
};
@@ -738,9 +949,8 @@ weechat_python_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -764,14 +974,14 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Python scripts:");
if (python_scripts)
{
for (ptr_plugin_script = python_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = python_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -781,15 +991,16 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Python message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Python(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -799,15 +1010,16 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Python command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Python(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
+297 -62
View File
@@ -95,7 +95,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"register\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (name, T_STRING);
@@ -116,7 +116,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
"\"%s\" script (another script "
"already exists with this name)",
c_name);
return Qnil;
return INT2FIX (0);
}
/* register script */
@@ -139,7 +139,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
"Ruby error: unable to load script "
"\"%s\" (not enough memory)",
c_name);
return Qnil;
return INT2FIX (0);
}
return INT2FIX (1);
@@ -158,6 +158,14 @@ weechat_ruby_print (VALUE class, VALUE message, VALUE channel_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to print message, "
"script not initialized");
return INT2FIX (0);
}
c_message = NULL;
c_channel_name = NULL;
c_server_name = NULL;
@@ -167,7 +175,7 @@ weechat_ruby_print (VALUE class, VALUE message, VALUE channel_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"print\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (message, T_STRING);
@@ -202,6 +210,14 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to print infobar message, "
"script not initialized");
return INT2FIX (0);
}
c_delay = 1;
c_message = NULL;
@@ -210,7 +226,7 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"print_infobar\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (delay, T_FIXNUM);
@@ -237,6 +253,14 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to run command, "
"script not initialized");
return INT2FIX (0);
}
c_command = NULL;
c_channel_name = NULL;
c_server_name = NULL;
@@ -246,7 +270,7 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"command\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (command, T_STRING);
@@ -264,7 +288,7 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
ruby_plugin->exec_command (ruby_plugin,
c_server_name, c_channel_name,
c_command);
return INT2FIX (1);
}
@@ -280,6 +304,14 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add message handler, "
"script not initialized");
return INT2FIX (0);
}
c_message = NULL;
c_function = NULL;
@@ -288,7 +320,7 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"add_message_handler\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (message, T_STRING);
@@ -297,19 +329,12 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
c_message = STR2CSTR (message);
c_function = STR2CSTR (function);
if (ruby_current_script)
ruby_plugin->msg_handler_add (ruby_plugin, c_message,
if (ruby_plugin->msg_handler_add (ruby_plugin, c_message,
weechat_ruby_handler, c_function,
(void *)ruby_current_script);
else
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add message handler, "
"script not initialized");
return Qnil;
}
(void *)ruby_current_script))
return INT2FIX (1);
return INT2FIX (1);
return INT2FIX (0);
}
/*
@@ -321,12 +346,20 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
VALUE description, VALUE arguments,
VALUE arguments_description)
{
char *c_command, *c_function,*c_description, *c_arguments;
char *c_command, *c_function, *c_description, *c_arguments;
char *c_arguments_description;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add command handler, "
"script not initialized");
return INT2FIX (0);
}
c_command = NULL;
c_function = NULL;
c_description = NULL;
@@ -338,7 +371,7 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"add_command_handler\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (command, T_STRING);
@@ -359,23 +392,59 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
if (!NIL_P (arguments_description))
c_arguments_description = STR2CSTR (arguments_description);
if (ruby_current_script)
ruby_plugin->cmd_handler_add (ruby_plugin,
if (ruby_plugin->cmd_handler_add (ruby_plugin,
c_command,
c_description,
c_arguments,
c_arguments_description,
weechat_ruby_handler,
c_function,
(void *)ruby_current_script);
else
(void *)ruby_current_script))
return INT2FIX (1);
return INT2FIX (0);
}
/*
* weechat_remove_handler: remove a handler
*/
static VALUE
weechat_ruby_remove_handler (VALUE class, VALUE command, VALUE function)
{
char *c_command, *c_function;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add command handler, "
"Ruby error: unable to remove handler, "
"script not initialized");
return Qnil;
return INT2FIX (0);
}
c_command = NULL;
c_function = NULL;
if (NIL_P (command) || NIL_P (function))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"remove_handler\" function");
return INT2FIX (0);
}
Check_Type (command, T_STRING);
Check_Type (function, T_STRING);
c_command = STR2CSTR (command);
c_function = STR2CSTR (function);
weechat_script_remove_handler (ruby_plugin, ruby_current_script,
c_command, c_function);
return INT2FIX (1);
}
@@ -393,6 +462,14 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get info, "
"script not initialized");
return INT2FIX (0);
}
c_arg = NULL;
c_server_name = NULL;
c_channel_name = NULL;
@@ -402,7 +479,7 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_info\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (arg, T_STRING);
@@ -428,11 +505,9 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
free (info);
return return_value;
}
else
return rb_str_new2 ("");
}
return INT2FIX (1);
return rb_str_new2 ("");
}
/*
@@ -445,23 +520,39 @@ weechat_ruby_get_dcc_info (VALUE class)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get DCC info, "
"script not initialized");
return INT2FIX (0);
}
/* TODO: get dcc info for Ruby */
return INT2FIX (1);
}
/*
* weechat_ruby_get_config: get value of a config option
* weechat_ruby_get_config: get value of a WeeChat config option
*/
static VALUE
weechat_ruby_get_config (VALUE class, VALUE option)
{
char *c_option, *value;
VALUE return_value;
char *c_option, *return_value;
VALUE ruby_return_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
if (NIL_P (option))
@@ -469,7 +560,7 @@ weechat_ruby_get_config (VALUE class, VALUE option)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_config\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (option, T_STRING);
@@ -477,19 +568,162 @@ weechat_ruby_get_config (VALUE class, VALUE option)
if (c_option)
{
value = ruby_plugin->get_config (ruby_plugin, c_option);
return_value = ruby_plugin->get_config (ruby_plugin, c_option);
if (value)
if (return_value)
{
return_value = rb_str_new2 (value);
free (value);
return return_value;
ruby_return_value = rb_str_new2 (return_value);
free (return_value);
return ruby_return_value;
}
else
return rb_str_new2 ("");
}
return INT2FIX (1);
return rb_str_new2 ("");
}
/*
* weechat_ruby_set_config: set value of a WeeChat config option
*/
static VALUE
weechat_ruby_set_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to set config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
c_value = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"set_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
Check_Type (value, T_STRING);
c_option = STR2CSTR (option);
c_value = STR2CSTR (value);
if (c_option && c_value)
{
if (ruby_plugin->set_config (ruby_plugin, c_option, c_value))
return INT2FIX (1);
}
return INT2FIX (0);
}
/*
* weechat_ruby_get_plugin_config: get value of a plugin config option
*/
static VALUE
weechat_ruby_get_plugin_config (VALUE class, VALUE option)
{
char *c_option, *return_value;
VALUE ruby_return_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get plugin config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_plugin_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
c_option = STR2CSTR (option);
if (c_option)
{
return_value = weechat_script_get_plugin_config (ruby_plugin,
ruby_current_script,
c_option);
if (return_value)
{
ruby_return_value = rb_str_new2 (return_value);
free (return_value);
return ruby_return_value;
}
}
return rb_str_new2 ("");
}
/*
* weechat_ruby_set_plugin_config: set value of a plugin config option
*/
static VALUE
weechat_ruby_set_plugin_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to set plugin config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
c_value = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"set_plugin_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
Check_Type (value, T_STRING);
c_option = STR2CSTR (option);
c_value = STR2CSTR (value);
if (c_option && c_value)
{
if (weechat_script_set_plugin_config (ruby_plugin,
ruby_current_script,
c_option, c_value))
return INT2FIX (1);
}
return INT2FIX (0);
}
/*
@@ -565,9 +799,8 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -591,14 +824,14 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Ruby scripts:");
if (ruby_scripts)
{
for (ptr_plugin_script = ruby_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = ruby_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -608,15 +841,16 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Ruby message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Ruby(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -626,15 +860,16 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Ruby command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Ruby(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
+102 -27
View File
@@ -130,38 +130,20 @@ void
weechat_script_remove (t_weechat_plugin *plugin,
t_plugin_script **script_list, t_plugin_script *script)
{
t_plugin_msg_handler *ptr_msg_handler, *next_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler, *next_cmd_handler;
/* make gcc happy */
(void) plugin;
t_plugin_handler *ptr_handler, *next_handler;
/* remove message handlers */
ptr_msg_handler = plugin->msg_handlers;
while (ptr_msg_handler)
/* remove all handlers pointing to script */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
if ((t_plugin_script *)ptr_msg_handler->msg_handler_pointer == script)
if ((t_plugin_script *)ptr_handler->handler_pointer == script)
{
next_msg_handler = ptr_msg_handler->next_handler;
plugin->msg_handler_remove (plugin, ptr_msg_handler);
ptr_msg_handler = next_msg_handler;
next_handler = ptr_handler->next_handler;
plugin->handler_remove (plugin, ptr_handler);
ptr_handler = next_handler;
}
else
ptr_msg_handler = ptr_msg_handler->next_handler;
}
/* remove command handlers */
ptr_cmd_handler = plugin->cmd_handlers;
while (ptr_cmd_handler)
{
if ((t_plugin_script *)ptr_cmd_handler->cmd_handler_pointer == script)
{
next_cmd_handler = ptr_cmd_handler->next_handler;
plugin->cmd_handler_remove (plugin, ptr_cmd_handler);
ptr_cmd_handler = next_cmd_handler;
}
else
ptr_cmd_handler = ptr_cmd_handler->next_handler;
ptr_handler = ptr_handler->next_handler;
}
/* free data */
@@ -187,3 +169,96 @@ weechat_script_remove (t_weechat_plugin *plugin,
/* free script */
free (script);
}
/*
* weechat_script_remove_handler: remove a handler for a script
* for a msg handler, arg1=irc command, arg2=function
* for a cmd handler, arg1=command, arg2=function
*/
void
weechat_script_remove_handler (t_weechat_plugin *plugin,
t_plugin_script *script,
char *arg1, char *arg2)
{
t_plugin_handler *ptr_handler, *next_handler;
char *ptr_arg1;
/* search and remove message handlers */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
ptr_arg1 = NULL;
if (ptr_handler->type == HANDLER_MESSAGE)
ptr_arg1 = ptr_handler->irc_command;
else if (ptr_handler->type == HANDLER_COMMAND)
ptr_arg1 = ptr_handler->command;
if ((ptr_arg1)
&& ((t_plugin_script *)ptr_handler->handler_pointer == script)
&& (plugin->ascii_strcasecmp (plugin, ptr_arg1, arg1) == 0)
&& (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, arg2) == 0))
{
next_handler = ptr_handler->next_handler;
plugin->handler_remove (plugin, ptr_handler);
ptr_handler = next_handler;
}
else
ptr_handler = ptr_handler->next_handler;
}
}
/*
* weechat_script_get_plugin_config: get a value of a script option
* format in file is: plugin.script.option=value
*/
char *
weechat_script_get_plugin_config (t_weechat_plugin *plugin,
t_plugin_script *script,
char *option)
{
char *option_fullname, *return_value;
option_fullname = (char *)malloc (strlen (script->name) +
strlen (option) + 2);
if (!option_fullname)
return NULL;
strcpy (option_fullname, script->name);
strcat (option_fullname, ".");
strcat (option_fullname, option);
return_value = plugin->get_plugin_config (plugin, option_fullname);
free (option_fullname);
return return_value;
}
/*
* weechat_script_set_plugin_config: set value of a script config option
* format in file is: plugin.script.option=value
*/
int
weechat_script_set_plugin_config (t_weechat_plugin *plugin,
t_plugin_script *script,
char *option, char *value)
{
char *option_fullname;
int return_code;
option_fullname = (char *)malloc (strlen (script->name) +
strlen (option) + 2);
if (!option_fullname)
return 0;
strcpy (option_fullname, script->name);
strcat (option_fullname, ".");
strcat (option_fullname, option);
return_code = plugin->set_plugin_config (plugin, option_fullname, value);
free (option_fullname);
return return_code;
}
+9
View File
@@ -48,5 +48,14 @@ extern t_plugin_script *weechat_script_add (t_weechat_plugin *,
char *, char *, char *);
extern void weechat_script_remove (t_weechat_plugin *,
t_plugin_script **, t_plugin_script *);
extern void weechat_script_remove_handler (t_weechat_plugin *,
t_plugin_script *,
char *, char *);
extern char *weechat_script_get_plugin_config (t_weechat_plugin *,
t_plugin_script *,
char *);
extern int weechat_script_set_plugin_config (t_weechat_plugin *,
t_plugin_script *,
char *, char *);
#endif /* weechat-script.h */
+41 -48
View File
@@ -52,40 +52,39 @@ typedef int (t_plugin_handler_func) (t_weechat_plugin *, char *, char *, char *,
/* message handler, called when an IRC messages is received */
typedef struct t_plugin_msg_handler t_plugin_msg_handler;
typedef enum t_handler_type t_handler_type;
struct t_plugin_msg_handler
enum t_handler_type
{
char *irc_command; /* name of IRC command (PRIVMSG, ..) */
t_plugin_handler_func *msg_handler; /* pointer to message handler */
char *msg_handler_args; /* arguments sent to message handler */
void *msg_handler_pointer; /* pointer sent to message handler */
int running; /* 1 if currently running */
/* (used to prevent circular call) */
t_plugin_msg_handler *prev_handler; /* link to previous handler */
t_plugin_msg_handler *next_handler; /* link to next handler */
HANDLER_MESSAGE,
HANDLER_COMMAND
};
/* command handler, to add new commands to WeeChat */
typedef struct t_plugin_handler t_plugin_handler;
typedef struct t_plugin_cmd_handler t_plugin_cmd_handler;
struct t_plugin_cmd_handler
struct t_plugin_handler
{
t_handler_type type; /* handler type */
/* data for message handler */
char *irc_command; /* name of IRC command (PRIVMSG, ..) */
/* data for command handler */
char *command; /* name of command (without first '/') */
char *description; /* (for /help) short cmd description */
char *arguments; /* (for /help) command arguments */
char *arguments_description; /* (for /help) args long description */
/* command handler */
t_plugin_handler_func *cmd_handler; /* pointer to command handler */
char *cmd_handler_args; /* arguments sent to command handler */
void *cmd_handler_pointer; /* pointer sent to command handler */
/* data common to all handlers */
t_plugin_handler_func *handler; /* pointer to handler */
char *handler_args; /* arguments sent to handler */
void *handler_pointer; /* pointer sent to handler */
/* for internal use */
int running; /* 1 if currently running */
/* (used to prevent circular call) */
t_plugin_cmd_handler *prev_handler; /* link to previous handler */
t_plugin_cmd_handler *next_handler; /* link to next handler */
t_plugin_handler *prev_handler; /* link to previous handler */
t_plugin_handler *next_handler; /* link to next handler */
};
/* plugin, a WeeChat plugin, which is a dynamic library */
@@ -100,11 +99,9 @@ struct t_weechat_plugin
char *version; /* plugin version */
/* plugin handlers */
t_plugin_msg_handler *msg_handlers; /* IRC message handlers */
t_plugin_msg_handler *last_msg_handler;
t_plugin_cmd_handler *cmd_handlers; /* command handlers */
t_plugin_cmd_handler *last_cmd_handler;
t_plugin_handler *handlers; /* pointer to first handler */
t_plugin_handler *last_handler; /* pointer to last handler */
/* links to previous/next plugins */
t_weechat_plugin *prev_plugin; /* link to previous plugin */
t_weechat_plugin *next_plugin; /* link to next plugin */
@@ -127,17 +124,15 @@ struct t_weechat_plugin
void (*printf_server) (t_weechat_plugin *, char *, ...);
void (*infobar_printf) (t_weechat_plugin *, int, char *, ...);
t_plugin_msg_handler *(*msg_handler_add) (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
void (*msg_handler_remove) (t_weechat_plugin *, t_plugin_msg_handler *);
void (*msg_handler_remove_all) (t_weechat_plugin *);
t_plugin_cmd_handler *(*cmd_handler_add) (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
void (*cmd_handler_remove) (t_weechat_plugin *, t_plugin_cmd_handler *);
void (*cmd_handler_remove_all) (t_weechat_plugin *);
t_plugin_handler *(*msg_handler_add) (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
t_plugin_handler *(*cmd_handler_add) (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
void (*handler_remove) (t_weechat_plugin *, t_plugin_handler *);
void (*handler_remove_all) (t_weechat_plugin *);
void (*exec_command) (t_weechat_plugin *, char *, char *, char *);
char *(*get_info) (t_weechat_plugin *, char *, char *, char *);
@@ -166,17 +161,15 @@ extern void weechat_plugin_printf_server (t_weechat_plugin *, char *, ...);
extern void weechat_plugin_infobar_printf (t_weechat_plugin *, int, char *, ...);
/* handler functions */
extern t_plugin_msg_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_msg_handler_remove (t_weechat_plugin *, t_plugin_msg_handler *);
extern void weechat_plugin_msg_handler_remove_all (t_weechat_plugin *);
extern t_plugin_cmd_handler *weechat_plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_cmd_handler_remove (t_weechat_plugin *, t_plugin_cmd_handler *);
extern void weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *);
extern t_plugin_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *weechat_plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_handler_remove (t_weechat_plugin *, t_plugin_handler *);
extern void weechat_plugin_handler_remove_all (t_weechat_plugin *);
/* other functions */
extern void weechat_plugin_exec_command (t_weechat_plugin *, char *, char *, char *);
+1 -1
View File
@@ -112,7 +112,7 @@ if test "x$enable_ncurses" = "xyes" ; then
fi
AC_MSG_WARN([
*** ncursesw library not found! Falling back to "ncurses"
*** Be careful, UTF-8 display will not work properly.])
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
NCURSES_LIBS="-lncurses"
else
NCURSES_LIBS="-lncursesw"
+262 -10
View File
@@ -35,7 +35,7 @@
@title WeeChat - User guide
@subtitle Fast, light and extensible IRC client
@subtitle Documentation for WeeChat v0.1.6-cvs - October, 24 2005
@subtitle Documentation for WeeChat v0.1.6-cvs - October, 25 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1557,8 +1557,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2062,7 +2064,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2093,6 +2095,9 @@ Update value of a WeeChat config option.@*
*plugin, char *option)}@*
@*
Return value of a plugin option.@*
Option is read from file ~/.weechat/plugins.rc and is like:@*
@code{plugin.option=value}@*
Note: plugin name is automatically added.@*
@emph{Arguments:}
@itemize @minus
@@ -2116,6 +2121,9 @@ use.@*
*plugin, char *option, char *value)}@*
@*
Update value of a plugin option.@*
Option is written in file ~/.weechat/plugins.rc and is like:@*
@code{plugin.option=value}@*
Note: plugin name is automatically added.@*
@emph{Arguments:}
@itemize @minus
@@ -2244,6 +2252,10 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@item @option{description}: short description of script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::register ("sample", "1.0", "sample_end", "Sample script!");}@*
@@ -2261,6 +2273,10 @@ Print message in a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::print ("message");}@*
@@ -2280,6 +2296,10 @@ Print message in infobar.@*
@item @option{message}: message to display
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::print_infobar (5, "message");}@*
@@ -2300,6 +2320,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{function}: Perl function called when message is received
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::add_message_handler ("privmsg", my_function);}@*
@@ -2333,6 +2357,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::add_command_handler ("command", my_command);}@*
@@ -2343,6 +2371,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2355,6 +2403,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2385,6 +2437,10 @@ Get various info about WeeChat, server or user.@*
@item @option{channel}: channel name
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Examples:}@*
@*
@code{$version = weechat::get_info("version");}@*
@@ -2429,23 +2485,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2484,6 +2614,10 @@ unloaded (optional parameter, empty string means nothing is called at the end)
@item @option{description}: short description of script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@@ -2501,6 +2635,10 @@ Print message in a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.prnt ("message")}@*
@@ -2520,6 +2658,10 @@ Print message in infobar.@*
@item @option{message}: message to display
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.print_infobar (5, "message")}@*
@@ -2540,6 +2682,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{function}: Python function called when message is received
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@@ -2571,6 +2717,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.add_command_handler ("command", my_command)}@*
@@ -2578,6 +2728,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("server:"+server+" arguments:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2590,6 +2760,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2619,6 +2793,10 @@ Get various info about WeeChat, server or user.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Examples:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2663,23 +2841,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+256 -10
View File
@@ -36,7 +36,7 @@
@title WeeChat - Gui@'on de usuario.
@subtitle Cliente IRC r@'apido, peque@~no y extensible
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 24 de octubre de 2005
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 25 de octubre de 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1560,8 +1560,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2065,7 +2067,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2246,6 +2248,10 @@ tener un nombre distinto)
@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...");}@*
@@ -2263,6 +2269,10 @@ Escribe un mensaje en un 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");}@*
@@ -2282,6 +2292,10 @@ Escribir un mensaje en la barra de informaciones.@*
@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");}@*
@@ -2303,6 +2317,10 @@ 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);}@*
@@ -2336,6 +2354,10 @@ 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);}@*
@@ -2346,6 +2368,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2358,6 +2400,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2387,6 +2433,10 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@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");}@*
@@ -2431,23 +2481,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2485,6 +2609,10 @@ tener un nombre distinto)
@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...")}@*
@@ -2502,6 +2630,10 @@ Escribe un mensaje en un 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")}@*
@@ -2521,6 +2653,10 @@ Escribir un mensaje en la barra de informaciones.@*
@item @option{mensaje}: 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")}@*
@@ -2542,6 +2678,10 @@ 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:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Ejemplo:}@*
@*
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@*
@@ -2573,6 +2713,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Ejemplo:}@*
@*
@code{weechat.add_command_handler ("comando", mi_comando)}@*
@@ -2580,6 +2724,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2592,6 +2756,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2620,6 +2788,10 @@ Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
@item @option{servidor}: nombre interno del servidor
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Ejemplos:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2664,23 +2836,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+271 -7
View File
@@ -36,7 +36,7 @@
@title WeeChat - Guide utilisateur
@subtitle Client IRC rapide, l@'eger et extensible
@subtitle Documentation pour WeeChat v0.1.6-cvs - 24 octobre 2005
@subtitle Documentation pour WeeChat v0.1.6-cvs - 25 octobre 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1564,8 +1564,10 @@ obligatoires (sans quoi l'extension ne peut
@end itemize
@item fonctions d'initialisation et fin de l'extension :
@itemize @minus
@item weechat_plugin_init: fonction appel@'ee au chargement de l'extension
@item weechat_plugin_end: fonction appel@'ee au d@'echargement de l'extension
@item weechat_plugin_init: fonction appel@'ee au chargement de l'extension,
qui doit renvoyer 1 en cas de succ@`es, 0 en cas d'erreur
@item weechat_plugin_end: fonction appel@'ee au d@'echargement de l'extension,
qui doit renvoyer 1 en cas de succ@`es, 0 en cas d'erreur
@end itemize
@end itemize
@@ -2118,6 +2120,10 @@ s'est produite.@*
*plugin, char *option)}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.option=valeur}@*
NB: le nom de l'extension est ajout@'e automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@@ -2141,6 +2147,10 @@ NB: le r@'esultat doit @^etre lib@'er@'e par un appel @`a la fonction
*plugin, char *option, char *value)}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.option=valeur}@*
NB: le nom de l'extension est ajout@'e automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@@ -2271,6 +2281,10 @@ de fonction @`a appeler)
@item @option{description}: description br@`eve du script.
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si le script a @'et@'e enregistr@'e, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::register ("essai", "1.0", "fin_essai", "Script d'essai !");}@*
@@ -2288,6 +2302,10 @@ Affiche un message dans un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::print ("message");}@*
@@ -2307,6 +2325,10 @@ Affiche un message dans la barre d'infos.@*
@item @option{message}: message @`a afficher
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::print_infobar (5, "message");}@*
@@ -2328,6 +2350,10 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fonction}: fonction Perl appel@'ee lorsque le message est re@,{c}u
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Perl a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::add_message_handler ("privmsg", ma_fonction);}@*
@@ -2362,6 +2388,10 @@ commande (affich@'ee par /help commande)
param@`etres de la commande (affich@'ee par /help commande)
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Perl a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::add_command_handler ("commande", ma_commande);}@*
@@ -2372,6 +2402,26 @@ param@`etres de la commande (affich@'ee par /help commande)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( nom, fonction );}@*
@*
Supprime un gestionnaire de message ou de commande.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom du message IRC ou de la commande
@item @option{fonction}: fonction Perl associ@'ee
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::remove_handler ("commande", ma_commande);}@*
@*
@item
@command{weechat::command ( commande, [canal, [serveur]] );}@*
@*
@@ -2384,6 +2434,10 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::command ("bonjour tout le monde !");}@*
@@ -2415,6 +2469,11 @@ syst@`eme de partage WeeChat
@item @option{canal}: nom du canal
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
L'information demand@'e, blanc si une erreur s'est produite ou que
l'information n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$version = get_info("version");}@*
@@ -2459,23 +2518,101 @@ Le tableau renvoy@'e contient les champs suivants :
@item bytes_per_sec: nombre d'octets transmis par seconde depuis le d@'ebut
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La liste des DCC, 0 si une erreur s'est produite.@*
@*
@item
@command{weechat::get_config ( nom );}@*
@command{weechat::get_config ( option );}@*
@*
Obtenir la valeur d'une option de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom de l'option
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$value1 = weechat::get_config ("look_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, valeur );}@*
@*
Modifier une otion de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat::set_config ("look_nicklist", "off");}@*
@code{weechat::set_config ("freenode.server_autojoin, "#weechat");}@*
@*
@item
@command{weechat::get_plugin_config ( option );}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemple :}@*
@*
@code{$value = weechat::get_plugin_config ("ma_variable");}@*
@*
@item
@command{weechat::set_plugin_config ( option, valeur );}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat::set_plugin_config ("ma_variable", "valeur");}@*
@*
@end itemize
@subsection Scripts Python
@@ -2514,6 +2651,10 @@ de fonction @`a appeler)
@item @option{description}: description br@`eve du script.
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si le script a @'et@'e enregistr@'e, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.register ("essai", "1.0", "fin_essai", "Script d'essai !")}@*
@@ -2531,6 +2672,10 @@ Affiche un message dans un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.prnt ("message")}@*
@@ -2550,6 +2695,10 @@ Affiche un message dans la barre d'infos.@*
@item @option{message}: message @`a afficher
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.print_infobar (5, "message")}@*
@@ -2571,6 +2720,10 @@ RFC 2812 : @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fonction}: fonction Python appel@'ee lorsque le message est re@,{c}u
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Python a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.add_message_handler ("privmsg", ma_fonction)}@*
@@ -2602,6 +2755,10 @@ commande (affich@'ee par /help commande)
param@`etres de la commande (affich@'ee par /help commande)
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si la fonction Python a @'et@'e attach@'ee, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.add_command_handler ("commande", ma_commande)}@*
@@ -2609,6 +2766,26 @@ param@`etres de la commande (affich@'ee par /help commande)
@code{@ @ @ @ weechat.prnt("serveur:"+serveur+" param@`etres:"+args)}@*
@*
@item
@command{weechat.remove_handler ( nom, fonction );}@*
@*
Supprime un gestionnaire de message ou de commande.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom du message IRC ou de la commande
@item @option{fonction}: fonction Python associ@'ee
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.remove_handler ("commande", ma_commande);}@*
@*
@item
@command{weechat.command ( commande, [canal, [serveur]] )}@*
@*
@@ -2621,6 +2798,10 @@ Ex@'ecute une commande ou envoie un message @'a un canal.@*
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.command ("bonjour tout le monde !")}@*
@@ -2651,6 +2832,11 @@ syst@`eme de partage WeeChat
@item @option{serveur}: nom interne du serveur
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
L'information demand@'e, blanc si une erreur s'est produite ou que
l'information n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$version = weechat.get_info ("version")}@*
@@ -2695,6 +2881,10 @@ Le tableau renvoy@'e contient les champs suivants :
@item bytes_per_sec: nombre d'octets transmis par seconde depuis le d@'ebut
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La liste des DCC, 0 si une erreur s'est produite.@*
@*
@item
@command{weechat.get_config ( nom );}@*
@@ -2706,12 +2896,86 @@ Obtenir la valeur d'une option de configuration WeeChat.@*
@item @option{nom}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemples :}@*
@*
@code{$value1 = weechat.get_config ("look_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( nom, valeur );}@*
@*
Modifier une otion de configuration WeeChat.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{nom}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemples :}@*
@*
@code{weechat.set_config ("look_nicklist", "off");}@*
@code{weechat.set_config ("freenode.server_autojoin, "#weechat");}@*
@*
@item
@command{weechat.get_plugin_config ( option );}@*
@*
Renvoie la valeur d'une option de l'extension.@*
L'option est lue depuis le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
La valeur de l'option, blanc si une erreur s'est produite ou que
l'option n'a pas @'et@'e trouv@'ee.@*
@*
@emph{Exemple :}@*
@*
@code{$value = weechat.get_plugin_config ("ma_variable");}@*
@*
@item
@command{weechat.set_plugin_config ( option, valeur );}@*
@*
Modifie la valeur d'une option de l'extension.@*
L'option est @'ecrite dans le fichier ~/.weechat/plugins.rc et est
sous cette forme :@*
@code{extension.script.option=valeur}@*
NB: le nom de l'extension et du script sont ajout@'es automatiquement.@*
@emph{Param@`etres :}
@itemize @minus
@item @option{option}: nom de l'option
@item @option{valeur}: la nouvelle valeur pour l'option
@end itemize
@*
@emph{Valeur renvoy@'ee :}@*
@*
1 si succ@`es, 0 si une erreur s'est produite.@*
@*
@emph{Exemple :}@*
@*
@code{weechat.set_plugin_config ("ma_variable", "valeur");}@*
@*
@end itemize
@subsection Scripts Ruby
+256 -10
View File
@@ -36,7 +36,7 @@
@title WeeChat - Guia do Utilizador
@subtitle Cliente de IRC rapido, leve e extencivel
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.6-cvs - 24 de outubro de 2005
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.6-cvs - 25 de outubro de 2005
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}>
@@ -1555,8 +1555,10 @@ them the plugin can't load):@*
@end itemize
@item functions for init and end of plugin:
@itemize @minus
@item weechat_plugin_init: function called when plugin is loaded
@item weechat_plugin_end: function called when plugin is unloaded
@item weechat_plugin_init: function called when plugin is loaded,
must return 1 if successful, 0 if error
@item weechat_plugin_end: function called when plugin is unloaded,
must return 1 if successful, 0 if error
@end itemize
@end itemize
@@ -2060,7 +2062,7 @@ use.@*
@*
@emph{Examples:}@*
@*
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@*
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@*
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@*
@*
@@ -2240,6 +2242,10 @@ Todos os Scripts Perl para o Weechat devem invocar esta fun@,{c}@~ao.@*
@item @option{descri@,{c}@~ao}: breve descri@,{c}@~ao do script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::register ("sample", "1.0", "sample_end", "Sample script!");}@*
@@ -2257,6 +2263,10 @@ Imprimne uma mensagem na canal.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplos:}@*
@*
@code{weechat::print ("mensagem");}@*
@@ -2276,6 +2286,10 @@ Imprimne uma mensagem na barra do info.@*
@item @option{mensagem}: mensagem a mostrar
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::print_infobar (5, "mensagem");}@*
@@ -2296,6 +2310,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fun@,{c}@~ao}: fun@,{c}@~ao Perl invocada quando a mensagem é recebida
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::add_message_handler ("privmsg", my_function);}@*
@@ -2326,6 +2344,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Perl function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat::add_command_handler ("command", my_command);}@*
@@ -2336,6 +2358,26 @@ arguments (displayed by /help command)
@code{@} }@*
@*
@item
@command{weechat::remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Perl function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::remove_handler ("command", my_command);}@*
@*
@item
@command{weechat::command ( command, [channel, [server]] );}@*
@*
@@ -2348,6 +2390,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat::command ("hello world!");}@*
@@ -2377,6 +2423,10 @@ Comece o v@'ario info sobre WeeChat, servidor ou usu@'ario.@*
@item @option{canal}: nome da canal
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Exemplos:}@*
@*
@code{$version = get_info("version");}@*
@@ -2421,23 +2471,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat::get_config ( name );}@*
@command{weechat::get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat::get_config ("look_nicklist");}@*
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat::set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat::get_plugin_config ("my_var");}@*
@*
@item
@command{weechat::set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat::set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Python scripts
@@ -2474,6 +2598,10 @@ Todos os Scripts Python para o Weechat devem invocar esta fun@,{c}@~ao.@*
@item @option{descri@,{c}@~ao}: breve descri@,{c}@~ao do script.
@end itemize
@*
@emph{Return value:}@*
@*
1 if script was registered, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.register ("sample", "1.0", "sample_end", "Sample script!")}@*
@@ -2491,6 +2619,10 @@ Imprimne uma mensagem na canal.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplos:}@*
@*
@code{weechat.prnt ("mensagem")}@*
@@ -2510,6 +2642,10 @@ Imprimne uma mensagem na barra do info.@*
@item @option{mensagem}: mensagem a mostrar
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.print_infobar (5, "mensagem")}@*
@@ -2530,6 +2666,10 @@ RFC 2812: @uref{ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt}
@item @option{fun@,{c}@~ao}: fun@,{c}@~ao Python invocada quando a mensagem é recebida
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.add_message_handler ("privmsg", my_function)}@*
@@ -2559,6 +2699,10 @@ command)
arguments (displayed by /help command)
@end itemize
@*
@emph{Return value:}@*
@*
1 if Python function was attached, 0 if error occured.@*
@*
@emph{Exemplo:}@*
@*
@code{weechat.add_command_handler ("command", my_command)}@*
@@ -2566,6 +2710,26 @@ arguments (displayed by /help command)
@code{@ @ @ @ weechat.prnt("Servidor:"+server+" Argumentos:"+args)}@*
@*
@item
@command{weechat.remove_handler ( name, function );}@*
@*
Remove a message or command handler.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of IRC message or command handler
@item @option{function}: Python function
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.remove_handler ("command", my_command);}@*
@*
@item
@command{weechat.command ( command, [channel, [server]] )}@*
@*
@@ -2578,6 +2742,10 @@ Execute a command or send a message to a channel.@*
@item @option{server}: internal name of server
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@code{weechat.command ("hello world!")}@*
@@ -2606,6 +2774,10 @@ Comece o v@'ario info sobre WeeChat, servidor ou usu@'ario.@*
@item @option{servidor}: nome interno da servidor
@end itemize
@*
@emph{Return value:}@*
@*
Asked info, empty if error occured or info was not found.@*
@*
@emph{Exemplos:}@*
@*
@code{$version = weechat.get_info("version")}@*
@@ -2650,23 +2822,97 @@ Returned array has following fields:
@item bytes_per_sec: bytes sent/received per second
@end itemize
@*
@emph{Return value:}@*
@*
DCC list, 0 if error occured.@*
@*
@item
@command{weechat.get_config ( name );}@*
@command{weechat.get_config ( option );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{name}: name of option
@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_set_title");}@*
@code{$value1 = weechat.get_config ("look_nicklist");}@*
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@*
@*
@item
@command{weechat.set_config ( option, value );}@*
@*
Get WeeChat config option value.@*
@emph{Arguments:}
@itemize @minus
@item @option{option}: name of option
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Examples:}@*
@*
@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:}@*
@*
Value of option, empty if error occured or option was not found.@*
@*
@emph{Example:}@*
@*
@code{$value = weechat.get_plugin_config ("my_var");}@*
@*
@item
@command{weechat.set_plugin_config ( option, value );}@*
@*
Update value of a plugin option.@*
Option is written in 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
@item @option{value}: new value for option
@end itemize
@*
@emph{Return value:}@*
@*
1 if successful, 0 if error occured.@*
@*
@emph{Example:}@*
@*
@code{weechat.set_plugin_config ("my_var", "value");}@*
@*
@end itemize
@subsection Ruby scripts
+3
View File
@@ -10,6 +10,9 @@
./src/irc/irc.h
./src/plugins/plugins.c
./src/plugins/plugins.h
./src/plugins/plugins-config.c
./src/plugins/plugins-config.h
./src/plugins/plugins-interface.c
./src/plugins/weechat-plugin.h
./src/gui/curses/gui-input.c
./src/gui/curses/gui-display.c
+130 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:31+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1405,8 +1405,8 @@ msgstr "%s \"%s\" příkaz může být spuštěn pouze v okně kanálu\n"
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s špatný počet parametrů pro příkaz \"%s\"\n"
@@ -1466,7 +1466,7 @@ msgstr " se připojil "
msgid " has kicked "
msgstr " byl vykopnut "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " z "
@@ -1821,7 +1821,7 @@ msgstr "%s nemohu identifikovat přezdívku pro příkaz \"%s\"\n"
msgid "has invited"
msgstr "pozval"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "na"
@@ -2108,7 +2108,7 @@ msgstr "%s nedostatek paměti pro vytvoření ignorování\n"
msgid "Removing ignore:"
msgstr "Odebírám ignorování:"
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
@@ -2117,14 +2117,14 @@ msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro IRC příkaz \"%s\" (nedostatek "
"paměti)\n"
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro \"%s\" příkaz (již existuje)\n"
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
@@ -2132,25 +2132,25 @@ msgstr ""
"%s plugin %s: nemůžu přidat obsluhovač pro \"%s\" příkaz (nedostatek "
"paměti)\n"
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr "%s nemůžu načist plugin \"%s\": %s\n"
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
"%s symbol \"plugin_name\" nebyl v pluginu \"%s\" nalezen, načtení selhalo\n"
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
"%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n"
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
@@ -2158,7 +2158,7 @@ msgstr ""
"%s symbol \"plugin_description\" nebyl v pluginu \"%s\" nalezen, načtení "
"selhalo\n"
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
@@ -2166,7 +2166,7 @@ msgstr ""
"%s symbol \"plugin_version\" nebyl v pluginu \"%s\" nalezen, načtení "
"selhalo\n"
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
@@ -2175,100 +2175,126 @@ msgstr ""
"%s funkce \"weechat_plugin_init\" nebyla v pluginu \"%s\" nalezena, načtení "
"selhalo\n"
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr "Inicializuji plugin \"%s\" %s\n"
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr "%s nemohu načíst plugin \"%s\"\n"
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr "%s nemohu načíst plugin \"%s\" (nedostatek paměti)\n"
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr "Plugin \"%s\" (%s) načten.\n"
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr "Plugin \"%s\" odebrán.\n"
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr "%s plugin \"%s\" nenalezen\n"
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, řádek %d: nevalidní syntax, chybí \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s nemohu vytvořit soubor \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr "Změnil se den na %s\n"
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s zpoždění je veliké, odpojuji se od serveru...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "bajtů"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "Kb"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "Mb"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "Gb"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(pryč)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[nepřipojen]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Aktivní: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Zpoždění: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-VÍCE-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Akceptovat"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Storno"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Odebrat"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Pročistit staré DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Zavřít DCC pohled"
@@ -2432,7 +2458,7 @@ msgstr "vyčisti hotlist"
msgid "grab a key"
msgstr "zachytit klávesu"
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s nemohu napojit kalávesu \"%s\"\n"
@@ -2925,8 +2951,8 @@ msgstr "%s zrovna připojuji k serveru \"%s\"!\n"
msgid "%s server not found\n"
msgstr "%s server nenalezen\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s neznámá volba pro příkaz \"%s\"\n"
@@ -2954,121 +2980,121 @@ msgstr "IRC příkazy:\n"
msgid "Plugin commands:\n"
msgstr "Příkazy pluginu:\n"
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Není dostupná žádná nápověda, \"%s\" je neznámý příkaz\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr " ignoruji "
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr "Seznam ignorování:\n"
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr "Žádné ignorování není definováno.\n"
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr "Nové ignorování:"
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nová klávesová zkratka:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Klávesové zkratky:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Klávesa \"%s\" odpojena\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s nemohu odpojit klávesu \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Vnitřní klávesové funkce:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Výchozí klávesové zkratky obnoveny\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s \"-yes\" argument je požadován pro reset kaláves (bezpečnostní opatření)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr "Načtené pluginy:\n"
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr " obsluhovače zpráv:\n"
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr " IRC(%s)\n"
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr " (není obsluhovač zprávy)\n"
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr " obsluhovače příkazu:\n"
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr " (není obsluhovač příkazu)\n"
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr " (není plugin)\n"
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
"Příkaz \"plugin\" není dostupný, WeeChat byl přeložen bez podpory pluginů.\n"
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "žádný server.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Server '%s' nenalezen.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s chybí jméno serveru pro příkaz \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s příliž mnoho argumentů pro příkaz \"%s\", ignoruji argumety\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s server \"%s\" nenalezen pro příkaz \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3077,172 +3103,172 @@ msgstr ""
"%s nemůžete odebrat server \"%s\", protože jste k němu připojent. Skuste "
"nejprve /dissconnect %s.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Server"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "byl odebrán\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s chybí parametry pro příkaz \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s server \"%s\" již existuje, nemohu jej vytvořít!\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s chybí heslo pro parametr \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s chybí přezdívka/přezdívky pro parametr \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s chybí příkaz pro parametr \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "vytvořeno\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s nemohu vytvořit server\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(neznámý)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(heslo schováno) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s server \"%s\" nenalezen\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s volba nastavení \"%s\" nenalezena\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s nekorektní hodnota pro volbu \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s volba \"%s\" nemůže být změněna dokud WeeChat běží\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Nebyla nalezena žádná volba nastavení s \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Nebyla nalezena žádná volba nastavení\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr "Detail:\n"
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . typ boolean (hodnota: 'on' nebo 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . výchozí hodnota: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . typ celočíselný (hodnoty: mezi %d a %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . výchozí hodnota: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . typ řetězec (hodnoty: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "prázdný"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . typ barva (Curses nebo Gtk barva, viz WeeChat dokumentace)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . typ řetězec (jakýkoliv řetězec)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . popis: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "volba/volby nastavení nalezeny s \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "volba/volby nastavení nalezeny\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias nebo příkaz \"%s\" nenalezen\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" odebrán\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr "ignorování bylo odebráno.\n"
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr "ignorování bylo odebrán\n"
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr "%s žádné ignorování nenaleyeno\n"
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Otevřené okna:\n"
@@ -4415,11 +4441,6 @@ msgstr "%s %s, řádek %d: neznámý identifikátor sekce (\"%s\")\n"
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, řádek %d: nevalidní sekce pro volbu, řádek je ignorován\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, řádek %d: nevalidní syntax, chybí \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4462,11 +4483,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, řádek %d: nevalidní jméno barvy pro hodnotu '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s nemohu vytvořit soubor \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+130 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:31+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1412,8 +1412,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s número de argumentos incorrecto para el comando \"%s\"\n"
@@ -1474,7 +1474,7 @@ msgstr " se ha unido "
msgid " has kicked "
msgstr " se ha expulsado "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " de "
@@ -1830,7 +1830,7 @@ msgstr ""
msgid "has invited"
msgstr "ha invitado"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "en"
@@ -2118,154 +2118,180 @@ msgstr ""
msgid "Removing ignore:"
msgstr ""
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
"memory)\n"
msgstr ""
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr ""
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
"load\n"
msgstr ""
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr ""
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr ""
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr ""
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr ""
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr ""
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, línea %d: sintaxis inválida, falta \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s no es posible crear el fichero \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr ""
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s el lag (retraso) es alto, desconectando del servidor...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "bytes"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "KB"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "MB"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "GB"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(ausente)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[no conectado]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Act: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Lag: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-MÁS-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Aceptar"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Cancelar"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Eliminar"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Purgar los viejos DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Cerrar la vista DCC"
@@ -2429,7 +2455,7 @@ msgstr "limpiar hotlist"
msgid "grab a key"
msgstr ""
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s No ha sido posible atar la clave \"%s\"\n"
@@ -2910,8 +2936,8 @@ msgstr "%s actualmente conectando al servidor \"%s\"!\n"
msgid "%s server not found\n"
msgstr "%s servidor no encontrado\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s opción desconocida para el comando \"%s\"\n"
@@ -2939,122 +2965,122 @@ msgstr "Comandos IRC :\n"
msgid "Plugin commands:\n"
msgstr ""
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "No hay ayuda disponible, el comando \"%s\" es desconocido\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr ""
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr ""
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr ""
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr ""
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nuevo anclaje de clave:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Anclajes de clave:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Clave \"%s\" desatada\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s No ha sido posible desatar la clave \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Funciones de clave internas:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Anclajes de clave por defecto restaurados\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s \"-yes\" se requiere argumento para resetear las claves (por razones de "
"seguridad)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr ""
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr ""
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr ""
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr ""
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr ""
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr ""
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "Ningún servidor.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Servidor '%s' no encontrado.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s falta el nombre de servidor para el comando \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
"%s demasiados argumentos para el comando \"%s\", ignorando parámetros\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s servidor \"%s\" no encontrado para el comando \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3063,174 +3089,174 @@ msgstr ""
"%s usted no puede eliminar el servidor \"%s\" ya que está usted conectado a "
"él. Pruebe /disconnect %s antes.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Servidor"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "ha sido eliminado\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s faltan parámetros para el comando \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s el servidor \"%s\" ya existe, ¡no se puede crear!\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s falta contraseña para el comando \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s falta(n) usuario(s) para el parámetro \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s falta comando para el parámetro \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "creado\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s no es posible crear el servidor\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(desconocido)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(contraseña oculta) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s servidor \"%s\" no encontrado\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s opción de configuración \"%s\" no encontrada\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
"%s la opción \"%s\" no puede ser modificada mientras WeeChat esté en "
"ejecución\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Ninguna opción de configuración encontrada con \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Ninguna opción de configuración encontrada\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr ""
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . tipo booleano (valores: 'on' u 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . valor por defecto: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . tipo entero (valores: entre %d y %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . valor por defecto: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . tipo cadena (valores: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "vacío"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . tipo color (color Curses ó Gtk, ver la documentación de WeeChat)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . tipo cadena (cualquier cadena)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . descripción: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "opción/opciones de configuración encontrada(s) con \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "opción/opciones de configuración encontrada(s)\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias o comando \"%s\" no encontrado\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" eliminado\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr ""
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr ""
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr ""
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Ventanas abiertas:\n"
@@ -4401,11 +4427,6 @@ msgstr "%s %s, l
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, línea %d: sección inválida para la opción, línea ignorada\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, línea %d: sintaxis inválida, falta \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4448,11 +4469,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, línea %d: nombre de color inválido para la opción '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s no es posible crear el fichero \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+135 -114
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.1.6-cvs\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"PO-Revision-Date: 2005-10-23 23:31+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: 2005-10-25 11:30+0200\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1415,8 +1415,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr "%s nombre de paramètres erroné pour la commande \"%s\"\n"
@@ -1477,7 +1477,7 @@ msgstr " a rejoint "
msgid " has kicked "
msgstr " a poussé dehors "
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr " de "
@@ -1833,7 +1833,7 @@ msgstr ""
msgid "has invited"
msgstr "a invité"
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr "sur"
@@ -2127,7 +2127,7 @@ msgstr "%s pas assez de m
msgid "Removing ignore:"
msgstr "Suppression du ignore:"
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
@@ -2136,7 +2136,7 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande IRC \"%s"
"\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
@@ -2144,7 +2144,7 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande \"%s"
"\" (existe déjà)\n"
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
@@ -2152,19 +2152,19 @@ msgstr ""
"%s extension %s: impossible d'ajouter la fonction pour la commande \"%s"
"\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr "%s impossible de charger l'extension \"%s\": %s\n"
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
"%s le symbole \"plugin_name\" est introuvable dans l'extension \"%s\", échec "
"de chargement\n"
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
@@ -2172,7 +2172,7 @@ msgstr ""
"%s impossible de charger l'extension \"%s\": une extension avec le même nom "
"existe déjà\n"
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
@@ -2180,7 +2180,7 @@ msgstr ""
"%s le symbole \"plugin_description\" est introuvable dans l'extension \"%s"
"\", échec de chargement\n"
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
@@ -2188,7 +2188,7 @@ msgstr ""
"%s le symbole \"plugin_version\" est introuvable dans l'extension \"%s\", "
"échec de chargement\n"
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
@@ -2197,100 +2197,131 @@ msgstr ""
"%s la fonction \"weechat_plugin_init\" est introuvable dans l'extension \"%s"
"\", échec de chargement\n"
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr "Initialisation de l'extension \"%s\" %s\n"
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr "%s impossible d'initialiser l'extension \"%s\"\n"
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr "%s impossible de charger l'extension \"%s\" (mémoire insuffisante)\n"
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr "Extension \"%s\" (%s) chargée.\n"
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr "Extension \"%s\" déchargée.\n"
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr "%s extension \"%s\" non trouvée\n"
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n"
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s impossible de créer le fichier \"%s\"\n"
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
"#\n"
"# %s: fichier de configuration des extensions, créé par %s v%s le %s"
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
"# ATTENTION ! Soyez prudents en modifiant ce fichier, WeeChat l'écrit quand "
"des options sont modifiées.\n"
"#\n"
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr "Jour changé: %s\n"
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr "%s le lag est élevé, déconnexion du serveur...\n"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr "octets"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr "Ko"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr "Mo"
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr "Go"
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr "(absent)"
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr "[non connecté]"
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr "Act: "
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr "Lag: %.1f"
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr "-PLUS-"
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr " [A] Accepter"
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr " [C] Annuler"
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr " [R] Retirer"
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr " [P] Purger anciens DCC"
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr " [Q] Fermer la vue DCC"
@@ -2454,7 +2485,7 @@ msgstr "effacer la liste d'activit
msgid "grab a key"
msgstr "capturer une touche"
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr "%s impossible de créer la touche \"%s\"\n"
@@ -2956,8 +2987,8 @@ msgstr "%s une connexion vers le serveur \"%s\" est en cours !\n"
msgid "%s server not found\n"
msgstr "%s serveur non trouvé\n"
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr "%s option inconnue pour la commande \"%s\"\n"
@@ -2985,91 +3016,91 @@ msgstr "Commandes IRC :\n"
msgid "Plugin commands:\n"
msgstr "Commandes d'extension :\n"
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr "Pas d'aide disponible, la commande \"%s\" est inconnue\n"
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr " ignore "
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr "Liste des ignore:\n"
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr "Aucun ignore défini.\n"
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr "Nouveau ignore:"
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr "Nouvelle touche:\n"
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr "Associations de touches:\n"
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr "Touche \"%s\" supprimée\n"
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr "%s impossible de supprimer la touche \"%s\"\n"
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr "Fonctions internes pour les touches:\n"
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr "Touches par défaut restaurées\n"
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
"%s le paramètre \"-yes\" est requis pour la réinitialisation des touches "
"(raison de sécurité)\n"
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr "Extensions chargées :\n"
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr " fonctions de message :\n"
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr " IRC(%s)\n"
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr " (aucunne fonction de message)\n"
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr " commandes :\n"
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr " (aucune commande)\n"
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr " (aucune extension)\n"
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
@@ -3077,31 +3108,31 @@ msgstr ""
"La commande \"plugin\" n'est pas disponible, WeeChat a été compilé sans le "
"support des extensions.\n"
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr "Pas de serveur.\n"
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr "Serveur '%s' non trouvé.\n"
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr "%s il manque le nom du serveur pour la commande \"%s\"\n"
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr "%s trop de paramètres pour la commande \"%s\", paramètres ignorés\n"
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr "%s le serveur \"%s\" n'existe pas pour la commande \"%s\"\n"
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
@@ -3110,172 +3141,172 @@ msgstr ""
"%s vous ne pouvez pas supprimer le server \"%s\" car vous êtes connecté "
"dessus. Essayez /disconnect %s avant.\n"
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr "Serveur"
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr "a été supprimé\n"
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr "%s paramètres manquants pour la commande \"%s\"\n"
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr "%s le serveur \"%s\" existe déjà, impossible de le créer !\n"
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr "%s mot de passe manquant pour le paramètre \"%s\"\n"
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr "%s pseudo(s) manquant(s) pour le paramètre \"%s\"\n"
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr "%s commande manquante pour le paramètre \"%s\"\n"
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr "créé\n"
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr "%s impossible de créer le serveur\n"
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr "(inconnu)"
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr "(mot de passe caché) "
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr "%s serveur \"%s\" non trouvé\n"
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr "%s option de configuration \"%s\" non trouvée\n"
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr "%s valeur incorrecte pour l'option \"%s\"\n"
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr "%s l'option \"%s\" ne peut pas être changée lorsque WeeChat tourne\n"
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr "Aucune option de configuration trouvée avec \"%s\"\n"
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr "Aucune option de configuration trouvée\n"
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr "Détail :\n"
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr " . type booléen (valeurs: 'on' ou 'off')\n"
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr " . valeur par défaut: '%s'\n"
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr " . type entier (valeurs: entre %d et %d)\n"
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr " . valeur par défaut: %d\n"
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr " . type chaîne (valeurs: "
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr "vide"
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr " . type couleur (couleur Curses ou Gtk, voir la doc WeeChat)\n"
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr " . type chaîne (toute chaîne)\n"
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr " . description: %s\n"
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr "option(s) de configuration trouvée(s) avec \"%s\"\n"
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr "option(s) de configuration trouvée(s)\n"
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr "%s alias ou commande \"%s\" non trouvé\n"
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr "Alias \"%s\" supprimé\n"
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr "ignore ont été supprimés.\n"
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr "ignore a été supprimé.\n"
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr "%s aucun ignore trouvé\n"
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr "Fenêtres ouvertes:\n"
@@ -4480,11 +4511,6 @@ msgstr "%s %s, ligne %d: section inconnue (\"%s\")\n"
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr "%s %s, ligne %d: section invalide pour l'option, ligne ignorée\n"
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr "%s %s, ligne %d: syntaxe invalide, il manque \"=\"\n"
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4527,11 +4553,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr "%s %s, ligne %d: nom de couleur invalide pour l'option '%s'\n"
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr "%s impossible de créer le fichier \"%s\"\n"
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+129 -113
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2005-10-23 23:28+0200\n"
"POT-Creation-Date: 2005-10-25 18:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1300,8 +1300,8 @@ msgstr ""
#: src/irc/irc-send.c:456 src/irc/irc-send.c:468 src/irc/irc-send.c:486
#: src/irc/irc-send.c:1138 src/irc/irc-send.c:1231 src/irc/irc-send.c:1763
#: src/common/command.c:1221 src/common/command.c:1631
#: src/common/command.c:1763
#: src/common/command.c:1221 src/common/command.c:1635
#: src/common/command.c:1769
#, c-format
msgid "%s wrong argument count for \"%s\" command\n"
msgstr ""
@@ -1361,7 +1361,7 @@ msgstr ""
msgid " has kicked "
msgstr ""
#: src/irc/irc-recv.c:414 src/common/command.c:1452
#: src/irc/irc-recv.c:414 src/common/command.c:1456
msgid " from "
msgstr ""
@@ -1716,7 +1716,7 @@ msgstr ""
msgid "has invited"
msgstr ""
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1445
#: src/irc/irc-recv.c:3718 src/irc/irc-recv.c:4139 src/common/command.c:1449
msgid "on"
msgstr ""
@@ -1992,154 +1992,180 @@ msgstr ""
msgid "Removing ignore:"
msgstr ""
#: src/plugins/plugins.c:226
#: src/plugins/plugins.c:232
#, c-format
msgid ""
"%s plugin %s: unable to add handler for IRC command \"%s\" (not enough "
"memory)\n"
msgstr ""
#: src/plugins/plugins.c:261
#: src/plugins/plugins.c:267
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (already exists)\n"
msgstr ""
#: src/plugins/plugins.c:296
#: src/plugins/plugins.c:304
#, c-format
msgid ""
"%s plugin %s: unable to add handler for \"%s\" command (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:573
#: src/plugins/plugins.c:542
#, c-format
msgid "%s unable to load plugin \"%s\": %s\n"
msgstr ""
#: src/plugins/plugins.c:584
#: src/plugins/plugins.c:553
#, c-format
msgid "%s symbol \"plugin_name\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:595
#: src/plugins/plugins.c:564
#, c-format
msgid ""
"%s unable to load plugin \"%s\": a plugin with same name already exists\n"
msgstr ""
#: src/plugins/plugins.c:607
#: src/plugins/plugins.c:576
#, c-format
msgid ""
"%s symbol \"plugin_description\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:618
#: src/plugins/plugins.c:587
#, c-format
msgid ""
"%s symbol \"plugin_version\" not found in plugin \"%s\", failed to load\n"
msgstr ""
#: src/plugins/plugins.c:629
#: src/plugins/plugins.c:598
#, c-format
msgid ""
"%s function \"weechat_plugin_init\" not found in plugin \"%s\", failed to "
"load\n"
msgstr ""
#: src/plugins/plugins.c:687
#: src/plugins/plugins.c:652
#, c-format
msgid "Initializing plugin \"%s\" %s\n"
msgstr ""
#: src/plugins/plugins.c:695
#: src/plugins/plugins.c:660
#, c-format
msgid "%s unable to initialize plugin \"%s\"\n"
msgstr ""
#: src/plugins/plugins.c:706
#: src/plugins/plugins.c:671
#, c-format
msgid "%s unable to load plugin \"%s\" (not enough memory)\n"
msgstr ""
#: src/plugins/plugins.c:714
#: src/plugins/plugins.c:679
#, c-format
msgid "Plugin \"%s\" (%s) loaded.\n"
msgstr ""
#: src/plugins/plugins.c:855
#: src/plugins/plugins.c:819
#, c-format
msgid "Plugin \"%s\" unloaded.\n"
msgstr ""
#: src/plugins/plugins.c:861
#: src/plugins/plugins.c:825
#, c-format
msgid "%s plugin \"%s\" not found\n"
msgstr ""
#: src/gui/curses/gui-input.c:325
#: src/plugins/plugins-config.c:215 src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr ""
#: src/plugins/plugins-config.c:265 src/common/weeconfig.c:1796
#: src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr ""
#: src/plugins/plugins-config.c:272
#, c-format
msgid ""
"#\n"
"# %s plugins configuration file, created by %s v%s on %s"
msgstr ""
#: src/plugins/plugins-config.c:276
#, c-format
msgid ""
"# WARNING! Be careful when editing this file, WeeChat writes this file when "
"options are updated.\n"
"#\n"
msgstr ""
#: src/gui/curses/gui-input.c:330
#, c-format
msgid "Day changed to %s\n"
msgstr ""
#: src/gui/curses/gui-input.c:408
#: src/gui/curses/gui-input.c:413
#, c-format
msgid "%s lag is high, disconnecting from server...\n"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "bytes"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Kb"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Mb"
msgstr ""
#: src/gui/curses/gui-display.c:799
#: src/gui/curses/gui-display.c:804
msgid "Gb"
msgstr ""
#: src/gui/curses/gui-display.c:1267
#: src/gui/curses/gui-display.c:1272
msgid "(away)"
msgstr ""
#: src/gui/curses/gui-display.c:1385
#: src/gui/curses/gui-display.c:1390
msgid "[not connected]"
msgstr ""
#: src/gui/curses/gui-display.c:1402
#: src/gui/curses/gui-display.c:1407
msgid "Act: "
msgstr ""
#: src/gui/curses/gui-display.c:1496
#: src/gui/curses/gui-display.c:1501
#, c-format
msgid "Lag: %.1f"
msgstr ""
#: src/gui/curses/gui-display.c:1518
#: src/gui/curses/gui-display.c:1523
msgid "-MORE-"
msgstr ""
#: src/gui/curses/gui-display.c:1708
#: src/gui/curses/gui-display.c:1713
msgid " [A] Accept"
msgstr ""
#: src/gui/curses/gui-display.c:1709 src/gui/curses/gui-display.c:1713
#: src/gui/curses/gui-display.c:1714 src/gui/curses/gui-display.c:1718
msgid " [C] Cancel"
msgstr ""
#: src/gui/curses/gui-display.c:1718
#: src/gui/curses/gui-display.c:1723
msgid " [R] Remove"
msgstr ""
#: src/gui/curses/gui-display.c:1722
#: src/gui/curses/gui-display.c:1727
msgid " [P] Purge old DCC"
msgstr ""
#: src/gui/curses/gui-display.c:1723
#: src/gui/curses/gui-display.c:1728
msgid " [Q] Close DCC view"
msgstr ""
@@ -2303,7 +2329,7 @@ msgstr ""
msgid "grab a key"
msgstr ""
#: src/gui/gui-keyboard.c:426 src/common/command.c:1646
#: src/gui/gui-keyboard.c:426 src/common/command.c:1650
#, c-format
msgid "%s unable to bind key \"%s\"\n"
msgstr ""
@@ -2722,8 +2748,8 @@ msgstr ""
msgid "%s server not found\n"
msgstr ""
#: src/common/command.c:1234 src/common/command.c:1756
#: src/common/command.c:2577 src/common/command.c:2601
#: src/common/command.c:1234 src/common/command.c:1762
#: src/common/command.c:2583 src/common/command.c:2607
#, c-format
msgid "%s unknown option for \"%s\" command\n"
msgstr ""
@@ -2751,291 +2777,291 @@ msgstr ""
msgid "Plugin commands:\n"
msgstr ""
#: src/common/command.c:1428
#: src/common/command.c:1432
#, c-format
msgid "No help available, \"%s\" is an unknown command\n"
msgstr ""
#: src/common/command.c:1450
#: src/common/command.c:1454
msgid " ignoring "
msgstr ""
#: src/common/command.c:1474
#: src/common/command.c:1478
msgid "List of ignore:\n"
msgstr ""
#: src/common/command.c:1489
#: src/common/command.c:1493
msgid "No ignore defined.\n"
msgstr ""
#: src/common/command.c:1515
#: src/common/command.c:1519
msgid "New ignore:"
msgstr ""
#: src/common/command.c:1534
#: src/common/command.c:1538
msgid "New key binding:\n"
msgstr ""
#: src/common/command.c:1567
#: src/common/command.c:1571
msgid "Key bindings:\n"
msgstr ""
#: src/common/command.c:1579
#: src/common/command.c:1583
#, c-format
msgid "Key \"%s\" unbinded\n"
msgstr ""
#: src/common/command.c:1584
#: src/common/command.c:1588
#, c-format
msgid "%s unable to unbind key \"%s\"\n"
msgstr ""
#: src/common/command.c:1592 src/common/weechat.c:401
#: src/common/command.c:1596 src/common/weechat.c:401
#, c-format
msgid "Internal key functions:\n"
msgstr ""
#: src/common/command.c:1611
#: src/common/command.c:1615
msgid "Default key bindings restored\n"
msgstr ""
#: src/common/command.c:1617
#: src/common/command.c:1621
#, c-format
msgid "%s \"-yes\" argument is required for keys reset (securuty reason)\n"
msgstr ""
#: src/common/command.c:1673
#: src/common/command.c:1677
msgid "Plugins loaded:\n"
msgstr ""
#: src/common/command.c:1687
#: src/common/command.c:1691
msgid " message handlers:\n"
msgstr ""
#: src/common/command.c:1693
#: src/common/command.c:1700
#, c-format
msgid " IRC(%s)\n"
msgstr ""
#: src/common/command.c:1699
#: src/common/command.c:1707
msgid " (no message handler)\n"
msgstr ""
#: src/common/command.c:1704
#: src/common/command.c:1712
msgid " command handlers:\n"
msgstr ""
#: src/common/command.c:1721
#: src/common/command.c:1733
msgid " (no command handler)\n"
msgstr ""
#: src/common/command.c:1727
#: src/common/command.c:1739
msgid " (no plugin)\n"
msgstr ""
#: src/common/command.c:1769
#: src/common/command.c:1775
msgid ""
"Command \"plugin\" is not available, WeeChat was built without plugins "
"support.\n"
msgstr ""
#: src/common/command.c:1816
#: src/common/command.c:1822
msgid "No server.\n"
msgstr ""
#: src/common/command.c:1827
#: src/common/command.c:1833
#, c-format
msgid "Server '%s' not found.\n"
msgstr ""
#: src/common/command.c:1839
#: src/common/command.c:1845
#, c-format
msgid "%s missing servername for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1847
#: src/common/command.c:1853
#, c-format
msgid "%s too much arguments for \"%s\" command, ignoring arguments\n"
msgstr ""
#: src/common/command.c:1866
#: src/common/command.c:1872
#, c-format
msgid "%s server \"%s\" not found for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1874
#: src/common/command.c:1880
#, c-format
msgid ""
"%s you can not delete server \"%s\" because you are connected to. Try /"
"disconnect %s before.\n"
msgstr ""
#: src/common/command.c:1890 src/common/command.c:2036
#: src/common/command.c:1896 src/common/command.c:2042
msgid "Server"
msgstr ""
#: src/common/command.c:1893
#: src/common/command.c:1899
msgid "has been deleted\n"
msgstr ""
#: src/common/command.c:1908
#: src/common/command.c:1914
#, c-format
msgid "%s missing parameters for \"%s\" command\n"
msgstr ""
#: src/common/command.c:1918
#: src/common/command.c:1924
#, c-format
msgid "%s server \"%s\" already exists, can't create it!\n"
msgstr ""
#: src/common/command.c:1947 src/common/command.c:1975
#: src/common/command.c:1988 src/common/command.c:2014
#: src/common/command.c:1953 src/common/command.c:1981
#: src/common/command.c:1994 src/common/command.c:2020
#, c-format
msgid "%s missing password for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:1960
#: src/common/command.c:1966
#, c-format
msgid "%s missing nick(s) for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:2001
#: src/common/command.c:2007
#, c-format
msgid "%s missing command for \"%s\" parameter\n"
msgstr ""
#: src/common/command.c:2039
#: src/common/command.c:2045
msgid "created\n"
msgstr ""
#: src/common/command.c:2045
#: src/common/command.c:2051
#, c-format
msgid "%s unable to create server\n"
msgstr ""
#: src/common/command.c:2100
#: src/common/command.c:2106
msgid "(unknown)"
msgstr ""
#: src/common/command.c:2123
#: src/common/command.c:2129
msgid "(password hidden) "
msgstr ""
#: src/common/command.c:2187
#: src/common/command.c:2193
#, c-format
msgid "%s server \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2218 src/common/command.c:2264
#: src/common/command.c:2224 src/common/command.c:2270
#, c-format
msgid "%s config option \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2223 src/common/command.c:2256
#: src/common/command.c:2229 src/common/command.c:2262
#, c-format
msgid "%s incorrect value for option \"%s\"\n"
msgstr ""
#: src/common/command.c:2239
#: src/common/command.c:2245
#, c-format
msgid "%s option \"%s\" can not be changed while WeeChat is running\n"
msgstr ""
#: src/common/command.c:2344
#: src/common/command.c:2350
#, c-format
msgid "No config option found with \"%s\"\n"
msgstr ""
#: src/common/command.c:2347
#: src/common/command.c:2353
msgid "No config option found\n"
msgstr ""
#: src/common/command.c:2354
#: src/common/command.c:2360
msgid "Detail:\n"
msgstr ""
#: src/common/command.c:2358 src/common/weechat.c:287
#: src/common/command.c:2364 src/common/weechat.c:287
#, c-format
msgid " . type boolean (values: 'on' or 'off')\n"
msgstr ""
#: src/common/command.c:2359 src/common/command.c:2382
#: src/common/command.c:2388 src/common/command.c:2394
#: src/common/command.c:2365 src/common/command.c:2388
#: src/common/command.c:2394 src/common/command.c:2400
#: src/common/weechat.c:288 src/common/weechat.c:311 src/common/weechat.c:317
#: src/common/weechat.c:323
#, c-format
msgid " . default value: '%s'\n"
msgstr ""
#: src/common/command.c:2364 src/common/weechat.c:293
#: src/common/command.c:2370 src/common/weechat.c:293
#, c-format
msgid " . type integer (values: between %d and %d)\n"
msgstr ""
#: src/common/command.c:2367 src/common/weechat.c:296
#: src/common/command.c:2373 src/common/weechat.c:296
#, c-format
msgid " . default value: %d\n"
msgstr ""
#: src/common/command.c:2371 src/common/weechat.c:300
#: src/common/command.c:2377 src/common/weechat.c:300
#, c-format
msgid " . type string (values: "
msgstr ""
#: src/common/command.c:2384 src/common/command.c:2390
#: src/common/command.c:2396 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/command.c:2390 src/common/command.c:2396
#: src/common/command.c:2402 src/common/weechat.c:313 src/common/weechat.c:319
#: src/common/weechat.c:325
msgid "empty"
msgstr ""
#: src/common/command.c:2387 src/common/weechat.c:316
#: src/common/command.c:2393 src/common/weechat.c:316
#, c-format
msgid " . type color (Curses or Gtk color, look at WeeChat doc)\n"
msgstr ""
#: src/common/command.c:2393 src/common/weechat.c:322
#: src/common/command.c:2399 src/common/weechat.c:322
#, c-format
msgid " . type string (any string)\n"
msgstr ""
#: src/common/command.c:2399 src/common/weechat.c:328
#: src/common/command.c:2405 src/common/weechat.c:328
#, c-format
msgid " . description: %s\n"
msgstr ""
#: src/common/command.c:2406
#: src/common/command.c:2412
#, c-format
msgid "config option(s) found with \"%s\"\n"
msgstr ""
#: src/common/command.c:2409
#: src/common/command.c:2415
msgid "config option(s) found\n"
msgstr ""
#: src/common/command.c:2430
#: src/common/command.c:2436
#, c-format
msgid "%s alias or command \"%s\" not found\n"
msgstr ""
#: src/common/command.c:2440
#: src/common/command.c:2446
#, c-format
msgid "Alias \"%s\" removed\n"
msgstr ""
#: src/common/command.c:2493
#: src/common/command.c:2499
msgid "ignore were removed.\n"
msgstr ""
#: src/common/command.c:2495
#: src/common/command.c:2501
msgid "ignore was removed.\n"
msgstr ""
#: src/common/command.c:2500
#: src/common/command.c:2506
#, c-format
msgid "%s no ignore found\n"
msgstr ""
#: src/common/command.c:2525
#: src/common/command.c:2531
msgid "Opened windows:\n"
msgstr ""
@@ -4151,11 +4177,6 @@ msgstr ""
msgid "%s %s, line %d: invalid section for option, line is ignored\n"
msgstr ""
#: src/common/weeconfig.c:1623
#, c-format
msgid "%s %s, line %d: invalid syntax, missing \"=\"\n"
msgstr ""
#: src/common/weeconfig.c:1660 src/common/weeconfig.c:1686
#, c-format
msgid "%s %s, line %d: invalid option \"%s\"\n"
@@ -4192,11 +4213,6 @@ msgstr ""
msgid "%s %s, line %d: invalid color name for option '%s'\n"
msgstr ""
#: src/common/weeconfig.c:1796 src/common/weeconfig.c:1994
#, c-format
msgid "%s cannot create file \"%s\"\n"
msgstr ""
#: src/common/weeconfig.c:1802
#, c-format
msgid "%s: creating default config file...\n"
+61 -55
View File
@@ -1292,7 +1292,7 @@ weechat_cmd_help (int argc, char **argv)
int i;
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
#endif
switch (argc)
@@ -1325,16 +1325,19 @@ weechat_cmd_help (int argc, char **argv)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->description
&& ptr_cmd_handler->description[0])
gui_printf (NULL, " - %s",
ptr_cmd_handler->description);
gui_printf (NULL, "\n");
if (ptr_handler->type == HANDLER_COMMAND)
{
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " %s",
ptr_handler->command);
if (ptr_handler->description
&& ptr_handler->description[0])
gui_printf (NULL, " - %s",
ptr_handler->description);
gui_printf (NULL, "\n");
}
}
}
#endif
@@ -1395,29 +1398,30 @@ weechat_cmd_help (int argc, char **argv)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_cmd_handler->command, argv[0]) == 0)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, argv[0]) == 0))
{
gui_printf (NULL, "\n");
gui_printf (NULL, "[p]");
gui_printf_color (NULL, COLOR_WIN_CHAT_CHANNEL, " /%s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->arguments &&
ptr_cmd_handler->arguments[0])
ptr_handler->command);
if (ptr_handler->arguments &&
ptr_handler->arguments[0])
gui_printf (NULL, " %s\n",
ptr_cmd_handler->arguments);
ptr_handler->arguments);
else
gui_printf (NULL, "\n");
if (ptr_cmd_handler->description &&
ptr_cmd_handler->description[0])
if (ptr_handler->description &&
ptr_handler->description[0])
gui_printf (NULL, "\n%s\n",
ptr_cmd_handler->description);
if (ptr_cmd_handler->arguments_description &&
ptr_cmd_handler->arguments_description[0])
ptr_handler->description);
if (ptr_handler->arguments_description &&
ptr_handler->arguments_description[0])
gui_printf (NULL, "\n%s\n",
ptr_cmd_handler->arguments_description);
ptr_handler->arguments_description);
return 0;
}
}
@@ -1661,8 +1665,8 @@ weechat_cmd_plugin (int argc, char **argv)
{
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
int handler_found;
switch (argc)
{
@@ -1685,15 +1689,19 @@ weechat_cmd_plugin (int argc, char **argv)
/* message handlers */
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" message handlers:\n"));
for (ptr_msg_handler = ptr_plugin->msg_handlers;
ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
handler_found = 0;
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s)\n"),
ptr_msg_handler->irc_command);
if (ptr_handler->type == HANDLER_MESSAGE)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" IRC(%s)\n"),
ptr_handler->irc_command);
}
}
if (!ptr_plugin->msg_handlers)
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (no message handler)\n"));
@@ -1702,20 +1710,24 @@ weechat_cmd_plugin (int argc, char **argv)
/* command handlers */
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" command handlers:\n"));
for (ptr_cmd_handler = ptr_plugin->cmd_handlers;
ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
handler_found = 0;
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " /%s",
ptr_cmd_handler->command);
if (ptr_cmd_handler->description
&& ptr_cmd_handler->description[0])
gui_printf (NULL, " (%s)",
ptr_cmd_handler->description);
gui_printf (NULL, "\n");
if (ptr_handler->type == HANDLER_COMMAND)
{
handler_found = 1;
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, " /%s",
ptr_handler->command);
if (ptr_handler->description
&& ptr_handler->description[0])
gui_printf (NULL, " (%s)",
ptr_handler->description);
gui_printf (NULL, "\n");
}
}
if (!ptr_plugin->cmd_handlers)
if (!handler_found)
{
irc_display_prefix (NULL, PREFIX_PLUGIN);
gui_printf (NULL, _(" (no command handler)\n"));
@@ -1728,27 +1740,21 @@ weechat_cmd_plugin (int argc, char **argv)
}
break;
case 1:
/*if (ascii_strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
if (ascii_strcasecmp (argv[0], "autoload") == 0)
plugin_auto_load ();
else if (ascii_strcasecmp (argv[0], "reload") == 0)
{
plugin_unload (PLUGIN_TYPE_PERL, NULL);
plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
plugin_unload_all ();
plugin_auto_load ();
}
else if (ascii_strcasecmp (argv[0], "unload") == 0)
plugin_unload (PLUGIN_TYPE_PERL, NULL);*/
plugin_unload_all ();
break;
case 2:
if (ascii_strcasecmp (argv[0], "load") == 0)
{
/* load plugin */
plugin_load (argv[1]);
}
else if (ascii_strcasecmp (argv[0], "unload") == 0)
{
/* unload plugin */
plugin_unload_name (argv[1]);
}
else
{
irc_display_prefix (NULL, PREFIX_ERROR);
+7 -7
View File
@@ -115,7 +115,7 @@ completion_build_list (t_completion *completion, void *channel)
char option_string[2048];
#ifdef PLUGINS
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_handler *ptr_handler;
#endif
/* WeeChat internal commands */
@@ -213,13 +213,13 @@ completion_build_list (t_completion *completion, void *channel)
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_cmd_handler = ptr_plugin->cmd_handlers;
ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
weelist_add (&completion->completion_list,
&completion->last_completion,
ptr_cmd_handler->command);
if (ptr_handler->type == HANDLER_COMMAND)
weelist_add (&completion->completion_list,
&completion->last_completion,
ptr_handler->command);
}
}
#endif
+10 -33
View File
@@ -216,7 +216,7 @@ weechat_plugin_infobar_printf (t_weechat_plugin *plugin, int time_displayed, cha
* weechat_plugin_msg_handler_add: add a message handler
*/
t_plugin_msg_handler *
t_plugin_handler *
weechat_plugin_msg_handler_add (t_weechat_plugin *plugin, char *message,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
@@ -228,34 +228,11 @@ weechat_plugin_msg_handler_add (t_weechat_plugin *plugin, char *message,
return NULL;
}
/*
* weechat_plugin_msg_handler_remove: remove a WeeChat message handler
*/
void
weechat_plugin_msg_handler_remove (t_weechat_plugin *plugin,
t_plugin_msg_handler *msg_handler)
{
if (plugin && msg_handler)
plugin_msg_handler_remove (plugin, msg_handler);
}
/*
* weechat_plugin_msg_handler_remove_all: remove all WeeChat message handlers
*/
void
weechat_plugin_msg_handler_remove_all (t_weechat_plugin *plugin)
{
if (plugin)
plugin_msg_handler_remove_all (plugin);
}
/*
* weechat_plugin_cmd_handler_add: add a command handler
*/
t_plugin_cmd_handler *
t_plugin_handler *
weechat_plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
char *description, char *arguments,
char *arguments_description,
@@ -272,26 +249,26 @@ weechat_plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
}
/*
* weechat_cmd_plugin_handler_remove: remove a WeeChat command handler
* weechat_plugin_handler_remove: remove a WeeChat handler
*/
void
weechat_plugin_cmd_handler_remove (t_weechat_plugin *plugin,
t_plugin_cmd_handler *cmd_handler)
weechat_plugin_handler_remove (t_weechat_plugin *plugin,
t_plugin_handler *handler)
{
if (plugin && cmd_handler)
plugin_cmd_handler_remove (plugin, cmd_handler);
if (plugin && handler)
plugin_handler_remove (plugin, handler);
}
/*
* weechat_plugin_cmd_handler_remove_all: remove all WeeChat command handlers
* weechat_plugin_handler_remove_all: remove all WeeChat handlers
*/
void
weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *plugin)
weechat_plugin_handler_remove_all (t_weechat_plugin *plugin)
{
if (plugin)
plugin_cmd_handler_remove_all (plugin);
plugin_handler_remove_all (plugin);
}
/*
+117 -153
View File
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <dlfcn.h>
#include "../common/weechat.h"
#include "plugins.h"
#include "plugins-config.h"
@@ -160,21 +161,21 @@ plugin_search (char *name)
* return: pointer to handler, NULL if not found
*/
t_plugin_cmd_handler *
t_plugin_handler *
plugin_cmd_handler_search (char *command)
{
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_plugin_cmd_handler;
t_plugin_handler *ptr_handler;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_cmd_handler = ptr_plugin->cmd_handlers;
ptr_plugin_cmd_handler;
ptr_plugin_cmd_handler = ptr_plugin_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_cmd_handler->command, command) == 0)
return ptr_plugin_cmd_handler;
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, command) == 0))
return ptr_handler;
}
}
@@ -194,30 +195,35 @@ plugin_cmd_handler_search (char *command)
* handler when called (used by scripts)
*/
t_plugin_msg_handler *
t_plugin_handler *
plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
{
t_plugin_msg_handler *new_plugin_msg_handler;
t_plugin_handler *new_handler;
new_plugin_msg_handler = (t_plugin_msg_handler *)malloc (sizeof (t_plugin_msg_handler));
if (new_plugin_msg_handler)
new_handler = (t_plugin_handler *)malloc (sizeof (t_plugin_handler));
if (new_handler)
{
new_plugin_msg_handler->irc_command = strdup (irc_command);
new_plugin_msg_handler->msg_handler = handler_func;
new_plugin_msg_handler->msg_handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_plugin_msg_handler->msg_handler_pointer = handler_pointer;
new_plugin_msg_handler->running = 0;
new_handler->type = HANDLER_MESSAGE;
new_handler->irc_command = strdup (irc_command);
new_handler->command = NULL;
new_handler->description = NULL;
new_handler->arguments = NULL;
new_handler->arguments_description = NULL;
new_handler->handler = handler_func;
new_handler->handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_handler->handler_pointer = handler_pointer;
new_handler->running = 0;
/* add new handler to list */
new_plugin_msg_handler->prev_handler = plugin->last_msg_handler;
new_plugin_msg_handler->next_handler = NULL;
if (plugin->msg_handlers)
(plugin->last_msg_handler)->next_handler = new_plugin_msg_handler;
new_handler->prev_handler = plugin->last_handler;
new_handler->next_handler = NULL;
if (plugin->handlers)
(plugin->last_handler)->next_handler = new_handler;
else
plugin->msg_handlers = new_plugin_msg_handler;
plugin->last_msg_handler = new_plugin_msg_handler;
plugin->handlers = new_handler;
plugin->last_handler = new_handler;
}
else
{
@@ -227,7 +233,7 @@ plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
WEECHAT_ERROR, plugin->name, irc_command);
return NULL;
}
return new_plugin_msg_handler;
return new_handler;
}
/*
@@ -245,14 +251,14 @@ plugin_msg_handler_add (t_weechat_plugin *plugin, char *irc_command,
* handler when called (used by scripts)
*/
t_plugin_cmd_handler *
t_plugin_handler *
plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
char *description, char *arguments,
char *arguments_description,
t_plugin_handler_func *handler_func,
char *handler_args, void *handler_pointer)
{
t_plugin_cmd_handler *new_plugin_cmd_handler;
t_plugin_handler *new_handler;
if (plugin_cmd_handler_search (command))
{
@@ -264,26 +270,28 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
return NULL;
}
new_plugin_cmd_handler = (t_plugin_cmd_handler *)malloc (sizeof (t_plugin_cmd_handler));
if (new_plugin_cmd_handler)
new_handler = (t_plugin_handler *)malloc (sizeof (t_plugin_handler));
if (new_handler)
{
new_plugin_cmd_handler->command = strdup (command);
new_plugin_cmd_handler->description = (description) ? strdup (description) : NULL;
new_plugin_cmd_handler->arguments = (arguments) ? strdup (arguments) : NULL;
new_plugin_cmd_handler->arguments_description = (arguments_description) ? strdup (arguments_description) : NULL;
new_plugin_cmd_handler->cmd_handler = handler_func;
new_plugin_cmd_handler->cmd_handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_plugin_cmd_handler->cmd_handler_pointer = handler_pointer;
new_plugin_cmd_handler->running = 0;
new_handler->type = HANDLER_COMMAND;
new_handler->irc_command = NULL;
new_handler->command = strdup (command);
new_handler->description = (description) ? strdup (description) : NULL;
new_handler->arguments = (arguments) ? strdup (arguments) : NULL;
new_handler->arguments_description = (arguments_description) ? strdup (arguments_description) : NULL;
new_handler->handler = handler_func;
new_handler->handler_args = (handler_args) ? strdup (handler_args) : NULL;
new_handler->handler_pointer = handler_pointer;
new_handler->running = 0;
/* add new handler to list */
new_plugin_cmd_handler->prev_handler = plugin->last_cmd_handler;
new_plugin_cmd_handler->next_handler = NULL;
if (plugin->cmd_handlers)
(plugin->last_cmd_handler)->next_handler = new_plugin_cmd_handler;
new_handler->prev_handler = plugin->last_handler;
new_handler->next_handler = NULL;
if (plugin->handlers)
(plugin->last_handler)->next_handler = new_handler;
else
plugin->cmd_handlers = new_plugin_cmd_handler;
plugin->last_cmd_handler = new_plugin_cmd_handler;
plugin->handlers = new_handler;
plugin->last_handler = new_handler;
/* add command to WeeChat commands list */
if (!weelist_search (index_commands, command))
@@ -297,7 +305,7 @@ plugin_cmd_handler_add (t_weechat_plugin *plugin, char *command,
WEECHAT_ERROR, plugin->name, command);
return NULL;
}
return new_plugin_cmd_handler;
return new_handler;
}
/*
@@ -309,30 +317,30 @@ int
plugin_msg_handler_exec (char *server, char *irc_command, char *irc_message)
{
t_weechat_plugin *ptr_plugin;
t_plugin_msg_handler *ptr_plugin_msg_handler;
t_plugin_handler *ptr_handler;
int count;
count = 0;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_msg_handler = ptr_plugin->msg_handlers;
ptr_plugin_msg_handler;
ptr_plugin_msg_handler = ptr_plugin_msg_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_msg_handler->irc_command, irc_command) == 0)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ascii_strcasecmp (ptr_handler->irc_command, irc_command) == 0))
{
if (ptr_plugin_msg_handler->running == 0)
if (ptr_handler->running == 0)
{
ptr_plugin_msg_handler->running = 1;
if ((int) (ptr_plugin_msg_handler->msg_handler) (ptr_plugin,
server,
irc_command,
irc_message,
ptr_plugin_msg_handler->msg_handler_args,
ptr_plugin_msg_handler->msg_handler_pointer))
ptr_handler->running = 1;
if ((int) (ptr_handler->handler) (ptr_plugin,
server,
irc_command,
irc_message,
ptr_handler->handler_args,
ptr_handler->handler_pointer))
count++;
ptr_plugin_msg_handler->running = 0;
ptr_handler->running = 0;
}
}
}
@@ -350,28 +358,28 @@ int
plugin_cmd_handler_exec (char *server, char *command, char *arguments)
{
t_weechat_plugin *ptr_plugin;
t_plugin_cmd_handler *ptr_plugin_cmd_handler;
t_plugin_handler *ptr_handler;
int return_code;
for (ptr_plugin = weechat_plugins; ptr_plugin;
ptr_plugin = ptr_plugin->next_plugin)
{
for (ptr_plugin_cmd_handler = ptr_plugin->cmd_handlers;
ptr_plugin_cmd_handler;
ptr_plugin_cmd_handler = ptr_plugin_cmd_handler->next_handler)
for (ptr_handler = ptr_plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ascii_strcasecmp (ptr_plugin_cmd_handler->command, command) == 0)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ascii_strcasecmp (ptr_handler->command, command) == 0))
{
if (ptr_plugin_cmd_handler->running == 0)
if (ptr_handler->running == 0)
{
ptr_plugin_cmd_handler->running = 1;
return_code = (int) (ptr_plugin_cmd_handler->cmd_handler) (ptr_plugin,
server,
command,
arguments,
ptr_plugin_cmd_handler->cmd_handler_args,
ptr_plugin_cmd_handler->cmd_handler_pointer);
ptr_plugin_cmd_handler->running = 0;
ptr_handler->running = 1;
return_code = (int) (ptr_handler->handler) (ptr_plugin,
server,
command,
arguments,
ptr_handler->handler_args,
ptr_handler->handler_pointer);
ptr_handler->running = 0;
return (return_code) ? 1 : 0;
}
}
@@ -382,99 +390,60 @@ plugin_cmd_handler_exec (char *server, char *command, char *arguments)
}
/*
* plugin_msg_handler_remove: remove a message handler for a plugin
* plugin_handler_remove: remove a handler for a plugin
*/
void
plugin_msg_handler_remove (t_weechat_plugin *plugin,
t_plugin_msg_handler *plugin_msg_handler)
plugin_handler_remove (t_weechat_plugin *plugin,
t_plugin_handler *handler)
{
t_plugin_msg_handler *new_plugin_msg_handlers;
t_plugin_handler *new_handlers;
/* remove handler from list */
if (plugin->last_msg_handler == plugin_msg_handler)
plugin->last_msg_handler = plugin_msg_handler->prev_handler;
if (plugin_msg_handler->prev_handler)
if (plugin->last_handler == handler)
plugin->last_handler = handler->prev_handler;
if (handler->prev_handler)
{
(plugin_msg_handler->prev_handler)->next_handler = plugin_msg_handler->next_handler;
new_plugin_msg_handlers = plugin->msg_handlers;
(handler->prev_handler)->next_handler = handler->next_handler;
new_handlers = plugin->handlers;
}
else
new_plugin_msg_handlers = plugin_msg_handler->next_handler;
new_handlers = handler->next_handler;
if (plugin_msg_handler->next_handler)
(plugin_msg_handler->next_handler)->prev_handler = plugin_msg_handler->prev_handler;
/* free data */
if (plugin_msg_handler->irc_command)
free (plugin_msg_handler->irc_command);
if (plugin_msg_handler->msg_handler_args)
free (plugin_msg_handler->msg_handler_args);
plugin->msg_handlers = new_plugin_msg_handlers;
}
/*
* plugin_cmd_handler_remove: remove a command handler for a plugin
*/
void
plugin_cmd_handler_remove (t_weechat_plugin *plugin,
t_plugin_cmd_handler *plugin_cmd_handler)
{
t_plugin_cmd_handler *new_plugin_cmd_handlers;
if (handler->next_handler)
(handler->next_handler)->prev_handler = handler->prev_handler;
/* remove handler from list */
if (plugin->last_cmd_handler == plugin_cmd_handler)
plugin->last_cmd_handler = plugin_cmd_handler->prev_handler;
if (plugin_cmd_handler->prev_handler)
{
(plugin_cmd_handler->prev_handler)->next_handler = plugin_cmd_handler->next_handler;
new_plugin_cmd_handlers = plugin->cmd_handlers;
}
else
new_plugin_cmd_handlers = plugin_cmd_handler->next_handler;
if (plugin_cmd_handler->next_handler)
(plugin_cmd_handler->next_handler)->prev_handler = plugin_cmd_handler->prev_handler;
/* remove command from WeeChat command list */
weelist_remove (&index_commands, &last_index_command,
weelist_search (index_commands, plugin_cmd_handler->command));
/* remove command from WeeChat command list, if command handler */
if (handler->type == HANDLER_COMMAND)
weelist_remove (&index_commands, &last_index_command,
weelist_search (index_commands, handler->command));
/* free data */
if (plugin_cmd_handler->command)
free (plugin_cmd_handler->command);
if (plugin_cmd_handler->description)
free (plugin_cmd_handler->description);
if (plugin_cmd_handler->arguments)
free (plugin_cmd_handler->arguments);
if (plugin_cmd_handler->arguments_description)
free (plugin_cmd_handler->arguments_description);
if (plugin_cmd_handler->cmd_handler_args)
free (plugin_cmd_handler->cmd_handler_args);
plugin->cmd_handlers = new_plugin_cmd_handlers;
if (handler->irc_command)
free (handler->irc_command);
if (handler->command)
free (handler->command);
if (handler->description)
free (handler->description);
if (handler->arguments)
free (handler->arguments);
if (handler->arguments_description)
free (handler->arguments_description);
if (handler->handler_args)
free (handler->handler_args);
plugin->handlers = new_handlers;
}
/*
* plugin_msg_handler_remove_all: remove all message handlers for a plugin
* plugin_handler_remove_all: remove all handlers for a plugin
*/
void
plugin_msg_handler_remove_all (t_weechat_plugin *plugin)
plugin_handler_remove_all (t_weechat_plugin *plugin)
{
while (plugin->msg_handlers)
plugin_msg_handler_remove (plugin, plugin->msg_handlers);
}
/*
* plugin_cmd_handler_remove_all: remove all command handlers for a plugin
*/
void
plugin_cmd_handler_remove_all (t_weechat_plugin *plugin)
{
while (plugin->cmd_handlers)
plugin_cmd_handler_remove (plugin, plugin->cmd_handlers);
while (plugin->handlers)
plugin_handler_remove (plugin, plugin->handlers);
}
/*
@@ -650,11 +619,9 @@ plugin_load (char *filename)
new_plugin->mkdir_home = &weechat_plugin_mkdir_home;
new_plugin->exec_on_files = &weechat_plugin_exec_on_files;
new_plugin->msg_handler_add = &weechat_plugin_msg_handler_add;
new_plugin->msg_handler_remove = &weechat_plugin_msg_handler_remove;
new_plugin->msg_handler_remove_all = &weechat_plugin_msg_handler_remove_all;
new_plugin->cmd_handler_add = &weechat_plugin_cmd_handler_add;
new_plugin->cmd_handler_remove = &weechat_plugin_cmd_handler_remove;
new_plugin->cmd_handler_remove_all = &weechat_plugin_cmd_handler_remove_all;
new_plugin->handler_remove = &weechat_plugin_handler_remove;
new_plugin->handler_remove_all = &weechat_plugin_handler_remove_all;
new_plugin->printf = &weechat_plugin_printf;
new_plugin->printf_server = &weechat_plugin_printf_server;
new_plugin->infobar_printf = &weechat_plugin_infobar_printf;
@@ -668,10 +635,8 @@ plugin_load (char *filename)
new_plugin->set_plugin_config = &weechat_plugin_set_plugin_config;
/* handlers */
new_plugin->msg_handlers = NULL;
new_plugin->last_msg_handler = NULL;
new_plugin->cmd_handlers = NULL;
new_plugin->last_cmd_handler = NULL;
new_plugin->handlers = NULL;
new_plugin->last_handler = NULL;
/* add new plugin to list */
new_plugin->prev_plugin = last_weechat_plugin;
@@ -807,8 +772,7 @@ plugin_remove (t_weechat_plugin *plugin)
(plugin->next_plugin)->prev_plugin = plugin->prev_plugin;
/* free data */
plugin_msg_handler_remove_all (plugin);
plugin_cmd_handler_remove_all (plugin);
plugin_handler_remove_all (plugin);
if (plugin->filename)
free (plugin->filename);
dlclose (plugin->handle);
+11 -13
View File
@@ -34,22 +34,20 @@ extern t_gui_buffer *plugin_find_buffer (char *, char *);
extern void plugin_exec_on_files (t_weechat_plugin *, char *,
int (*)(t_weechat_plugin *, char *));
extern t_weechat_plugin *plugin_search (char *);
extern t_plugin_msg_handler *plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_cmd_handler *plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern int plugin_msg_handler_exec (char *, char *, char *);
extern int plugin_cmd_handler_exec (char *, char *, char *);
extern void plugin_msg_handler_remove (t_weechat_plugin *,
t_plugin_msg_handler *);
extern void plugin_cmd_handler_remove (t_weechat_plugin *,
t_plugin_cmd_handler *);
extern void plugin_msg_handler_remove_all (t_weechat_plugin *);
extern void plugin_cmd_handler_remove_all (t_weechat_plugin *);
extern void plugin_handler_remove (t_weechat_plugin *,
t_plugin_handler *);
extern void plugin_handler_remove_all (t_weechat_plugin *);
extern t_weechat_plugin *plugin_load (char *);
extern void plugin_auto_load ();
extern void plugin_remove (t_weechat_plugin *);
extern void plugin_unload (t_weechat_plugin *);
extern void plugin_unload_name (char *);
+299 -79
View File
@@ -139,7 +139,6 @@ static XS (XS_weechat_register)
"Perl error: wrong parameters for "
"\"register\" function");
XSRETURN (0);
return;
}
name = SvPV (ST (0), integer);
@@ -156,7 +155,6 @@ static XS (XS_weechat_register)
"already exists with this name)",
name);
XSRETURN (0);
return;
}
/* register script */
@@ -179,8 +177,8 @@ static XS (XS_weechat_register)
"\"%s\" (not enough memory)",
name);
XSRETURN (0);
return;
}
XSRETURN (1);
}
@@ -197,13 +195,20 @@ static XS (XS_weechat_print)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to print message, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"print\" function");
XSRETURN_NO;
return;
XSRETURN (0);
}
channel_name = NULL;
@@ -220,7 +225,8 @@ static XS (XS_weechat_print)
perl_plugin->printf (perl_plugin,
server_name, channel_name,
"%s", message);
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -235,18 +241,27 @@ static XS (XS_weechat_print_infobar)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to print infobar message, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"print_infobar\" function");
XSRETURN_NO;
XSRETURN (0);
}
perl_plugin->infobar_printf (perl_plugin,
SvIV (ST (0)),
SvPV (ST (1), integer));
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -262,13 +277,20 @@ static XS (XS_weechat_command)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to run command, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"command\" function");
XSRETURN_NO;
return;
XSRETURN (0);
}
channel_name = NULL;
@@ -284,7 +306,8 @@ static XS (XS_weechat_command)
perl_plugin->exec_command (perl_plugin,
server_name, channel_name,
SvPV (ST (0), integer));
XSRETURN_YES;
XSRETURN (1);
}
/*
@@ -293,37 +316,38 @@ static XS (XS_weechat_command)
static XS (XS_weechat_add_message_handler)
{
char *name, *function;
char *irc_command, *function;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add message handler, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"add_message_handler\" function");
XSRETURN_NO;
XSRETURN (0);
}
name = SvPV (ST (0), integer);
irc_command = SvPV (ST (0), integer);
function = SvPV (ST (1), integer);
if (perl_current_script)
perl_plugin->msg_handler_add (perl_plugin, name,
weechat_perl_handler, function,
(void *)perl_current_script);
else
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add message handler, "
"script not initialized");
XSRETURN_NO;
}
if (perl_plugin->msg_handler_add (perl_plugin, irc_command,
weechat_perl_handler, function,
(void *)perl_current_script))
XSRETURN (1);
XSRETURN_YES;
XSRETURN (0);
}
/*
@@ -339,12 +363,20 @@ static XS (XS_weechat_add_command_handler)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add command handler, "
"script not initialized");
XSRETURN (0);
}
if (items < 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"add_command_handler\" function");
XSRETURN_NO;
XSRETURN (0);
}
command = SvPV (ST (0), integer);
@@ -353,24 +385,55 @@ static XS (XS_weechat_add_command_handler)
arguments = (items >= 4) ? SvPV (ST (3), integer) : NULL;
arguments_description = (items >= 5) ? SvPV (ST (4), integer) : NULL;
if (perl_current_script)
perl_plugin->cmd_handler_add (perl_plugin,
command,
description,
arguments,
arguments_description,
weechat_perl_handler,
function,
(void *)perl_current_script);
else
if (perl_plugin->cmd_handler_add (perl_plugin,
command,
description,
arguments,
arguments_description,
weechat_perl_handler,
function,
(void *)perl_current_script))
XSRETURN (1);
XSRETURN (0);
}
/*
* weechat::remove_handler: remove a handler
*/
static XS (XS_weechat_remove_handler)
{
char *command, *function;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to add command handler, "
"script not initialized");
XSRETURN_NO;
"Perl error: unable to remove handler, "
"script not initialized");
XSRETURN (0);
}
XSRETURN_YES;
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"remove_handler\" function");
XSRETURN (0);
}
command = SvPV (ST (0), integer);
function = SvPV (ST (1), integer);
weechat_script_remove_handler (perl_plugin, perl_current_script,
command, function);
XSRETURN (1);
}
/*
@@ -386,12 +449,20 @@ static XS (XS_weechat_get_info)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get info, "
"script not initialized");
XSRETURN (0);
}
if ((items < 1) || (items > 3))
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_info\" function");
XSRETURN_NO;
XSRETURN (0);
}
server_name = NULL;
@@ -411,12 +482,11 @@ static XS (XS_weechat_get_info)
{
XST_mPV (0, info);
free (info);
return;
}
else
XST_mPV (0, "");
}
XSRETURN (1);
XST_mPV (0, "");
}
/*
@@ -433,14 +503,19 @@ static XS (XS_weechat_get_dcc_info)
(void) cv;
(void) items;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get DCC info, "
"script not initialized");
XSRETURN (0);
}
dcc_info = perl_plugin->get_dcc_info (perl_plugin);
dcc_count = 0;
if (!dcc_info)
{
XSRETURN (0);
return;
}
for (ptr_dcc = dcc_info; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
{
@@ -473,10 +548,56 @@ static XS (XS_weechat_get_dcc_info)
}
/*
* weechat::get_config: get value of a config option
* weechat::get_config: get value of a WeeChat config option
*/
static XS (XS_weechat_get_config)
{
char *option, *return_value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 1)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
if (option)
{
return_value = perl_plugin->get_config (perl_plugin, option);
if (return_value)
{
XST_mPV (0, return_value);
free (return_value);
return;
}
}
XST_mPV (0, "");
}
/*
* weechat::set_config: set value of a WeeChat config option
*/
static XS (XS_weechat_set_config)
{
char *option, *value;
unsigned int integer;
@@ -485,29 +606,123 @@ static XS (XS_weechat_get_config)
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to set config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"set_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
value = SvPV (ST (1), integer);
if (option && value)
{
if (perl_plugin->set_config (perl_plugin, option, value))
XSRETURN (1);
}
XSRETURN (0);
}
/*
* weechat::get_plugin_config: get value of a plugin config option
*/
static XS (XS_weechat_get_plugin_config)
{
char *option, *return_value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to get plugin config option, "
"script not initialized");
XSRETURN (0);
}
if (items != 1)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"get_config\" function");
XSRETURN_NO;
"\"get_plugin_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
if (option)
{
value = perl_plugin->get_config (perl_plugin, option);
return_value = weechat_script_get_plugin_config (perl_plugin,
perl_current_script,
option);
if (value)
if (return_value)
{
XST_mPV (0, value);
free (value);
XST_mPV (0, return_value);
free (return_value);
return;
}
else
XST_mPV (0, "");
}
XST_mPV (0, "");
}
/*
* weechat::set_plugin_config: set value of a WeeChat config option
*/
static XS (XS_weechat_set_plugin_config)
{
char *option, *value;
unsigned int integer;
dXSARGS;
/* make gcc happy */
(void) cv;
if (!perl_current_script)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: unable to set plugin config option, "
"script not initialized");
XSRETURN (0);
}
XSRETURN (1);
if (items != 2)
{
perl_plugin->printf_server (perl_plugin,
"Perl error: wrong parameters for "
"\"set_plugin_config\" function");
XSRETURN (0);
}
option = SvPV (ST (0), integer);
value = SvPV (ST (1), integer);
if (option && value)
{
if (weechat_script_set_plugin_config (perl_plugin,
perl_current_script,
option, value))
XSRETURN (1);
}
XSRETURN (0);
}
/*
@@ -525,13 +740,17 @@ weechat_perl_xs_init (pTHX)
newXS ("weechat::command", XS_weechat_command, "weechat");
newXS ("weechat::add_message_handler", XS_weechat_add_message_handler, "weechat");
newXS ("weechat::add_command_handler", XS_weechat_add_command_handler, "weechat");
newXS ("weechat::remove_handler", XS_weechat_remove_handler, "weechat");
newXS ("weechat::get_info", XS_weechat_get_info, "weechat");
newXS ("weechat::get_dcc_info", XS_weechat_get_dcc_info, "weechat");
newXS ("weechat::get_config", XS_weechat_get_config, "weechat");
newXS ("weechat::set_config", XS_weechat_set_config, "weechat");
newXS ("weechat::get_plugin_config", XS_weechat_get_plugin_config, "weechat");
newXS ("weechat::set_plugin_config", XS_weechat_set_plugin_config, "weechat");
}
/*
* wee_perl_load: load a Perl script
* weechat_perl_load: load a Perl script
*/
int
@@ -689,9 +908,8 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -715,14 +933,14 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Perl scripts:");
if (perl_scripts)
{
for (ptr_plugin_script = perl_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = perl_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -732,15 +950,16 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Perl message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Perl(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -750,15 +969,16 @@ weechat_perl_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Perl command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Perl(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -118,7 +118,7 @@ weechat_python_register (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"register\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (weechat_script_search (python_plugin, &python_scripts, name))
@@ -129,7 +129,7 @@ weechat_python_register (PyObject *self, PyObject *args)
"\"%s\" script (another script "
"already exists with this name)",
name);
return NULL;
return Py_BuildValue ("i", 0);
}
/* register script */
@@ -152,11 +152,10 @@ weechat_python_register (PyObject *self, PyObject *args)
"Python error: unable to load script "
"\"%s\" (not enough memory)",
name);
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
return Py_BuildValue ("i", 1);
}
/*
@@ -171,6 +170,14 @@ weechat_python_print (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to print message, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
message = NULL;
channel_name = NULL;
server_name = NULL;
@@ -180,12 +187,13 @@ weechat_python_print (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"print\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->printf (python_plugin,
server_name, channel_name,
"%s", message);
return Py_BuildValue ("i", 1);
}
@@ -202,6 +210,14 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to print infobar message, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
delay = 1;
message = NULL;
@@ -210,13 +226,12 @@ weechat_python_print_infobar (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"print_infobar\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->infobar_printf (python_plugin, delay, message);
Py_INCREF (Py_None);
return Py_None;
return Py_BuildValue ("i", 1);
}
/*
@@ -231,6 +246,14 @@ weechat_python_command (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to run command, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
command = NULL;
channel_name = NULL;
server_name = NULL;
@@ -240,12 +263,13 @@ weechat_python_command (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"command\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
python_plugin->exec_command (python_plugin,
server_name, channel_name,
command);
return Py_BuildValue ("i", 1);
}
@@ -256,36 +280,36 @@ weechat_python_command (PyObject *self, PyObject *args)
static PyObject *
weechat_python_add_message_handler (PyObject *self, PyObject *args)
{
char *message, *function;
char *irc_command, *function;
/* make gcc happy */
(void) self;
message = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &message, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_message_handler\" function");
return NULL;
}
if (python_current_script)
python_plugin->msg_handler_add (python_plugin, message,
weechat_python_handler, function,
(void *)python_current_script);
else
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add message handler, "
"script not initialized");
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
irc_command = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &irc_command, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_message_handler\" function");
return Py_BuildValue ("i", 0);
}
if (python_plugin->msg_handler_add (python_plugin, irc_command,
weechat_python_handler, function,
(void *)python_current_script))
return Py_BuildValue ("i", 1);
return Py_BuildValue ("i", 0);
}
/*
@@ -299,7 +323,15 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add command handler, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
command = NULL;
function = NULL;
description = NULL;
@@ -312,28 +344,57 @@ weechat_python_add_command_handler (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"add_command_handler\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (python_current_script)
python_plugin->cmd_handler_add (python_plugin,
if (python_plugin->cmd_handler_add (python_plugin,
command,
description,
arguments,
arguments_description,
weechat_python_handler,
function,
(void *)python_current_script);
else
(void *)python_current_script))
return Py_BuildValue ("i", 1);
return Py_BuildValue ("i", 0);
}
/*
* weechat.remove_handler: remove a handler
*/
static PyObject *
weechat_python_remove_handler (PyObject *self, PyObject *args)
{
char *command, *function;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to add command handler, "
"Python error: unable to remove handler, "
"script not initialized");
return NULL;
return Py_BuildValue ("i", 0);
}
Py_INCREF (Py_None);
return Py_None;
command = NULL;
function = NULL;
if (!PyArg_ParseTuple (args, "ss", &command, &function))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"remove_handler\" function");
return Py_BuildValue ("i", 0);
}
weechat_script_remove_handler (python_plugin, python_current_script,
command, function);
return Py_BuildValue ("i", 1);
}
/*
@@ -349,6 +410,14 @@ weechat_python_get_info (PyObject *self, PyObject *args)
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get info, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
arg = NULL;
server_name = NULL;
channel_name = NULL;
@@ -358,7 +427,7 @@ weechat_python_get_info (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_info\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (arg)
@@ -371,11 +440,9 @@ weechat_python_get_info (PyObject *self, PyObject *args)
free (info);
return object;
}
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
return Py_BuildValue ("s", "");
}
/*
@@ -393,11 +460,19 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
(void) self;
(void) args;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get DCC info, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
dcc_info = python_plugin->get_dcc_info (python_plugin);
dcc_count = 0;
if (!dcc_info)
return Py_None;
return Py_BuildValue ("i", 0);
for (ptr_dcc = dcc_info; ptr_dcc; ptr_dcc = ptr_dcc->next_dcc)
{
@@ -409,7 +484,7 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
if (!list)
{
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
dcc_count = 0;
@@ -440,14 +515,14 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
PyMem_Free (listvalue);
PyMem_Free (list);
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
PyMem_Free (listvalue);
}
else
{
python_plugin->free_dcc_info (python_plugin, dcc_info);
return Py_None;
return Py_BuildValue ("i", 0);
}
dcc_count++;
}
@@ -458,18 +533,26 @@ weechat_python_get_dcc_info (PyObject *self, PyObject *args)
}
/*
* weechat.get_config: get value of a config option
* weechat.get_config: get value of a WeeChat config option
*/
static PyObject *
weechat_python_get_config (PyObject *self, PyObject *args)
{
char *option, *value;
PyObject *object;
char *option, *return_value;
PyObject *python_return_value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
if (!PyArg_ParseTuple (args, "s", &option))
@@ -477,26 +560,150 @@ weechat_python_get_config (PyObject *self, PyObject *args)
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_config\" function");
return NULL;
return Py_BuildValue ("i", 0);
}
if (option)
{
value = python_plugin->get_config (python_plugin, option);
return_value = python_plugin->get_config (python_plugin, option);
if (value)
if (return_value)
{
object = Py_BuildValue ("s", value);
free (value);
return object;
python_return_value = Py_BuildValue ("s", return_value);
free (return_value);
return python_return_value;
}
else
return Py_BuildValue ("s", "");
}
return Py_BuildValue ("i", 1);
return Py_BuildValue ("s", "");
}
/*
* weechat.set_config: set value of a WeeChat config option
*/
static PyObject *
weechat_python_set_config (PyObject *self, PyObject *args)
{
char *option, *value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to set config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
value = NULL;
if (!PyArg_ParseTuple (args, "ss", &option, &value))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"set_config\" function");
return Py_BuildValue ("i", 0);
}
if (option && value)
{
if (python_plugin->set_config (python_plugin, option, value))
return Py_BuildValue ("i", 1);
}
return Py_BuildValue ("i", 0);
}
/*
* weechat.get_plugin_config: get value of a plugin config option
*/
static PyObject *
weechat_python_get_plugin_config (PyObject *self, PyObject *args)
{
char *option, *return_value;
PyObject *python_return_value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to get plugin config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
if (!PyArg_ParseTuple (args, "s", &option))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"get_plugin_config\" function");
return Py_BuildValue ("i", 0);
}
if (option)
{
return_value = python_plugin->get_config (python_plugin, option);
if (return_value)
{
python_return_value = Py_BuildValue ("s", return_value);
free (return_value);
return python_return_value;
}
}
return Py_BuildValue ("s", "");
}
/*
* weechat.set_plugin_config: set value of a plugin config option
*/
static PyObject *
weechat_python_set_plugin_config (PyObject *self, PyObject *args)
{
char *option, *value;
/* make gcc happy */
(void) self;
if (!python_current_script)
{
python_plugin->printf_server (python_plugin,
"Python error: unable to set plugin config option, "
"script not initialized");
return Py_BuildValue ("i", 0);
}
option = NULL;
value = NULL;
if (!PyArg_ParseTuple (args, "ss", &option, &value))
{
python_plugin->printf_server (python_plugin,
"Python error: wrong parameters for "
"\"set_plugin_config\" function");
return Py_BuildValue ("i", 0);
}
if (option && value)
{
if (python_plugin->set_config (python_plugin, option, value))
return Py_BuildValue ("i", 1);
}
return Py_BuildValue ("i", 0);
}
/*
* Python subroutines
*/
@@ -509,9 +716,13 @@ PyMethodDef weechat_python_funcs[] = {
{ "command", weechat_python_command, METH_VARARGS, "" },
{ "add_message_handler", weechat_python_add_message_handler, METH_VARARGS, "" },
{ "add_command_handler", weechat_python_add_command_handler, METH_VARARGS, "" },
{ "remove_handler", weechat_python_remove_handler, METH_VARARGS, "" },
{ "get_info", weechat_python_get_info, METH_VARARGS, "" },
{ "get_dcc_info", weechat_python_get_dcc_info, METH_VARARGS, "" },
{ "get_config", weechat_python_get_config, METH_VARARGS, "" },
{ "set_config", weechat_python_set_config, METH_VARARGS, "" },
{ "get_plugin_config", weechat_python_get_plugin_config, METH_VARARGS, "" },
{ "set_plugin_config", weechat_python_set_plugin_config, METH_VARARGS, "" },
{ NULL, NULL, 0, NULL }
};
@@ -738,9 +949,8 @@ weechat_python_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -764,14 +974,14 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Python scripts:");
if (python_scripts)
{
for (ptr_plugin_script = python_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = python_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -781,15 +991,16 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Python message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Python(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -799,15 +1010,16 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Python command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Python(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
+297 -62
View File
@@ -95,7 +95,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"register\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (name, T_STRING);
@@ -116,7 +116,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
"\"%s\" script (another script "
"already exists with this name)",
c_name);
return Qnil;
return INT2FIX (0);
}
/* register script */
@@ -139,7 +139,7 @@ weechat_ruby_register (VALUE class, VALUE name, VALUE version,
"Ruby error: unable to load script "
"\"%s\" (not enough memory)",
c_name);
return Qnil;
return INT2FIX (0);
}
return INT2FIX (1);
@@ -158,6 +158,14 @@ weechat_ruby_print (VALUE class, VALUE message, VALUE channel_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to print message, "
"script not initialized");
return INT2FIX (0);
}
c_message = NULL;
c_channel_name = NULL;
c_server_name = NULL;
@@ -167,7 +175,7 @@ weechat_ruby_print (VALUE class, VALUE message, VALUE channel_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"print\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (message, T_STRING);
@@ -202,6 +210,14 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to print infobar message, "
"script not initialized");
return INT2FIX (0);
}
c_delay = 1;
c_message = NULL;
@@ -210,7 +226,7 @@ weechat_ruby_print_infobar (VALUE class, VALUE delay, VALUE message)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"print_infobar\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (delay, T_FIXNUM);
@@ -237,6 +253,14 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to run command, "
"script not initialized");
return INT2FIX (0);
}
c_command = NULL;
c_channel_name = NULL;
c_server_name = NULL;
@@ -246,7 +270,7 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"command\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (command, T_STRING);
@@ -264,7 +288,7 @@ weechat_ruby_command (VALUE class, VALUE command, VALUE channel_name,
ruby_plugin->exec_command (ruby_plugin,
c_server_name, c_channel_name,
c_command);
return INT2FIX (1);
}
@@ -280,6 +304,14 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add message handler, "
"script not initialized");
return INT2FIX (0);
}
c_message = NULL;
c_function = NULL;
@@ -288,7 +320,7 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"add_message_handler\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (message, T_STRING);
@@ -297,19 +329,12 @@ weechat_ruby_add_message_handler (VALUE class, VALUE message, VALUE function)
c_message = STR2CSTR (message);
c_function = STR2CSTR (function);
if (ruby_current_script)
ruby_plugin->msg_handler_add (ruby_plugin, c_message,
if (ruby_plugin->msg_handler_add (ruby_plugin, c_message,
weechat_ruby_handler, c_function,
(void *)ruby_current_script);
else
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add message handler, "
"script not initialized");
return Qnil;
}
(void *)ruby_current_script))
return INT2FIX (1);
return INT2FIX (1);
return INT2FIX (0);
}
/*
@@ -321,12 +346,20 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
VALUE description, VALUE arguments,
VALUE arguments_description)
{
char *c_command, *c_function,*c_description, *c_arguments;
char *c_command, *c_function, *c_description, *c_arguments;
char *c_arguments_description;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add command handler, "
"script not initialized");
return INT2FIX (0);
}
c_command = NULL;
c_function = NULL;
c_description = NULL;
@@ -338,7 +371,7 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"add_command_handler\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (command, T_STRING);
@@ -359,23 +392,59 @@ weechat_ruby_add_command_handler (VALUE class, VALUE command, VALUE function,
if (!NIL_P (arguments_description))
c_arguments_description = STR2CSTR (arguments_description);
if (ruby_current_script)
ruby_plugin->cmd_handler_add (ruby_plugin,
if (ruby_plugin->cmd_handler_add (ruby_plugin,
c_command,
c_description,
c_arguments,
c_arguments_description,
weechat_ruby_handler,
c_function,
(void *)ruby_current_script);
else
(void *)ruby_current_script))
return INT2FIX (1);
return INT2FIX (0);
}
/*
* weechat_remove_handler: remove a handler
*/
static VALUE
weechat_ruby_remove_handler (VALUE class, VALUE command, VALUE function)
{
char *c_command, *c_function;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to add command handler, "
"Ruby error: unable to remove handler, "
"script not initialized");
return Qnil;
return INT2FIX (0);
}
c_command = NULL;
c_function = NULL;
if (NIL_P (command) || NIL_P (function))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"remove_handler\" function");
return INT2FIX (0);
}
Check_Type (command, T_STRING);
Check_Type (function, T_STRING);
c_command = STR2CSTR (command);
c_function = STR2CSTR (function);
weechat_script_remove_handler (ruby_plugin, ruby_current_script,
c_command, c_function);
return INT2FIX (1);
}
@@ -393,6 +462,14 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get info, "
"script not initialized");
return INT2FIX (0);
}
c_arg = NULL;
c_server_name = NULL;
c_channel_name = NULL;
@@ -402,7 +479,7 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_info\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (arg, T_STRING);
@@ -428,11 +505,9 @@ weechat_ruby_get_info (VALUE class, VALUE arg, VALUE server_name,
free (info);
return return_value;
}
else
return rb_str_new2 ("");
}
return INT2FIX (1);
return rb_str_new2 ("");
}
/*
@@ -445,23 +520,39 @@ weechat_ruby_get_dcc_info (VALUE class)
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get DCC info, "
"script not initialized");
return INT2FIX (0);
}
/* TODO: get dcc info for Ruby */
return INT2FIX (1);
}
/*
* weechat_ruby_get_config: get value of a config option
* weechat_ruby_get_config: get value of a WeeChat config option
*/
static VALUE
weechat_ruby_get_config (VALUE class, VALUE option)
{
char *c_option, *value;
VALUE return_value;
char *c_option, *return_value;
VALUE ruby_return_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
if (NIL_P (option))
@@ -469,7 +560,7 @@ weechat_ruby_get_config (VALUE class, VALUE option)
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_config\" function");
return Qnil;
return INT2FIX (0);
}
Check_Type (option, T_STRING);
@@ -477,19 +568,162 @@ weechat_ruby_get_config (VALUE class, VALUE option)
if (c_option)
{
value = ruby_plugin->get_config (ruby_plugin, c_option);
return_value = ruby_plugin->get_config (ruby_plugin, c_option);
if (value)
if (return_value)
{
return_value = rb_str_new2 (value);
free (value);
return return_value;
ruby_return_value = rb_str_new2 (return_value);
free (return_value);
return ruby_return_value;
}
else
return rb_str_new2 ("");
}
return INT2FIX (1);
return rb_str_new2 ("");
}
/*
* weechat_ruby_set_config: set value of a WeeChat config option
*/
static VALUE
weechat_ruby_set_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to set config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
c_value = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"set_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
Check_Type (value, T_STRING);
c_option = STR2CSTR (option);
c_value = STR2CSTR (value);
if (c_option && c_value)
{
if (ruby_plugin->set_config (ruby_plugin, c_option, c_value))
return INT2FIX (1);
}
return INT2FIX (0);
}
/*
* weechat_ruby_get_plugin_config: get value of a plugin config option
*/
static VALUE
weechat_ruby_get_plugin_config (VALUE class, VALUE option)
{
char *c_option, *return_value;
VALUE ruby_return_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to get plugin config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"get_plugin_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
c_option = STR2CSTR (option);
if (c_option)
{
return_value = weechat_script_get_plugin_config (ruby_plugin,
ruby_current_script,
c_option);
if (return_value)
{
ruby_return_value = rb_str_new2 (return_value);
free (return_value);
return ruby_return_value;
}
}
return rb_str_new2 ("");
}
/*
* weechat_ruby_set_plugin_config: set value of a plugin config option
*/
static VALUE
weechat_ruby_set_plugin_config (VALUE class, VALUE option, VALUE value)
{
char *c_option, *c_value;
/* make gcc happy */
(void) class;
if (!ruby_current_script)
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: unable to set plugin config option, "
"script not initialized");
return INT2FIX (0);
}
c_option = NULL;
c_value = NULL;
if (NIL_P (option))
{
ruby_plugin->printf_server (ruby_plugin,
"Ruby error: wrong parameters for "
"\"set_plugin_config\" function");
return INT2FIX (0);
}
Check_Type (option, T_STRING);
Check_Type (value, T_STRING);
c_option = STR2CSTR (option);
c_value = STR2CSTR (value);
if (c_option && c_value)
{
if (weechat_script_set_plugin_config (ruby_plugin,
ruby_current_script,
c_option, c_value))
return INT2FIX (1);
}
return INT2FIX (0);
}
/*
@@ -565,9 +799,8 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
{
int argc, path_length, handler_found;
char **argv, *path_script, *dir_home;
t_plugin_script *ptr_plugin_script;
t_plugin_msg_handler *ptr_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler;
t_plugin_script *ptr_script;
t_plugin_handler *ptr_handler;
/* make gcc happy */
(void) server;
@@ -591,14 +824,14 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "Registered Ruby scripts:");
if (ruby_scripts)
{
for (ptr_plugin_script = ruby_scripts; ptr_plugin_script;
ptr_plugin_script = ptr_plugin_script->next_script)
for (ptr_script = ruby_scripts;
ptr_script; ptr_script = ptr_script->next_script)
{
plugin->printf_server (plugin, " %s v%s%s%s",
ptr_plugin_script->name,
ptr_plugin_script->version,
(ptr_plugin_script->description[0]) ? " - " : "",
ptr_plugin_script->description);
ptr_script->name,
ptr_script->version,
(ptr_script->description[0]) ? " - " : "",
ptr_script->description);
}
}
else
@@ -608,15 +841,16 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Ruby message handlers:");
handler_found = 0;
for (ptr_msg_handler = plugin->msg_handlers; ptr_msg_handler;
ptr_msg_handler = ptr_msg_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_msg_handler->msg_handler_args)
if ((ptr_handler->type == HANDLER_MESSAGE)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " IRC(%s) => Ruby(%s)",
ptr_msg_handler->irc_command,
ptr_msg_handler->msg_handler_args);
ptr_handler->irc_command,
ptr_handler->handler_args);
}
}
if (!handler_found)
@@ -626,15 +860,16 @@ weechat_ruby_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin, "");
plugin->printf_server (plugin, "Ruby command handlers:");
handler_found = 0;
for (ptr_cmd_handler = plugin->cmd_handlers; ptr_cmd_handler;
ptr_cmd_handler = ptr_cmd_handler->next_handler)
for (ptr_handler = plugin->handlers;
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if (ptr_cmd_handler->cmd_handler_args)
if ((ptr_handler->type == HANDLER_COMMAND)
&& (ptr_handler->handler_args))
{
handler_found = 1;
plugin->printf_server (plugin, " /%s => Ruby(%s)",
ptr_cmd_handler->command,
ptr_cmd_handler->cmd_handler_args);
ptr_handler->command,
ptr_handler->handler_args);
}
}
if (!handler_found)
+102 -27
View File
@@ -130,38 +130,20 @@ void
weechat_script_remove (t_weechat_plugin *plugin,
t_plugin_script **script_list, t_plugin_script *script)
{
t_plugin_msg_handler *ptr_msg_handler, *next_msg_handler;
t_plugin_cmd_handler *ptr_cmd_handler, *next_cmd_handler;
/* make gcc happy */
(void) plugin;
t_plugin_handler *ptr_handler, *next_handler;
/* remove message handlers */
ptr_msg_handler = plugin->msg_handlers;
while (ptr_msg_handler)
/* remove all handlers pointing to script */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
if ((t_plugin_script *)ptr_msg_handler->msg_handler_pointer == script)
if ((t_plugin_script *)ptr_handler->handler_pointer == script)
{
next_msg_handler = ptr_msg_handler->next_handler;
plugin->msg_handler_remove (plugin, ptr_msg_handler);
ptr_msg_handler = next_msg_handler;
next_handler = ptr_handler->next_handler;
plugin->handler_remove (plugin, ptr_handler);
ptr_handler = next_handler;
}
else
ptr_msg_handler = ptr_msg_handler->next_handler;
}
/* remove command handlers */
ptr_cmd_handler = plugin->cmd_handlers;
while (ptr_cmd_handler)
{
if ((t_plugin_script *)ptr_cmd_handler->cmd_handler_pointer == script)
{
next_cmd_handler = ptr_cmd_handler->next_handler;
plugin->cmd_handler_remove (plugin, ptr_cmd_handler);
ptr_cmd_handler = next_cmd_handler;
}
else
ptr_cmd_handler = ptr_cmd_handler->next_handler;
ptr_handler = ptr_handler->next_handler;
}
/* free data */
@@ -187,3 +169,96 @@ weechat_script_remove (t_weechat_plugin *plugin,
/* free script */
free (script);
}
/*
* weechat_script_remove_handler: remove a handler for a script
* for a msg handler, arg1=irc command, arg2=function
* for a cmd handler, arg1=command, arg2=function
*/
void
weechat_script_remove_handler (t_weechat_plugin *plugin,
t_plugin_script *script,
char *arg1, char *arg2)
{
t_plugin_handler *ptr_handler, *next_handler;
char *ptr_arg1;
/* search and remove message handlers */
ptr_handler = plugin->handlers;
while (ptr_handler)
{
ptr_arg1 = NULL;
if (ptr_handler->type == HANDLER_MESSAGE)
ptr_arg1 = ptr_handler->irc_command;
else if (ptr_handler->type == HANDLER_COMMAND)
ptr_arg1 = ptr_handler->command;
if ((ptr_arg1)
&& ((t_plugin_script *)ptr_handler->handler_pointer == script)
&& (plugin->ascii_strcasecmp (plugin, ptr_arg1, arg1) == 0)
&& (plugin->ascii_strcasecmp (plugin, ptr_handler->handler_args, arg2) == 0))
{
next_handler = ptr_handler->next_handler;
plugin->handler_remove (plugin, ptr_handler);
ptr_handler = next_handler;
}
else
ptr_handler = ptr_handler->next_handler;
}
}
/*
* weechat_script_get_plugin_config: get a value of a script option
* format in file is: plugin.script.option=value
*/
char *
weechat_script_get_plugin_config (t_weechat_plugin *plugin,
t_plugin_script *script,
char *option)
{
char *option_fullname, *return_value;
option_fullname = (char *)malloc (strlen (script->name) +
strlen (option) + 2);
if (!option_fullname)
return NULL;
strcpy (option_fullname, script->name);
strcat (option_fullname, ".");
strcat (option_fullname, option);
return_value = plugin->get_plugin_config (plugin, option_fullname);
free (option_fullname);
return return_value;
}
/*
* weechat_script_set_plugin_config: set value of a script config option
* format in file is: plugin.script.option=value
*/
int
weechat_script_set_plugin_config (t_weechat_plugin *plugin,
t_plugin_script *script,
char *option, char *value)
{
char *option_fullname;
int return_code;
option_fullname = (char *)malloc (strlen (script->name) +
strlen (option) + 2);
if (!option_fullname)
return 0;
strcpy (option_fullname, script->name);
strcat (option_fullname, ".");
strcat (option_fullname, option);
return_code = plugin->set_plugin_config (plugin, option_fullname, value);
free (option_fullname);
return return_code;
}
@@ -48,5 +48,14 @@ extern t_plugin_script *weechat_script_add (t_weechat_plugin *,
char *, char *, char *);
extern void weechat_script_remove (t_weechat_plugin *,
t_plugin_script **, t_plugin_script *);
extern void weechat_script_remove_handler (t_weechat_plugin *,
t_plugin_script *,
char *, char *);
extern char *weechat_script_get_plugin_config (t_weechat_plugin *,
t_plugin_script *,
char *);
extern int weechat_script_set_plugin_config (t_weechat_plugin *,
t_plugin_script *,
char *, char *);
#endif /* weechat-script.h */
+41 -48
View File
@@ -52,40 +52,39 @@ typedef int (t_plugin_handler_func) (t_weechat_plugin *, char *, char *, char *,
/* message handler, called when an IRC messages is received */
typedef struct t_plugin_msg_handler t_plugin_msg_handler;
typedef enum t_handler_type t_handler_type;
struct t_plugin_msg_handler
enum t_handler_type
{
char *irc_command; /* name of IRC command (PRIVMSG, ..) */
t_plugin_handler_func *msg_handler; /* pointer to message handler */
char *msg_handler_args; /* arguments sent to message handler */
void *msg_handler_pointer; /* pointer sent to message handler */
int running; /* 1 if currently running */
/* (used to prevent circular call) */
t_plugin_msg_handler *prev_handler; /* link to previous handler */
t_plugin_msg_handler *next_handler; /* link to next handler */
HANDLER_MESSAGE,
HANDLER_COMMAND
};
/* command handler, to add new commands to WeeChat */
typedef struct t_plugin_handler t_plugin_handler;
typedef struct t_plugin_cmd_handler t_plugin_cmd_handler;
struct t_plugin_cmd_handler
struct t_plugin_handler
{
t_handler_type type; /* handler type */
/* data for message handler */
char *irc_command; /* name of IRC command (PRIVMSG, ..) */
/* data for command handler */
char *command; /* name of command (without first '/') */
char *description; /* (for /help) short cmd description */
char *arguments; /* (for /help) command arguments */
char *arguments_description; /* (for /help) args long description */
/* command handler */
t_plugin_handler_func *cmd_handler; /* pointer to command handler */
char *cmd_handler_args; /* arguments sent to command handler */
void *cmd_handler_pointer; /* pointer sent to command handler */
/* data common to all handlers */
t_plugin_handler_func *handler; /* pointer to handler */
char *handler_args; /* arguments sent to handler */
void *handler_pointer; /* pointer sent to handler */
/* for internal use */
int running; /* 1 if currently running */
/* (used to prevent circular call) */
t_plugin_cmd_handler *prev_handler; /* link to previous handler */
t_plugin_cmd_handler *next_handler; /* link to next handler */
t_plugin_handler *prev_handler; /* link to previous handler */
t_plugin_handler *next_handler; /* link to next handler */
};
/* plugin, a WeeChat plugin, which is a dynamic library */
@@ -100,11 +99,9 @@ struct t_weechat_plugin
char *version; /* plugin version */
/* plugin handlers */
t_plugin_msg_handler *msg_handlers; /* IRC message handlers */
t_plugin_msg_handler *last_msg_handler;
t_plugin_cmd_handler *cmd_handlers; /* command handlers */
t_plugin_cmd_handler *last_cmd_handler;
t_plugin_handler *handlers; /* pointer to first handler */
t_plugin_handler *last_handler; /* pointer to last handler */
/* links to previous/next plugins */
t_weechat_plugin *prev_plugin; /* link to previous plugin */
t_weechat_plugin *next_plugin; /* link to next plugin */
@@ -127,17 +124,15 @@ struct t_weechat_plugin
void (*printf_server) (t_weechat_plugin *, char *, ...);
void (*infobar_printf) (t_weechat_plugin *, int, char *, ...);
t_plugin_msg_handler *(*msg_handler_add) (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
void (*msg_handler_remove) (t_weechat_plugin *, t_plugin_msg_handler *);
void (*msg_handler_remove_all) (t_weechat_plugin *);
t_plugin_cmd_handler *(*cmd_handler_add) (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
void (*cmd_handler_remove) (t_weechat_plugin *, t_plugin_cmd_handler *);
void (*cmd_handler_remove_all) (t_weechat_plugin *);
t_plugin_handler *(*msg_handler_add) (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
t_plugin_handler *(*cmd_handler_add) (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
void (*handler_remove) (t_weechat_plugin *, t_plugin_handler *);
void (*handler_remove_all) (t_weechat_plugin *);
void (*exec_command) (t_weechat_plugin *, char *, char *, char *);
char *(*get_info) (t_weechat_plugin *, char *, char *, char *);
@@ -166,17 +161,15 @@ extern void weechat_plugin_printf_server (t_weechat_plugin *, char *, ...);
extern void weechat_plugin_infobar_printf (t_weechat_plugin *, int, char *, ...);
/* handler functions */
extern t_plugin_msg_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_msg_handler_remove (t_weechat_plugin *, t_plugin_msg_handler *);
extern void weechat_plugin_msg_handler_remove_all (t_weechat_plugin *);
extern t_plugin_cmd_handler *weechat_plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_cmd_handler_remove (t_weechat_plugin *, t_plugin_cmd_handler *);
extern void weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *);
extern t_plugin_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *,
t_plugin_handler_func *,
char *, void *);
extern t_plugin_handler *weechat_plugin_cmd_handler_add (t_weechat_plugin *, char *,
char *, char *, char *,
t_plugin_handler_func *,
char *, void *);
extern void weechat_plugin_handler_remove (t_weechat_plugin *, t_plugin_handler *);
extern void weechat_plugin_handler_remove_all (t_weechat_plugin *);
/* other functions */
extern void weechat_plugin_exec_command (t_weechat_plugin *, char *, char *, char *);