diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-11-04 12:47:01 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-11-04 12:47:01 +0100 |
commit | 8503857d28a41e42e0d232a508b1534827c7e737 (patch) | |
tree | 0eb9030ef40b146214b5c991609d7244c5c9a6dc | |
parent | abd95bf1b189c571a618bb0331deb4e6772b1d03 (diff) | |
download | weechat-8503857d28a41e42e0d232a508b1534827c7e737.zip |
irc: allow URL "irc://" in command /connect
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/de/autogen/user/irc_commands.txt | 26 | ||||
-rw-r--r-- | doc/en/autogen/user/irc_commands.txt | 10 | ||||
-rw-r--r-- | doc/fr/autogen/user/irc_commands.txt | 10 | ||||
-rw-r--r-- | doc/it/autogen/user/irc_commands.txt | 26 | ||||
-rw-r--r-- | po/cs.po | 21 | ||||
-rw-r--r-- | po/de.po | 21 | ||||
-rw-r--r-- | po/es.po | 21 | ||||
-rw-r--r-- | po/fr.po | 37 | ||||
-rw-r--r-- | po/hu.po | 19 | ||||
-rw-r--r-- | po/it.po | 21 | ||||
-rw-r--r-- | po/pl.po | 21 | ||||
-rw-r--r-- | po/pt_BR.po | 19 | ||||
-rw-r--r-- | po/ru.po | 19 | ||||
-rw-r--r-- | po/weechat.pot | 19 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 74 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.c | 15 | ||||
-rw-r--r-- | src/plugins/irc/irc-server.h | 2 |
18 files changed, 228 insertions, 156 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.7-dev, 2011-11-01 +v0.3.7-dev, 2011-11-04 Version 0.3.7 (under dev!) @@ -17,6 +17,7 @@ Version 0.3.7 (under dev!) * core: fix compilation error with "pid_t" on Mac OS X (bug #34639) * core: enable background process under Cygwin to connect to servers, fix reconnection problem (bug #34626) +* irc: allow URL "irc://" in command /connect * irc: auto-connect to servers created with "irc://" on command line but not other servers if "-a" ("--no-connect") is given * guile: new script plugin for scheme (task #7289) diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt index 21b64c3d7..82343a2b0 100644 --- a/doc/de/autogen/user/irc_commands.txt +++ b/doc/de/autogen/user/irc_commands.txt @@ -55,25 +55,27 @@ Ohne Angabe von Argumenten wird die Ban-Liste für den aktuellen Channel angezei [[command_irc_connect]] [command]*`connect`* Mit IRC-Server(n) verbinden:: ........................................ -/connect [<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] +/connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-open [-nojoin] [-switch] - server: intern genutzter Servername mit dem verbunden werden soll (Der Server muss zuerst mittels "/server add" angelegt werden) - hostname: Hostname oder IP eines Servers (damit erstelt man ausschließlich einen TEMPORÄREN Server) - port: Port den der Server nutzen soll (Standardport: 6667) - option: legt die Optionen für den Server fest (die Boolean-Optionen können weggelassen werden) - nooption: stellt die Boolean Option auf "off" (Beispiel: -nossl) - -all: Verbindet mit allen Servern - -open: stellt eine Verbindung zu allen geöffneten Servern her zu denen es aktuell keine Verbindung gibt - -nojoin: Channel(s) werden nicht betreten (auch falls die Funktion "autojoin" aktiviert sein sollte) - -switch: wechselt zur nächsten Server-Adresse - -Beispiele: + server: server name, which can be: + - internal server name (created by /server add, recommended usage) + - hostname/port or IP/port (this will create a TEMPORARY server), port is 6667 by default + - URL with format: irc[6][s]://[nickname[:password]@]irc.example.org[:port][/#channel1][,#channel2[...]] + option: set option for server (for boolean option, value can be omitted) + nooption: set boolean option to 'off' (for example: -nossl) + -all: connect to all servers defined in configuration + -open: connect to all opened servers that are not currently connected + -nojoin: do not join any channel (even if autojoin is enabled on server) + -switch: switch to next server address + +Examples: /connect freenode /connect irc.oftc.net/6667 /connect irc6.oftc.net/6667 -ipv6 /connect irc6.oftc.net/6697 -ipv6 -ssl /connect my.server.org/6697 -ssl -password=test + /connect irc://nick@irc.oftc.net/#channel /connect -switch ........................................ diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt index fdf9dc841..42316c583 100644 --- a/doc/en/autogen/user/irc_commands.txt +++ b/doc/en/autogen/user/irc_commands.txt @@ -55,12 +55,13 @@ Without argument, this command display ban list for current channel. [[command_irc_connect]] [command]*`connect`* connect to IRC server(s):: ........................................ -/connect [<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] +/connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-open [-nojoin] [-switch] - server: internal server name to connect (server must have been created by /server add) - hostname: hostname (or IP) of a server (this will create a TEMPORARY server) - port: port for server (6667 by default) + server: server name, which can be: + - internal server name (created by /server add, recommended usage) + - hostname/port or IP/port (this will create a TEMPORARY server), port is 6667 by default + - URL with format: irc[6][s]://[nickname[:password]@]irc.example.org[:port][/#channel1][,#channel2[...]] option: set option for server (for boolean option, value can be omitted) nooption: set boolean option to 'off' (for example: -nossl) -all: connect to all servers defined in configuration @@ -74,6 +75,7 @@ Examples: /connect irc6.oftc.net/6667 -ipv6 /connect irc6.oftc.net/6697 -ipv6 -ssl /connect my.server.org/6697 -ssl -password=test + /connect irc://nick@irc.oftc.net/#channel /connect -switch ........................................ diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt index 6bb17a250..4ba53ace9 100644 --- a/doc/fr/autogen/user/irc_commands.txt +++ b/doc/fr/autogen/user/irc_commands.txt @@ -55,12 +55,13 @@ Sans paramètre, cette commande affiche la liste des bans pour le canal courant. [[command_irc_connect]] [command]*`connect`* se connecter à un/plusieurs serveur(s) IRC:: ........................................ -/connect [<serveur> [<serveur>...] | <nom>[/<port>]] [-<option>[=<valeur>]] [-no<option>] [-nojoin] [-switch] +/connect [<serveur> [<serveur>...] [-<option>[=<valeur>]] [-no<option>] [-nojoin] [-switch] -all|-open [-nojoin] [-switch] - serveur: nom du serveur interne pour se connecter (le serveur doit avoir été créé par /server add) - nom: nom (ou adresse IP) d'un serveur (ceci crééra un serveur TEMPORAIRE) - port: port pour le serveur (6667 par défaut) + serveur: nom du serveur, qui peut être : + - nom interne de serveur (créé par /server add, usage recommandé) + - nom/port ou IP/port (ceci crééra un serveur TEMPORAIRE), le port par défaut est 6667 + - URL avec le format: irc[6][s]://[pseudo[:mot_passe]@]irc.example.org[:port][/#canal1][,#canal2[...]] option: définir l'option pour le serveur (pour une option booléenne, la valeur peut être omise) nooption: définir l'option booléenne à 'off' (par exemple: -nossl) -all: se connecter à tous les serveurs définis dans la configuration @@ -74,6 +75,7 @@ Exemples: /connect irc6.oftc.net/6667 -ipv6 /connect irc6.oftc.net/6697 -ipv6 -ssl /connect my.server.org/6697 -ssl -password=test + /connect irc://nick@irc.oftc.net/#channel /connect -switch ........................................ diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt index c33411835..3c48b550d 100644 --- a/doc/it/autogen/user/irc_commands.txt +++ b/doc/it/autogen/user/irc_commands.txt @@ -55,25 +55,27 @@ Senza argomento, il comando mostra la lista dei ban per il canale corrente. [[command_irc_connect]] [command]*`connect`* connette ad uno o più server IRC:: ........................................ -/connect [<server> [<server>...] | <hostname>[/<porta>]] [-<opzione>[=<valore>]] [-no<opzione>] [-nojoin] [-switch] +/connect <server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch] -all|-open [-nojoin] [-switch] - server: nome interno del server a cui connettersi (il server deve essere stato creato con /server add) - hostname: nome host (o IP) di un server (in questo modo viene creato un server TEMPORANEO) - porta: porta per il server (6667 è la predefinita) - opzione: imposta opzione per il server (per un'opzione bool, il valore può essere omesso) - nooption: imposta un'opzione bool su 'off' (ad esempio: -nossl) - -all: connette a tutti i server definiti nella configurazione - -open: connette a tutti i server aperti a cui non si è connessi - -nojoin: non entra su nessun canale (anche se l'ingresso automatico è attivo sul server) - -switch: passa all'indirizzo successivo del server - -Esempi: + server: server name, which can be: + - internal server name (created by /server add, recommended usage) + - hostname/port or IP/port (this will create a TEMPORARY server), port is 6667 by default + - URL with format: irc[6][s]://[nickname[:password]@]irc.example.org[:port][/#channel1][,#channel2[...]] + option: set option for server (for boolean option, value can be omitted) + nooption: set boolean option to 'off' (for example: -nossl) + -all: connect to all servers defined in configuration + -open: connect to all opened servers that are not currently connected + -nojoin: do not join any channel (even if autojoin is enabled on server) + -switch: switch to next server address + +Examples: /connect freenode /connect irc.oftc.net/6667 /connect irc6.oftc.net/6667 -ipv6 /connect irc6.oftc.net/6697 -ipv6 -ssl /connect my.server.org/6697 -ssl -password=test + /connect irc://nick@irc.oftc.net/#channel /connect -switch ........................................ @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4172,19 +4172,23 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "připojit se k IRC serveru/serverům" +#, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" "no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4199,6 +4203,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " server: vnitřní jméno serveru pro přípojení (server musí být vytvořen " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4489,19 +4489,23 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "Mit IRC-Server(n) verbinden" +#, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" "no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4516,6 +4520,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " server: intern genutzter Servername mit dem verbunden werden soll (Der " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4348,19 +4348,23 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "conectar a un servidor IRC" +#, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[<servidor> [<servidor>...] | <hostname>[/<puerto>]] [-<opción>[=<valor>]] [-" "no<opción>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4375,6 +4379,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" "servidor: nombre interno del servidor a conectar (debe haber sido creado " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" -"PO-Revision-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" +"PO-Revision-Date: 2011-11-04 12:42+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -4388,18 +4388,20 @@ msgid "connect to IRC server(s)" msgstr "se connecter à un/plusieurs serveur(s) IRC" msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" -"[<serveur> [<serveur>...] | <nom>[/<port>]] [-<option>[=<valeur>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"[<serveur> [<serveur>...] [-<option>[=<valeur>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4414,13 +4416,15 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" -" serveur: nom du serveur interne pour se connecter (le serveur doit avoir " -"été créé par /server add)\n" -" nom: nom (ou adresse IP) d'un serveur (ceci crééra un serveur " -"TEMPORAIRE)\n" -" port: port pour le serveur (6667 par défaut)\n" +" serveur: nom du serveur, qui peut être :\n" +" - nom interne de serveur (créé par /server add, usage recommandé)\n" +" - nom/port ou IP/port (ceci crééra un serveur TEMPORAIRE), le port " +"par défaut est 6667\n" +" - URL avec le format: irc[6][s]://[pseudo[:mot_passe]@]irc.example." +"org[:port][/#canal1][,#canal2[...]]\n" " option: définir l'option pour le serveur (pour une option booléenne, la " "valeur peut être omise)\n" "nooption: définir l'option booléenne à 'off' (par exemple: -nossl)\n" @@ -4437,6 +4441,7 @@ msgstr "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgid "send a CTCP message (Client-To-Client Protocol)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3789,19 +3789,21 @@ msgstr "csatlakozás a szerver(ek)hez" #, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[-all [-nojoin] | szervernév [szervernév ...] [-nojoin] | gépnév [-port " "port] [-ipv6] [-ssl]]" #, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -3816,6 +3818,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " -all: kapcsolódás minden szerverhez\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4344,19 +4344,23 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "connette ad uno o più server IRC" +#, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[<server> [<server>...] | <hostname>[/<porta>]] [-<opzione>[=<valore>]] [-" "no<opzione>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4371,6 +4375,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " server: nome interno del server a cui connettersi (il server deve essere " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:57+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4326,19 +4326,23 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "łączy się z serwerem(ami) IRC" +#, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[<serwer> [<serwer>...] | <host>[/<port>]] [-<opcja>[=<wartość>]] [-" "no<opcja>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4353,6 +4357,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " serwer: wewnętrzna nazwa serwera do połączenia (serwer stworzony za " diff --git a/po/pt_BR.po b/po/pt_BR.po index 929051bc7..f600518dd 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-11-03 16:58+0100\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4168,16 +4168,18 @@ msgid "connect to IRC server(s)" msgstr "" msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -4192,6 +4194,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\n" "PO-Revision-Date: 2011-10-22 12:21+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3809,19 +3809,21 @@ msgstr "подключиться к серверу(-ам)" #, fuzzy msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" "[-all [-nojoin] | сервер [servername ...] [-nojoin] | адрес [-port порт] [-" "ipv6] [-ssl]]" #, fuzzy msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -3836,6 +3838,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" " -all: переподключиться ко всем серверам\n" diff --git a/po/weechat.pot b/po/weechat.pot index 7c9b34b65..98969dc75 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: 2011-11-03 16:55+0100\n" +"POT-Creation-Date: 2011-11-04 12:41+0100\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" @@ -3374,16 +3374,18 @@ msgid "connect to IRC server(s)" msgstr "" msgid "" -"[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" -"no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" +"<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" +"switch] || -all|-open [-nojoin] [-switch]" msgstr "" msgid "" -" server: internal server name to connect (server must have been created " -"by /server add)\n" -" hostname: hostname (or IP) of a server (this will create a TEMPORARY " -"server)\n" -" port: port for server (6667 by default)\n" +" server: server name, which can be:\n" +" - internal server name (created by /server add, recommended " +"usage)\n" +" - hostname/port or IP/port (this will create a TEMPORARY " +"server), port is 6667 by default\n" +" - URL with format: irc[6][s]://[nickname[:password]@]irc.example." +"org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean option, value can be " "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" @@ -3398,6 +3400,7 @@ msgid "" " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" +" /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index b9cc42ed1..ceb73a9cd 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -840,28 +840,46 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, } else { - name = irc_server_get_name_without_port (argv[i]); - ptr_server = irc_server_alloc ((name) ? name : argv[i]); - if (name) - free (name); - if (ptr_server) + if ((strncmp (argv[i], "irc", 3) == 0) + && strstr (argv[i], "://")) { - ptr_server->temp_server = 1; - weechat_config_option_set (ptr_server->options[IRC_SERVER_OPTION_ADDRESSES], - argv[i], 1); - weechat_printf (NULL, - _("%s: server %s%s%s created (temporary server, NOT SAVED!)"), - IRC_PLUGIN_NAME, - IRC_COLOR_CHAT_SERVER, - ptr_server->name, - IRC_COLOR_RESET); - irc_server_apply_command_line_options (ptr_server, - argc, argv); - if (!irc_command_connect_one_server (ptr_server, 0, 0)) - connect_ok = 0; + /* read server using URL format */ + ptr_server = irc_server_alloc_with_url (argv[i]); + if (ptr_server) + { + irc_server_apply_command_line_options (ptr_server, + argc, argv); + if (!irc_command_connect_one_server (ptr_server, 0, 0)) + connect_ok = 0; + } } else { + /* create server with address */ + name = irc_server_get_name_without_port (argv[i]); + ptr_server = irc_server_alloc ((name) ? name : argv[i]); + if (name) + free (name); + if (ptr_server) + { + ptr_server->temp_server = 1; + weechat_config_option_set (ptr_server->options[IRC_SERVER_OPTION_ADDRESSES], + argv[i], 1); + weechat_printf (NULL, + _("%s: server %s%s%s created " + "(temporary server, NOT SAVED!)"), + IRC_PLUGIN_NAME, + IRC_COLOR_CHAT_SERVER, + ptr_server->name, + IRC_COLOR_RESET); + irc_server_apply_command_line_options (ptr_server, + argc, argv); + if (!irc_command_connect_one_server (ptr_server, 0, 0)) + connect_ok = 0; + } + } + if (!ptr_server) + { weechat_printf (NULL, _("%s%s: unable to create server " "\"%s\""), @@ -4784,15 +4802,18 @@ irc_command_init () "%(irc_channel_nicks_hosts)", &irc_command_ban, NULL); weechat_hook_command ("connect", N_("connect to IRC server(s)"), - N_("[<server> [<server>...] | <hostname>[/<port>]] " - "[-<option>[=<value>]] [-no<option>] [-nojoin] " - "[-switch]" + N_("<server> [<server>...] [-<option>[=<value>]] " + "[-no<option>] [-nojoin] [-switch]" " || -all|-open [-nojoin] [-switch]"), - N_(" server: internal server name to connect " - "(server must have been created by /server add)\n" - " hostname: hostname (or IP) of a server (this " - "will create a TEMPORARY server)\n" - " port: port for server (6667 by default)\n" + N_(" server: server name, which can be:\n" + " - internal server name (created by " + "/server add, recommended usage)\n" + " - hostname/port or IP/port (this " + "will create a TEMPORARY server), port is 6667 " + "by default\n" + " - URL with format: " + "irc[6][s]://[nickname[:password]@]" + "irc.example.org[:port][/#channel1][,#channel2[...]]\n" " option: set option for server (for boolean " "option, value can be omitted)\n" " nooption: set boolean option to 'off' (for " @@ -4810,6 +4831,7 @@ irc_command_init () " /connect irc6.oftc.net/6667 -ipv6\n" " /connect irc6.oftc.net/6697 -ipv6 -ssl\n" " /connect my.server.org/6697 -ssl -password=test\n" + " /connect irc://nick@irc.oftc.net/#channel\n" " /connect -switch"), "%(irc_servers)|-all|-open|-nojoin|-switch|%*", &irc_command_connect, NULL); diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index eb76285e5..6f5c84055 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -705,11 +705,10 @@ irc_server_alloc (const char *name) /* * 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 + * return server pointer, or NULL if error */ -int +struct t_irc_server * irc_server_alloc_with_url (const char *irc_url) { char *irc_url2, *pos_server, *pos_nick, *pos_password; @@ -720,7 +719,7 @@ irc_server_alloc_with_url (const char *irc_url) irc_url2 = strdup (irc_url); if (!irc_url2) - return 0; + return NULL; pos_server = NULL; pos_nick = NULL; @@ -733,10 +732,10 @@ irc_server_alloc_with_url (const char *irc_url) ssl = 0; pos_server = strstr (irc_url2, "://"); - if (!pos_server) + if (!pos_server || !pos_server[3]) { free (irc_url2); - return 0; + return NULL; } pos_server[0] = '\0'; pos_server += 3; @@ -796,7 +795,7 @@ irc_server_alloc_with_url (const char *irc_url) if (!pos) { free (irc_url2); - return 0; + return NULL; } pos[0] = '\0'; pos++; @@ -900,7 +899,7 @@ irc_server_alloc_with_url (const char *irc_url) free (irc_url2); - return (ptr_server) ? 1 : 0; + return ptr_server; } /* diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 86f5254bf..67d431829 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -230,7 +230,7 @@ extern char irc_server_get_prefix_mode_for_char (struct t_irc_server *server, extern char irc_server_get_prefix_char_for_mode (struct t_irc_server *server, char mode); extern struct t_irc_server *irc_server_alloc (const char *name); -extern int irc_server_alloc_with_url (const char *irc_url); +extern struct t_irc_server *irc_server_alloc_with_url (const char *irc_url); extern void irc_server_apply_command_line_options (struct t_irc_server *server, int argc, char **argv); extern void irc_server_free_all (); |