diff options
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | doc/de/includes/autogen_user_commands.de.adoc | 6 | ||||
-rw-r--r-- | doc/en/includes/autogen_user_commands.en.adoc | 6 | ||||
-rw-r--r-- | doc/fr/includes/autogen_user_commands.fr.adoc | 6 | ||||
-rw-r--r-- | doc/it/includes/autogen_user_commands.it.adoc | 6 | ||||
-rw-r--r-- | doc/ja/includes/autogen_user_commands.ja.adoc | 6 | ||||
-rw-r--r-- | doc/pl/includes/autogen_user_commands.pl.adoc | 6 | ||||
-rw-r--r-- | doc/sr/includes/autogen_user_commands.sr.adoc | 6 | ||||
-rw-r--r-- | po/cs.po | 7 | ||||
-rw-r--r-- | po/de.po | 7 | ||||
-rw-r--r-- | po/es.po | 7 | ||||
-rw-r--r-- | po/fr.po | 7 | ||||
-rw-r--r-- | po/hu.po | 7 | ||||
-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.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 7 | ||||
-rw-r--r-- | po/ru.po | 7 | ||||
-rw-r--r-- | po/sr.po | 7 | ||||
-rw-r--r-- | po/tr.po | 7 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 28 |
23 files changed, 152 insertions, 15 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 13d5b743e..10c47d158 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -24,6 +24,7 @@ New features:: * core: force ctrl keys to lower case when they are added (issue #1875) * core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213) * alias: use lower case for default aliases (issue #1872) + * irc: add command `/rules` (issue #1864) * irc: add command `/knock` (issue #7) * irc: add server option "registered_mode", add fields "authentication_method" and "sasl_mechanism_used" in server (issue #1625) * irc: add option `join` in command `/autojoin` diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc index f51b5c381..4437226d4 100644 --- a/doc/de/includes/autogen_user_commands.de.adoc +++ b/doc/de/includes/autogen_user_commands.de.adoc @@ -757,6 +757,12 @@ channel: Kanalname target: Servername ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: fordert einen User auf einen oder mehrere Kanäle zu betreten diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc index e9e2f9395..fd28ec0fd 100644 --- a/doc/en/includes/autogen_user_commands.en.adoc +++ b/doc/en/includes/autogen_user_commands.en.adoc @@ -757,6 +757,12 @@ channel: channel name target: server name ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: force a user to join channel(s) diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc index 18d56c50e..fb0bdce88 100644 --- a/doc/fr/includes/autogen_user_commands.fr.adoc +++ b/doc/fr/includes/autogen_user_commands.fr.adoc @@ -757,6 +757,12 @@ raison : raison (les variables spéciales $nick, $channel et $server sont rempl cible : nom du serveur ---- +[[command_irc_rules]] +* `+rules+`: demander les règles du serveur + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: forcer un utilisateur à rejoindre un ou plusieurs canaux diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc index 1656c4b99..307193e5b 100644 --- a/doc/it/includes/autogen_user_commands.it.adoc +++ b/doc/it/includes/autogen_user_commands.it.adoc @@ -757,6 +757,12 @@ channel: channel name destinazione: nome server ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: forza un utente ad entrare su uno o più canali diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index 46650bdac..6766bb810 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -757,6 +757,12 @@ channel: channel name target: サーバ名 ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: ユーザがチャンネルへ参加することを強制 diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc index 4ef65e838..0211f6ef0 100644 --- a/doc/pl/includes/autogen_user_commands.pl.adoc +++ b/doc/pl/includes/autogen_user_commands.pl.adoc @@ -757,6 +757,12 @@ kanał: nazwa kanału cel: nazwa serwera ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: zmusza użytkownika do wejścia na kanał(y) diff --git a/doc/sr/includes/autogen_user_commands.sr.adoc b/doc/sr/includes/autogen_user_commands.sr.adoc index 38f5170ce..065e95fc2 100644 --- a/doc/sr/includes/autogen_user_commands.sr.adoc +++ b/doc/sr/includes/autogen_user_commands.sr.adoc @@ -757,6 +757,12 @@ message: message to send циљ: име сервера ---- +[[command_irc_rules]] +* `+rules+`: request the server rules + +---- +---- + [[command_irc_sajoin]] * `+sajoin+`: форсирање да корисник приступи канал(у/има) @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7863,6 +7863,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "říct serveru, aby se restartoval" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "znovu připojit k serveru(ům)" + msgid "force a user to join channel(s)" msgstr "násilně připojit uživatele ke kanálu/kanálům" @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2023-01-31 07:52+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German - Germany <weechatter@arcor.de>\n" @@ -9834,6 +9834,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "Server dazu bringen sich selbst neu zu starten" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "Mit einem oder mehreren Server(n) erneut verbinden" + msgid "force a user to join channel(s)" msgstr "fordert einen User auf einen oder mehrere Kanäle zu betreten" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8449,6 +8449,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "pedir al servidor que se reinicie" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "reconectar al servidor(es)" + msgid "force a user to join channel(s)" msgstr "fuerza un usuario a unirse a un canal o canales" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" -"PO-Revision-Date: 2023-01-31 18:35+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" +"PO-Revision-Date: 2023-01-31 18:40+0100\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -9648,6 +9648,9 @@ msgstr "" msgid "tell the server to restart itself" msgstr "demander au serveur de redémarrer" +msgid "request the server rules" +msgstr "demander les règles du serveur" + msgid "force a user to join channel(s)" msgstr "forcer un utilisateur à rejoindre un ou plusieurs canaux" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7348,6 +7348,11 @@ msgid "tell the server to restart itself" msgstr "szerver újraindítása" #, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "újracsatlakozás a szerver(ek)hez" + +#, fuzzy msgid "force a user to join channel(s)" msgstr "felhasználó erőszakos eltávolítása a szobából" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -8212,6 +8212,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "chiede al server di riavviarsi" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "riconnette a uno o più server" + msgid "force a user to join channel(s)" msgstr "forza un utente ad entrare su uno o più canali" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -9227,6 +9227,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "サーバに再起動を指示" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "サーバに再接続" + msgid "force a user to join channel(s)" msgstr "ユーザがチャンネルへ参加することを強制" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-12-30 14:10+0100\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -9757,6 +9757,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "mówi serwerowi, aby się ponownie uruchomił" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "ponownie połącz się z serwerem(ami)" + msgid "force a user to join channel(s)" msgstr "zmusza użytkownika do wejścia na kanał(y)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -8990,6 +8990,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "pedir ao servidor para se reiniciar" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "reconectar-se a um servidor" + msgid "force a user to join channel(s)" msgstr "forçar um utilizador a juntar-se a canais" diff --git a/po/pt_BR.po b/po/pt_BR.po index 2e4316539..1c4d2ddc9 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: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7926,6 +7926,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "requisitar ao servidor para reiniciar a si mesmo" +#, fuzzy +#| msgid "shutdown the server" +msgid "request the server rules" +msgstr "desligar o servidor" + msgid "force a user to join channel(s)" msgstr "forçar o usuário a entrar em algum(s) canal(is)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -7385,6 +7385,11 @@ msgid "tell the server to restart itself" msgstr "перезагрузить сервер" #, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "переподключиться к серверу(-ам)" + +#, fuzzy msgid "force a user to join channel(s)" msgstr "принудительно удалить пользователя с канала" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-12-05 09:44+0400\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9935,6 +9935,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "налог серверу да се поново покрене" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "поновно повезивање са сервер(ом/има)" + msgid "force a user to join channel(s)" msgstr "форсирање да корисник приступи канал(у/има)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9969,6 +9969,11 @@ msgstr "" msgid "tell the server to restart itself" msgstr "sunucuya kendisini yeniden başlatmasını söyle" +#, fuzzy +#| msgid "reconnect to server(s)" +msgid "request the server rules" +msgstr "sunuculara yeniden bağlan" + msgid "force a user to join channel(s)" msgstr "bir kullanıcıyı kanal(lar)a katılmaya zorla" diff --git a/po/weechat.pot b/po/weechat.pot index 3f751480e..9429cb902 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: 2023-01-31 18:33+0100\n" +"POT-Creation-Date: 2023-01-31 18:40+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -6674,6 +6674,9 @@ msgstr "" msgid "tell the server to restart itself" msgstr "" +msgid "request the server rules" +msgstr "" + msgid "force a user to join channel(s)" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index c48a2fbc5..76003f957 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -4889,6 +4889,28 @@ IRC_COMMAND_CALLBACK(restart) } /* + * Callback for command "/rules": requests the server rules + */ + +IRC_COMMAND_CALLBACK(rules) +{ + IRC_BUFFER_GET_SERVER(buffer); + IRC_COMMAND_CHECK_SERVER("rules", 1, 1); + + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) argc; + (void) argv; + (void) argv_eol; + + irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "RULES"); + + return WEECHAT_RC_OK; +} + +/* * Callback for command "/sajoin": forces a user to join channel(s). */ @@ -7434,6 +7456,12 @@ irc_command_init () N_("target: server name"), NULL, &irc_command_restart, NULL, NULL); weechat_hook_command ( + "rules", + N_("request the server rules"), + "", + "", + NULL, &irc_command_rules, NULL, NULL); + weechat_hook_command ( "sajoin", N_("force a user to join channel(s)"), N_("<nick> <channel>[,<channel>...]"), |