diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4708cecd657..852c0abc995 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -19,6 +19,7 @@ New features:: * core: use function util_strftimeval in evaluation of expression `date:xxx` * api: add support of specifier `%!` for timestamp in function util_strftimeval * api: add support of base64url in encode/decode functions + * irc: add server option "autojoin_delay" (delay before autojoin), use option "command_delay" before execution of the command (issue #862) * relay: add "api" protocol (HTTP REST API), add option relay.look.display_clients, change option type relay.look.auto_open_buffer to string, rename option relay.weechat.commands to relay.network.commands, add option relay.network.time_window (issue #2066) * relay: add support of websocket extension "permessage-deflate" (issue #1549) diff --git a/po/cs.po b/po/cs.po index 9457b0ef172..69d5a987088 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -10138,6 +10138,11 @@ msgstr "" "pomocí \";\", použijte \"\\;\" pro středník, speciální proměnné $nick, " "$channel a $server jsou přepsány svou hodnotou)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "doba (v sekundách) před novým znovupřipojením (po vykopnutí)" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -10153,8 +10158,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "počkání (v sekundách) po spuštění příkazu (například: dád nějaký čas pro " "autorizaci)" @@ -14958,14 +14963,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%sChyba: selhalo vytvoření pole \"%s\"" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "Pole \"%s\" vytvořeno" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%sChyba: selhalo vytvoření pole \"%s\"" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: server \"%s\" nenalezen" diff --git a/po/de.po b/po/de.po index d17c8483825..13fc76d9e9b 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2024-01-27 14:34+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -11201,6 +11201,13 @@ msgstr "" "wird evaluiert, siehe /help eval; Serveroptionen sind mittels ${irc_server." "xxx} evaluiert und ${server} wird durch den eigentlichen Servernamen ersetzt)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"Wartezeit, in Sekunden, die verstreichen soll bevor man den Kanal " +"automatisch erneut betritt (nachdem man rausgeworfen wurde)" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -11217,9 +11224,14 @@ msgstr "" "eval; Serveroptionen sind mittels ${irc_server.xxx} evaluiert und ${server} " "wird durch den eigentlichen Servernamen ersetzt)" +#, fuzzy +#| msgid "" +#| "delay (in seconds) after execution of command and before auto-join of " +#| "channels (example: give some time for authentication before joining " +#| "channels)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "Wartezeit (in Sekunden) nach Ausführung des Befehls und bevor Kanäle " "automatisch betreten werden (Beispiel: es wird eine gewisse Zeit gewartet, " @@ -16469,14 +16481,14 @@ msgstr "" "%s%s: Trigger \"%s\" existiert schon (wähle einen anderen Namen oder nutze " "die Option \"addreplace\" um vorhandenen Trigger zu überschreiben)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s: Trigger \"%s\" konnte nicht erstellt werden" - #, c-format msgid "Trigger \"%s\" created" msgstr "Trigger \"%s\" erstellt" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s: Trigger \"%s\" konnte nicht erstellt werden" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: Trigger, \"%s\", nicht gefunden" diff --git a/po/es.po b/po/es.po index fc63be2caaa..7dfcfb3cc61 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -10361,6 +10361,13 @@ msgstr "" "variables especiales $nick, $channel y $server son reemplazados por sus " "valores)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"espera (en segundos) antes de unirse automáticamente (después de ser " +"expulsado)" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -10377,8 +10384,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "espera (en segundos) después de que el comando sea ejecutado (ejemplo: dar " "algo de tiempo para la autenticación)" @@ -15250,14 +15257,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%sError: no se pudo crear la barra \"%s\"" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "Barra \"%s\" creada" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%sError: no se pudo crear la barra \"%s\"" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%sTecla \"%s\" no encontrada" diff --git a/po/fr.po b/po/fr.po index 6b550bf370c..c11773c5a6f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" -"PO-Revision-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" +"PO-Revision-Date: 2024-02-11 08:55+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -10997,6 +10997,9 @@ msgstr "" "sont évaluées avec ${irc_server.xxx} et ${server} est remplacé par le nom du " "serveur)" +msgid "delay (in seconds) before execution of command" +msgstr "délai (en secondes) avant l'exécution de la commande" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -11013,12 +11016,11 @@ msgstr "" "${irc_server.xxx} et ${server} est remplacé par le nom du serveur)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" -"délai (en secondes) après exécution de la commande et avant le \"join\" " -"automatique des canaux (exemple : donner du temps pour l'authentification " -"avant de rejoindre les canaux)" +"délai (en secondes) avant le \"join\" automatique des canaux (exemple : " +"donner du temps pour l'authentification avant de rejoindre les canaux)" msgid "" "comma separated list of channels to join after connection to server (and " @@ -16115,14 +16117,14 @@ msgstr "" "%s%s : le trigger \"%s\" existe déjà (utilisez un autre nom ou utilisez " "l'option \"addreplace\" pour l'écraser)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s : impossible de créer le trigger \"%s\"" - #, c-format msgid "Trigger \"%s\" created" msgstr "Trigger \"%s\" créé" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s : impossible de créer le trigger \"%s\"" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s : trigger \"%s\" non trouvé" diff --git a/po/hu.po b/po/hu.po index 41c19d1fb7f..e87b600d9d5 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -9750,6 +9750,10 @@ msgstr "" "pontosvesszőtszeretne írni, a $nick, $channel és $server szavak helyére azok " "értéke kerül)" +#, fuzzy +msgid "delay (in seconds) before execution of command" +msgstr "két újracsatlakozási próba közti szünet (másodpercben)" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -9766,8 +9770,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "szünet (másodpercben) a parancs futtatása után (például: hagyni némi időt az " "azonosításra)" @@ -14361,14 +14365,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s nem sikerült a modul opciókat elmenteni\n" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "A \"%s\" => \"%s\" aliasz elkészült\n" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s nem sikerült a modul opciókat elmenteni\n" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s a \"%s\" szerver nem található\n" diff --git a/po/it.po b/po/it.po index 86596e5dfda..e9b58451671 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -10360,6 +10360,11 @@ msgstr "" "speciali $nick, $canale e $server vengono sostituite dai loro valori) (nota: " "il contenuto viene valutato, consultare /help eval)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "ritardo (in secondi) prima di rientrare automaticamente (dopo il kick)" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -10376,8 +10381,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "ritardo (in secondi) dopo l'esecuzione del comando (esempio: fornire il " "tempo per l'autenticazione)" @@ -15309,14 +15314,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%sErrore: creazione della barra \"%s\" fallita" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "Barra \"%s\" creata" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%sErrore: creazione della barra \"%s\" fallita" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%sTasto \"%s\" non trovato" diff --git a/po/ja.po b/po/ja.po index 9173ff626a3..7a0a608c3fa 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -10671,6 +10671,11 @@ msgstr "" "jest przetwarzana, zobacz /help eval; opcje serwera mogą zostać użytego w " "postaci ${irc_server.xxx} oraz ${server} jest zastępowany nazwą serwera)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "opóźnienie (w sekundach) przed wejściem na kanał (po wykopaniu)" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -10686,9 +10691,14 @@ msgstr "" "help eval; opcje serwera mogą zostać użytego w postaci ${irc_server.xxx} " "oraz ${server} jest zastępowany nazwą serwera)" +#, fuzzy +#| msgid "" +#| "delay (in seconds) after execution of command and before auto-join of " +#| "channels (example: give some time for authentication before joining " +#| "channels)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "odstęp (w sekundach) po wykonaniu komendy i przed automatycznym wejściem na " "kanały (na przykład: daj trochę czasu na uwierzytelnienie przed wejściem na " @@ -15698,14 +15708,14 @@ msgstr "" "%s%s: trigger \"%s\" już istnieje (wybierz inną nazwę lub użyj opcji " "\"addreplace\" żeby nadpisać istniejący)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s: nie udało się utworzyć triggera \"%s\"" - #, c-format msgid "Trigger \"%s\" created" msgstr "Utworzono trigger \"%s\"" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s: nie udało się utworzyć triggera \"%s\"" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: trigger \"%s\" nie został znaleziony" diff --git a/po/pt.po b/po/pt.po index 63a4f0e542c..512c6672f7f 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -10660,6 +10660,13 @@ msgstr "" "remover \"i\"); ver /help mode para a sintaxe completa de mode (note: o " "conteúdo é avaliado, ver /help eval)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"atraso (em segundos) antes de se voltar a juntar (depois de ser expulso " +"(kick))" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -10675,9 +10682,14 @@ msgstr "" "$server são substituídas pelos respetivos valores) (nota: o conteúdo é " "avaliado, ver /help eval)" +#, fuzzy +#| msgid "" +#| "delay (in seconds) after execution of command and before auto-join of " +#| "channels (example: give some time for authentication before joining " +#| "channels)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "atraso (em segundos) depois de executar os comandos e antes de se juntar " "automaticamente aos canais (exemplo: dar algum tempo à autenticação antes de " @@ -15682,14 +15694,14 @@ msgstr "" "%s%s: o acionador \"%s\" já existe (escolha outro nome ou use a opção " "\"addreplace\" para o substituir)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s: falha ao criar o acionador \"%s\"" - #, c-format msgid "Trigger \"%s\" created" msgstr "Acionador \"%s\" criado" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s: falha ao criar o acionador \"%s\"" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: acionador \"%s\" não encontrado" diff --git a/po/pt_BR.po b/po/pt_BR.po index a913da41af1..3c83ec2e452 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-10-20 13:11+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -10048,6 +10048,12 @@ msgstr "" "variáveis especiais $nick [apelido], $channel [canal] e $server [servidor] " "são substituídas por seus valores)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"tempo de espera (em segundos) antes de auto-re-entrar (depois de ser chutado)" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -10064,8 +10070,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "tempo de espera (em segundos) depois que um comando for executado (exemplo: " "espere algum tempo para a autenticação)" @@ -14789,14 +14795,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%sErro: falha ao criar a barra \"%s\"" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "Barra \"%s\" criada" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%sErro: falha ao criar a barra \"%s\"" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%sTecla \"%s\" não encontrada" diff --git a/po/ru.po b/po/ru.po index 1ee9966b5b3..8b2fb87d3bf 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -9788,6 +9788,10 @@ msgstr "" "специальные переменные $nick, $channel и $server заменяются на " "соответствующие значения)" +#, fuzzy +msgid "delay (in seconds) before execution of command" +msgstr "задержка (в секундах) перед повторным соединением с сервером" + #, fuzzy msgid "" "command(s) to run after connection to server and before auto-join of " @@ -9804,8 +9808,8 @@ msgstr "" #, fuzzy msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "задержка (в секундах) перед выполнением команды (например, нужно время для " "аутентификации)" @@ -14411,14 +14415,14 @@ msgid "" "\"addreplace\" to overwrite it)" msgstr "" -#, fuzzy, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s не могу сохранить конфигурационный файл pluginов\n" - #, fuzzy, c-format msgid "Trigger \"%s\" created" msgstr "Сокращение \"%s\" => \"%s\" создано\n" +#, fuzzy, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s не могу сохранить конфигурационный файл pluginов\n" + #, fuzzy, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s сервер \"%s\" не найден\n" diff --git a/po/sr.po b/po/sr.po index 2a98002b5f3..813bdc350fc 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2024-01-15 10:23+0400\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -10647,6 +10647,13 @@ msgstr "" "израчунава, погледајте /help eval; опције сервера се израчунавају са " "${irc_server.xxx} и ${server} се замењује са именом сервера)" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"време (у секундама) пре него што се обави аутоматско поновно приступање " +"каналу (након избацивања)" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -10662,9 +10669,14 @@ msgstr "" "eval; опције сервера се израчунавају са ${irc_server.xxx} и ${server} се " "замењује са именом сервера)" +#, fuzzy +#| msgid "" +#| "delay (in seconds) after execution of command and before auto-join of " +#| "channels (example: give some time for authentication before joining " +#| "channels)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "време (у секундама) након извршавања команде и пре ауто-приступа каналима " "(пример: давање мало времена за аутентификацију пре него што се приступи " @@ -15663,14 +15675,14 @@ msgstr "" "%s%s: окидач „%s” већ постоји (изаберите неко друго име или употребите " "опцију „addreplace” да га препишете)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s: није успело креирање окидача „%s”" - #, c-format msgid "Trigger \"%s\" created" msgstr "Окидач „%s” је креиран" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s: није успело креирање окидача „%s”" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: није пронађен окидач „%s”" diff --git a/po/tr.po b/po/tr.po index 414c50aa7fb..493a6d9493b 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -10823,6 +10823,12 @@ msgstr "" "değerlendirilir, bkz. /help eval; sunucu seçenekleri ${irc_server.xxx} ile " "değerlendirilir ve ${server} sunucu adı ile değiştirilir" +#, fuzzy +#| msgid "delay (in seconds) before autorejoin (after kick)" +msgid "delay (in seconds) before execution of command" +msgstr "" +"kendiliğinden yeniden katılma öncesi gecikme (saniye) (kovulma sonrası)" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -10838,9 +10844,14 @@ msgstr "" "eval; sunucu seçenekleri ${irc_server.xxx} ile değerlendirilir ve ${server} " "sunucu adı ile değiştirilir" +#, fuzzy +#| msgid "" +#| "delay (in seconds) after execution of command and before auto-join of " +#| "channels (example: give some time for authentication before joining " +#| "channels)" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" "komut yürütüldükten sonra ve kanallara kendiliğinden katılma sonrası gecikme " "(örnek: kanallara katılma öncesi kimlik doğrulama için zaman ver)" @@ -15941,14 +15952,14 @@ msgstr "" "%s%s: \"%s\" tetiği halihazırda mevcut (yeni bir ad seçin veya üzerine " "yazmak için \"addreplace\" seçeneğini kullanın)" -#, c-format -msgid "%s%s: failed to create trigger \"%s\"" -msgstr "%s%s: \"%s\" tetiği oluşturulamadı" - #, c-format msgid "Trigger \"%s\" created" msgstr "\"%s\" tetiği oluşturuldu" +#, c-format +msgid "%s%s: failed to create trigger \"%s\"" +msgstr "%s%s: \"%s\" tetiği oluşturulamadı" + #, c-format msgid "%s%s: trigger \"%s\" not found" msgstr "%s%s: \"%s\" tetiği bulunamadı" diff --git a/po/weechat.pot b/po/weechat.pot index d4d9b5be24e..b95b574eb2b 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-01 21:36+0100\n" +"POT-Creation-Date: 2024-02-11 08:54+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -8863,6 +8863,9 @@ msgid "" "name)" msgstr "" +msgid "delay (in seconds) before execution of command" +msgstr "" + msgid "" "command(s) to run after connection to server and before auto-join of " "channels (many commands can be separated by \";\", use \"\\;\" for a " @@ -8873,8 +8876,8 @@ msgid "" msgstr "" msgid "" -"delay (in seconds) after execution of command and before auto-join of " -"channels (example: give some time for authentication before joining channels)" +"delay (in seconds) before auto-join of channels (example: give some time for " +"authentication before joining channels)" msgstr "" msgid "" @@ -13139,11 +13142,11 @@ msgid "" msgstr "" #, c-format -msgid "%s%s: failed to create trigger \"%s\"" +msgid "Trigger \"%s\" created" msgstr "" #, c-format -msgid "Trigger \"%s\" created" +msgid "%s%s: failed to create trigger \"%s\"" msgstr "" #, c-format diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index e9112facc6e..52531047ad0 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -5421,6 +5421,16 @@ irc_command_display_server (struct t_irc_server *server, int with_detail) weechat_printf (NULL, " usermode . . . . . . : %s'%s'", IRC_COLOR_CHAT_VALUE, weechat_config_string (server->options[IRC_SERVER_OPTION_USERMODE])); + /* command_delay */ + if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_COMMAND_DELAY])) + weechat_printf (NULL, " command_delay. . . . : (%d %s)", + IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY), + NG_("second", "seconds", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY))); + else + weechat_printf (NULL, " command_delay. . . . : %s%d %s", + IRC_COLOR_CHAT_VALUE, + weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]), + NG_("second", "seconds", weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]))); /* command */ if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_COMMAND])) { @@ -5443,16 +5453,16 @@ irc_command_display_server (struct t_irc_server *server, int with_detail) if (cmd_pwd_hidden) free (cmd_pwd_hidden); } - /* command_delay */ - if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_COMMAND_DELAY])) - weechat_printf (NULL, " command_delay. . . . : (%d %s)", - IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY), - NG_("second", "seconds", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY))); + /* autojoin_delay */ + if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOJOIN_DELAY])) + weechat_printf (NULL, " autojoin_delay . . . : (%d %s)", + IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOJOIN_DELAY), + NG_("second", "seconds", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOJOIN_DELAY))); else - weechat_printf (NULL, " command_delay. . . . : %s%d %s", + weechat_printf (NULL, " autojoin_delay . . . : %s%d %s", IRC_COLOR_CHAT_VALUE, - weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]), - NG_("second", "seconds", weechat_config_integer (server->options[IRC_SERVER_OPTION_COMMAND_DELAY]))); + weechat_config_integer (server->options[IRC_SERVER_OPTION_AUTOJOIN_DELAY]), + NG_("second", "seconds", weechat_config_integer (server->options[IRC_SERVER_OPTION_AUTOJOIN_DELAY]))); /* autojoin */ if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_AUTOJOIN])) weechat_printf (NULL, " autojoin . . . . . . : ('%s')", diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 5de3e51b083..7a8db7b1008 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -2376,6 +2376,22 @@ irc_config_server_new_option (struct t_config_file *config_file, callback_change_data, NULL, NULL, NULL); break; + case IRC_SERVER_OPTION_COMMAND_DELAY: + new_option = weechat_config_new_option ( + config_file, section, + option_name, "integer", + N_("delay (in seconds) before execution of command"), + NULL, 0, 3600, + default_value, value, + null_value_allowed, + callback_check_value, + callback_check_value_pointer, + callback_check_value_data, + callback_change, + callback_change_pointer, + callback_change_data, + NULL, NULL, NULL); + break; case IRC_SERVER_OPTION_COMMAND: new_option = weechat_config_new_option ( config_file, section, @@ -2398,13 +2414,13 @@ irc_config_server_new_option (struct t_config_file *config_file, callback_change_data, NULL, NULL, NULL); break; - case IRC_SERVER_OPTION_COMMAND_DELAY: + case IRC_SERVER_OPTION_AUTOJOIN_DELAY: new_option = weechat_config_new_option ( config_file, section, option_name, "integer", - N_("delay (in seconds) after execution of command and before " - "auto-join of channels (example: give some time for " - "authentication before joining channels)"), + N_("delay (in seconds) before auto-join of channels " + "(example: give some time for authentication before joining " + "channels)"), NULL, 0, 3600, default_value, value, null_value_allowed, @@ -2880,8 +2896,9 @@ irc_config_update_cb (const void *pointer, void *data, struct t_hashtable *data_read) { const char *ptr_section, *ptr_option, *ptr_value; + const char *option_autojoin_delay = "autojoin_delay"; char *new_option, *pos_option, *new_value; - int changes; + int changes, length; /* make C compiler happy */ (void) pointer; @@ -2987,6 +3004,57 @@ irc_config_update_cb (const void *pointer, void *data, } } + if (version_read < 4) + { + /* + * changes in v4 (WeeChat 4.3.0): + * - server option "command_delay" is renamed to "autojoin_delay" + * ("command_delay" is a new option that sets the delay before + * the command, while "autojoin_delay" sets the delay before the + * autojoin) + */ + ptr_section = weechat_hashtable_get (data_read, "section"); + ptr_option = weechat_hashtable_get (data_read, "option"); + if (ptr_section + && ptr_option + && (strcmp (ptr_section, "server_default") == 0) + && (strcmp (ptr_option, "command_delay") == 0)) + { + weechat_printf ( + NULL, + _("IRC option renamed: \"irc.%s.%s\" => \"irc.%s.%s\""), + ptr_section, ptr_option, + ptr_section, option_autojoin_delay); + weechat_hashtable_set (data_read, "option", option_autojoin_delay); + changes++; + } + else if (ptr_section + && ptr_option + && (strcmp (ptr_section, "server") == 0)) + { + pos_option = strrchr (ptr_option, '.'); + if (pos_option && (strcmp (pos_option + 1, "command_delay") == 0)) + { + length = (pos_option - ptr_option + 1) + strlen (option_autojoin_delay) + 1; + new_option = malloc (length); + if (new_option) + { + memcpy (new_option, ptr_option, pos_option - ptr_option + 1); + new_option[pos_option - ptr_option + 1] = '\0'; + strcat (new_option, option_autojoin_delay); + weechat_printf ( + NULL, + _("IRC option renamed: \"irc.%s.%s\" => \"irc.%s.%s\""), + ptr_section, ptr_option, + ptr_section, new_option); + weechat_hashtable_set (data_read, "option", new_option); + changes++; + free (new_option); + } + } + } + } + return (changes) ? data_read : NULL; } diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index 7164df9e3b3..eb905becdad 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -23,7 +23,7 @@ #define IRC_CONFIG_NAME "irc" #define IRC_CONFIG_PRIO_NAME (TO_STR(IRC_PLUGIN_PRIORITY) "|" IRC_CONFIG_NAME) -#define IRC_CONFIG_VERSION 3 +#define IRC_CONFIG_VERSION 4 enum t_irc_config_look_server_buffer { diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 2d286d14414..cde4c4d6af1 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4004,10 +4004,7 @@ IRC_PROTOCOL_CALLBACK(warn) IRC_PROTOCOL_CALLBACK(001) { - char **commands, **ptr_command, *command2, *command3, *slash_command; char *away_msg, *usermode; - const char *ptr_server_command; - int length; IRC_PROTOCOL_MIN_PARAMS(1); @@ -4061,57 +4058,16 @@ IRC_PROTOCOL_CALLBACK(001) free (usermode); /* execute command when connected */ - ptr_server_command = IRC_SERVER_OPTION_STRING(ctxt->server, - IRC_SERVER_OPTION_COMMAND); - if (ptr_server_command && ptr_server_command[0]) - { - /* split command on ';' which can be escaped with '\;' */ - commands = weechat_string_split_command (ptr_server_command, ';'); - if (commands) - { - for (ptr_command = commands; *ptr_command; ptr_command++) - { - command2 = irc_server_eval_expression (ctxt->server, *ptr_command); - if (command2) - { - command3 = irc_message_replace_vars (ctxt->server, NULL, - command2); - if (command3) - { - if (weechat_string_is_command_char (command3)) - { - weechat_command (ctxt->server->buffer, command3); - } - else - { - length = 1 + strlen (command3) + 1; - slash_command = malloc (length); - if (slash_command) - { - snprintf (slash_command, length, - "/%s", command3); - weechat_command (ctxt->server->buffer, - slash_command); - free (slash_command); - } - } - free (command3); - } - free (command2); - } - } - weechat_string_free_split_command (commands); - } + if (IRC_SERVER_OPTION_INTEGER(ctxt->server, IRC_SERVER_OPTION_COMMAND_DELAY) > 0) + ctxt->server->command_time = time (NULL) + 1; + else + irc_server_execute_command (ctxt->server); - if (IRC_SERVER_OPTION_INTEGER(ctxt->server, IRC_SERVER_OPTION_COMMAND_DELAY) > 0) - ctxt->server->command_time = time (NULL) + 1; - else - irc_server_autojoin_channels (ctxt->server); - } + /* auto-join of channels */ + if (IRC_SERVER_OPTION_INTEGER(ctxt->server, IRC_SERVER_OPTION_AUTOJOIN_DELAY) > 0) + ctxt->server->autojoin_time = time (NULL) + 1; else - { irc_server_autojoin_channels (ctxt->server); - } return WEECHAT_RC_OK; } diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index cbd20a431b6..b25e5a94588 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -109,8 +109,9 @@ char *irc_server_options[IRC_SERVER_NUM_OPTIONS][2] = { "realname", "" }, { "local_hostname", "" }, { "usermode", "" }, - { "command", "" }, { "command_delay", "0" }, + { "command", "" }, + { "autojoin_delay", "0" }, { "autojoin", "" }, { "autojoin_dynamic", "off" }, { "autorejoin", "off" }, @@ -1755,6 +1756,7 @@ irc_server_alloc (const char *name) new_server->reconnect_delay = 0; new_server->reconnect_start = 0; new_server->command_time = 0; + new_server->autojoin_time = 0; new_server->autojoin_done = 0; new_server->disable_autojoin = 0; new_server->is_away = 0; @@ -4067,15 +4069,24 @@ irc_server_timer_cb (const void *pointer, void *data, int remaining_calls) } } - /* check if it's time to autojoin channels (after command delay) */ + /* check if it's time to execute command (after command_delay) */ if ((ptr_server->command_time != 0) && (current_time >= ptr_server->command_time + IRC_SERVER_OPTION_INTEGER(ptr_server, IRC_SERVER_OPTION_COMMAND_DELAY))) { - irc_server_autojoin_channels (ptr_server); + irc_server_execute_command (ptr_server); ptr_server->command_time = 0; } + /* check if it's time to auto-join channels (after autojoin_delay) */ + if ((ptr_server->autojoin_time != 0) + && (current_time >= ptr_server->autojoin_time + + IRC_SERVER_OPTION_INTEGER(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_DELAY))) + { + irc_server_autojoin_channels (ptr_server); + ptr_server->autojoin_time = 0; + } + /* check if it's time to send MONITOR command */ if ((ptr_server->monitor_time != 0) && (current_time >= ptr_server->monitor_time)) @@ -5897,6 +5908,58 @@ irc_server_disconnect_all () } } +/* + * Executes command on server (using server option ".command"). + */ + +void +irc_server_execute_command (struct t_irc_server *server) +{ + char **commands, **ptr_command, *command2, *command3, *slash_command; + const char *ptr_server_command; + int length; + + ptr_server_command = IRC_SERVER_OPTION_STRING(server, + IRC_SERVER_OPTION_COMMAND); + if (!ptr_server_command || !ptr_server_command[0]) + return; + + /* split command on ';' which can be escaped with '\;' */ + commands = weechat_string_split_command (ptr_server_command, ';'); + if (!commands) + return; + + for (ptr_command = commands; *ptr_command; ptr_command++) + { + command2 = irc_server_eval_expression (server, *ptr_command); + if (command2) + { + command3 = irc_message_replace_vars (server, NULL, command2); + if (command3) + { + if (weechat_string_is_command_char (command3)) + { + weechat_command (server->buffer, command3); + } + else + { + length = 1 + strlen (command3) + 1; + slash_command = malloc (length); + if (slash_command) + { + snprintf (slash_command, length, "/%s", command3); + weechat_command (server->buffer, slash_command); + free (slash_command); + } + } + free (command3); + } + free (command2); + } + } + weechat_string_free_split_command (commands); +} + /* * Creates buffers for auto-joined channels on a server. */ @@ -6567,6 +6630,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data, WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_delay, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, reconnect_start, TIME, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, command_time, TIME, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_irc_server, autojoin_time, TIME, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, autojoin_done, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, disable_autojoin, INTEGER, 0, NULL, NULL); WEECHAT_HDATA_VAR(struct t_irc_server, is_away, INTEGER, 0, NULL, NULL); @@ -6726,11 +6790,14 @@ irc_server_add_to_infolist (struct t_infolist *infolist, if (!weechat_infolist_new_var_string (ptr_item, "usermode", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_USERMODE))) return 0; + if (!weechat_infolist_new_var_integer (ptr_item, "command_delay", + IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY))) + return 0; if (!weechat_infolist_new_var_string (ptr_item, "command", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_COMMAND))) return 0; - if (!weechat_infolist_new_var_integer (ptr_item, "command_delay", - IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_COMMAND_DELAY))) + if (!weechat_infolist_new_var_integer (ptr_item, "autojoin_delay", + IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOJOIN_DELAY))) return 0; if (!weechat_infolist_new_var_string (ptr_item, "autojoin", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_AUTOJOIN))) @@ -6949,6 +7016,8 @@ irc_server_add_to_infolist (struct t_infolist *infolist, return 0; if (!weechat_infolist_new_var_time (ptr_item, "command_time", server->command_time)) return 0; + if (!weechat_infolist_new_var_time (ptr_item, "autojoin_time", server->autojoin_time)) + return 0; if (!weechat_infolist_new_var_integer (ptr_item, "autojoin_done", server->autojoin_done)) return 0; if (!weechat_infolist_new_var_integer (ptr_item, "disable_autojoin", server->disable_autojoin)) @@ -7165,11 +7234,6 @@ irc_server_print_log () else weechat_log_printf (" usermode. . . . . . . . . : '%s'", weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_USERMODE])); - /* command */ - if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_COMMAND])) - weechat_log_printf (" command . . . . . . . . . : null"); - else - weechat_log_printf (" command . . . . . . . . . : (hidden)"); /* command_delay */ if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_COMMAND_DELAY])) weechat_log_printf (" command_delay . . . . . . : null (%d)", @@ -7177,6 +7241,18 @@ irc_server_print_log () else weechat_log_printf (" command_delay . . . . . . : %d", weechat_config_integer (ptr_server->options[IRC_SERVER_OPTION_COMMAND_DELAY])); + /* command */ + if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_COMMAND])) + weechat_log_printf (" command . . . . . . . . . : null"); + else + weechat_log_printf (" command . . . . . . . . . : (hidden)"); + /* autojoin_delay */ + if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_DELAY])) + weechat_log_printf (" autojoin_delay. . . . . . : null (%d)", + IRC_SERVER_OPTION_INTEGER(ptr_server, IRC_SERVER_OPTION_AUTOJOIN_DELAY)); + else + weechat_log_printf (" autojoin_delay. . . . . . : %d", + weechat_config_integer (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN_DELAY])); /* autojoin */ if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_AUTOJOIN])) weechat_log_printf (" autojoin. . . . . . . . . : null ('%s')", @@ -7336,6 +7412,7 @@ irc_server_print_log () weechat_log_printf (" reconnect_delay . . . . . : %d", ptr_server->reconnect_delay); weechat_log_printf (" reconnect_start . . . . . : %lld", (long long)ptr_server->reconnect_start); weechat_log_printf (" command_time. . . . . . . : %lld", (long long)ptr_server->command_time); + weechat_log_printf (" autojoin_time . . . . . . : %lld", (long long)ptr_server->autojoin_time); weechat_log_printf (" autojoin_done . . . . . . : %d", ptr_server->autojoin_done); weechat_log_printf (" disable_autojoin. . . . . : %d", ptr_server->disable_autojoin); weechat_log_printf (" is_away . . . . . . . . . : %d", ptr_server->is_away); diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 12a3b53d927..90be6b29249 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -76,9 +76,10 @@ enum t_irc_server_option IRC_SERVER_OPTION_REALNAME, /* real name */ IRC_SERVER_OPTION_LOCAL_HOSTNAME,/* custom local hostname */ IRC_SERVER_OPTION_USERMODE, /* usermode to set once connected */ + IRC_SERVER_OPTION_COMMAND_DELAY, /* delay before execution of command */ IRC_SERVER_OPTION_COMMAND, /* command to run once connected */ - IRC_SERVER_OPTION_COMMAND_DELAY, /* delay after execution of command */ - IRC_SERVER_OPTION_AUTOJOIN, /* channels to automatically join */ + IRC_SERVER_OPTION_AUTOJOIN_DELAY, /* delay before autojoin */ + IRC_SERVER_OPTION_AUTOJOIN, /* channels to automatically join */ IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC, /* auto set autojoin option */ IRC_SERVER_OPTION_AUTOREJOIN, /* auto rejoin channels when kicked */ IRC_SERVER_OPTION_AUTOREJOIN_DELAY, /* delay before auto rejoin */ @@ -269,7 +270,9 @@ struct t_irc_server int reconnect_delay; /* current reconnect delay (growing) */ time_t reconnect_start; /* this time + delay = reconnect time */ time_t command_time; /* this time + command_delay = time to */ - /* autojoin channels */ + /* execute command */ + time_t autojoin_time; /* this time + autojoin_delay = time to */ + /* auto-join channels */ int autojoin_done; /* 1 if autojoin has been done */ int disable_autojoin; /* 1 if user asked to not autojoin chans */ int is_away; /* 1 is user is marked as away */ @@ -445,6 +448,7 @@ extern void irc_server_switch_address (struct t_irc_server *server, extern void irc_server_disconnect (struct t_irc_server *server, int switch_address, int reconnect); extern void irc_server_disconnect_all (); +extern void irc_server_execute_command (struct t_irc_server *server); extern void irc_server_free_sasl_data (struct t_irc_server *server); extern void irc_server_free (struct t_irc_server *server); extern int irc_server_xfer_send_ready_cb (const void *pointer, void *data, diff --git a/src/plugins/irc/irc-upgrade.c b/src/plugins/irc/irc-upgrade.c index b500a5a7deb..402a225e491 100644 --- a/src/plugins/irc/irc-upgrade.c +++ b/src/plugins/irc/irc-upgrade.c @@ -649,6 +649,7 @@ irc_upgrade_read_cb (const void *pointer, void *data, irc_upgrade_current_server->reconnect_delay = weechat_infolist_integer (infolist, "reconnect_delay"); irc_upgrade_current_server->reconnect_start = weechat_infolist_time (infolist, "reconnect_start"); irc_upgrade_current_server->command_time = weechat_infolist_time (infolist, "command_time"); + irc_upgrade_current_server->autojoin_time = weechat_infolist_time (infolist, "autojoin_time"); irc_upgrade_current_server->autojoin_done = weechat_infolist_integer (infolist, "autojoin_done"); irc_upgrade_current_server->disable_autojoin = weechat_infolist_integer (infolist, "disable_autojoin"); irc_upgrade_current_server->is_away = weechat_infolist_integer (infolist, "is_away"); diff --git a/tests/unit/plugins/irc/test-irc-server.cpp b/tests/unit/plugins/irc/test-irc-server.cpp index f951bc6acc9..99ff5538e65 100644 --- a/tests/unit/plugins/irc/test-irc-server.cpp +++ b/tests/unit/plugins/irc/test-irc-server.cpp @@ -1478,6 +1478,16 @@ TEST(IrcServer, DisconnectAll) /* TODO: write tests */ } +/* + * Tests functions: + * irc_server_execute_command + */ + +TEST(IrcServer, ExecuteCommand) +{ + /* TODO: write tests */ +} + /* * Tests functions: * irc_server_autojoin_create_buffers