diff options
29 files changed, 506 insertions, 703 deletions
diff --git a/doc/weechat-curses.1 b/doc/weechat-curses.1 index b419ff949..0ad439c67 100644 --- a/doc/weechat-curses.1 +++ b/doc/weechat-curses.1 @@ -1,13 +1,12 @@ -.TH WEECHAT 1 "March 2008" "FlashCode" +.TH WEECHAT 1 "May 2008" "FlashCode" .SH NAME weechat-curses \- Wee Enhanced Environment for Chat (Curses version) .SH SYNOPSIS .B weechat-curses -.RI [ options... ] -or -.RI [ url... ] +.RI [ option... ] +.RI [ plugin:option... ] .br .SH DESCRIPTION @@ -24,26 +23,14 @@ It is compliant with IRC RFCs 1459, 2810, 2811, 2812, and 2813. .br disable auto-connect to servers at startup .TP -.B \-c, \-\-config -.br -display config file help (list of options) -.TP .B \-d, \-\-dir <dir> .br set WeeChat home dir .TP -.B \-f, \-\-key\-functions -.br -display internal functions for keys -.TP .B \-h, \-\-help .br display summary of options .TP -.B \-i, \-\-irc\-commands -.br -display IRC commands -.TP .B \-k, \-\-keys .br display default keys @@ -59,19 +46,15 @@ don't load any plugin at startup .B \-v, \-\-version .br display WeeChat version -.TP -.B \-w, \-\-weechat\-commands -.br -display WeeChat commands -.SH URL -WeeChat can use an URL (Uniform Resource Locator) to automatically connect -to an IRC server. These are in the following form: +.SH PLUGIN OPTIONS +Options for plugins depend on plugins, you can look at plugins documentation on WeeChat website for more information. .TP -.B irc[6][s]://[[nickname][:password]@]server[:port][/[#&+!]channel[,channel...]] +For example, with irc plugin, you can connect to temporary server with an url like: +.B irc[6][s]://[[nickname][:password]@]server[/port][//#channel1[,#channel2...]] .TP -Exemple to join WeeChat channel support with nick "MyNick": -irc://MyNick@irc.freenode.net/weechat +To join WeeChat IRC channel support with nick "MyNick": +irc://MyNick@irc.freenode.net//#weechat .SH FILES .TP @@ -102,11 +85,11 @@ Please read the COPYING file for more information. .SH BUGS Please report bugs or feature requests at Savannah website: .br -Bugs: +- Bugs: .UR http://savannah.nongnu.org/bugs/?group=weechat .br -Feature requests: +- Feature requests: .UR http://savannah.nongnu.org/task/?group=weechat @@ -116,8 +99,3 @@ WeeChat is written by FlashCode <flashcode@flashtux.org> Web: .UR http://weechat.flashtux.org/ -.br -Get support there: -.UR -http://weechat.flashtux.org/support.php -.UE @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -24,27 +24,25 @@ msgstr "" "Vyvíjí FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" -"Použití: %s [nastavení ...]\n" -" nebo: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/" -"channel][,channel[...]]" #, fuzzy msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" " -a, --no-connect vypne automatické připojení k serverům při startu\n" " -c, --config zobrazí nastavení konfiguračního souboru\n" @@ -60,16 +58,6 @@ msgstr "" " -w, --weechat-commands zobrazí příkazy WeeChat\n" #. TRANSLATORS: %s is "weechat" -#, fuzzy, c-format -msgid "%s configuration options:\n" -msgstr "nastaví konfigurační možnosti" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "%s vnitřní příkazy:\n" - -#. TRANSLATORS: %s is "weechat" #, c-format msgid "%s default keys:\n" msgstr "%s výchozí klávesy:\n" @@ -78,10 +66,6 @@ msgstr "%s výchozí klávesy:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "%s chybí argument pro volbu \"%s\"\n" -#, fuzzy, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "%s neznámý parametr '%s', ignorován\n" - #, fuzzy msgid "Error: unable to get HOME directory\n" msgstr "%s nemohu získat HOME adresář\n" @@ -2028,6 +2012,10 @@ msgid "%s%s: error opening file, closing it" msgstr "%s chyba při čtení FIFO roury, zavírám ji\n" #, fuzzy, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s nevalidní syntaxe pro IRC server ('%s'), ignorován\n" + +#, fuzzy, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s nemohu přidělit nový kanál" @@ -4577,6 +4565,31 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s chybí argument pro volbu \"%s\"\n" #, fuzzy +#~ msgid "" +#~ "Usage: %s [options ...]\n" +#~ " or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[/port][//" +#~ "#channel1][,#channel2[...]]" +#~ msgstr "" +#~ "Použití: %s [nastavení ...]\n" +#~ " nebo: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/" +#~ "channel][,channel[...]]" + +#, fuzzy +#~ msgid "%s%s: error retrieving user's name: %s" +#~ msgstr "%s nedostatek paměti pro infobar zprávu\n" + +#, fuzzy +#~ msgid "%s configuration options:\n" +#~ msgstr "nastaví konfigurační možnosti" + +#~ msgid "%s internal commands:\n" +#~ msgstr "%s vnitřní příkazy:\n" + +#, fuzzy +#~ msgid "Warning: unknown parameter '%s', ignored\n" +#~ msgstr "%s neznámý parametr '%s', ignorován\n" + +#, fuzzy #~ msgid "to" #~ msgstr "nahoře" @@ -6193,9 +6206,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n" #~ msgid "%s missing argument for --session option\n" #~ msgstr "%s chybí argument pro --session volbu\n" -#~ msgid "%s invalid syntax for IRC server ('%s'), ignored\n" -#~ msgstr "%s nevalidní syntaxe pro IRC server ('%s'), ignorován\n" - #~ msgid "%s unable to create server ('%s'), ignored\n" #~ msgstr "%s nemohu vytvořit server ('%s'), ignorován\n" @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -28,27 +28,25 @@ msgstr "" "Entwickelt von FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" -"Benutzung: %s [Optionen ...]\n" -" oder: %s [irc[6][s]://[Nickname[:Passwort]@]irc.example.org[:Port][/" -"Channel][,Channel[...]]" #, fuzzy msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" " -a, --no-connect deaktiviert das automatische Verbinden mit den " "Servern beim Starten\n" @@ -65,16 +63,6 @@ msgstr "" " -w, --weechat-commands zeigt die WeeChat-Befehle an\n" #. TRANSLATORS: %s is "weechat" -#, fuzzy, c-format -msgid "%s configuration options:\n" -msgstr "Konfigurationsparameter setzen" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "%s interne Befehle:\n" - -#. TRANSLATORS: %s is "weechat" #, c-format msgid "%s default keys:\n" msgstr "%s Standardtastenbelegungen:\n" @@ -83,10 +71,6 @@ msgstr "%s Standardtastenbelegungen:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" -#, fuzzy, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "%s unbekannter Parameter '%s', ignoriert\n" - #, fuzzy msgid "Error: unable to get HOME directory\n" msgstr "%s kann das HOME-Verzeichnis nicht ermitteln\n" @@ -2027,6 +2011,11 @@ msgstr "%s Fehler beim Lesen vom FIFO, FIFO wird geschlossen\n" msgid "%s%s: error opening file, closing it" msgstr "%s Fehler beim Lesen vom FIFO, FIFO wird geschlossen\n" +# ??? +#, fuzzy, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s ungültige Syntax für IRC-Server ('%s'), ignoriert\n" + #, fuzzy, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s Neuer Channel konnte nicht alloziert werden" @@ -4566,6 +4555,31 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #, fuzzy +#~ msgid "" +#~ "Usage: %s [options ...]\n" +#~ " or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[/port][//" +#~ "#channel1][,#channel2[...]]" +#~ msgstr "" +#~ "Benutzung: %s [Optionen ...]\n" +#~ " oder: %s [irc[6][s]://[Nickname[:Passwort]@]irc.example.org[:Port][/" +#~ "Channel][,Channel[...]]" + +#, fuzzy +#~ msgid "%s%s: error retrieving user's name: %s" +#~ msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n" + +#, fuzzy +#~ msgid "%s configuration options:\n" +#~ msgstr "Konfigurationsparameter setzen" + +#~ msgid "%s internal commands:\n" +#~ msgstr "%s interne Befehle:\n" + +#, fuzzy +#~ msgid "Warning: unknown parameter '%s', ignored\n" +#~ msgstr "%s unbekannter Parameter '%s', ignoriert\n" + +#, fuzzy #~ msgid "to" #~ msgstr "top" @@ -6204,10 +6218,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #~ msgid "%s missing argument for --session option\n" #~ msgstr "%s fehlende Argumente für den \"--session\"-Befehl\n" -# ??? -#~ msgid "%s invalid syntax for IRC server ('%s'), ignored\n" -#~ msgstr "%s ungültige Syntax für IRC-Server ('%s'), ignoriert\n" - #~ msgid "%s unable to create server ('%s'), ignored\n" #~ msgstr "%s Kann Server nicht anlegen ('%s'), ignoriert\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" "PO-Revision-Date: 2007-09-19 12:09+0200\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -24,27 +24,25 @@ msgstr "" "Desarrollado por FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" -"Uso: %s [opciones ...]\n" -" ó: %s [irc[6][s]://[usuario[:contraseña]@]irc.ejemplo.org[:puerto][/" -"channel]" #, fuzzy msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" " -a, --no-connect desactivar autoconexión a los servidores al " "inicio\n" @@ -62,16 +60,6 @@ msgstr "" " -w, --weechat-commands mostrar comandos de Weechat\n" #. TRANSLATORS: %s is "weechat" -#, fuzzy, c-format -msgid "%s configuration options:\n" -msgstr "poner opciones de configuración" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "Comandos internos %s :\n" - -#. TRANSLATORS: %s is "weechat" #, c-format msgid "%s default keys:\n" msgstr "%s claves por defecto:\n" @@ -80,10 +68,6 @@ msgstr "%s claves por defecto:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "%s falta un argumento para la opción --dir\n" -#, fuzzy, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "%s parámetro desconocido '%s', ignorado\n" - #, fuzzy msgid "Error: unable to get HOME directory\n" msgstr "%s no ha sido posible leer el directorio HOME\n" @@ -2008,6 +1992,10 @@ msgid "%s%s: error opening file, closing it" msgstr "%s error al leer la tuberÃa FIFO, cerrándola\n" #, fuzzy, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s sintaxis inválida para el servidor IRC ('%s'), ignorado\n" + +#, fuzzy, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s no ha sido posible crear un nuevo canal" @@ -4575,6 +4563,32 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" #, fuzzy +#~ msgid "" +#~ "Usage: %s [options ...]\n" +#~ " or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[/port][//" +#~ "#channel1][,#channel2[...]]" +#~ msgstr "" +#~ "Uso: %s [opciones ...]\n" +#~ " ó: %s [irc[6][s]://[usuario[:contraseña]@]irc.ejemplo.org[:puerto][/" +#~ "channel]" + +#, fuzzy +#~ msgid "%s%s: error retrieving user's name: %s" +#~ msgstr "" +#~ "No hay suficiente memoria para el mensaje de la barra de información\n" + +#, fuzzy +#~ msgid "%s configuration options:\n" +#~ msgstr "poner opciones de configuración" + +#~ msgid "%s internal commands:\n" +#~ msgstr "Comandos internos %s :\n" + +#, fuzzy +#~ msgid "Warning: unknown parameter '%s', ignored\n" +#~ msgstr "%s parámetro desconocido '%s', ignorado\n" + +#, fuzzy #~ msgid "to" #~ msgstr "operador" @@ -6214,9 +6228,6 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgid "%s missing argument for --session option\n" #~ msgstr "%s falta un argumento para la opción --session\n" -#~ msgid "%s invalid syntax for IRC server ('%s'), ignored\n" -#~ msgstr "%s sintaxis inválida para el servidor IRC ('%s'), ignorado\n" - #~ msgid "%s unable to create server ('%s'), ignored\n" #~ msgstr "%s no es posible crear el servidor ('%s'), ignorado\n" @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" -"PO-Revision-Date: 2008-05-15 17:17+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" +"PO-Revision-Date: 2008-05-15 22:10+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -24,48 +24,38 @@ msgstr "" "Développé par FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" -msgstr "" -"Utilisation: %s [options ...]\n" -" ou: %s [irc[6][s]://[pseudo[:mot_passe]@]irc.exemple.org[:port][/" -"canal][,canal[...]]" - -msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" -msgstr "" -" -a, --no-connect désactiver l'auto-connexion aux serveurs au " -"démarrage\n" -" -c, --config afficher les options du fichier de configuration\n" -" -d, --dir <rep> définir le répertoire de base pour WeeChat " -"(défaut: ~/.weechat)\n" -" -h, --help cette aide\n" -" -k, --keys afficher les touches WeeChat par défaut\n" -" -l, --license afficher la licence WeeChat\n" -" -p, --no-plugin ne charger aucune extension au démarrage\n" -" -v, --version afficher la version de WeeChat\n" -"\n" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s configuration options:\n" -msgstr "Options de configuration %s:\n" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "Commandes internes %s:\n" +msgid "Usage: %s [option...] [plugin:option...]\n" +msgstr "Utilisation: %s [option...] [extension:option...]\n" + +msgid "" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" +msgstr "" +" -a, --no-connect désactiver l'auto-connexion aux serveurs au démarrage\n" +" -d, --dir <rep> définir le répertoire de base pour WeeChat (défaut: ~/.weechat)\n" +" -h, --help cette aide\n" +" -k, --keys afficher les touches WeeChat par défaut\n" +" -l, --license afficher la licence WeeChat\n" +" -p, --no-plugin ne charger aucune extension au démarrage\n" +" -v, --version afficher la version de WeeChat\n" +" extension:option option pour une extension\n" +" par exemple, l'extension irc peut se connecter\n" +" à un serveur avec une url comme :\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[port][//#channel1][,#channel2[...]]\n" +" (consulter la documentation des extensions pour plus d'information\n" +" sur les options possibles)\n" #. TRANSLATORS: %s is "weechat" #, c-format @@ -76,10 +66,6 @@ msgstr "Touches par défaut %s:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "Erreur: paramètre manquant pour l'option \"%s\"\n" -#, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "Attention: paramètre inconnu '%s', ignoré\n" - msgid "Error: unable to get HOME directory\n" msgstr "Erreur: impossible de lire le répertoire personnel\n" @@ -1956,6 +1942,10 @@ msgid "%s%s: error opening file, closing it" msgstr "%s%s: erreur d'ouverture du fichier, fermeture" #, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s%s: syntaxe invalide pour le serveur IRC ('%s'), ignoré" + +#, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s%s: impossible d'allouer un nouveau canal" @@ -3789,7 +3779,10 @@ msgstr "%s%s: connexion refusée" msgid "" "%s%s: proxy fails to establish connection to server (check username/password " "if used and if IRC server address/port is allowed by proxy)" -msgstr "%s%s: le proxy n'a pas pu se connecter au serveur (vérifiez l'utilisateur/mot de passe si utilisés et si l'adresse/port du serveur IRC sont autorisés par le proxy)" +msgstr "" +"%s%s: le proxy n'a pas pu se connecter au serveur (vérifiez l'utilisateur/" +"mot de passe si utilisés et si l'adresse/port du serveur IRC sont autorisés " +"par le proxy)" #, c-format msgid "%s%s: unable to set local hostname/IP" @@ -4503,18 +4496,3 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket" #, c-format msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s" - -#~ msgid "to" -#~ msgstr "vers" - -#~ msgid "from" -#~ msgstr "de" - -#~ msgid "%sOption \"%s\" not found" -#~ msgstr "%sOption \"%s\" non trouvée" - -#~ msgid "Option reset" -#~ msgstr "Option réinitialisée" - -#~ msgid "background color for selected line" -#~ msgstr "couleur du fond pour la ligne sélectionnée" @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" "PO-Revision-Date: 2007-10-10 18:07+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -30,27 +30,25 @@ msgstr "" "Fejlesztő: FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" -"Használat: %s [opciók ...]\n" -" vagy: %s [irc[6][s]://[név[:jelszó]@]irc.példa.org[:port][/szoba][,szoba" -"[...]]" #, fuzzy msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" " -a, --no-connect automatikus csatlakozás a szerverekhez tiltása\n" " -c, --config beállítófájl opcióinak mutatása\n" @@ -66,16 +64,6 @@ msgstr "" " -w, --weechat-commands WeeChat parancsok mutatása\n" #. TRANSLATORS: %s is "weechat" -#, fuzzy, c-format -msgid "%s configuration options:\n" -msgstr "konfigurációs paraméterek beállítása" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "%s belső parancsok:\n" - -#. TRANSLATORS: %s is "weechat" #, c-format msgid "%s default keys:\n" msgstr "%s alapértelmezett billentyűk:\n" @@ -84,10 +72,6 @@ msgstr "%s alapértelmezett billentyűk:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" -#, fuzzy, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "%s ismeretlen paraméter: '%s', mellőzve\n" - #, fuzzy msgid "Error: unable to get HOME directory\n" msgstr "%s nem sikerült a HOME könyvtárat beállítani\n" @@ -2031,6 +2015,10 @@ msgid "%s%s: error opening file, closing it" msgstr "%s hiba a FIFO cső olvasása közben, bezárás\n" #, fuzzy, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s érvénytelen szintaxis az IRC szervernek ('%s'), mellőzve\n" + +#, fuzzy, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s nem sikerült új csatornát lefoglalni" @@ -4581,6 +4569,31 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy +#~ msgid "" +#~ "Usage: %s [options ...]\n" +#~ " or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[/port][//" +#~ "#channel1][,#channel2[...]]" +#~ msgstr "" +#~ "Használat: %s [opciók ...]\n" +#~ " vagy: %s [irc[6][s]://[név[:jelszó]@]irc.példa.org[:port][/szoba][," +#~ "szoba[...]]" + +#, fuzzy +#~ msgid "%s%s: error retrieving user's name: %s" +#~ msgstr "%s nincs elég memória az információs pult üzenethez\n" + +#, fuzzy +#~ msgid "%s configuration options:\n" +#~ msgstr "konfigurációs paraméterek beállítása" + +#~ msgid "%s internal commands:\n" +#~ msgstr "%s belső parancsok:\n" + +#, fuzzy +#~ msgid "Warning: unknown parameter '%s', ignored\n" +#~ msgstr "%s ismeretlen paraméter: '%s', mellőzve\n" + +#, fuzzy #~ msgid "to" #~ msgstr "legfelső" @@ -6191,9 +6204,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #~ msgid "%s missing argument for --session option\n" #~ msgstr "%s hiányzó argumentum a --session opciónak\n" -#~ msgid "%s invalid syntax for IRC server ('%s'), ignored\n" -#~ msgstr "%s érvénytelen szintaxis az IRC szervernek ('%s'), mellőzve\n" - #~ msgid "%s unable to create server ('%s'), ignored\n" #~ msgstr "%s nem sikerült a szervert ('%s') létrehozni, mellőzve\n" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+0200\n" "PO-Revision-Date: 2007-09-06 12:44+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -25,27 +25,25 @@ msgstr "" "Разработчик - FlashCode <flashcode@flashtux.org> - %s" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" -"Использование: %s [параметры ...]\n" -" или: %s [irc[6][s]://[ник[:пароль]@]irc.example.org[:порт][/канал]" -"[,канал[...]]" #, fuzzy msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" " -a, --no-connect не подключаться автоматически при запуске\n" " -c, --config отобразить параметры конфигурации\n" @@ -62,16 +60,6 @@ msgstr "" " -w, --weechat-commands отобразить команды WeeChat\n" #. TRANSLATORS: %s is "weechat" -#, fuzzy, c-format -msgid "%s configuration options:\n" -msgstr "настроить параметры конфигурации" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" -msgstr "Внутренние команды %s:\n" - -#. TRANSLATORS: %s is "weechat" #, c-format msgid "%s default keys:\n" msgstr "%s клавиши по умолчанию:\n" @@ -80,10 +68,6 @@ msgstr "%s клавиши по умолчанию:\n" msgid "Error: missing argument for \"%s\" option\n" msgstr "%s нет аргумента для параметра \"%s\"\n" -#, fuzzy, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "%s неизвестный параметр '%s', игнорируется\n" - #, fuzzy msgid "Error: unable to get HOME directory\n" msgstr "%s не могу получить домашний каталог\n" @@ -2038,6 +2022,10 @@ msgid "%s%s: error opening file, closing it" msgstr "%s ошибка чтения FIFO pipe, закрываю его\n" #, fuzzy, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "%s некорректный синтаксис IRC сервра ('%s'), игнорируется\n" + +#, fuzzy, c-format msgid "%s%s: cannot allocate new channel" msgstr "%s не могу расположить новый канал" @@ -4566,6 +4554,31 @@ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy +#~ msgid "" +#~ "Usage: %s [options ...]\n" +#~ " or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[/port][//" +#~ "#channel1][,#channel2[...]]" +#~ msgstr "" +#~ "Использование: %s [параметры ...]\n" +#~ " или: %s [irc[6][s]://[ник[:пароль]@]irc.example.org[:порт][/" +#~ "канал][,канал[...]]" + +#, fuzzy +#~ msgid "%s%s: error retrieving user's name: %s" +#~ msgstr "%s недостаточно памяти для сообщения в строке информации\n" + +#, fuzzy +#~ msgid "%s configuration options:\n" +#~ msgstr "настроить параметры конфигурации" + +#~ msgid "%s internal commands:\n" +#~ msgstr "Внутренние команды %s:\n" + +#, fuzzy +#~ msgid "Warning: unknown parameter '%s', ignored\n" +#~ msgstr "%s неизвестный параметр '%s', игнорируется\n" + +#, fuzzy #~ msgid "to" #~ msgstr "сверху" @@ -6196,9 +6209,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #~ msgid "%s missing argument for --session option\n" #~ msgstr "%s нет аргумента для параметра --session\n" -#~ msgid "%s invalid syntax for IRC server ('%s'), ignored\n" -#~ msgstr "%s некорректный синтаксис IRC сервра ('%s'), игнорируется\n" - #~ msgid "%s unable to create server ('%s'), ignored\n" #~ msgstr "%s не могу создать сервер ('%s'), игнорируется\n" diff --git a/po/weechat.pot b/po/weechat.pot index 98df6606a..4667eda26 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2008-05-15 17:16+0200\n" +"POT-Creation-Date: 2008-05-15 22:10+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" @@ -23,33 +23,24 @@ msgid "" msgstr "" #, c-format -msgid "" -"Usage: %s [options ...]\n" -" or: %s [irc[6][s]://[nickname[:password]@]irc.example.org[:port][/channel]" -"[,channel[...]]" +msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "" msgid "" -" -a, --no-connect disable auto-connect to servers at startup\n" -" -c, --config display config file options\n" -" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" -" -h, --help this help\n" -" -m, --commands display WeeChat commands\n" -" -k, --keys display WeeChat default keys\n" -" -l, --license display WeeChat license\n" -" -p, --no-plugin don't load any plugin at startup\n" -" -v, --version display WeeChat version\n" -"\n" -msgstr "" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s configuration options:\n" -msgstr "" - -#. TRANSLATORS: %s is "weechat" -#, c-format -msgid "%s internal commands:\n" +" -a, --no-connect disable auto-connect to servers at startup\n" +" -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" +" -h, --help this help\n" +" -k, --keys display WeeChat default keys\n" +" -l, --license display WeeChat license\n" +" -p, --no-plugin don't load any plugin at startup\n" +" -v, --version display WeeChat version\n" +" plugin:option option for plugin\n" +" for example, irc plugin can connect\n" +" to server with url like:\n" +" irc[6][s]://[nickname[:password]@]irc.example.org[/port]" +"[//#channel1][,#channel2[...]]\n" +" (look at plugins documentation for more information\n" +" about possible options)\n" msgstr "" #. TRANSLATORS: %s is "weechat" @@ -61,10 +52,6 @@ msgstr "" msgid "Error: missing argument for \"%s\" option\n" msgstr "" -#, c-format -msgid "Warning: unknown parameter '%s', ignored\n" -msgstr "" - msgid "Error: unable to get HOME directory\n" msgstr "" @@ -1695,6 +1682,10 @@ msgid "%s%s: error opening file, closing it" msgstr "" #, c-format +msgid "%s%s: invalid syntax for IRC server ('%s'), ignored" +msgstr "" + +#, c-format msgid "%s%s: cannot allocate new channel" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 24847f194..296a7935d 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -2231,7 +2231,7 @@ command_upgrade (void *data, struct t_gui_buffer *buffer, execvp (exec_args[0], exec_args);*/ /* this code should not be reached if execvp is ok */ - plugin_init (1); + plugin_init (1, 0, NULL); /*string_iconv_fprintf (stderr, _("Error: exec failed (program: \"%s\"), exiting WeeChat"), diff --git a/src/core/weechat.c b/src/core/weechat.c index f9c266897..44f622cad 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -75,7 +75,6 @@ char *weechat_home = NULL; /* home dir. (default: ~/.weechat) */ char *weechat_local_charset = NULL; /* example: ISO-8859-1, UTF-8 */ int weechat_server_cmd_line = 0; /* at least 1 server on cmd line */ int weechat_auto_load_plugins = 1; /* auto load plugins */ -int weechat_auto_connect = 1; /* auto connect in plugins */ /* @@ -93,54 +92,28 @@ weechat_display_usage (char *exec_name) PACKAGE_STRING, __DATE__, __TIME__, WEECHAT_WEBSITE); string_iconv_fprintf (stdout, "\n\n"); string_iconv_fprintf (stdout, - _("Usage: %s [options ...]\n" \ - " or: %s [irc[6][s]://[nickname[:password]@]" - "irc.example.org[:port][/channel][,channel[...]]"), + _("Usage: %s [option...] [plugin:option...]\n"), exec_name, exec_name); string_iconv_fprintf (stdout, "\n\n"); string_iconv_fprintf (stdout, - _(" -a, --no-connect disable auto-connect to servers at startup\n" - " -c, --config display config file options\n" - " -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" - " -h, --help this help\n" - " -m, --commands display WeeChat commands\n" - " -k, --keys display WeeChat default keys\n" - " -l, --license display WeeChat license\n" - " -p, --no-plugin don't load any plugin at startup\n" - " -v, --version display WeeChat version\n\n")); + _(" -a, --no-connect disable auto-connect to servers at startup\n" + " -d, --dir <path> set WeeChat home directory (default: ~/.weechat)\n" + " -h, --help this help\n" + " -k, --keys display WeeChat default keys\n" + " -l, --license display WeeChat license\n" + " -p, --no-plugin don't load any plugin at startup\n" + " -v, --version display WeeChat version\n" + " plugin:option option for plugin\n" + " for example, irc plugin can connect\n" + " to server with url like:\n" + " irc[6][s]://[nickname[:password]@]" + "irc.example.org[/port][//#channel1][,#channel2[...]]\n" + " (look at plugins documentation for more information\n" + " about possible options)\n")); string_iconv_fprintf(stdout, "\n"); } /* - * weechat_display_config_options: display config options - */ - -void -weechat_display_config_options () -{ - string_iconv_fprintf (stdout, - /* TRANSLATORS: %s is "weechat" */ - _("%s configuration options:\n"), - PACKAGE_NAME); - config_file_print_stdout (weechat_config_file); -} - -/* - * weechat_display_commands: display commands for one or more protocols - */ - -void -weechat_display_commands () -{ - string_iconv_fprintf (stdout, - /* TRANSLATORS: %s is "weechat" */ - _("%s internal commands:\n"), - PACKAGE_NAME); - string_iconv_fprintf (stdout, "\n"); - command_print_stdout (); -} - -/* * weechat_display_keys: display WeeChat default keys */ @@ -181,31 +154,10 @@ weechat_parse_args (int argc, char *argv[]) weechat_home = NULL; weechat_server_cmd_line = 0; weechat_auto_load_plugins = 1; - weechat_auto_connect = 1; for (i = 1; i < argc; i++) { - if ((strcmp (argv[i], "-a") == 0) - || (strcmp (argv[i], "--no-connect") == 0)) - weechat_auto_connect = 0; - else if ((strcmp (argv[i], "-c") == 0) - || (strcmp (argv[i], "--config") == 0)) - { - if (i + 1 < argc) - { - weechat_display_config_options (argv[i + 1]); - weechat_shutdown (EXIT_SUCCESS, 0); - } - else - { - string_iconv_fprintf (stderr, - _("Error: missing argument for \"%s\" " - "option\n"), - "--config"); - weechat_shutdown (EXIT_FAILURE, 0); - } - } - else if ((strcmp (argv[i], "-d") == 0) + if ((strcmp (argv[i], "-d") == 0) || (strcmp (argv[i], "--dir") == 0)) { if (i + 1 < argc) @@ -237,12 +189,6 @@ weechat_parse_args (int argc, char *argv[]) string_iconv_fprintf (stdout, "\n%s%s", WEECHAT_LICENSE); weechat_shutdown (EXIT_SUCCESS, 0); } - else if ((strcmp (argv[i], "-m") == 0) - || (strcmp (argv[i], "--commands") == 0)) - { - weechat_display_commands (); - weechat_shutdown (EXIT_SUCCESS, 0); - } else if ((strcmp (argv[i], "-p") == 0) || (strcmp (argv[i], "--no-plugin") == 0)) { @@ -267,40 +213,6 @@ weechat_parse_args (int argc, char *argv[]) string_iconv_fprintf (stdout, PACKAGE_VERSION "\n"); weechat_shutdown (EXIT_SUCCESS, 0); } - /*else if ((weechat_strncasecmp (argv[i], "irc", 3) == 0)) - { - if (irc_server_init_with_url (argv[i], &server_tmp) < 0) - { - string_iconv_fprintf (stderr, - _("Warning: invalid syntax for IRC server " - "('%s'), ignored\n"), - argv[i]); - } - else - { - if (!irc_server_new (server_tmp.name, server_tmp.autoconnect, - server_tmp.autoreconnect, - server_tmp.autoreconnect_delay, - 1, server_tmp.address, server_tmp.port, - server_tmp.ipv6, server_tmp.ssl, - server_tmp.password, server_tmp.nick1, - server_tmp.nick2, server_tmp.nick3, - NULL, NULL, NULL, NULL, 0, - server_tmp.autojoin, 1, NULL)) - string_iconv_fprintf (stderr, - _("Warning: unable to create server " - "('%s'), ignored\n"), - argv[i]); - irc_server_free_data (&server_tmp); - server_cmd_line = 1; - } - }*/ - else - { - string_iconv_fprintf (stderr, - _("Warning: unknown parameter '%s', ignored\n"), - argv[i]); - } } } @@ -486,8 +398,8 @@ main (int argc, char *argv[]) //session_load (weechat_session); /* load previous session if asked */ weechat_welcome_message (); /* display WeeChat welcome message */ command_startup (0); /* command executed before plugins */ - plugin_init (weechat_auto_load_plugins); /* init plugin interface(s) */ - weechat_auto_connect = 1; /* auto-connect for future plugins */ + plugin_init (weechat_auto_load_plugins, /* init plugin interface(s) */ + argc, argv); command_startup (1); /* command executed after plugins */ gui_main_loop (); /* WeeChat main loop */ diff --git a/src/core/weechat.h b/src/core/weechat.h index 4a29f308b..7608d407e 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -103,7 +103,6 @@ extern time_t weechat_start_time; extern int weechat_quit; extern char *weechat_home; extern char *weechat_local_charset; -extern int weechat_auto_connect; extern void weechat_dump (int crash); extern void weechat_shutdown (int return_code, int crash); diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index c64f28c49..724f3ed33 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -818,8 +818,12 @@ alias_completion_cb (void *data, char *completion, struct t_gui_buffer *buffer, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; if (!alias_config_init ()) diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index fc67b889a..1964844e5 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -513,8 +513,12 @@ charset_command_cb (void *data, struct t_gui_buffer *buffer, int argc, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; /* get terminal & internal charsets */ diff --git a/src/plugins/debug/debug.c b/src/plugins/debug/debug.c index 514b11fc0..fa154405e 100644 --- a/src/plugins/debug/debug.c +++ b/src/plugins/debug/debug.c @@ -86,8 +86,12 @@ debug_command_cb (void *data, struct t_gui_buffer *buffer, int argc, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; weechat_hook_command ("debug", diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c index 1f4b2609f..2206a13c5 100644 --- a/src/plugins/demo/demo.c +++ b/src/plugins/demo/demo.c @@ -402,8 +402,12 @@ demo_signal_cb (void *data, char *signal, char *type_data, void *signal_data) */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; weechat_hook_command ("demo_printf", diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index 5e92498ed..1317fc9b5 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -345,8 +345,12 @@ fifo_config_cb (void *data, char *option, char *value) */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; if (fifo_create ()) diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index ba9852c11..63270e728 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -26,7 +26,6 @@ #include <stdio.h> #include <stdarg.h> #include <string.h> -#include <pwd.h> #include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> @@ -374,23 +373,25 @@ irc_server_alloc (char *name) } /* - * irc_server_init_with_url: init a server with url of this form: - * irc://nick:pass@irc.toto.org:6667 - * returns: 0 = ok - * -1 = invalid syntax + * irc_server_alloc_with_url: init a server with url of this form: + * irc://nick:pass@irc.toto.org:6667 + * returns: 1 = ok + * 0 = error */ -/* int -irc_server_init_with_url (struct t_irc_server *server, char *irc_url) +irc_server_alloc_with_url (char *irc_url) { char *url, *pos_server, *pos_channel, *pos, *pos2; - int ipv6, ssl; - struct passwd *my_passwd; + char *password, *nick1, *nicks, *autojoin; + int ipv6, ssl, length; + struct t_irc_server *ptr_server; - irc_server_init (server); ipv6 = 0; ssl = 0; + password = NULL; + nick1 = NULL; + autojoin = NULL; if (weechat_strncasecmp (irc_url, "irc6://", 7) == 0) { pos = irc_url + 7; @@ -413,7 +414,7 @@ irc_server_init_with_url (struct t_irc_server *server, char *irc_url) pos = irc_url + 6; } else - return -1; + return 0; url = strdup (pos); pos_server = strchr (url, '@'); @@ -424,286 +425,79 @@ irc_server_init_with_url (struct t_irc_server *server, char *irc_url) if (!pos[0]) { free (url); - return -1; + return 0; } pos2 = strchr (url, ':'); if (pos2) { pos2[0] = '\0'; - server->password = strdup (pos2 + 1); + password = strdup (pos2 + 1); } - server->nick1 = strdup (url); + nick1 = strdup (url); } else - { - if ((my_passwd = getpwuid (geteuid ())) != NULL) - server->nick1 = strdup (my_passwd->pw_name); - else - { - weechat_printf (NULL, - _("%s%s: error retrieving user's name: %s"), - weechat_prefix ("error"), "irc", - strerror (errno)); - free (url); - return -1; - } pos_server = url; - } + if (!pos_server[0]) { free (url); - return -1; + return 0; } - pos_channel = strchr (pos_server, '/'); + pos_channel = strstr (pos_server, "//"); if (pos_channel) { pos_channel[0] = '\0'; - pos_channel++; + pos_channel += 2; } - pos = strchr (pos_server, ':'); - if (pos) - { - pos[0] = '\0'; - server->port = atoi (pos + 1); - } - server->name = strdup (pos_server); - server->address = strdup (pos_server); if (pos_channel && pos_channel[0]) { if (irc_channel_is_channel (pos_channel)) - server->autojoin = strdup (pos_channel); + autojoin = strdup (pos_channel); else { - server->autojoin = malloc (strlen (pos_channel) + 2); - strcpy (server->autojoin, "#"); - strcat (server->autojoin, pos_channel); + autojoin = malloc (strlen (pos_channel) + 2); + strcpy (autojoin, "#"); + strcat (autojoin, pos_channel); } } - free (url); - - server->ipv6 = ipv6; - server->ssl = ssl; - - // some default values - if (server->port < 0) - server->port = IRC_SERVER_DEFAULT_PORT; - server->nick2 = malloc (strlen (server->nick1) + 2); - strcpy (server->nick2, server->nick1); - server->nick2 = strcat (server->nick2, "1"); - server->nick3 = malloc (strlen (server->nick1) + 2); - strcpy (server->nick3, server->nick1); - server->nick3 = strcat (server->nick3, "2"); + ptr_server = irc_server_alloc (pos_server); - return 0; -} -*/ - -/* - * irc_server_init_with_config_options: init a server with config options - * (called when reading config file) - */ -/* -void -irc_server_init_with_config_options (struct t_irc_server *server, - struct t_config_section *section, - int config_reload) -{ - struct t_config_option *ptr_option; - struct t_irc_server *ptr_server; - - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_NAME); - if (!ptr_option) - { - irc_server_free (server); - return; - } - - if (config_reload) + if (ptr_server) { - for (ptr_server = irc_servers; ptr_server; - ptr_server = ptr_server->next_server) + irc_server_set_addresses (ptr_server, pos_server); + ptr_server->ipv6 = ipv6; + ptr_server->ssl = ssl; + + if (nick1) { - if ((ptr_server != server) - && (strcmp (ptr_server->name, - weechat_config_string (ptr_option)) == 0)) - break; + length = ((strlen (nick1) + 2) * 5) + 1; + nicks = malloc (length); + if (nicks) + { + snprintf (nicks, length, + "%s,%s1,%s2,%s3,%s4", + nick1, nick1, nick1, nick1, nick1); + irc_server_set_nicks (ptr_server, nicks); + free (nicks); + } } - if (ptr_server) - irc_server_free (server); - else - ptr_server = server; - } - else - ptr_server = server; - - // server internal name - if (ptr_server->name) - free (ptr_server->name); - ptr_server->name = strdup (weechat_config_string (ptr_option)); - - // auto-connect - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_AUTOCONNECT); - if (ptr_option) - ptr_server->autoconnect = weechat_config_integer (ptr_option); - - // auto-reconnect - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_AUTORECONNECT); - if (ptr_option) - ptr_server->autoreconnect = weechat_config_integer (ptr_option); - - // auto-reconnect delay - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_AUTORECONNECT_DELAY); - if (ptr_option) - ptr_server->autoreconnect_delay = weechat_config_integer (ptr_option); - - // addresses - if (ptr_server->addresses) - { - free (ptr_server->addresses); - ptr_server->addresses = NULL; - } - ptr_server->addresses_count = 0; - if (ptr_server->addresses_array) - { - weechat_string_free_exploded (ptr_server->addresses_array); - ptr_server->addresses_array = NULL; - } - if (ptr_server->ports_array) - { - free (ptr_server->ports_array); - ptr_server->ports_array = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_ADDRESSES); - if (ptr_option) - irc_server_set_addresses (ptr_server, weechat_config_string (ptr_option)); - - // ipv6 - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_IPV6); - if (ptr_option) - ptr_server->ipv6 = weechat_config_integer (ptr_option); - - // SSL - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_SSL); - if (ptr_option) - ptr_server->ssl = weechat_config_integer (ptr_option); - - // password - if (ptr_server->password) - { - free (ptr_server->password); - ptr_server->password = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_PASSWORD); - if (ptr_option) - ptr_server->password = strdup (weechat_config_string (ptr_option)); - - // nicks - if (ptr_server->nicks) - { - free (ptr_server->nicks); - ptr_server->nicks = NULL; - } - ptr_server->nicks_count = 0; - if (ptr_server->nicks_array) - { - weechat_string_free_exploded (ptr_server->nicks_array); - ptr_server->nicks_array = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_NICKS); - if (ptr_option) - irc_server_set_nicks (ptr_server, weechat_config_string (ptr_option)); - - // username - if (ptr_server->username) - { - free (ptr_server->username); - ptr_server->username = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_USERNAME); - if (ptr_option) - ptr_server->username = strdup (weechat_config_string (ptr_option)); - - // realname - if (ptr_server->realname) - { - free (ptr_server->realname); - ptr_server->realname = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_REALNAME); - if (ptr_option) - ptr_server->realname = strdup (weechat_config_string (ptr_option)); - - // hostname - if (ptr_server->hostname) - { - free (ptr_server->hostname); - ptr_server->hostname = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_HOSTNAME); - if (ptr_option) - ptr_server->hostname = strdup (weechat_config_string (ptr_option)); - - // command - if (ptr_server->command) - { - free (ptr_server->command); - ptr_server->command = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_COMMAND); - if (ptr_option) - ptr_server->command = strdup (weechat_config_string (ptr_option)); - - // command delay - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_COMMAND_DELAY); - if (ptr_option) - ptr_server->command_delay = weechat_config_integer (ptr_option); - - // auto-join - if (ptr_server->autojoin) - { - free (ptr_server->autojoin); - ptr_server->autojoin = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_AUTOJOIN); - if (ptr_option) - ptr_server->autojoin = strdup (weechat_config_string (ptr_option)); - - // auto-rejoin - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_AUTOREJOIN); - if (ptr_option) - ptr_server->autorejoin = weechat_config_integer (ptr_option); - - // notify_levels - if (ptr_server->notify_levels) - { - free (ptr_server->notify_levels); - ptr_server->notify_levels = NULL; - } - ptr_option = weechat_config_search_option (NULL, section, - IRC_CONFIG_SERVER_NOTIFY_LEVELS); - if (ptr_option) - ptr_server->notify_levels = strdup (weechat_config_string (ptr_option)); + ptr_server->password = (password) ? strdup (password) : NULL; + ptr_server->autojoin = (autojoin) ? strdup (autojoin) : NULL; + ptr_server->temp_server = 1; + ptr_server->autoconnect = 1; + } + + if (password) + free (password); + if (nick1) + free (nick1); + if (autojoin) + free (autojoin); + free (url); - ptr_server->reloaded_from_config = 1; + return (ptr_server) ? 1 : 0; } -*/ /* * irc_server_outqueue_add: add a message in out queue diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index c1903d903..b63c18526 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -146,11 +146,7 @@ extern void irc_server_set_with_option (struct t_irc_server *server, struct t_config_option *option); extern void irc_server_init (struct t_irc_server *server); extern struct t_irc_server *irc_server_alloc (char *name); - -/*extern void irc_server_init_with_config_options (struct t_irc_server *server, - struct t_config_section *section, - int config_reload); -*/ +extern int irc_server_alloc_with_url (char *irc_url); extern struct t_irc_server *irc_server_new (char *name, int autoconnect, int autoreconnect, int autoreconnect_delay, diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index b850cceb4..c07e5ce1d 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -83,9 +83,9 @@ irc_signal_quit_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { - char *auto_connect; + int i, auto_connect; weechat_plugin = plugin; @@ -113,10 +113,30 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) /* hook completions */ irc_completion_init (); - - auto_connect = weechat_info_get ("auto_connect"); - irc_server_auto_connect ((auto_connect && (strcmp (auto_connect, "1") == 0)) ? 1 : 0, - 0); + + /* look at arguments */ + auto_connect = 1; + for (i = 0; i < argc; i++) + { + if ((weechat_strcasecmp (argv[i], "-a") == 0) + || (weechat_strcasecmp (argv[i], "--no-connect") == 0)) + { + auto_connect = 0; + } + else if ((weechat_strncasecmp (argv[i], "irc", 3) == 0)) + { + if (!irc_server_alloc_with_url (argv[i])) + { + weechat_printf (NULL, + _("%s%s: invalid syntax for IRC server " + "('%s'), ignored"), + weechat_prefix ("error"), "irc", + argv[i]); + } + } + } + + irc_server_auto_connect (auto_connect, 0); irc_hook_timer = weechat_hook_timer (1 * 1000, 0, 0, &irc_server_timer_cb, NULL); diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index add0c81a3..b73aad733 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -678,8 +678,12 @@ logger_config_cb (void *data, char *option, char *value) */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; if (!logger_config_read ()) diff --git a/src/plugins/plugin-api.c b/src/plugins/plugin-api.c index 967e75478..a24f16937 100644 --- a/src/plugins/plugin-api.c +++ b/src/plugins/plugin-api.c @@ -459,11 +459,6 @@ plugin_api_info_get (struct t_weechat_plugin *plugin, char *info) snprintf (value, sizeof (value), "%d", gui_filters_enabled); return value; } - else if (string_strcasecmp (info, "auto_connect") == 0) - { - snprintf (value, sizeof (value), "%d", weechat_auto_connect); - return value; - } /* info not found */ return NULL; diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index fd26a3347..250c0481f 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -56,6 +56,9 @@ struct t_weechat_plugin *weechat_plugins = NULL; struct t_weechat_plugin *last_weechat_plugin = NULL; +int plugin_argc; /* command line arguments (used only */ +char **plugin_argv; /* first time loading plugin) */ + /* * plugin_search: search a plugin by name @@ -90,7 +93,8 @@ plugin_load (char *filename) char *name, *author, *description, *version, *weechat_version, *license; char *charset; t_weechat_init_func *init_func; - int rc; + int rc, i, argc; + char **argv; struct t_weechat_plugin *new_plugin; if (!filename) @@ -427,9 +431,42 @@ plugin_load (char *filename) else weechat_plugins = new_plugin; last_weechat_plugin = new_plugin; + + /* build arguments for plugin */ + argc = 0; + argv = NULL; + if (plugin_argc > 0) + { + argv = malloc ((plugin_argc + 1) * sizeof (*argv)); + if (argv) + { + argc = 0; + for (i = 0; i < plugin_argc; i++) + { + if ((string_strcasecmp (plugin_argv[i], "-a") == 0) + || (string_strcasecmp (plugin_argv[i], "--no-connect") == 0) + || (string_strncasecmp (plugin_argv[i], name, strlen (name)) == 0)) + { + argv[argc] = plugin_argv[i]; + argc++; + } + } + if (argc == 0) + { + free (argv); + argv = NULL; + } + else + argv[argc] = NULL; + } + } /* init plugin */ - rc = ((t_weechat_init_func *)init_func) (new_plugin); + rc = ((t_weechat_init_func *)init_func) (new_plugin, argc, argv); + + if (argv) + free (argv); + if (rc != WEECHAT_RC_OK) { gui_chat_printf (NULL, @@ -735,8 +772,11 @@ plugin_reload_name (char *name) */ void -plugin_init (int auto_load) +plugin_init (int auto_load, int argc, char *argv[]) { + plugin_argc = argc; + plugin_argv = argv; + /* read plugins options on disk */ plugin_config_init (); plugin_config_read (); @@ -744,6 +784,10 @@ plugin_init (int auto_load) /* auto-load plugins if asked */ if (auto_load) plugin_auto_load (); + + /* discard command arguments for future plugins */ + plugin_argc = 0; + plugin_argv = NULL; } /* diff --git a/src/plugins/plugin.h b/src/plugins/plugin.h index ca2d3e3a2..1d05abe98 100644 --- a/src/plugins/plugin.h +++ b/src/plugins/plugin.h @@ -22,7 +22,8 @@ #include "weechat-plugin.h" -typedef int (t_weechat_init_func) (struct t_weechat_plugin *plugin); +typedef int (t_weechat_init_func) (struct t_weechat_plugin *plugin, + int argc, char *argv[]); typedef int (t_weechat_end_func) (struct t_weechat_plugin *plugin); extern struct t_weechat_plugin *weechat_plugins; @@ -38,7 +39,7 @@ extern void plugin_unload (struct t_weechat_plugin *plugin); extern void plugin_unload_name (char *name); extern void plugin_unload_all (); extern void plugin_reload_name (char *name); -extern void plugin_init (int auto_load); +extern void plugin_init (int auto_load, int argc, char *argv[]); extern void plugin_end (); extern void plugin_print_log (); diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c index 2aa388710..f6ca6a6e9 100644 --- a/src/plugins/scripts/lua/weechat-lua.c +++ b/src/plugins/scripts/lua/weechat-lua.c @@ -470,8 +470,11 @@ weechat_lua_buffer_closed_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; weechat_lua_plugin = plugin; diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c index 638c8ef69..ec65da636 100644 --- a/src/plugins/scripts/perl/weechat-perl.c +++ b/src/plugins/scripts/perl/weechat-perl.c @@ -611,12 +611,16 @@ weechat_perl_buffer_closed_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { #ifndef MULTIPLICITY char *perl_args[] = { "", "-e", "0" }; #endif + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_perl_plugin = plugin; #ifndef MULTIPLICITY diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 32b46f581..c593aa102 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -644,8 +644,12 @@ weechat_python_buffer_closed_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_python_plugin = plugin; /* init stdout/stderr buffer */ diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c index 7e920c612..190aab498 100644 --- a/src/plugins/scripts/ruby/weechat-ruby.c +++ b/src/plugins/scripts/ruby/weechat-ruby.c @@ -646,7 +646,7 @@ weechat_ruby_buffer_closed_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { int ruby_error; char *weechat_ruby_code = @@ -692,6 +692,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin) "end\n" }; + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_ruby_plugin = plugin; ruby_error = 0; diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 0bcf417fc..8d49971a7 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -426,7 +426,8 @@ struct t_weechat_plugin /* WeeChat developers: ALWAYS add new functions at the end */ }; -extern int weechat_plugin_init (struct t_weechat_plugin *plugin); +extern int weechat_plugin_init (struct t_weechat_plugin *plugin, + int argc, char *argv[]); extern int weechat_plugin_end (struct t_weechat_plugin *plugin); /* macros for easy call to plugin API */ diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 4d07d0830..a6d558773 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1194,8 +1194,12 @@ xfer_debug_dump_cb (void *data, char *signal, char *type_data, */ int -weechat_plugin_init (struct t_weechat_plugin *plugin) +weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + /* make C compiler happy */ + (void) argc; + (void) argv; + weechat_plugin = plugin; if (!xfer_config_init ()) |