36 |
|
|
37 |
@title WeeChat - Gui@'on de usuario. |
@title WeeChat - Gui@'on de usuario. |
38 |
@subtitle Cliente IRC r@'apido, peque@~no y extensible |
@subtitle Cliente IRC r@'apido, peque@~no y extensible |
39 |
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 24 de octubre de 2005 |
@subtitle Documentaci@'on para WeeChat v0.1.6-cvs - 25 de octubre de 2005 |
40 |
|
|
41 |
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}> |
@author FlashCode <@email{flashcode@@flashtux.org, flashcode AT flashtux.org}> |
42 |
|
|
1560 |
@end itemize |
@end itemize |
1561 |
@item functions for init and end of plugin: |
@item functions for init and end of plugin: |
1562 |
@itemize @minus |
@itemize @minus |
1563 |
@item weechat_plugin_init: function called when plugin is loaded |
@item weechat_plugin_init: function called when plugin is loaded, |
1564 |
@item weechat_plugin_end: function called when plugin is unloaded |
must return 1 if successful, 0 if error |
1565 |
|
@item weechat_plugin_end: function called when plugin is unloaded, |
1566 |
|
must return 1 if successful, 0 if error |
1567 |
@end itemize |
@end itemize |
1568 |
@end itemize |
@end itemize |
1569 |
|
|
2067 |
@* |
@* |
2068 |
@emph{Examples:}@* |
@emph{Examples:}@* |
2069 |
@* |
@* |
2070 |
@code{char *value1 = plugin->get_config (plugin, "look_set_title");}@* |
@code{char *value1 = plugin->get_config (plugin, "look_nicklist");}@* |
2071 |
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@* |
@code{char *value2 = plugin->get_config (plugin, "freenode.server_autojoin");}@* |
2072 |
@* |
@* |
2073 |
|
|
2248 |
@item @option{descripci@'on}: descripci@'on breve del programa |
@item @option{descripci@'on}: descripci@'on breve del programa |
2249 |
@end itemize |
@end itemize |
2250 |
@* |
@* |
2251 |
|
@emph{Return value:}@* |
2252 |
|
@* |
2253 |
|
1 if script was registered, 0 if error occured.@* |
2254 |
|
@* |
2255 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2256 |
@* |
@* |
2257 |
@code{weechat::register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@* |
@code{weechat::register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@* |
2269 |
@item @option{servidor}: (opcional) nombre interno del servidor |
@item @option{servidor}: (opcional) nombre interno del servidor |
2270 |
@end itemize |
@end itemize |
2271 |
@* |
@* |
2272 |
|
@emph{Return value:}@* |
2273 |
|
@* |
2274 |
|
1 if successful, 0 if error occured.@* |
2275 |
|
@* |
2276 |
@emph{Ejemplos:}@* |
@emph{Ejemplos:}@* |
2277 |
@* |
@* |
2278 |
@code{weechat::print ("mensaje");}@* |
@code{weechat::print ("mensaje");}@* |
2292 |
@item @option{message}: mensaje que se escribir@'a en la barra de informaciones. |
@item @option{message}: mensaje que se escribir@'a en la barra de informaciones. |
2293 |
@end itemize |
@end itemize |
2294 |
@* |
@* |
2295 |
|
@emph{Return value:}@* |
2296 |
|
@* |
2297 |
|
1 if successful, 0 if error occured.@* |
2298 |
|
@* |
2299 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2300 |
@* |
@* |
2301 |
@code{weechat::print_infobar (5, "mensaje");}@* |
@code{weechat::print_infobar (5, "mensaje");}@* |
2317 |
@item @option{funci@'on}: funci@'on en Perl llamada cuando se reciba el mensaje. |
@item @option{funci@'on}: funci@'on en Perl llamada cuando se reciba el mensaje. |
2318 |
@end itemize |
@end itemize |
2319 |
@* |
@* |
2320 |
|
@emph{Return value:}@* |
2321 |
|
@* |
2322 |
|
1 if Perl function was attached, 0 if error occured.@* |
2323 |
|
@* |
2324 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2325 |
@* |
@* |
2326 |
@code{weechat::add_message_handler ("privmsg", mi_funcion);}@* |
@code{weechat::add_message_handler ("privmsg", mi_funcion);}@* |
2354 |
arguments (displayed by /help command) |
arguments (displayed by /help command) |
2355 |
@end itemize |
@end itemize |
2356 |
@* |
@* |
2357 |
|
@emph{Return value:}@* |
2358 |
|
@* |
2359 |
|
1 if Perl function was attached, 0 if error occured.@* |
2360 |
|
@* |
2361 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2362 |
@* |
@* |
2363 |
@code{weechat::add_command_handler ("comando", mi_comando);}@* |
@code{weechat::add_command_handler ("comando", mi_comando);}@* |
2369 |
@* |
@* |
2370 |
|
|
2371 |
@item |
@item |
2372 |
|
@command{weechat::remove_handler ( name, function );}@* |
2373 |
|
@* |
2374 |
|
Remove a message or command handler.@* |
2375 |
|
|
2376 |
|
@emph{Arguments:} |
2377 |
|
@itemize @minus |
2378 |
|
@item @option{name}: name of IRC message or command handler |
2379 |
|
@item @option{function}: Perl function |
2380 |
|
@end itemize |
2381 |
|
@* |
2382 |
|
@emph{Return value:}@* |
2383 |
|
@* |
2384 |
|
1 if successful, 0 if error occured.@* |
2385 |
|
@* |
2386 |
|
@emph{Example:}@* |
2387 |
|
@* |
2388 |
|
@code{weechat::remove_handler ("command", my_command);}@* |
2389 |
|
@* |
2390 |
|
|
2391 |
|
@item |
2392 |
@command{weechat::command ( command, [channel, [server]] );}@* |
@command{weechat::command ( command, [channel, [server]] );}@* |
2393 |
@* |
@* |
2394 |
Execute a command or send a message to a channel.@* |
Execute a command or send a message to a channel.@* |
2400 |
@item @option{server}: internal name of server |
@item @option{server}: internal name of server |
2401 |
@end itemize |
@end itemize |
2402 |
@* |
@* |
2403 |
|
@emph{Return value:}@* |
2404 |
|
@* |
2405 |
|
1 if successful, 0 if error occured.@* |
2406 |
|
@* |
2407 |
@emph{Examples:}@* |
@emph{Examples:}@* |
2408 |
@* |
@* |
2409 |
@code{weechat::command ("hello world!");}@* |
@code{weechat::command ("hello world!");}@* |
2433 |
@item @option{canal}: nombre del canal |
@item @option{canal}: nombre del canal |
2434 |
@end itemize |
@end itemize |
2435 |
@* |
@* |
2436 |
|
@emph{Return value:}@* |
2437 |
|
@* |
2438 |
|
Asked info, empty if error occured or info was not found.@* |
2439 |
|
@* |
2440 |
@emph{Ejemplos:}@* |
@emph{Ejemplos:}@* |
2441 |
@* |
@* |
2442 |
@code{$version = weechat::get_info("version");}@* |
@code{$version = weechat::get_info("version");}@* |
2481 |
@item bytes_per_sec: bytes sent/received per second |
@item bytes_per_sec: bytes sent/received per second |
2482 |
@end itemize |
@end itemize |
2483 |
@* |
@* |
2484 |
|
@emph{Return value:}@* |
2485 |
|
@* |
2486 |
|
DCC list, 0 if error occured.@* |
2487 |
|
@* |
2488 |
|
|
2489 |
@item |
@item |
2490 |
@command{weechat::get_config ( name );}@* |
@command{weechat::get_config ( option );}@* |
2491 |
@* |
@* |
2492 |
Get WeeChat config option value.@* |
Get WeeChat config option value.@* |
2493 |
|
|
2494 |
@emph{Arguments:} |
@emph{Arguments:} |
2495 |
@itemize @minus |
@itemize @minus |
2496 |
@item @option{name}: name of option |
@item @option{option}: name of option |
2497 |
@end itemize |
@end itemize |
2498 |
@* |
@* |
2499 |
|
@emph{Return value:}@* |
2500 |
|
@* |
2501 |
|
Value of option, empty if error occured or option was not found.@* |
2502 |
|
@* |
2503 |
@emph{Examples:}@* |
@emph{Examples:}@* |
2504 |
@* |
@* |
2505 |
@code{$value1 = weechat::get_config ("look_set_title");}@* |
@code{$value1 = weechat::get_config ("look_nicklist");}@* |
2506 |
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@* |
@code{$value2 = weechat::get_config ("freenode.server_autojoin");}@* |
2507 |
@* |
@* |
2508 |
|
|
2509 |
|
@item |
2510 |
|
@command{weechat::set_config ( option, value );}@* |
2511 |
|
@* |
2512 |
|
Get WeeChat config option value.@* |
2513 |
|
|
2514 |
|
@emph{Arguments:} |
2515 |
|
@itemize @minus |
2516 |
|
@item @option{option}: name of option |
2517 |
|
@item @option{value}: new value for option |
2518 |
|
@end itemize |
2519 |
|
@* |
2520 |
|
@emph{Return value:}@* |
2521 |
|
@* |
2522 |
|
1 if successful, 0 if error occured.@* |
2523 |
|
@* |
2524 |
|
@emph{Examples:}@* |
2525 |
|
@* |
2526 |
|
@code{weechat::set_config ("look_nicklist", "off");}@* |
2527 |
|
@code{weechat::set_config ("freenode.server_autojoin"", "#weechat");}@* |
2528 |
|
@* |
2529 |
|
|
2530 |
|
@item |
2531 |
|
@command{weechat::get_plugin_config ( option );}@* |
2532 |
|
@* |
2533 |
|
Return value of a plugin option.@* |
2534 |
|
Option is read from file ~/.weechat/plugins.rc and is like:@* |
2535 |
|
@code{plugin.script.option=value}@* |
2536 |
|
Note: plugin and script names are automatically added.@* |
2537 |
|
|
2538 |
|
@emph{Arguments:} |
2539 |
|
@itemize @minus |
2540 |
|
@item @option{option}: name of option |
2541 |
|
@end itemize |
2542 |
|
@* |
2543 |
|
@emph{Return value:}@* |
2544 |
|
@* |
2545 |
|
Value of option, empty if error occured or option was not found.@* |
2546 |
|
@* |
2547 |
|
@emph{Example:}@* |
2548 |
|
@* |
2549 |
|
@code{$value = weechat::get_plugin_config ("my_var");}@* |
2550 |
|
@* |
2551 |
|
|
2552 |
|
@item |
2553 |
|
@command{weechat::set_plugin_config ( option, value );}@* |
2554 |
|
@* |
2555 |
|
Update value of a plugin option.@* |
2556 |
|
Option is written in file ~/.weechat/plugins.rc and is like:@* |
2557 |
|
@code{plugin.script.option=value}@* |
2558 |
|
Note: plugin and script names are automatically added.@* |
2559 |
|
|
2560 |
|
@emph{Arguments:} |
2561 |
|
@itemize @minus |
2562 |
|
@item @option{option}: name of option |
2563 |
|
@item @option{value}: new value for option |
2564 |
|
@end itemize |
2565 |
|
@* |
2566 |
|
@emph{Return value:}@* |
2567 |
|
@* |
2568 |
|
1 if successful, 0 if error occured.@* |
2569 |
|
@* |
2570 |
|
@emph{Example:}@* |
2571 |
|
@* |
2572 |
|
@code{weechat::set_plugin_config ("my_var", "value");}@* |
2573 |
|
@* |
2574 |
|
|
2575 |
@end itemize |
@end itemize |
2576 |
|
|
2577 |
@subsection Python scripts |
@subsection Python scripts |
2609 |
@item @option{descripci@'on}: descripci@'on breve del programa |
@item @option{descripci@'on}: descripci@'on breve del programa |
2610 |
@end itemize |
@end itemize |
2611 |
@* |
@* |
2612 |
|
@emph{Return value:}@* |
2613 |
|
@* |
2614 |
|
1 if script was registered, 0 if error occured.@* |
2615 |
|
@* |
2616 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2617 |
@* |
@* |
2618 |
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@* |
@code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@* |
2630 |
@item @option{servidor}: (opcional) nombre interno del servidor |
@item @option{servidor}: (opcional) nombre interno del servidor |
2631 |
@end itemize |
@end itemize |
2632 |
@* |
@* |
2633 |
|
@emph{Return value:}@* |
2634 |
|
@* |
2635 |
|
1 if successful, 0 if error occured.@* |
2636 |
|
@* |
2637 |
@emph{Ejemplos:}@* |
@emph{Ejemplos:}@* |
2638 |
@* |
@* |
2639 |
@code{weechat.prnt ("mensaje")}@* |
@code{weechat.prnt ("mensaje")}@* |
2653 |
@item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones. |
@item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones. |
2654 |
@end itemize |
@end itemize |
2655 |
@* |
@* |
2656 |
|
@emph{Return value:}@* |
2657 |
|
@* |
2658 |
|
1 if successful, 0 if error occured.@* |
2659 |
|
@* |
2660 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2661 |
@* |
@* |
2662 |
@code{weechat.print_infobar (5, "mensaje")}@* |
@code{weechat.print_infobar (5, "mensaje")}@* |
2678 |
@item @option{funci@'on}: funci@'on en Python llamada cuando se reciba el mensaje. |
@item @option{funci@'on}: funci@'on en Python llamada cuando se reciba el mensaje. |
2679 |
@end itemize |
@end itemize |
2680 |
@* |
@* |
2681 |
|
@emph{Return value:}@* |
2682 |
|
@* |
2683 |
|
1 if Python function was attached, 0 if error occured.@* |
2684 |
|
@* |
2685 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2686 |
@* |
@* |
2687 |
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@* |
@code{weechat.add_message_handler ("privmsg", mi_funcion)}@* |
2713 |
arguments (displayed by /help command) |
arguments (displayed by /help command) |
2714 |
@end itemize |
@end itemize |
2715 |
@* |
@* |
2716 |
|
@emph{Return value:}@* |
2717 |
|
@* |
2718 |
|
1 if Python function was attached, 0 if error occured.@* |
2719 |
|
@* |
2720 |
@emph{Ejemplo:}@* |
@emph{Ejemplo:}@* |
2721 |
@* |
@* |
2722 |
@code{weechat.add_command_handler ("comando", mi_comando)}@* |
@code{weechat.add_command_handler ("comando", mi_comando)}@* |
2725 |
@* |
@* |
2726 |
|
|
2727 |
@item |
@item |
2728 |
|
@command{weechat.remove_handler ( name, function );}@* |
2729 |
|
@* |
2730 |
|
Remove a message or command handler.@* |
2731 |
|
|
2732 |
|
@emph{Arguments:} |
2733 |
|
@itemize @minus |
2734 |
|
@item @option{name}: name of IRC message or command handler |
2735 |
|
@item @option{function}: Python function |
2736 |
|
@end itemize |
2737 |
|
@* |
2738 |
|
@emph{Return value:}@* |
2739 |
|
@* |
2740 |
|
1 if successful, 0 if error occured.@* |
2741 |
|
@* |
2742 |
|
@emph{Example:}@* |
2743 |
|
@* |
2744 |
|
@code{weechat.remove_handler ("command", my_command);}@* |
2745 |
|
@* |
2746 |
|
|
2747 |
|
@item |
2748 |
@command{weechat.command ( command, [channel, [server]] )}@* |
@command{weechat.command ( command, [channel, [server]] )}@* |
2749 |
@* |
@* |
2750 |
Execute a command or send a message to a channel.@* |
Execute a command or send a message to a channel.@* |
2756 |
@item @option{server}: internal name of server |
@item @option{server}: internal name of server |
2757 |
@end itemize |
@end itemize |
2758 |
@* |
@* |
2759 |
|
@emph{Return value:}@* |
2760 |
|
@* |
2761 |
|
1 if successful, 0 if error occured.@* |
2762 |
|
@* |
2763 |
@emph{Examples:}@* |
@emph{Examples:}@* |
2764 |
@* |
@* |
2765 |
@code{weechat.command ("hello world!")}@* |
@code{weechat.command ("hello world!")}@* |
2788 |
@item @option{servidor}: nombre interno del servidor |
@item @option{servidor}: nombre interno del servidor |
2789 |
@end itemize |
@end itemize |
2790 |
@* |
@* |
2791 |
|
@emph{Return value:}@* |
2792 |
|
@* |
2793 |
|
Asked info, empty if error occured or info was not found.@* |
2794 |
|
@* |
2795 |
@emph{Ejemplos:}@* |
@emph{Ejemplos:}@* |
2796 |
@* |
@* |
2797 |
@code{$version = weechat.get_info("version")}@* |
@code{$version = weechat.get_info("version")}@* |
2836 |
@item bytes_per_sec: bytes sent/received per second |
@item bytes_per_sec: bytes sent/received per second |
2837 |
@end itemize |
@end itemize |
2838 |
@* |
@* |
2839 |
|
@emph{Return value:}@* |
2840 |
|
@* |
2841 |
|
DCC list, 0 if error occured.@* |
2842 |
|
@* |
2843 |
|
|
2844 |
@item |
@item |
2845 |
@command{weechat.get_config ( name );}@* |
@command{weechat.get_config ( option );}@* |
2846 |
@* |
@* |
2847 |
Get WeeChat config option value.@* |
Get WeeChat config option value.@* |
2848 |
|
|
2849 |
@emph{Arguments:} |
@emph{Arguments:} |
2850 |
@itemize @minus |
@itemize @minus |
2851 |
@item @option{name}: name of option |
@item @option{option}: name of option |
2852 |
@end itemize |
@end itemize |
2853 |
@* |
@* |
2854 |
|
@emph{Return value:}@* |
2855 |
|
@* |
2856 |
|
Value of option, empty if error occured or option was not found.@* |
2857 |
|
@* |
2858 |
@emph{Examples:}@* |
@emph{Examples:}@* |
2859 |
@* |
@* |
2860 |
@code{$value1 = weechat.get_config ("look_set_title");}@* |
@code{$value1 = weechat.get_config ("look_nicklist");}@* |
2861 |
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@* |
@code{$value2 = weechat.get_config ("freenode.server_autojoin");}@* |
2862 |
@* |
@* |
2863 |
|
|
2864 |
|
@item |
2865 |
|
@command{weechat.set_config ( option, value );}@* |
2866 |
|
@* |
2867 |
|
Get WeeChat config option value.@* |
2868 |
|
|
2869 |
|
@emph{Arguments:} |
2870 |
|
@itemize @minus |
2871 |
|
@item @option{option}: name of option |
2872 |
|
@item @option{value}: new value for option |
2873 |
|
@end itemize |
2874 |
|
@* |
2875 |
|
@emph{Return value:}@* |
2876 |
|
@* |
2877 |
|
1 if successful, 0 if error occured.@* |
2878 |
|
@* |
2879 |
|
@emph{Examples:}@* |
2880 |
|
@* |
2881 |
|
@code{weechat.set_config ("look_nicklist", "off");}@* |
2882 |
|
@code{weechat.set_config ("freenode.server_autojoin"", "#weechat");}@* |
2883 |
|
@* |
2884 |
|
|
2885 |
|
@item |
2886 |
|
@command{weechat.get_plugin_config ( option );}@* |
2887 |
|
@* |
2888 |
|
Return value of a plugin option.@* |
2889 |
|
Option is read from file ~/.weechat/plugins.rc and is like:@* |
2890 |
|
@code{plugin.script.option=value}@* |
2891 |
|
Note: plugin and script names are automatically added.@* |
2892 |
|
|
2893 |
|
@emph{Arguments:} |
2894 |
|
@itemize @minus |
2895 |
|
@item @option{option}: name of option |
2896 |
|
@end itemize |
2897 |
|
@* |
2898 |
|
@emph{Return value:}@* |
2899 |
|
@* |
2900 |
|
Value of option, empty if error occured or option was not found.@* |
2901 |
|
@* |
2902 |
|
@emph{Example:}@* |
2903 |
|
@* |
2904 |
|
@code{$value = weechat.get_plugin_config ("my_var");}@* |
2905 |
|
@* |
2906 |
|
|
2907 |
|
@item |
2908 |
|
@command{weechat.set_plugin_config ( option, value );}@* |
2909 |
|
@* |
2910 |
|
Update value of a plugin option.@* |
2911 |
|
Option is written in file ~/.weechat/plugins.rc and is like:@* |
2912 |
|
@code{plugin.script.option=value}@* |
2913 |
|
Note: plugin and script names are automatically added.@* |
2914 |
|
|
2915 |
|
@emph{Arguments:} |
2916 |
|
@itemize @minus |
2917 |
|
@item @option{option}: name of option |
2918 |
|
@item @option{value}: new value for option |
2919 |
|
@end itemize |
2920 |
|
@* |
2921 |
|
@emph{Return value:}@* |
2922 |
|
@* |
2923 |
|
1 if successful, 0 if error occured.@* |
2924 |
|
@* |
2925 |
|
@emph{Example:}@* |
2926 |
|
@* |
2927 |
|
@code{weechat.set_plugin_config ("my_var", "value");}@* |
2928 |
|
@* |
2929 |
|
|
2930 |
@end itemize |
@end itemize |
2931 |
|
|
2932 |
@subsection Ruby scripts |
@subsection Ruby scripts |