1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Add a type for wrapping examples instead of using manual linewraps.

At a later date we should revise the examples for all commands for
consistency.
This commit is contained in:
Sadie Powell
2026-02-24 18:10:39 +00:00
parent 538b2cf035
commit d0c2baeed4
19 changed files with 473 additions and 262 deletions
+16
View File
@@ -101,6 +101,22 @@ namespace Anope
extern CoreExport Anope::string Template(const Anope::string &str, const Anope::map<Anope::string> &vars);
}
class CoreExport ExampleWrapper final
{
private:
struct Example final
{
Anope::string example;
Anope::string description;
Anope::string privilege;
};
std::vector<Example> entries;
public:
void AddEntry(const Anope::string &example, const Anope::string &desc, const Anope::string &priv = "");
void SendTo(CommandSource &source);
};
class CoreExport HelpWrapper final
{
private:
+177 -128
View File
@@ -16,8 +16,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Anope\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-24 15:34+0000\n"
"PO-Revision-Date: 2026-02-24 15:34+0000\n"
"POT-Creation-Date: 2026-02-24 18:12+0000\n"
"PO-Revision-Date: 2026-02-24 18:12+0000\n"
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
"Language-Team: English\n"
"Language: en_US\n"
@@ -1294,6 +1294,9 @@ msgstr ""
msgid "ADD message"
msgstr ""
msgid "ADD nickname fingerprint"
msgstr ""
msgid "ADD oper type"
msgstr ""
@@ -1465,6 +1468,15 @@ msgstr ""
msgid "Additionally, if fantasy is enabled fantasy commands can be executed by prefixing the command name with one of the following fantasy prefixes: %s"
msgstr ""
msgid "Adds a mode lock on the moderated, no external messages, topic lock flag modes as well as a ban on *!*@*.example.com."
msgstr ""
msgid "Adds the specified fingerprint to the certificate list of nickname."
msgstr ""
msgid "Adds your current fingerprint to your certificate list."
msgstr ""
#, c-format
msgid "All O:lines of %s have been reset."
msgstr ""
@@ -1737,11 +1749,7 @@ msgstr ""
msgid "Allows you to change and view Services Operators. Note that operators removed by this command but are still set in the configuration file are not permanently affected by this."
msgstr ""
msgid ""
"Allows you to change and view configuration settings. Settings changed by this command are temporary and will not be reflected back into the configuration file, and will be lost if Anope is shut down, restarted, or the configuration is reloaded.\n"
"\n"
"Example:\n"
" MODIFYnickservregdelay15m"
msgid "Allows you to change and view configuration settings. Settings changed by this command are temporary and will not be reflected back into the configuration file, and will be lost if Anope is shut down, restarted, or the configuration is reloaded."
msgstr ""
msgid "Allows you to choose the way services are communicating with the given user. With MSG set, services will use messages, else they'll use notices."
@@ -2124,6 +2132,9 @@ msgstr ""
msgid "Changes the password used to identify you as the nick's owner."
msgstr ""
msgid "Changes the registration delay to 15 minutes."
msgstr ""
msgid "Changes the successor of a channel. If the founder's nickname expires or is dropped while the channel is still registered, the successor will become the new founder of the channel. The successor's nickname must be a registered one. If there's no successor set, then the first nickname on the access list (with the highest access, if applicable) will become the new founder, but if the access list is empty, the channel will be dropped."
msgstr ""
@@ -2285,6 +2296,9 @@ msgstr ""
msgid "Cleared info from %s."
msgstr ""
msgid "Clears all extended bans that start with channel:."
msgstr ""
msgid "Colors kicker"
msgstr ""
@@ -2454,6 +2468,12 @@ msgstr ""
msgid "DEL entry-num"
msgstr ""
msgid "DEL fingerprint"
msgstr ""
msgid "DEL nickname fingerprint"
msgstr ""
msgid "DEL oper"
msgstr ""
@@ -2686,20 +2706,13 @@ msgstr[1] ""
msgid "Deleted info from %s."
msgstr ""
msgid ""
"Deletes the specified memo or memos. You can supply multiple memo numbers or ranges of numbers instead of a single number, as in the second example below.\n"
"\n"
"If LAST is given, the last memo will be deleted.\n"
"\n"
"If ALL is given, deletes all of your memos.\n"
"\n"
"Examples:\n"
"\n"
" DEL1\n"
" Deletes your first memo.\n"
"\n"
" DEL2-5,7-9\n"
" Deletes memos numbered 2 through 5 and 7 through 9."
msgid "Deletes all of your memos."
msgstr ""
msgid "Deletes memos numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Deletes the specified memo or memos. You can supply multiple memo numbers or ranges of numbers instead of a single number, as in the second example below."
msgstr ""
msgid "Deletes the vhost assigned to the given nick from the database."
@@ -2711,6 +2724,12 @@ msgstr ""
msgid "Deletes the vhost for all nicks in the same account as that of the given nick."
msgstr ""
msgid "Deletes your first memo."
msgstr ""
msgid "Deletes your last memo."
msgstr ""
#, c-format
msgid "Depooled %s."
msgstr ""
@@ -2751,6 +2770,12 @@ msgstr ""
msgid "Displayed records matching key %s (count: %d)."
msgstr ""
msgid "Displays all of your memos."
msgstr ""
msgid "Displays any new memos."
msgstr ""
msgid "Displays information about a given nickname"
msgstr ""
@@ -2760,9 +2785,18 @@ msgstr ""
msgid "Displays information about your memos"
msgstr ""
msgid "Displays memos numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Displays one or more vhost entries"
msgstr ""
msgid "Displays the current certificate list of nickname as well as the details about who added each entry and when they added it."
msgstr ""
msgid "Displays the current certificate list of nickname."
msgstr ""
msgid "Displays the top 10 users of a channel"
msgstr ""
@@ -2784,6 +2818,15 @@ msgstr ""
msgid "Displays your Global Stats"
msgstr ""
msgid "Displays your current certificate list as well the details about who added each entry and when they added it."
msgstr ""
msgid "Displays your current certificate list."
msgstr ""
msgid "Displays your last memo."
msgstr ""
msgid "Don't use AMSGs!"
msgstr ""
@@ -3019,6 +3062,9 @@ msgstr ""
msgid "Error! The vident is too long, please use an ident shorter than %zu characters."
msgstr ""
msgid "Examples:"
msgstr ""
#, c-format
msgid "Exception for %s has been updated to %d."
msgstr ""
@@ -3315,6 +3361,9 @@ msgstr ""
msgid "LIMIT enforced on %s, %zu users removed."
msgstr ""
msgid "LIST nickname"
msgstr ""
msgid "LIST threshold"
msgstr ""
@@ -3438,6 +3487,24 @@ msgstr ""
msgid "List your memos"
msgstr ""
msgid "Lists AKILL entries numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists SNLINE entries numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists SQLINE entries numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists access entries numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists access entries on #channel numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists access entries on #channel that match *nick*."
msgstr ""
msgid ""
"Lists all available bots on this network.\n"
"\n"
@@ -3475,19 +3542,19 @@ msgid ""
"\n"
"Note that a preceding '#' specifies a range, channel names are to be written without '#'.\n"
"\n"
"If the SUSPENDED or NOEXPIRE options are given, only channels which, respectively, are SUSPENDED or have the NOEXPIRE flag set will be displayed. If multiple options are given, all channels matching at least one option will be displayed. Note that these options are limited to Services Operators.\n"
"\n"
"Examples:\n"
"\n"
" LIST*anope*\n"
" Lists all registered channels with anope in their\n"
" names (case insensitive).\n"
"\n"
" LIST*NOEXPIRE\n"
" Lists all registered channels which have been set to not expire.\n"
"\n"
" LIST #51-100\n"
" Lists all registered channels within the given range (51-100)."
"If the SUSPENDED or NOEXPIRE options are given, only channels which, respectively, are SUSPENDED or have the NOEXPIRE flag set will be displayed. If multiple options are given, all channels matching at least one option will be displayed. Note that these options are limited to Services Operators."
msgstr ""
msgid "Lists all registered channels that have been set to not expire."
msgstr ""
msgid "Lists all registered channels that have been suspended."
msgstr ""
msgid "Lists all registered channels with anope in their name (case insensitive). "
msgstr ""
msgid "Lists all registered channels within the given range (51-100)."
msgstr ""
msgid ""
@@ -3495,22 +3562,28 @@ msgid ""
"\n"
"Note that a preceding '#' specifies a range.\n"
"\n"
"If the DISPLAY, NOEXPIRE, SUSPENDED, or UNCONFIRMED options are given only nicks which, respectively, are display nicks, will not expire, are suspended, or are unconfirmed will be shown. If multiple options are given, nicks must match every option to be shown. Note that these options are limited to Services Operators.\n"
"\n"
"Examples:\n"
"\n"
" LIST *!joeuser@foo.com\n"
" Lists all registered nicks owned by joeuser@foo.com.\n"
"\n"
" LIST *Bot*!*@*\n"
" Lists all registered nicks with Bot in their\n"
" names (case insensitive).\n"
"\n"
" LIST * NOEXPIRE\n"
" Lists all registered nicks which have been set to not expire.\n"
"\n"
" LIST #51-100\n"
" Lists all registered nicks within the given range (51-100)."
"If the DISPLAY, NOEXPIRE, SUSPENDED, or UNCONFIRMED options are given only nicks which, respectively, are display nicks, will not expire, are suspended, or are unconfirmed will be shown. If multiple options are given, nicks must match every option to be shown. Note that these options are limited to Services Operators."
msgstr ""
msgid "Lists all registered nicks owned by a user who last connected from the userhost foobar@example.com (case insensitive)."
msgstr ""
msgid "Lists all registered nicks that are the display nickname for their account."
msgstr ""
msgid "Lists all registered nicks that have been set to not expire."
msgstr ""
msgid "Lists all registered nicks that have been suspended."
msgstr ""
msgid "Lists all registered nicks that have not been confirmed yet."
msgstr ""
msgid "Lists all registered nicks with Bot in their name (case insensitive)."
msgstr ""
msgid "Lists all registered nicks within the given range (51-100)."
msgstr ""
msgid "Lists all user records"
@@ -3522,15 +3595,21 @@ msgid ""
"If pattern is given, lists only users that match it (it must be in the format nick!user@host[#realname]). If channel is given, lists only users that are on the given channel. If INVISIBLE is specified, only users with the +i flag will be listed."
msgstr ""
msgid ""
"Lists any memos you currently have. With NEW, lists only new (unread) memos. Unread memos are marked with a \"*\" to the left of the memo number. You can also specify a list of numbers, as in the example below:\n"
" LIST 2-5,7-9\n"
" Lists memos numbered 2 through 5 and 7 through 9."
msgid "Lists any memos you currently have. With NEW, lists only new (unread) memos. Unread memos are marked with a \"*\" to the left of the memo number. You can also specify a list of numbers."
msgstr ""
msgid "Lists any new memos."
msgstr ""
msgid "Lists available bots"
msgstr ""
msgid "Lists bad word entries on #channel numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Lists bad word entries on #channel that match *UwU*."
msgstr ""
msgid "Lists currently loaded modules."
msgstr ""
@@ -3540,6 +3619,9 @@ msgstr ""
msgid "Lists information about the specified registered channel, including its founder, time of registration, last time used, and description. If the user issuing the command has the appropriate access for it, then the successor, last topic set, settings and expiration time will also be displayed when applicable."
msgstr ""
msgid "Lists memos numbered 2 through 5 and 7 through 9."
msgstr ""
msgid "Load a module"
msgstr ""
@@ -3595,19 +3677,8 @@ msgid ""
"\n"
"The %sLOCK command allows you to add, delete, and view mode locks on a channel. If a mode is locked on or off, services will not allow that mode to be changed. The SET command will clear all existing mode locks and set the new one given, while ADD and DEL modify the existing mode lock.\n"
"\n"
"Example:\n"
" %s#channelLOCKADD+bmnt*!*@*.example.com\n"
"\n"
"\n"
"The %sSET command allows you to set modes through services. Wildcards * and ? may be given as parameters for list and status modes.\n"
"\n"
"Example:\n"
" %s#channelSET+v*\n"
" Sets voice status to all users in the channel.\n"
"\n"
" %s#channelSET-b~c:*\n"
" Clears all extended bans that start with ~c:\n"
"\n"
"The %sCLEAR command is an easy way to clear modes on a channel. what may be any mode name. Examples include bans, excepts, inviteoverrides, ops, halfops, and voices. If what is not given then all basic modes are removed."
msgstr ""
@@ -3653,10 +3724,7 @@ msgid ""
"\n"
"The DEL command removes the given word from the bad words list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
"\n"
"The LIST command displays the bad words list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" #channelLIST2-5,7-9\n"
" Lists bad words entries numbered 2 through 5 and\n"
" 7 through 9.\n"
"The LIST command displays the bad words list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"The CLEAR command clears all entries from the bad words list."
msgstr ""
@@ -3813,22 +3881,7 @@ msgstr ""
msgid "Modes cleared on %s and the channel destroyed."
msgstr ""
#, c-format
msgid ""
"Modifies or displays the certificate list for your nick. If you connect to IRC and provide a client certificate with a matching fingerprint in the cert list, you will be automatically identified to services. Services Operators may provide a nick to modify other users' certificate lists.\n"
"\n"
"Examples:\n"
"\n"
" %sADD\n"
" Adds your current fingerprint to the certificate list and\n"
" automatically identifies you when you connect to IRC\n"
" using this fingerprint.\n"
"\n"
" %sDEL<fingerprint>\n"
" Removes the fingerprint <fingerprint> from your certificate list.\n"
"\n"
" %sLIST\n"
" Displays the current certificate list."
msgid "Modifies or displays the certificate list for your nick. If you connect to IRC and provide a client certificate with a matching fingerprint in the cert list, you will be automatically identified to services. Services Operators may provide a nick to modify other users' certificate lists."
msgstr ""
#, c-format
@@ -4556,6 +4609,15 @@ msgstr ""
msgid "Removes a selected nicks status modes on a channel. If nick is omitted then your status is removed. If channel is omitted then your channel status is removed on every channel you are in."
msgstr ""
msgid "Removes all entries that were added in the last 30 minutes."
msgstr ""
msgid "Removes the specified fingerprint from the certificate list of nickname."
msgstr ""
msgid "Removes the specified fingerprint from your certificate list."
msgstr ""
#, c-format
msgid "Removing %s because %s covers it."
msgstr ""
@@ -4643,6 +4705,9 @@ msgstr ""
msgid "Searches logs for a matching pattern"
msgstr ""
msgid "Searches the last 21 days worth of logs for messages containing Anope and lists the most recent 500 of them."
msgstr ""
msgid "Secure founder"
msgstr ""
@@ -4705,6 +4770,15 @@ msgstr ""
msgid "Sends a memo and requests a read receipt"
msgstr ""
msgid "Sends a memo to the channel when someone uses the chanserv/xop command on #anope."
msgstr ""
msgid "Sends a message to channel operators and above when someone uses the chanserv/access command on #anope."
msgstr ""
msgid "Sends a notice to channel voices and above when someone uses the chanserv/flags command on #anope."
msgstr ""
msgid "Sends all registered users a memo containing memo-text."
msgstr ""
@@ -4717,11 +4791,7 @@ msgstr ""
msgid "Sends the named nick or channel a memo containing memo-text. When sending to a nickname, the recipient will receive a notice that they have a new memo. The target nickname/channel must be registered. Once the memo is read by its recipient, an automatic notification memo will be sent to the sender informing them that the memo has been read."
msgstr ""
msgid ""
"Sends you the text of the memos specified. If LAST is given, sends you the memo you most recently received. If NEW is given, sends you all of your new memos. If ALL is given, sends you all of your memos. Otherwise, sends you memo number num. You can also give a list of numbers, as in this example:\n"
"\n"
" READ 2-5,7-9\n"
" Displays memos numbered 2 through 5 and 7 through 9."
msgid "Sends you the text of the memos specified. If LAST is given, sends you the memo you most recently received. If NEW is given, sends you all of your new memos. If ALL is given, sends you all of your memos. Otherwise, sends you memo number num. You can also give a list of numbers."
msgstr ""
msgid "Server"
@@ -5046,6 +5116,9 @@ msgstr ""
msgid "Sets various nickname options. option can be one of:"
msgstr ""
msgid "Sets voice status on all users in the channel."
msgstr ""
msgid "Sets whether services should set channel status modes on you automatically."
msgstr ""
@@ -5106,6 +5179,9 @@ msgstr ""
msgid "Showed %zu/%zu matches for %s."
msgstr ""
msgid "Shows the current server configuration."
msgstr ""
msgid "Sign kicks that are done with the KICK command"
msgstr ""
@@ -5315,10 +5391,7 @@ msgid ""
"\n"
"The %sDEL command removes the given nick from the %s list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
"\n"
"The %sLIST command displays the %s list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" %s#channelLIST2-5,7-9\n"
" Lists %s entries numbered 2 through 5 and\n"
" 7 through 9.\n"
"The %sLIST command displays the %s list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"The %sCLEAR command clears all entries of the %s list."
msgstr ""
@@ -5327,10 +5400,7 @@ msgstr ""
msgid ""
"The %sDEL command removes the given mask from the AKILL list if it is present. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
"\n"
"The %sLIST command displays the AKILL list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" %sLIST2-5,7-9\n"
" Lists AKILL entries numbered 2 through 5 and 7\n"
" through 9.\n"
"The %sLIST command displays the AKILL list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"%sVIEW is a more verbose version of %sLIST, and will show who added an AKILL, the date it was added, and when it expires, as well as the user@host/ip mask and reason.\n"
"\n"
@@ -5341,10 +5411,7 @@ msgstr ""
msgid ""
"The %sDEL command removes the given nick from the access list. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.) You may remove yourself from an access list, even if you do not have access to modify that list otherwise.\n"
"\n"
"The %sLIST command displays the access list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" %s#channelLIST2-5,7-9\n"
" Lists access entries numbered 2 through 5 and\n"
" 7 through 9.\n"
"The %sLIST command displays the access list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"The %sVIEW command displays the access list similar to %sLIST but shows the creator and last used time.\n"
"\n"
@@ -5354,10 +5421,7 @@ msgstr ""
msgid ""
"The SNLINEDEL command removes the given mask from the SNLINE list if it is present. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
"\n"
"The SNLINELIST command displays the SNLINE list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" SNLINELIST2-5,7-9\n"
" Lists SNLINE entries numbered 2 through 5 and 7\n"
" through 9.\n"
"The SNLINELIST command displays the SNLINE list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"SNLINEVIEW is a more verbose version of SNLINELIST, and will show who added an SNLINE, the date it was added, and when it expires, as well as the realname mask and reason.\n"
"\n"
@@ -5367,25 +5431,17 @@ msgstr ""
msgid ""
"The SQLINEDEL command removes the given mask from the SQLINE list if it is present. If a list of entry numbers is given, those entries are deleted. (See the example for LIST below.)\n"
"\n"
"The SQLINELIST command displays the SQLINE list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown; for example:\n"
" SQLINELIST2-5,7-9\n"
" Lists SQLINE entries numbered 2 through 5 and 7\n"
" through 9.\n"
"The SQLINELIST command displays the SQLINE list. If a wildcard mask is given, only those entries matching the mask are displayed. If a list of entry numbers is given, only those entries are shown.\n"
"\n"
"SQLINEVIEW is a more verbose version of SQLINELIST, and will show who added an SQLINE, the date it was added, and when it expires, as well as the mask and reason.\n"
"\n"
"SQLINECLEAR clears all entries of the SQLINE list."
msgstr ""
#, c-format
msgid ""
"The STATS command prints out statistics about stored nicks and memory usage.\n"
"\n"
"The CLEAR command lets you clean the database by removing all entries from the database that were added within time.\n"
"\n"
"Example:\n"
" %sCLEAR30m\n"
" Will remove all entries that were added within the last 30 minutes."
"The CLEAR command lets you clean the database by removing all entries from the database that were added within time."
msgstr ""
msgid "The email parameter is optional and will set the email address for your nick immediately. You may also wish to SETHIDE it after registering if it isn't the default setting already."
@@ -5401,11 +5457,7 @@ msgid ""
"\n"
"Which are used to message, notice, and memo the channel respectively. With MESSAGE or NOTICE you must have a service bot assigned to and joined to your channel. Status may be a channel status such as @ or +.\n"
"\n"
"To remove a logging method use the same syntax as you would to add it.\n"
"\n"
"Example:\n"
" %s#anopechanserv/accessMESSAGE@\n"
" Would message any channel operators whenever someone used the ACCESS command on ChanServ on the channel."
"To remove a logging method use the same syntax as you would to add it."
msgstr ""
#, c-format
@@ -5720,13 +5772,7 @@ msgstr ""
msgid "This command retrieves the vhost requests."
msgstr ""
msgid ""
"This command searches the services logfiles for messages that match the given pattern. The day and limit argument may be used to specify how many days of logs to search and the number of replies to limit to. By default this command searches one week of logs, and limits replies to 50.\n"
"\n"
"For example:\n"
" LOGSEARCH+21d+500lAnope\n"
" Searches the last 21 days worth of logs for messages\n"
" containing Anope and lists the most recent 500 of them."
msgid "This command searches the services logfiles for messages that match the given pattern. The day and limit argument may be used to specify how many days of logs to search and the number of replies to limit to. By default this command searches one week of logs, and limits replies to 50."
msgstr ""
msgid "This command tells you what a users access is on a channel and what access entries, if any, they match. Additionally it will tell you of any auto kick entries they match. Usage of this command is limited to users who have the ability to modify access entries on the channel."
@@ -6079,6 +6125,9 @@ msgstr ""
msgid "VIEW host"
msgstr ""
msgid "VIEW nickname"
msgstr ""
msgid "VIEW [mask | list | id]"
msgstr ""
+11 -4
View File
@@ -501,16 +501,23 @@ public:
"The \002LIST\002 command displays the bad words list. If "
"a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002#channel\033LIST\0332-5,7-9\002\n"
" Lists bad words entries numbered 2 through 5 and\n"
" 7 through 9."
"only those entries are shown."
"\n\n"
"The \002CLEAR\002 command clears all entries from the "
"bad words list."
),
source.service->GetQueryCommand("generic/help").c_str(),
source.command.nobreak().c_str());
ExampleWrapper examples;
examples.AddEntry("#channel LIST 2-5,7-9", _(
"Lists bad word entries on \037#channel\037 numbered 2 through 5 and 7 through 9."
));
examples.AddEntry("#channel LIST *UwU*", _(
"Lists bad word entries on \037#channel\037 that match \037*UwU*\037."
));
examples.SendTo(source);
return true;
}
};
+10 -5
View File
@@ -635,10 +635,7 @@ public:
"The \002%s\033LIST\002 command displays the access list. If "
"a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002%s\033#channel\033LIST\0332-5,7-9\002\n"
" Lists access entries numbered 2 through 5 and\n"
" 7 through 9."
"only those entries are shown."
"\n\n"
"The \002%s\033VIEW\002 command displays the access list similar "
"to \002%s\033LIST\002 but shows the creator and last used time."
@@ -650,9 +647,17 @@ public:
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str());
ExampleWrapper examples;
examples.AddEntry("#channel LIST 2-5,7-9", _(
"Lists access entries on \037#channel\037 numbered 2 through 5 and 7 through 9."
));
examples.AddEntry("#channel LIST *nick*", _(
"Lists access entries on \037#channel\037 that match \037*nick*\037."
));
examples.SendTo(source);
BotInfo *bi;
Anope::string cmd;
if (Command::FindCommandFromService("chanserv/levels", bi, cmd))
+15 -12
View File
@@ -154,20 +154,23 @@ public:
"flag set will be displayed. If multiple options are given, "
"all channels matching at least one option will be displayed. "
"Note that these options are limited to \037Services Operators\037."
"\n\n"
"Examples:"
"\n\n"
" \002LIST\033*anope*\002\n"
" Lists all registered channels with \002anope\002 in their\n"
" names (case insensitive)."
"\n\n"
" \002LIST\033*\033NOEXPIRE\002\n"
" Lists all registered channels which have been set to not expire."
"\n\n"
" \002LIST #51-100\002\n"
" Lists all registered channels within the given range (51-100)."
));
ExampleWrapper examples;
examples.AddEntry("*anope*", _(
"Lists all registered channels with \037anope\037 in their name (case insensitive). "
));
examples.AddEntry("#51-100", _(
"Lists all registered channels within the given range (51-100)."
));
examples.AddEntry("* NOEXPIRE", _(
"Lists all registered channels that have been set to not expire."
), "chanserv/list");
examples.AddEntry("* SUSPENDED", _(
"Lists all registered channels that have been suspended."
), "chanserv/list");
examples.SendTo(source);
if (!Config->GetBlock("options").Get<const Anope::string>("regexengine").empty())
{
source.Reply(" ");
+14 -6
View File
@@ -286,15 +286,23 @@ public:
"to your channel. Status may be a channel status such as @ or +."
"\n\n"
"To remove a logging method use the same syntax as you would to add it."
"\n\n"
"Example:\n"
" %s\033#anope\033chanserv/access\033MESSAGE\033@\n"
" Would message any channel operators whenever someone used the "
"ACCESS command on ChanServ on the channel."
),
source.command.nobreak().c_str(),
source.command.nobreak().c_str());
ExampleWrapper examples;
examples.AddEntry("#anope chanserv/access MESSAGE @", _(
"Sends a message to channel operators and above when someone uses the chanserv/access "
"command on #anope."
));
examples.AddEntry("#anope chanserv/flags NOTICE +", _(
"Sends a notice to channel voices and above when someone uses the chanserv/flags "
"command on #anope."
));
examples.AddEntry("#anope chanserv/xop MEMO", _(
"Sends a memo to the channel when someone uses the chanserv/xop command on #anope."
));
examples.SendTo(source);
return true;
}
};
+13 -13
View File
@@ -816,29 +816,29 @@ public:
"command will clear all existing mode locks and set the new one given, while \002ADD\002 and \002DEL\002 "
"modify the existing mode lock."
"\n\n"
"Example:\n"
" \002%s\033#channel\033LOCK\033ADD\033+bmnt\033*!*@*.example.com\002\n"
"\n\n"
"The \002%s\033SET\002 command allows you to set modes through services. Wildcards * and ? may "
"be given as parameters for list and status modes."
"\n\n"
"Example:\n"
" \002%s\033#channel\033SET\033+v\033*\002\n"
" Sets voice status to all users in the channel."
"\n\n"
" \002%s\033#channel\033SET\033-b\033~c:*\n"
" Clears all extended bans that start with ~c:"
"\n\n"
"The \002%s\033CLEAR\002 command is an easy way to clear modes on a channel. \037what\037 may be "
"any mode name. Examples include bans, excepts, inviteoverrides, ops, halfops, and voices. If \037what\037 "
"is not given then all basic modes are removed."
),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str());
ExampleWrapper examples;
examples.AddEntry("#channel LOCK ADD +bmnt *!*@*.example.com", _(
"Adds a mode lock on the moderated, no external messages, topic lock flag modes as "
"well as a ban on \037*!*@*.example.com\037."
));
examples.AddEntry("#channel SET +v *", _(
"Sets voice status on all users in the channel."
));
examples.AddEntry("#channel SET -b channel:*", _(
"Clears all extended bans that start with \037channel:\037."
));
return true;
}
};
+10 -10
View File
@@ -226,16 +226,16 @@ public:
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_(
"The \002STATS\002 command prints out statistics about stored nicks and memory usage."
"\n\n"
"The \002CLEAR\002 command lets you clean the database by removing all entries from the "
"database that were added within \037time\037."
"\n\n"
"Example:\n"
" %s\033CLEAR\03330m\n"
" Will remove all entries that were added within the last 30 minutes."
),
source.command.nobreak().c_str());
"The \002STATS\002 command prints out statistics about stored nicks and memory usage."
"\n\n"
"The \002CLEAR\002 command lets you clean the database by removing all entries from the "
"database that were added within \037time\037."
));
ExampleWrapper examples;
examples.AddEntry("CLEAR 30m", _(
"Removes all entries that were added in the last 30 minutes."
));
return true;
}
};
+7 -6
View File
@@ -614,10 +614,7 @@ public:
"The \002%s\033LIST\002 command displays the %s list. If "
"a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002%s\033#channel\033LIST\0332-5,7-9\002\n"
" Lists %s entries numbered 2 through 5 and\n"
" 7 through 9."
"only those entries are shown."
"\n\n"
"The \002%s\033CLEAR\002 command clears all entries of the "
"%s list."
@@ -629,10 +626,14 @@ public:
cmd.c_str(),
cmd.c_str(),
cmd.c_str(),
cmd.c_str(),
cmd.c_str(),
cmd.c_str());
ExampleWrapper examples;
examples.AddEntry("#channel LIST 2-5,7-9", _(
"Lists access entries numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
BotInfo *access_bi, *flags_bi;
Anope::string access_cmd, flags_cmd;
Command::FindCommandFromService("chanserv/access", access_bi, access_cmd);
+16 -12
View File
@@ -134,19 +134,23 @@ public:
"Deletes the specified memo or memos. You can supply "
"multiple memo numbers or ranges of numbers instead of a "
"single number, as in the second example below."
"\n\n"
"If \002LAST\002 is given, the last memo will be deleted."
"\n\n"
"If \002ALL\002 is given, deletes all of your memos."
"\n\n"
"Examples:"
"\n\n"
" \002DEL\0331\002\n"
" Deletes your first memo."
"\n\n"
" \002DEL\0332-5,7-9\002\n"
" Deletes memos numbered 2 through 5 and 7 through 9."
));
ExampleWrapper examples;
examples.AddEntry("ALL", _(
"Deletes all of your memos."
));
examples.AddEntry("LAST", _(
"Deletes your last memo."
));
examples.AddEntry("1", _(
"Deletes your first memo."
));
examples.AddEntry("2-5,7-9", _(
"Deletes memos numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
+11 -3
View File
@@ -143,10 +143,18 @@ public:
"Lists any memos you currently have. With \002NEW\002, lists only "
"new (unread) memos. Unread memos are marked with a \"*\" "
"to the left of the memo number. You can also specify a list "
"of numbers, as in the example below:\n"
" \002LIST 2-5,7-9\002\n"
" Lists memos numbered 2 through 5 and 7 through 9."
"of numbers."
));
ExampleWrapper examples;
examples.AddEntry("NEW", _(
"Lists any new memos."
));
examples.AddEntry("2-5,7-9", _(
"Lists memos numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
+17 -5
View File
@@ -204,12 +204,24 @@ public:
"given, sends you the memo you most recently received. If "
"NEW is given, sends you all of your new memos. If ALL is "
"given, sends you all of your memos. Otherwise, sends you "
"memo number \037num\037. You can also give a list of numbers, "
"as in this example:"
"\n\n"
" \002READ 2-5,7-9\002\n"
" Displays memos numbered 2 through 5 and 7 through 9."
"memo number \037num\037. You can also give a list of numbers."
));
ExampleWrapper examples;
examples.AddEntry("ALL", _(
"Displays all of your memos."
));
examples.AddEntry("LAST", _(
"Displays your last memo."
));
examples.AddEntry("NEW", _(
"Displays any new memos."
));
examples.AddEntry("2-5,7-9", _(
"Displays memos numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
+41 -22
View File
@@ -496,28 +496,47 @@ public:
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_(
"Modifies or displays the certificate list for your nick. "
"If you connect to IRC and provide a client certificate with a "
"matching fingerprint in the cert list, you will be "
"automatically identified to services. Services Operators "
"may provide a nick to modify other users' certificate lists."
"\n\n"
"Examples:"
"\n\n"
" \002%s\033ADD\002\n"
" Adds your current fingerprint to the certificate list and\n"
" automatically identifies you when you connect to IRC\n"
" using this fingerprint."
"\n\n"
" \002%s\033DEL\033<fingerprint>\002\n"
" Removes the fingerprint <fingerprint> from your certificate list."
"\n\n"
" \002%s\033LIST\002\n"
" Displays the current certificate list."
),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str());
"Modifies or displays the certificate list for your nick. If you connect to IRC and "
"provide a client certificate with a matching fingerprint in the cert list, you will "
"be automatically identified to services. Services Operators may provide a nick to "
"modify other users' certificate lists."
));
ExampleWrapper examples;
examples.AddEntry("ADD", _(
"Adds your current fingerprint to your certificate list."
));
examples.AddEntry(_("ADD \037nickname\037 \037fingerprint\037"), _(
"Adds the specified \037fingerprint\037 to the certificate list of \037nickname\037."
), "nickserv/cert");
examples.AddEntry(_("DEL \037fingerprint\037"), _(
"Removes the specified \037fingerprint\037 from your certificate list."
));
examples.AddEntry(_("DEL \037nickname\037 \037fingerprint\037"), _(
"Removes the specified \037fingerprint\037 from the certificate list of "
"\037nickname\037."
), "nickserv/cert");
examples.AddEntry("LIST", _(
"Displays your current certificate list."
));
examples.AddEntry(_("LIST \037nickname\037"), _(
"Displays the current certificate list of \037nickname\037."
), "nickserv/cert");
examples.AddEntry("VIEW", _(
"Displays your current certificate list as well the details about who added each entry "
"and when they added it."
));
examples.AddEntry(_("VIEW \037nickname\037"), _(
"Displays the current certificate list of \037nickname\037 as well as the details "
"about who added each entry and when they added it."
), "nickserv/cert");
examples.SendTo(source);
return true;
}
};
+25 -15
View File
@@ -147,23 +147,33 @@ public:
"suspended, or are unconfirmed will be shown. If multiple options are "
"given, nicks must match every option to be shown. "
"Note that these options are limited to \037Services Operators\037."
"\n\n"
"Examples:"
"\n\n"
" \002LIST *!joeuser@foo.com\002\n"
" Lists all registered nicks owned by joeuser@foo.com."
"\n\n"
" \002LIST *Bot*!*@*\002\n"
" Lists all registered nicks with \002Bot\002 in their\n"
" names (case insensitive)."
"\n\n"
" \002LIST * NOEXPIRE\002\n"
" Lists all registered nicks which have been set to not expire."
"\n\n"
" \002LIST #51-100\002\n"
" Lists all registered nicks within the given range (51-100)."
));
ExampleWrapper examples;
examples.AddEntry("*!foobar@example.com", _(
"Lists all registered nicks owned by a user who last connected from the userhost "
"\037foobar@example.com\037 (case insensitive)."
));
examples.AddEntry("*Bot*!*@*", _(
"Lists all registered nicks with \037Bot\037 in their name (case insensitive)."
));
examples.AddEntry("#51-100", _(
"Lists all registered nicks within the given range (51-100)."
));
examples.AddEntry("* DISPLAY", _(
"Lists all registered nicks that are the display nickname for their account."
), "nickserv/list");
examples.AddEntry("* NOEXPIRE", _(
"Lists all registered nicks that have been set to not expire."
), "nickserv/list");
examples.AddEntry("* SUSPENDED", _(
"Lists all registered nicks that have been suspended."
), "nickserv/list");
examples.AddEntry("* UNCONFIRMED", _(
"Lists all registered nicks that have not been confirmed yet."
), "nickserv/list");
examples.SendTo(source);
const Anope::string &regexengine = Config->GetBlock("options").Get<const Anope::string>("regexengine");
if (!regexengine.empty())
{
+8 -5
View File
@@ -480,10 +480,7 @@ public:
"The \002%s\033LIST\002 command displays the AKILL list. "
"If a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002%s\033LIST\0332-5,7-9\002\n"
" Lists AKILL entries numbered 2 through 5 and 7\n"
" through 9."
"only those entries are shown."
"\n\n"
"\002%s\033VIEW\002 is a more verbose version of \002%s\033LIST\002, and "
"will show who added an AKILL, the date it was added, and when "
@@ -495,8 +492,14 @@ public:
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str(),
source.command.nobreak().c_str());
ExampleWrapper examples;
examples.AddEntry("2-5,7-9", _(
"Lists AKILL entries numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
+10 -3
View File
@@ -119,10 +119,17 @@ public:
"Settings changed by this command are temporary and will not be reflected "
"back into the configuration file, and will be lost if Anope is shut down, "
"restarted, or the configuration is reloaded."
"\n\n"
"Example:\n"
" \002MODIFY\033nickserv\033regdelay\03315m\002"
));
ExampleWrapper examples;
examples.AddEntry("MODIFY nickserv regdelay 15m", _(
"Changes the registration delay to 15 minutes."
));
examples.AddEntry("VIEW", _(
"Shows the current server configuration."
));
examples.SendTo(source);
return true;
}
};
+8 -5
View File
@@ -157,12 +157,15 @@ public:
"and the number of replies to limit to. By default this "
"command searches one week of logs, and limits replies "
"to 50."
"\n\n"
"For example:\n"
" \002LOGSEARCH\033+21d\033+500l\033Anope\002\n"
" Searches the last 21 days worth of logs for messages\n"
" containing Anope and lists the most recent 500 of them."
));
ExampleWrapper examples;
examples.AddEntry("+21d +500l Anope", _(
"Searches the last 21 days worth of logs for messages containing Anope and lists the "
"most recent 500 of them."
));
examples.SendTo(source);
return true;
}
};
+16 -8
View File
@@ -493,10 +493,7 @@ public:
"The \002SNLINE\033LIST\002 command displays the SNLINE list. "
"If a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002SNLINE\033LIST\0332-5,7-9\002\n"
" Lists SNLINE entries numbered 2 through 5 and 7\n"
" through 9."
"only those entries are shown."
"\n\n"
"\002SNLINE\033VIEW\002 is a more verbose version of \002SNLINE\033LIST\002, and "
"will show who added an SNLINE, the date it was added, and when "
@@ -504,6 +501,13 @@ public:
"\n\n"
"\002SNLINE\033CLEAR\002 clears all entries of the SNLINE list."
));
ExampleWrapper examples;
examples.AddEntry("LIST 2-5,7-9", _(
"Lists SNLINE entries numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
@@ -733,10 +737,7 @@ public:
"The \002SQLINE\033LIST\002 command displays the SQLINE list. "
"If a wildcard mask is given, only those entries matching the "
"mask are displayed. If a list of entry numbers is given, "
"only those entries are shown; for example:\n"
" \002SQLINE\033LIST\0332-5,7-9\002\n"
" Lists SQLINE entries numbered 2 through 5 and 7\n"
" through 9."
"only those entries are shown."
"\n\n"
"\002SQLINE\033VIEW\002 is a more verbose version of \002SQLINE\033LIST\002, and "
"will show who added an SQLINE, the date it was added, and when "
@@ -744,6 +745,13 @@ public:
"\n\n"
"\002SQLINE\033CLEAR\002 clears all entries of the SQLINE list."
));
ExampleWrapper examples;
examples.AddEntry("LIST 2-5,7-9", _(
"Lists SQLINE entries numbered 2 through 5 and 7 through 9."
));
examples.SendTo(source);
return true;
}
};
+48
View File
@@ -310,6 +310,54 @@ void InfoFormatter::AddOption(const Anope::string &opt)
this->options.push_back(Language::Translate(nc, opt.c_str()));
}
void ExampleWrapper::AddEntry(const Anope::string &example, const Anope::string &desc, const Anope::string &priv)
{
auto &entry = entries.emplace_back();
entry.example = example;
entry.description = desc;
entry.privilege = priv;
}
void ExampleWrapper::SendTo(CommandSource &source)
{
const auto *sourcenc = source.GetAccount();
const auto flexible = sourcenc ? sourcenc->HasExt("NS_FLEXIBLE") : false;
const auto *monospace = !flexible && sourcenc && sourcenc->HasExt("NS_MONOSPACE") ? "\021" : "";
const auto max_length = Config->GetBlock("options").Get<size_t>("linelength", "100");
auto header = true;
for (const auto &entry : entries)
{
if (!entry.privilege.empty() && !source.HasPriv(entry.privilege))
continue;
if (header)
{
source.Reply(" ");
source.Reply(_("Examples:"));
header = false;
}
source.Reply(" ");
if (flexible)
{
source.Reply("\002%s %s\002: %s", source.command.c_str(),
entry.example.c_str(), entry.description.c_str());
}
else
{
const auto full_example = Anope::Format("%s %s", source.command.c_str(), entry.example.c_str());
LineWrapper elw(Language::Translate(source.nc, full_example.c_str()), max_length - 2);
for (Anope::string line; elw.GetLine(line); )
source.Reply("%s \002%s\002", monospace, line.c_str());
LineWrapper dlw(Language::Translate(source.nc, entry.description.c_str()), max_length - 4);
for (Anope::string line; dlw.GetLine(line); )
source.Reply("%s %s", monospace, line.c_str());
}
}
}
void HelpWrapper::AddEntry(const Anope::string &name, const Anope::string &desc)
{