/[weechat]/weechat/doc/weechat_doc_es.texi
ViewVC logotype

Diff of /weechat/doc/weechat_doc_es.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by flashcode, Sat May 21 07:04:11 2005 UTC revision 1.9 by kolter, Sun Jun 5 12:55:58 2005 UTC
# Line 1445  Listar los programas Python cargados: @k Line 1445  Listar los programas Python cargados: @k
1445    
1446  @itemize @bullet  @itemize @bullet
1447  @item  @item
1448  @command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on );}@*  @command{weechat.register ( nombre, versi@'on, funci@'on_final, descripci@'on )}@*
1449  @*  @*
1450  Es la primera funci@'on a la que llamar en el programa Python.@*  Es la primera funci@'on a la que llamar en el programa Python.@*
1451  Todos los programas en Python para WeeChat deben llamar esta funci@'on.@*  Todos los programas en Python para WeeChat deben llamar esta funci@'on.@*
# Line 1461  tener un nombre distinto) Line 1461  tener un nombre distinto)
1461  @end itemize  @end itemize
1462  @*  @*
1463  @emph{Ejemplo:}@*  @emph{Ejemplo:}@*
1464  @code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...");}@*  @code{weechat.register ("ejemplo", "1.0", "fin_ejemplo", "programa de ejemplo...")}@*
1465  @*  @*
1466    
1467  @item  @item
1468  @command{weechat.prnt ( mensaje, [canal, [servidor]] );}@*  @command{weechat.prnt ( mensaje, [canal, [servidor]] )}@*
1469  @*  @*
1470  Escribe un mensaje en un canal.@*  Escribe un mensaje en un canal.@*
1471    
# Line 1477  Escribe un mensaje en un canal.@* Line 1477  Escribe un mensaje en un canal.@*
1477  @end itemize  @end itemize
1478  @*  @*
1479  @emph{Ejemplo:}@*  @emph{Ejemplo:}@*
1480  @code{weechat.prnt ("mensaje");}@*  @code{weechat.prnt ("mensaje")}@*
1481  @code{weechat.prnt ("mensaje", "#weechat");}@*  @code{weechat.prnt ("mensaje", "#weechat")}@*
1482  @code{weechat.prnt ("mensaje", "#weechat", "freenode");}@*  @code{weechat.prnt ("mensaje", "#weechat", "freenode")}@*
1483  @*  @*
1484    
1485  @item  @item
1486  @command{weechat.print_infobar ( retraso, mensaje );}@*  @command{weechat.print_infobar ( retraso, mensaje )}@*
1487  @*  @*
1488  Escribir un mensaje en la barra de informaciones.@*  Escribir un mensaje en la barra de informaciones.@*
1489    
1490  @emph{Par@'ametros:}  @emph{Par@'ametros:}
1491  @itemize @minus  @itemize @minus
1492  @item @option{plazo}: periodo en segundo durante el cual se mostrar@'a el mensaje  @item @option{retraso}: periodo en segundo durante el cual se mostrar@'a el mensaje
1493  (si es 0, el mensaje no se borrar@'a).  (si es 0, el mensaje no se borrar@'a).
1494  @item @option{message}: mensaje que se escribir@'a en la barra de informaciones.  @item @option{mensaje}: mensaje que se escribir@'a en la barra de informaciones.
1495  @end itemize  @end itemize
1496  @*  @*
1497  @emph{Ejemplo:}@*  @emph{Ejemplo:}@*
1498  @code{weechat.print_infobar (5, "mensaje");}@*  @code{weechat.print_infobar (5, "mensaje")}@*
1499  @*  @*
1500    
1501  @item  @item
1502  @command{weechat.add_message_handler ( nombre, funci@'on );}@*  @command{weechat.add_message_handler ( nombre, funci@'on )}@*
1503  @*  @*
1504  Adjunta una funci@'on Python a un mensaje IRC.@*  Adjunta una funci@'on Python a un mensaje IRC.@*
1505  Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@*  Se llamar@'a a la funci@'on cada vez que el mensaje IRC se reciba.@*
# Line 1515  RFC 2812: @uref{ftp://ftp.rfc-editor.org Line 1515  RFC 2812: @uref{ftp://ftp.rfc-editor.org
1515  @end itemize  @end itemize
1516  @*  @*
1517  @emph{Ejemplo:}@*  @emph{Ejemplo:}@*
1518  @code{weechat.add_message_handler ("privmsg", mi_funcion);}@*  @code{weechat.add_message_handler ("privmsg", mi_funcion)}@*
1519  @code{sub mi_funcion}@*  @code{def mi_funcion(servidor, args):}@*
1520  @code{@{ }@*  @code{@ @ @ @ weechat.prnt("servidor="+servidor)}@*
1521  @code{@ @ @ @ weechat.prnt ("serveur=$_[0]\n");}@*  @code{@ @ @ @ null, canal, mensaje = string.split(args, ":", 2)}@*
1522  @code{@ @ @ @ ($null, $canal, $mensaje) = split ":",$_[1],3;}@*  @code{@ @ @ @ mascara, null, canal = string.split(string.strip(canal), " ", 2)}@*
1523  @code{@ @ @ @ ($mascara, $null, $canal) = split " ", $canal;}@*  @code{@ @ @ @ weechat.prnt("mascara="+mascara+", canal="+canal+", mensaje="+mensaje)}@*
 @code{@ @ @ @ weechat.prnt ("mascara=$mascara, canal=$canal, mensaje=$mensaje\n");}@*  
 @code{@} }@*  
1524  @*  @*
1525    
1526  @item  @item
1527  @command{weechat.add_command_handler ( nombre, funci@'on );}@*  @command{weechat.add_command_handler ( nombre, funci@'on )}@*
1528  @*  @*
1529  A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Python.@*  A@~nadir un nuevo comando WeeChat, con un enlace a una funci@'on en Python.@*
1530  Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@*  Se llamar@'a a la funci@'on cuando el usuario lance el comando con @kbd{/nombre}.@*
# Line 1541  al antiguo comando si el script Python e Line 1539  al antiguo comando si el script Python e
1539  @end itemize  @end itemize
1540  @*  @*
1541  @emph{Ejemplo:}@*  @emph{Ejemplo:}@*
1542  @code{weechat.add_command_handler ("comando", mi_comando);}@*  @code{weechat.add_command_handler ("comando", mi_comando)}@*
1543  @code{sub mi_comando}@*  @code{def mi_comando(servidor, args):}@*
1544  @code{@{ }@*  @code{@ @ @ @ weechat.prnt("Servidor:"+servidor+" Par@'ametros:"+args)}@*
 @code{@ @ @ @ weechat.prnt("Servidor: $_[0], Par@'ametros: $_[1]\n");}@*  
 @code{@ @ @ @ return 0;}@*  
 @code{@} }@*  
1545  @*  @*
1546    
1547  @item  @item
1548  @command{weechat.command ( command, [channel, [server]] );}@*  @command{weechat.command ( command, [channel, [server]] )}@*
1549  @*  @*
1550  Execute a command or send a message to a channel.@*  Execute a command or send a message to a channel.@*
1551    
# Line 1562  Execute a command or send a message to a Line 1557  Execute a command or send a message to a
1557  @end itemize  @end itemize
1558  @*  @*
1559  @emph{Examples:}@*  @emph{Examples:}@*
1560  @code{weechat.command ("hello world!");}@*  @code{weechat.command ("hello world!")}@*
1561  @code{weechat.command ("/kick toto please leave this chan", "#weechat");}@*  @code{weechat.command ("/kick toto please leave this chan", "#weechat")}@*
1562  @code{weechat.command ("/nick newnick", "", "freenode");}@*  @code{weechat.command ("/nick newnick", "", "freenode")}@*
1563  @*  @*
1564    
1565  @item  @item
1566  @command{weechat.get_info ( nombre, [servidor] );}@*  @command{weechat.get_info ( nombre, [servidor] )}@*
1567  @*  @*
1568  Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*  Obtener informaciones distintas sobre WeeChat, el servidor o el usuario.@*
1569    
# Line 1587  Obtener informaciones distintas sobre We Line 1582  Obtener informaciones distintas sobre We
1582  @end itemize  @end itemize
1583  @*  @*
1584  @emph{Ejemplos:}@*  @emph{Ejemplos:}@*
1585  @code{$version = weechat.get_info("version");}@*  @code{$version = weechat.get_info("version")}@*
1586  @code{$nick = weechat.get_info("nick", "freenode");}@*  @code{$nick = weechat.get_info("nick", "freenode")}@*
1587  @*  @*
1588    
1589  @end itemize  @end itemize

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26