diff --git a/.gitignore b/.gitignore index 03a3a02f5..4e0d9badf 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ modules/m_ssl_gnutls.cpp modules/m_ssl_openssl.cpp modules/stats run/ +*.mo diff --git a/data/botserv.example.conf b/data/botserv.example.conf index 28dab350b..5dd150f42 100644 --- a/data/botserv.example.conf +++ b/data/botserv.example.conf @@ -323,6 +323,7 @@ command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/ privilege { name = "GREET" + desc = _("Greet message displayed on join") rank = 40 level = 5 flag = "g" diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf index 71965cc94..4aaf00ee0 100644 --- a/data/chanserv.example.conf +++ b/data/chanserv.example.conf @@ -216,6 +216,7 @@ module privilege { name = "ACCESS_CHANGE" + desc = _("Allowed to modify the access list") rank = 0 level = 10 flag = "f" @@ -232,6 +233,7 @@ privilege privilege { name = "ACCESS_LIST" + desc = _("Allowed to view the access list") rank = 10 level = 3 flag = "f" @@ -248,6 +250,7 @@ privilege privilege { name = "AKICK" + desc = _("Allowed to use the AKICK command") rank = 250 level = 10 flag = "K" @@ -264,6 +267,7 @@ privilege privilege { name = "ASSIGN" + desc = _("Allowed to assign/unassign a bot") rank = 270 level = "founder" flag = "s" @@ -280,6 +284,7 @@ privilege privilege { name = "AUTOHALFOP" + desc = _("Automatic halfop upon join") rank = 100 level = 4 flag = "H" @@ -296,6 +301,7 @@ privilege privilege { name = "AUTOOP" + desc = _("Automatic channel operator status upon join") rank = 210 level = 5 flag = "O" @@ -312,6 +318,7 @@ privilege privilege { name = "AUTOOWNER" + desc = _("Automatic owner upon join") rank = 330 level = 9999 flag = "Q" @@ -328,6 +335,7 @@ privilege privilege { name = "AUTOPROTECT" + desc = _("Automatic protect upon join") rank = 240 level = 10 flag = "A" @@ -344,6 +352,7 @@ privilege privilege { name = "AUTOVOICE" + desc = _("Automatic voice on join") rank = 50 level = 3 flag = "V" @@ -360,6 +369,7 @@ privilege privilege { name = "BADWORDS" + desc = _("Allowed to modify channel badwords list") rank = 260 level = 10 flag = "K" @@ -376,6 +386,7 @@ privilege privilege { name = "BAN" + desc = _("Allowed to ban users") rank = 150 level = 4 flag = "b" @@ -392,6 +403,7 @@ privilege privilege { name = "FANTASIA" + desc = _("Allowed to use fantasy commands") rank = 30 level = 3 flag = "c" @@ -411,6 +423,7 @@ privilege privilege { name = "FOUNDER" + desc = _("Allowed to issue commands restricted to channel founders") rank = 360 level = 10000 flag = "F" @@ -428,6 +441,7 @@ privilege privilege { name = "GETKEY" + desc = _("Allowed to use GETKEY command") rank = 180 level = 5 flag = "G" @@ -445,6 +459,7 @@ privilege privilege { name = "HALFOP" + desc = _("Allowed to (de)halfop users") rank = 120 level = 5 flag = "h" @@ -462,6 +477,7 @@ privilege privilege { name = "HALFOPME" + desc = _("Allowed to (de)halfop themself") rank = 110 level = 4 flag = "h" @@ -479,6 +495,7 @@ privilege privilege { name = "INFO" + desc = _("Allowed to get full INFO output") rank = 80 level = 9999 flag = "I" @@ -496,6 +513,7 @@ privilege privilege { name = "INVITE" + desc = _("Allowed to use the INVITE command") rank = 190 level = 5 flag = "i" @@ -512,6 +530,7 @@ privilege privilege { name = "KICK" + desc = _("Allowed to use the KICK command") rank = 130 level = 4 flag = "k" @@ -529,6 +548,7 @@ privilege privilege { name = "MEMO" + desc = _("Allowed to read channel memos") rank = 280 level = 10 flag = "m" @@ -546,6 +566,7 @@ privilege privilege { name = "MODE" + desc = _("Allowed to use the MODE command") rank = 170 level = 9999 flag = "s" @@ -562,6 +583,7 @@ privilege privilege { name = "NOKICK" + desc = _("Prevents users being kicked by services") rank = 20 level = 1 flag = "N" @@ -579,6 +601,7 @@ privilege privilege { name = "OP" + desc = _("Allowed to (de)op users") rank = 230 level = 5 flag = "o" @@ -596,6 +619,7 @@ privilege privilege { name = "OPME" + desc = _("Allowed to (de)op themself") rank = 220 level = 5 flag = "o" @@ -613,6 +637,7 @@ privilege privilege { name = "OWNER" + desc = _("Allowed to (de)owner users") rank = 350 level = "founder" flag = "q" @@ -630,6 +655,7 @@ privilege privilege { name = "OWNERME" + desc = _("Allowed to (de)owner themself") rank = 340 level = 9999 flag = "q" @@ -647,6 +673,7 @@ privilege privilege { name = "PROTECT" + desc = _("Allowed to (de)protect users") rank = 310 level = 9999 flag = "a" @@ -664,6 +691,7 @@ privilege privilege { name = "PROTECTME" + desc = _("Allowed to (de)protect themself") rank = 300 level = 10 flag = "a" @@ -681,6 +709,7 @@ privilege privilege { name = "SAY" + desc = _("Allowed to use SAY and ACT commands") rank = 90 level = 5 flag = "B" @@ -700,6 +729,7 @@ privilege privilege { name = "SET" + desc = _("Allowed to set channel settings") rank = 320 level = 9999 flag = "s" @@ -717,6 +747,7 @@ privilege privilege { name = "SIGNKICK" + desc = _("No signed kick when SIGNKICK LEVEL is used") rank = 140 level = 9999 flag = "K" @@ -733,6 +764,7 @@ privilege privilege { name = "TOPIC" + desc = _("Allowed to change channel topics") rank = 160 level = 5 flag = "t" @@ -749,6 +781,7 @@ privilege privilege { name = "UNBAN" + desc = _("Allowed to unban users") rank = 200 level = 4 flag = "u" @@ -765,6 +798,7 @@ privilege privilege { name = "UNBANME" + desc = _("Allowed to unban themself") rank = 200 level = 4 flag = "U" @@ -782,6 +816,7 @@ privilege privilege { name = "VOICE" + desc = _("Allowed to (de)voice users") rank = 70 level = 4 flag = "v" @@ -799,6 +834,7 @@ privilege privilege { name = "VOICEME" + desc = _("Allowed to (de)voice themself") rank = 60 level = 3 flag = "v" diff --git a/language/anope.en_US.po b/language/anope.en_US.po index 024d3bb82..d8971fa87 100644 --- a/language/anope.en_US.po +++ b/language/anope.en_US.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Anope\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-20 00:02+0000\n" -"PO-Revision-Date: 2023-12-20 00:07+0000\n" +"POT-Creation-Date: 2023-12-22 15:42+0000\n" +"PO-Revision-Date: 2023-12-22 15:44+0000\n" "Last-Translator: Sadie Powell \n" "Language-Team: English\n" "Language: en_US\n" @@ -1965,32 +1965,32 @@ msgstr "All vhosts in the group %s have been set to %s." msgid "All vhosts in the group %s have been set to %s@%s." msgstr "All vhosts in the group %s have been set to %s@%s." -msgid "Allowed to (de)halfop him/herself" -msgstr "Allowed to (de)halfop him/herself" +msgid "Allowed to (de)halfop themself" +msgstr "Allowed to (de)halfop themself" msgid "Allowed to (de)halfop users" msgstr "Allowed to (de)halfop users" -msgid "Allowed to (de)op him/herself" -msgstr "Allowed to (de)op him/herself" +msgid "Allowed to (de)op themself" +msgstr "Allowed to (de)op themself" msgid "Allowed to (de)op users" msgstr "Allowed to (de)op users" -msgid "Allowed to (de)owner him/herself" -msgstr "Allowed to (de)owner him/herself" +msgid "Allowed to (de)owner themself" +msgstr "Allowed to (de)owner themself" msgid "Allowed to (de)owner users" msgstr "Allowed to (de)owner users" -msgid "Allowed to (de)protect him/herself" -msgstr "Allowed to (de)protect him/herself" +msgid "Allowed to (de)protect themself" +msgstr "Allowed to (de)protect themself" msgid "Allowed to (de)protect users" msgstr "Allowed to (de)protect users" -msgid "Allowed to (de)voice him/herself" -msgstr "Allowed to (de)voice him/herself" +msgid "Allowed to (de)voice themself" +msgstr "Allowed to (de)voice themself" msgid "Allowed to (de)voice users" msgstr "Allowed to (de)voice users" @@ -2022,6 +2022,9 @@ msgstr "Allowed to read channel memos" msgid "Allowed to set channel settings" msgstr "Allowed to set channel settings" +msgid "Allowed to unban themself" +msgstr "Allowed to unban themself" + msgid "Allowed to unban users" msgstr "Allowed to unban users" @@ -5458,8 +5461,8 @@ msgstr "Prevent the nickname from appearing in the LIST command" msgid "Prevent the nickname from expiring" msgstr "Prevent the nickname from expiring" -msgid "Prevents users being kicked by Services" -msgstr "Prevents users being kicked by Services" +msgid "Prevents users being kicked by services" +msgstr "Prevents users being kicked by services" msgid "Private" msgstr "Private" diff --git a/language/anope.it_IT.po b/language/anope.it_IT.po index 05060b3d7..a139226e2 100644 --- a/language/anope.it_IT.po +++ b/language/anope.it_IT.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Anope\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-20 19:02+0100\n" -"PO-Revision-Date: 2023-12-20 19:02+0100\n" +"POT-Creation-Date: 2023-12-22 15:42+0000\n" +"PO-Revision-Date: 2023-12-22 15:53+0000\n" "Last-Translator: Dragone2 \n" "Language-Team: Italian\n" "Language: it_IT\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0.1\n" +"X-Generator: Poedit 3.4\n" #, c-format msgid "%d channel(s) cleared, and %d channel(s) dropped." @@ -1972,31 +1972,31 @@ msgstr "Tutti i vHost nel gruppo %s sono stati impostati a %s." msgid "All vhosts in the group %s have been set to %s@%s." msgstr "Tutti i vHost nel gruppo %s sono stati impostati a %s@%s." -msgid "Allowed to (de)halfop him/herself" +msgid "Allowed to (de)halfop themself" msgstr "Autorizzato a dare o rimuovere lo stato di halfop a sé stesso" msgid "Allowed to (de)halfop users" msgstr "Autorizzato a dare o rimuovere lo stato di halfop agli utenti" -msgid "Allowed to (de)op him/herself" +msgid "Allowed to (de)op themself" msgstr "Autorizzato a dare o rimuovere lo stato di op a sé stesso" msgid "Allowed to (de)op users" msgstr "Autorizzato a dare o rimuovere lo stato di op agli utenti" -msgid "Allowed to (de)owner him/herself" +msgid "Allowed to (de)owner themself" msgstr "Autorizzato a dare o rimuovere lo stato di owner a sé stesso" msgid "Allowed to (de)owner users" msgstr "Autorizzato a dare o rimuovere lo stato di owner agli utenti" -msgid "Allowed to (de)protect him/herself" +msgid "Allowed to (de)protect themself" msgstr "Autorizzato a dare o rimuovere lo stato di protect a sé stesso" msgid "Allowed to (de)protect users" msgstr "Autorizzato a dare o rimuovere lo stato di protect agli utenti" -msgid "Allowed to (de)voice him/herself" +msgid "Allowed to (de)voice themself" msgstr "Autorizzato a dare o rimuovere lo stato di voice a sé stesso" msgid "Allowed to (de)voice users" @@ -2029,6 +2029,9 @@ msgstr "Autorizzato alla lettura dei memo del canale" msgid "Allowed to set channel settings" msgstr "Autorizzato ad impostare i impostazioni del canale" +msgid "Allowed to unban themself" +msgstr "" + msgid "Allowed to unban users" msgstr "Autorizzato a rimuovere i ban sugli utenti" @@ -5494,7 +5497,7 @@ msgstr "Nasconde il nickname dall'output del comando LIST" msgid "Prevent the nickname from expiring" msgstr "Impedisce ad un nickname di scadere" -msgid "Prevents users being kicked by Services" +msgid "Prevents users being kicked by services" msgstr "Impedisce agli utenti di essere espulsi dai Services" msgid "Private" diff --git a/src/access.cpp b/src/access.cpp index 063280809..6e4232429 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -16,59 +16,8 @@ #include "account.h" #include "protocol.h" -static struct -{ - Anope::string name; - Anope::string desc; -} descriptions[] = { - {"ACCESS_CHANGE", _("Allowed to modify the access list")}, - {"ACCESS_LIST", _("Allowed to view the access list")}, - {"AKICK", _("Allowed to use the AKICK command")}, - {"ASSIGN", _("Allowed to assign/unassign a bot")}, - {"AUTOHALFOP", _("Automatic halfop upon join")}, - {"AUTOOP", _("Automatic channel operator status upon join")}, - {"AUTOOWNER", _("Automatic owner upon join")}, - {"AUTOPROTECT", _("Automatic protect upon join")}, - {"AUTOVOICE", _("Automatic voice on join")}, - {"BADWORDS", _("Allowed to modify channel badwords list")}, - {"BAN", _("Allowed to ban users")}, - {"FANTASIA", _("Allowed to use fantasy commands")}, - {"FOUNDER", _("Allowed to issue commands restricted to channel founders")}, - {"GETKEY", _("Allowed to use GETKEY command")}, - {"GREET", _("Greet message displayed on join")}, - {"HALFOP", _("Allowed to (de)halfop users")}, - {"HALFOPME", _("Allowed to (de)halfop him/herself")}, - {"INFO", _("Allowed to get full INFO output")}, - {"INVITE", _("Allowed to use the INVITE command")}, - {"KICK", _("Allowed to use the KICK command")}, - {"MEMO", _("Allowed to read channel memos")}, - {"MODE", _("Allowed to use the MODE command")}, - {"NOKICK", _("Prevents users being kicked by Services")}, - {"OP", _("Allowed to (de)op users")}, - {"OPME", _("Allowed to (de)op him/herself")}, - {"OWNER", _("Allowed to (de)owner users")}, - {"OWNERME", _("Allowed to (de)owner him/herself")}, - {"PROTECT", _("Allowed to (de)protect users")}, - {"PROTECTME", _("Allowed to (de)protect him/herself")}, - {"SAY", _("Allowed to use SAY and ACT commands")}, - {"SET", _("Allowed to set channel settings")}, - {"SIGNKICK", _("No signed kick when SIGNKICK LEVEL is used")}, - {"TOPIC", _("Allowed to change channel topics")}, - {"UNBAN", _("Allowed to unban users")}, - {"VOICE", _("Allowed to (de)voice users")}, - {"VOICEME", _("Allowed to (de)voice him/herself")} -}; - Privilege::Privilege(const Anope::string &n, const Anope::string &d, int r) : name(n), desc(d), rank(r) { - if (this->desc.empty()) - { - for (const auto &description : descriptions) - { - if (description.name.equals_ci(name)) - this->desc = description.desc; - } - } } bool Privilege::operator==(const Privilege &other) const