diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/de/autogen/user/irc_commands.txt | 12 | ||||
-rw-r--r-- | doc/en/autogen/user/irc_commands.txt | 12 | ||||
-rw-r--r-- | doc/fr/autogen/user/irc_commands.txt | 12 | ||||
-rw-r--r-- | doc/it/autogen/user/irc_commands.txt | 16 | ||||
-rw-r--r-- | po/cs.po | 23 | ||||
-rw-r--r-- | po/de.po | 23 | ||||
-rw-r--r-- | po/es.po | 23 | ||||
-rw-r--r-- | po/fr.po | 27 | ||||
-rw-r--r-- | po/hu.po | 21 | ||||
-rw-r--r-- | po/it.po | 23 | ||||
-rw-r--r-- | po/pl.po | 23 | ||||
-rw-r--r-- | po/pt_BR.po | 15 | ||||
-rw-r--r-- | po/ru.po | 21 | ||||
-rw-r--r-- | po/weechat.pot | 15 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 51 |
16 files changed, 198 insertions, 122 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.6-dev, 2011-08-27 +v0.3.6-dev, 2011-08-28 Version 0.3.6 (under dev!) @@ -73,6 +73,7 @@ Version 0.3.6 (under dev!) description for option when function is called) * scripts: fix crash with scripts not auto-loaded having a buffer opened after /upgrade (input/close callbacks for buffer not set properly) +* irc: allow reason for command /disconnect * irc: allow server name for commands /die and /restart * irc: add new info_hashtable "irc_message_split" * irc: improve split of privmsg message (keep ctcp), add split of ison, join, diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt index 4c31be333..c5ab1cb75 100644 --- a/doc/de/autogen/user/irc_commands.txt +++ b/doc/de/autogen/user/irc_commands.txt @@ -133,16 +133,19 @@ Beispiel: [[command_irc_die]] [command]*`die`* Server herunterfahren:: ........................................ +/die [<target>] + +Ziel: Servername ........................................ [[command_irc_disconnect]] -[command]*`disconnect`* Verbindung, zu einem oder mehreren IRC-Server(n), trennen:: +[command]*`disconnect`* disconnect from one or all IRC servers:: ........................................ -/disconnect <server> [<server>...] - -all +/disconnect [<server>|-all [<reason>]] server: server name to disconnect -all: disconnect from all servers +reason: reason for quit ........................................ [[command_irc_halfop]] @@ -489,6 +492,9 @@ option: zusätzliche Option, die von manchen Servern berücksichtigt wird. [[command_irc_restart]] [command]*`restart`* Den Server dazu bringen sich selbst neu zu starten:: ........................................ +/restart [<target>] + +Ziel: Servername ........................................ [[command_irc_sajoin]] diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt index a89047741..5c7992c21 100644 --- a/doc/en/autogen/user/irc_commands.txt +++ b/doc/en/autogen/user/irc_commands.txt @@ -133,16 +133,19 @@ Examples: [[command_irc_die]] [command]*`die`* shutdown the server:: ........................................ +/die [<target>] + +target: server name ........................................ [[command_irc_disconnect]] -[command]*`disconnect`* disconnect from IRC server(s):: +[command]*`disconnect`* disconnect from one or all IRC servers:: ........................................ -/disconnect <server> [<server>...] - -all +/disconnect [<server>|-all [<reason>]] server: server name to disconnect -all: disconnect from all servers +reason: reason for quit ........................................ [[command_irc_halfop]] @@ -489,6 +492,9 @@ option: extra option, for some servers [[command_irc_restart]] [command]*`restart`* tell the server to restart itself:: ........................................ +/restart [<target>] + +target: server name ........................................ [[command_irc_sajoin]] diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt index 336e5896c..49a1325e5 100644 --- a/doc/fr/autogen/user/irc_commands.txt +++ b/doc/fr/autogen/user/irc_commands.txt @@ -133,16 +133,19 @@ Exemples: [[command_irc_die]] [command]*`die`* arrêter le serveur:: ........................................ +/die [<cible>] + +cible: nom du serveur ........................................ [[command_irc_disconnect]] -[command]*`disconnect`* se déconnecter d'un/plusieurs serveur(s) IRC:: +[command]*`disconnect`* se déconnecter d'un ou de tous les serveurs IRC:: ........................................ -/disconnect <serveur> [<serveur>...] - -all +/disconnect [<serveur>|-all [<raison>]] serveur: nom du serveur pour se déconecter -all: se déconnecter de tous les serveurs + raison: raison pour le quit ........................................ [[command_irc_halfop]] @@ -489,6 +492,9 @@ option: option supplémentaire, pour certains serveurs [[command_irc_restart]] [command]*`restart`* demander au serveur de redémarrer:: ........................................ +/restart [<cible>] + +cible: nom du serveur ........................................ [[command_irc_sajoin]] diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt index 42b8967aa..f0152bc37 100644 --- a/doc/it/autogen/user/irc_commands.txt +++ b/doc/it/autogen/user/irc_commands.txt @@ -133,16 +133,19 @@ Esempi: [[command_irc_die]] [command]*`die`* arresta il server:: ........................................ +/die [<destinazione>] + +destinazione: nome server ........................................ [[command_irc_disconnect]] -[command]*`disconnect`* disconnette da uno o più server IRC:: +[command]*`disconnect`* disconnect from one or all IRC servers:: ........................................ -/disconnect <server> [<server>...] - -all +/disconnect [<server>|-all [<reason>]] -server: nome del server da cui disconnettersi - -all: disconnette da tutti i server +server: server name to disconnect + -all: disconnect from all servers +reason: reason for quit ........................................ [[command_irc_halfop]] @@ -489,6 +492,9 @@ opzione: opzione extra, per alcuni server [[command_irc_restart]] [command]*`restart`* chiede al server di riavviarsi:: ........................................ +/restart [<destinazione>] + +destinazione: nome server ........................................ [[command_irc_sajoin]] @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4205,15 +4205,22 @@ msgstr "odebrat hlas z přezdívky (přezdívek)" msgid "shutdown the server" msgstr "vypnout server" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "cíl: server jméno" + +#, fuzzy +msgid "disconnect from one or all IRC servers" msgstr "odpojit z IRC serveru/serverů" -msgid "<server> [<server>...] || -all" -msgstr "<server> [<server>...] || -all" +#, fuzzy +msgid "[<server>|-all [<reason>]]" +msgstr "[[<server>] <maska_serveru>]" +#, fuzzy msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "server: jméno serveru pro odpojení\n" " -all: odpojit se od všech serverů" @@ -4270,9 +4277,6 @@ msgstr "" msgid "get information describing the server" msgstr "získat informace popisující server" -msgid "target: server name" -msgstr "cíl: server jméno" - msgid "invite a nick on a channel" msgstr "pozvat přezdívku na kanál" @@ -8033,6 +8037,9 @@ msgstr "" msgid "Lists" msgstr "" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<server> [<server>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Chyba: nemohu napojit kalávesu \"%s\"" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-08-15 10:10+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4493,15 +4493,22 @@ msgstr "Voice-Privilegien einem oder mehreren Nicknamen entziehen" msgid "shutdown the server" msgstr "Server herunterfahren" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "Ziel: Servername" + +#, fuzzy +msgid "disconnect from one or all IRC servers" msgstr "Verbindung, zu einem oder mehreren IRC-Server(n), trennen" -msgid "<server> [<server>...] || -all" -msgstr "<server> [<server>...] || -all" +#, fuzzy +msgid "[<server>|-all [<reason>]]" +msgstr "[[<server>] <server_mask>]" +#, fuzzy msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "server: server name to disconnect\n" " -all: disconnect from all servers" @@ -4558,9 +4565,6 @@ msgstr "" msgid "get information describing the server" msgstr "Information über den Server abfragen" -msgid "target: server name" -msgstr "Ziel: Servername" - msgid "invite a nick on a channel" msgstr "Jemanden in einen Channel einladen" @@ -8431,6 +8435,9 @@ msgstr "Variablen" msgid "Lists" msgstr "Listen" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<server> [<server>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Fehler: kann die Taste \"%s\" nicht zuordnen" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4279,15 +4279,22 @@ msgstr "remueve voz de el/los apodo(s)" msgid "shutdown the server" msgstr "cerrar el servidor" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "objetivo: nombre del servidor" + +#, fuzzy +msgid "disconnect from one or all IRC servers" msgstr "desconectarse del servidor IRC" -msgid "<server> [<server>...] || -all" -msgstr "<servidor> [<servidor>...] || -all" +#, fuzzy +msgid "[<server>|-all [<reason>]]" +msgstr "[[<servidor>] <máscara>]" +#, fuzzy msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "servidor: nombre del servidor a desconectar\n" " -all: desconectar de todos los servidores" @@ -4345,9 +4352,6 @@ msgstr "" msgid "get information describing the server" msgstr "obtener información describiendo al servidor" -msgid "target: server name" -msgstr "objetivo: nombre del servidor" - msgid "invite a nick on a channel" msgstr "invitar a un apodo a un canal" @@ -8163,6 +8167,9 @@ msgstr "" msgid "Lists" msgstr "" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<servidor> [<servidor>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Error: no es posible crear el atajo \"%s\"" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" -"PO-Revision-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" +"PO-Revision-Date: 2011-08-28 16:21+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -4409,18 +4409,23 @@ msgstr "retirer la voix du/des pseudo(s)" msgid "shutdown the server" msgstr "arrêter le serveur" -msgid "disconnect from IRC server(s)" -msgstr "se déconnecter d'un/plusieurs serveur(s) IRC" +msgid "target: server name" +msgstr "cible: nom du serveur" -msgid "<server> [<server>...] || -all" -msgstr "<serveur> [<serveur>...] || -all" +msgid "disconnect from one or all IRC servers" +msgstr "se déconnecter d'un ou de tous les serveurs IRC" + +msgid "[<server>|-all [<reason>]]" +msgstr "[<serveur>|-all [<raison>]]" msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "serveur: nom du serveur pour se déconecter\n" -" -all: se déconnecter de tous les serveurs" +" -all: se déconnecter de tous les serveurs\n" +" raison: raison pour le quit" msgid "give channel half-operator status to nick(s)" msgstr "donner le statut de demi-opérateur à un/des pseudo(s)" @@ -4473,9 +4478,6 @@ msgstr "" msgid "get information describing the server" msgstr "voir les informations décrivant le serveur" -msgid "target: server name" -msgstr "cible: nom du serveur" - msgid "invite a nick on a channel" msgstr "inviter un pseudo sur un canal" @@ -8282,6 +8284,9 @@ msgstr "Variables" msgid "Lists" msgstr "Listes" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<serveur> [<serveur>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Erreur: impossible de créer la touche \"%s\"" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-05-15 10:51+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3830,17 +3830,21 @@ msgstr "elveszi a voice jogot a felhasználó(k)tól" msgid "shutdown the server" msgstr "szerver leállítása" +msgid "target: server name" +msgstr "cél: szerver neve" + #, fuzzy -msgid "disconnect from IRC server(s)" +msgid "disconnect from one or all IRC servers" msgstr "kilépés a szerver(ek)ről" #, fuzzy -msgid "<server> [<server>...] || -all" -msgstr "szerver1 [szerver2]" +msgid "[<server>|-all [<reason>]]" +msgstr "[[szerver] szerver_maszk]" msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" #, fuzzy @@ -3876,9 +3880,6 @@ msgstr "" msgid "get information describing the server" msgstr "szerverleíró információ lekérdezése" -msgid "target: server name" -msgstr "cél: szerver neve" - msgid "invite a nick on a channel" msgstr "felhasználó meghívása szobából" @@ -7586,6 +7587,10 @@ msgid "Lists" msgstr "" #, fuzzy +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "szerver1 [szerver2]" + +#, fuzzy #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "%s nem sikerült a(z) \"%s\" billentyűt hozzárendelni\n" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-08-16 17:48+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4360,15 +4360,22 @@ msgstr "rimuove voce da uno (o più) nick" msgid "shutdown the server" msgstr "arresta il server" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "destinazione: nome server" + +#, fuzzy +msgid "disconnect from one or all IRC servers" msgstr "disconnette da uno o più server IRC" -msgid "<server> [<server>...] || -all" -msgstr "<server> [<server>...] || -all" +#, fuzzy +msgid "[<server>|-all [<reason>]]" +msgstr "[[<server>] <mask_server>]" +#, fuzzy msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "server: nome del server da cui disconnettersi\n" " -all: disconnette da tutti i server" @@ -4422,9 +4429,6 @@ msgstr "" msgid "get information describing the server" msgstr "ottieni informazioni sul server" -msgid "target: server name" -msgstr "destinazione: nome server" - msgid "invite a nick on a channel" msgstr "invita un nick su un canale" @@ -8202,6 +8206,9 @@ msgstr "Variabili" msgid "Lists" msgstr "Liste" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<server> [<server>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Errore: impossibile associare il testo \"%s\"" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-07-05 15:38+0200\n" "Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4250,15 +4250,22 @@ msgstr "usuwa flage voice" msgid "shutdown the server" msgstr "wyłącza serwer" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "cel: nazwa srwera" + +#, fuzzy +msgid "disconnect from one or all IRC servers" msgstr "rozłącza się z serwerem(ami) IRC" -msgid "<server> [<server>...] || -all" -msgstr "<serwer> [<serwer>...] || -all" +#, fuzzy +msgid "[<server>|-all [<reason>]]" +msgstr "[[<serwer>] <maska_serwera>]" +#, fuzzy msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" "serwer: nazwa serwera do rozłączenia\n" " -all: rozłącza się ze wszystkimi serwerami" @@ -4316,9 +4323,6 @@ msgstr "" msgid "get information describing the server" msgstr "pobiera informacje opisujące serwer" -msgid "target: server name" -msgstr "cel: nazwa srwera" - msgid "invite a nick on a channel" msgstr "zaprasza użytkownika na kanał" @@ -8068,6 +8072,9 @@ msgstr "" msgid "Lists" msgstr "" +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "<serwer> [<serwer>...] || -all" + #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "Błąd: nie można przypisać klawisza \"%s\"" diff --git a/po/pt_BR.po b/po/pt_BR.po index 4373a702d..40666eca9 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4013,15 +4013,19 @@ msgstr "" msgid "shutdown the server" msgstr "" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "" + +msgid "disconnect from one or all IRC servers" msgstr "" -msgid "<server> [<server>...] || -all" +msgid "[<server>|-all [<reason>]]" msgstr "" msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" msgid "give channel half-operator status to nick(s)" @@ -4056,9 +4060,6 @@ msgstr "" msgid "get information describing the server" msgstr "" -msgid "target: server name" -msgstr "" - msgid "invite a nick on a channel" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3850,17 +3850,21 @@ msgstr "снимает право голоса с ника(-ов)" msgid "shutdown the server" msgstr "выключить сервер" +msgid "target: server name" +msgstr "цель: название сервера" + #, fuzzy -msgid "disconnect from IRC server(s)" +msgid "disconnect from one or all IRC servers" msgstr "отключиться от сервера(-ов)" #, fuzzy -msgid "<server> [<server>...] || -all" -msgstr "сервер1 [сервер2]" +msgid "[<server>|-all [<reason>]]" +msgstr "[[сервер] маска_сервера]" msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" #, fuzzy @@ -3896,9 +3900,6 @@ msgstr "" msgid "get information describing the server" msgstr "получить описание сервера" -msgid "target: server name" -msgstr "цель: название сервера" - msgid "invite a nick on a channel" msgstr "пригласить ник на канал" @@ -7595,6 +7596,10 @@ msgid "Lists" msgstr "" #, fuzzy +#~ msgid "<server> [<server>...] || -all" +#~ msgstr "сервер1 [сервер2]" + +#, fuzzy #~ msgid "Error: unable to bind key \"%s\"" #~ msgstr "%s не могу установить клавишу \"%s\"\n" diff --git a/po/weechat.pot b/po/weechat.pot index bf4d54242..67b00776b 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-08-26 23:34+0200\n" +"POT-Creation-Date: 2011-08-28 16:21+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" @@ -3389,15 +3389,19 @@ msgstr "" msgid "shutdown the server" msgstr "" -msgid "disconnect from IRC server(s)" +msgid "target: server name" +msgstr "" + +msgid "disconnect from one or all IRC servers" msgstr "" -msgid "<server> [<server>...] || -all" +msgid "[<server>|-all [<reason>]]" msgstr "" msgid "" "server: server name to disconnect\n" -" -all: disconnect from all servers" +" -all: disconnect from all servers\n" +"reason: reason for quit" msgstr "" msgid "give channel half-operator status to nick(s)" @@ -3432,9 +3436,6 @@ msgstr "" msgid "get information describing the server" msgstr "" -msgid "target: server name" -msgstr "" - msgid "invite a nick on a channel" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 6c5697c29..3790177a4 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -1368,7 +1368,8 @@ irc_command_quit_server (struct t_irc_server *server, const char *arguments) */ int -irc_command_disconnect_one_server (struct t_irc_server *server) +irc_command_disconnect_one_server (struct t_irc_server *server, + const char *reason) { if (!server) return 0; @@ -1388,7 +1389,7 @@ irc_command_disconnect_one_server (struct t_irc_server *server) _("%s: auto-reconnection is cancelled"), IRC_PLUGIN_NAME); } - irc_command_quit_server (server, NULL); + irc_command_quit_server (server, reason); irc_server_disconnect (server, 0, 0); /* disconnect ok */ @@ -1403,16 +1404,18 @@ int irc_command_disconnect (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { - int i, disconnect_ok; + int disconnect_ok; + const char *reason; IRC_BUFFER_GET_SERVER(buffer); /* make C compiler happy */ (void) data; - (void) argv_eol; + + reason = (argc > 2) ? argv_eol[2] : NULL; if (argc < 2) - disconnect_ok = irc_command_disconnect_one_server (ptr_server); + disconnect_ok = irc_command_disconnect_one_server (ptr_server, reason); else { disconnect_ok = 1; @@ -1426,29 +1429,26 @@ irc_command_disconnect (void *data, struct t_gui_buffer *buffer, int argc, || (ptr_server->hook_fd) || (ptr_server->reconnect_start != 0)) { - if (!irc_command_disconnect_one_server (ptr_server)) + if (!irc_command_disconnect_one_server (ptr_server, reason)) disconnect_ok = 0; } } } else { - for (i = 1; i < argc; i++) + ptr_server = irc_server_search (argv[1]); + if (ptr_server) { - ptr_server = irc_server_search (argv[i]); - if (ptr_server) - { - if (!irc_command_disconnect_one_server (ptr_server)) - disconnect_ok = 0; - } - else - { - weechat_printf (NULL, - _("%s%s: server \"%s\" not found"), - weechat_prefix ("error"), IRC_PLUGIN_NAME, - argv[i]); + if (!irc_command_disconnect_one_server (ptr_server, reason)) disconnect_ok = 0; - } + } + else + { + weechat_printf (NULL, + _("%s%s: server \"%s\" not found"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + argv[1]); + disconnect_ok = 0; } } } @@ -4868,13 +4868,12 @@ irc_command_init () N_("target: server name"), NULL, &irc_command_die, NULL); weechat_hook_command ("disconnect", - N_("disconnect from IRC server(s)"), - N_("<server> [<server>...]" - " || -all"), + N_("disconnect from one or all IRC servers"), + N_("[<server>|-all [<reason>]]"), N_("server: server name to disconnect\n" - " -all: disconnect from all servers"), - "-all" - " || %(irc_servers)|%*", + " -all: disconnect from all servers\n" + "reason: reason for quit"), + "%(irc_servers)|-all", &irc_command_disconnect, NULL); weechat_hook_command ("halfop", N_("give channel half-operator status to " |