diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | po/cs.po | 5 | ||||
-rw-r--r-- | po/de.po | 7 | ||||
-rw-r--r-- | po/es.po | 7 | ||||
-rw-r--r-- | po/fr.po | 10 | ||||
-rw-r--r-- | po/hu.po | 5 | ||||
-rw-r--r-- | po/it.po | 7 | ||||
-rw-r--r-- | po/ja.po | 7 | ||||
-rw-r--r-- | po/pl.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 5 | ||||
-rw-r--r-- | po/ru.po | 5 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 28 |
13 files changed, 73 insertions, 28 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.4.0-dev, 2012-12-02 +v0.4.0-dev, 2012-12-05 Version 0.4.0 (under dev!) @@ -42,6 +42,7 @@ Version 0.4.0 (under dev!) aspell.check.suggestions (task #12061) * aspell: fix creation of spellers when number of dictionaries is different between two buffers +* irc: add option "-auto" for command /connect (task #9340) * irc: add support of "server-time" capability (task #12255) * irc: add support of tags in messages * irc: fix crash on /upgrade (free channels before server data when a server @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4479,7 +4479,7 @@ msgstr "připojit se k IRC serveru/serverům" #, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[<server> [<server>...] | <hostname>[/<port>]] [-<option>[=<value>]] [-" "no<option>] [-nojoin] [-switch] || -all|-open [-nojoin] [-switch]" @@ -4497,6 +4497,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-11-04 15:41+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -4973,13 +4973,15 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "Mit IRC-Server(n) verbinden" +#, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" "switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" " server: server name, which can be:\n" " - internal server name (created by /server add, recommended " @@ -4992,6 +4994,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4677,13 +4677,15 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "conectar a un servidor IRC" +#, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[<servidor> [<servidor>...] [-<opción>[=<valor>]] [-no<opción>] [-nojoin] [-" "switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" " server: server name, which can be:\n" " - internal server name (created by /server add, recommended " @@ -4696,6 +4698,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" -"PO-Revision-Date: 2012-12-01 12:58+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" +"PO-Revision-Date: 2012-12-05 18:26+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -4840,10 +4840,10 @@ msgstr "se connecter à un/plusieurs serveur(s) IRC" msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[<serveur> [<serveur>...] [-<option>[=<valeur>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgid "" " server: server name, which can be:\n" @@ -4857,6 +4857,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -4880,6 +4881,7 @@ msgstr "" "valeur peut être omise)\n" "nooption: définir l'option booléenne à 'off' (par exemple: -nossl)\n" " -all: se connecter à tous les serveurs définis dans la configuration\n" +" -auto: se connecter aux serveurs qui ont \"autoconnect\" activé\n" " -open: se connecter à tous les serveurs ouverts qui ne sont pas " "actuellement connectés\n" " -nojoin: ne rejoindre aucun canal (même si l'autojoin est activé pour le " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4077,7 +4077,7 @@ msgstr "csatlakozás a szerver(ek)hez" #, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[-all [-nojoin] | szervernév [szervernév ...] [-nojoin] | gépnév [-port " "port] [-ipv6] [-ssl]]" @@ -4095,6 +4095,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4676,13 +4676,15 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "connette ad uno o più server IRC" +#, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "<server> [<server>...] [-<opzione>[=<valore>]] [-no<option>] [-nojoin] [-" "switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" " server: server name, which can be:\n" " - internal server name (created by /server add, recommended " @@ -4695,6 +4697,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -4578,13 +4578,15 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "IRC サーバに接続" +#, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" "switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" " server: server name, which can be:\n" " - internal server name (created by /server add, recommended " @@ -4597,6 +4599,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:42+0200\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4658,13 +4658,15 @@ msgstr "" msgid "connect to IRC server(s)" msgstr "łączy się z serwerem(ami) IRC" +#, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[<serwer> [<serwer>...] [-<opcja>[=<wartość>]] [-no<opcja>] [-nojoin] [-" "switch] || -all|-open [-nojoin] [-switch]" +#, fuzzy msgid "" " server: server name, which can be:\n" " - internal server name (created by /server add, recommended " @@ -4677,6 +4679,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 92b159334..b96cc773f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:43+0200\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4477,7 +4477,7 @@ msgstr "" msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" msgid "" @@ -4492,6 +4492,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+0100\n" "PO-Revision-Date: 2012-09-29 11:43+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4108,7 +4108,7 @@ msgstr "подключиться к серверу(-ам)" #, fuzzy msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" "[-all [-nojoin] | сервер [servername ...] [-nojoin] | адрес [-port порт] [-" "ipv6] [-ssl]]" @@ -4126,6 +4126,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" diff --git a/po/weechat.pot b/po/weechat.pot index 6c54e2645..e2cfd1044 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: 2012-12-01 15:15+0100\n" +"POT-Creation-Date: 2012-12-05 18:27+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" @@ -3649,7 +3649,7 @@ msgstr "" msgid "" "<server> [<server>...] [-<option>[=<value>]] [-no<option>] [-nojoin] [-" -"switch] || -all|-open [-nojoin] [-switch]" +"switch] || -all|-auto|-open [-nojoin] [-switch]" msgstr "" msgid "" @@ -3664,6 +3664,7 @@ msgid "" "omitted)\n" " nooption: set boolean option to 'off' (for example: -nossl)\n" " -all: connect to all servers defined in configuration\n" +" -auto: connect to servers with autoconnect enabled\n" " -open: connect to all opened servers that are not currently connected\n" " -nojoin: do not join any channel (even if autojoin is enabled on server)\n" " -switch: switch to next server address\n" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 20c0c0ec7..396b7e257 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -763,7 +763,7 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { int i, nb_connect, connect_ok, all_servers, all_opened, switch_address; - int no_join; + int no_join, autoconnect; char *name; IRC_BUFFER_GET_SERVER(buffer); @@ -778,6 +778,7 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, all_opened = 0; switch_address = 0; no_join = 0; + autoconnect = 0; for (i = 1; i < argc; i++) { if (weechat_strcasecmp (argv[i], "-all") == 0) @@ -788,6 +789,8 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, switch_address = 1; else if (weechat_strcasecmp (argv[i], "-nojoin") == 0) no_join = 1; + else if (weechat_strcasecmp (argv[i], "-auto") == 0) + autoconnect = 1; } if (all_opened) @@ -823,6 +826,23 @@ irc_command_connect (void *data, struct t_gui_buffer *buffer, int argc, } return (connect_ok) ? WEECHAT_RC_OK : WEECHAT_RC_ERROR; } + else if (autoconnect) + { + for (ptr_server = irc_servers; ptr_server; + ptr_server = ptr_server->next_server) + { + if (!ptr_server->is_connected && (!ptr_server->hook_connect) + && (IRC_SERVER_OPTION_BOOLEAN(ptr_server, IRC_SERVER_OPTION_AUTOCONNECT))) + { + if (!irc_command_connect_one_server (ptr_server, + switch_address, no_join)) + { + connect_ok = 0; + } + } + } + return (connect_ok) ? WEECHAT_RC_OK : WEECHAT_RC_ERROR; + } else { nb_connect = 0; @@ -5108,7 +5128,7 @@ irc_command_init () N_("connect to IRC server(s)"), N_("<server> [<server>...] [-<option>[=<value>]] " "[-no<option>] [-nojoin] [-switch]" - " || -all|-open [-nojoin] [-switch]"), + " || -all|-auto|-open [-nojoin] [-switch]"), N_(" server: server name, which can be:\n" " - internal server name (created by " "/server add, recommended usage)\n" @@ -5124,6 +5144,8 @@ irc_command_init () "example: -nossl)\n" " -all: connect to all servers defined in " "configuration\n" + " -auto: connect to servers with autoconnect " + "enabled\n" " -open: connect to all opened servers that " "are not currently connected\n" " -nojoin: do not join any channel (even if " @@ -5137,7 +5159,7 @@ irc_command_init () " /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_servers)|-all|-auto|-open|-nojoin|-switch|%*", &irc_command_connect, NULL); weechat_hook_command ("ctcp", N_("send a CTCP message (Client-To-Client Protocol)"), |