summaryrefslogtreecommitdiff
path: root/modules/chanserv/cs_access.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/chanserv/cs_access.cpp')
-rw-r--r--modules/chanserv/cs_access.cpp141
1 files changed, 79 insertions, 62 deletions
diff --git a/modules/chanserv/cs_access.cpp b/modules/chanserv/cs_access.cpp
index 72dc57450..d3ca6e492 100644
--- a/modules/chanserv/cs_access.cpp
+++ b/modules/chanserv/cs_access.cpp
@@ -582,54 +582,68 @@ public:
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("Maintains the \002access list\002 for a channel. The access\n"
- "list specifies which users are allowed chanop status or\n"
- "access to %s commands on the channel. Different\n"
- "user levels allow for access to different subsets of\n"
- "privileges. Any registered user not on the access list has\n"
- "a user level of 0, and any unregistered user has a user level\n"
- "of -1."), source.service->nick.c_str());
- source.Reply(" ");
- source.Reply(_("The \002ACCESS ADD\002 command adds the given mask to the\n"
- "access list with the given user level; if the mask is\n"
- "already present on the list, its access level is changed to\n"
- "the level specified in the command. The \037level\037 specified\n"
- "may be a numerical level or the name of a privilege (eg AUTOOP).\n"
- "When a user joins the channel the access they receive is from the\n"
- "highest level entry in the access list."));
+ source.Reply(_(
+ "Maintains the \002access list\002 for a channel. The access "
+ "list specifies which users are allowed chanop status or "
+ "access to %s commands on the channel. Different "
+ "user levels allow for access to different subsets of "
+ "privileges. Any registered user not on the access list has "
+ "a user level of 0, and any unregistered user has a user level "
+ "of -1."
+ "\n\n"
+ "The \002ACCESS\032ADD\002 command adds the given mask to the "
+ "access list with the given user level; if the mask is "
+ "already present on the list, its access level is changed to "
+ "the level specified in the command. The \037level\037 specified "
+ "may be a numerical level or the name of a privilege (eg AUTOOP). "
+ "When a user joins the channel the access they receive is from the "
+ "highest level entry in the access list."
+ ),
+ source.service->nick.c_str());
+
if (!Config->GetModule("chanserv").Get<bool>("disallow_channel_access"))
- source.Reply(_("The given mask may also be a channel, which will use the\n"
- "access list from the other channel up to the given \037level\037."));
- source.Reply(" ");
- source.Reply(_("The \002ACCESS DEL\002 command removes the given nick from the\n"
- "access list. If a list of entry numbers is given, those\n"
- "entries are deleted. (See the example for LIST below.)\n"
- "You may remove yourself from an access list, even if you\n"
- "do not have access to modify that list otherwise."));
- source.Reply(" ");
- source.Reply(_("The \002ACCESS LIST\002 command displays the access list. If\n"
- "a wildcard mask is given, only those entries matching the\n"
- "mask are displayed. If a list of entry numbers is given,\n"
- "only those entries are shown; for example:\n"
- " \002ACCESS #channel LIST 2-5,7-9\002\n"
- " Lists access entries numbered 2 through 5 and\n"
- " 7 through 9.\n"
- " \n"
- "The \002ACCESS VIEW\002 command displays the access list similar\n"
- "to \002ACCESS LIST\002 but shows the creator and last used time.\n"
- " \n"
- "The \002ACCESS CLEAR\002 command clears all entries of the\n"
- "access list."));
+ {
+ source.Reply(_(
+ "The given mask may also be a channel, which will use the "
+ "access list from the other channel up to the given \037level\037."
+ ));
+ }
+
source.Reply(" ");
+ source.Reply(_(
+ "The \002ACCESS\032DEL\002 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 \002ACCESS\032LIST\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"
+ " \002ACCESS\032#channel\032LIST\0322-5,7-9\002\n"
+ " Lists access entries numbered 2 through 5 and\n"
+ " 7 through 9."
+ "\n\n"
+ "The \002ACCESS\032VIEW\002 command displays the access list similar "
+ "to \002ACCESS\032LIST\002 but shows the creator and last used time."
+ "\n\n"
+ "The \002ACCESS\032CLEAR\002 command clears all entries of the "
+ "access list."
+ ));
BotInfo *bi;
Anope::string cmd;
if (Command::FindCommandFromService("chanserv/levels", bi, cmd))
{
- source.Reply(_("\002User access levels\002 can be seen by using the\n"
- "\002%s\002 command; type \002%s LEVELS\002 for\n"
- "information."),
- cmd.c_str(), bi->GetQueryCommand("generic/help").c_str());
+ source.Reply(" ");
+ source.Reply(_(
+ "\002User access levels\002 can be seen by using the "
+ "\002%s\002 command; type \002%s\032LEVELS\002 for "
+ "information."
+ ),
+ cmd.c_str(),
+ bi->GetQueryCommand("generic/help").c_str());
}
return true;
}
@@ -665,7 +679,7 @@ class CommandCSLevels final
Privilege *p = PrivilegeManager::FindPrivilege(what);
if (p == NULL)
{
- source.Reply(_("Setting \002%s\002 not known. Type \002%s LEVELS\002 for a list of valid settings."),
+ source.Reply(_("Setting \002%s\002 not known. Type \002%s\032LEVELS\002 for a list of valid settings."),
what.c_str(), source.service->GetQueryCommand("generic/help").c_str());
}
else
@@ -708,7 +722,7 @@ class CommandCSLevels final
return;
}
- source.Reply(_("Setting \002%s\002 not known. Type \002%s LEVELS\002 for a list of valid settings."),
+ source.Reply(_("Setting \002%s\002 not known. Type \002%s\032LEVELS\002 for a list of valid settings."),
what.c_str(), source.service->GetQueryCommand("generic/help").c_str());
}
@@ -838,25 +852,28 @@ public:
{
this->SendSyntax(source);
source.Reply(" ");
- source.Reply(_("The \002LEVELS\002 command allows fine control over the meaning of\n"
- "the numeric access levels used for channels. With this\n"
- "command, you can define the access level required for most\n"
- "of %s's functions. (The \002SET FOUNDER\002 and this command\n"
- "are always restricted to the channel founder.)\n"
- " \n"
- "\002LEVELS SET\002 allows the access level for a function or group of\n"
- "functions to be changed. \002LEVELS DISABLE\002 (or \002DIS\002 for short)\n"
- "disables an automatic feature or disallows access to a\n"
- "function by anyone, INCLUDING the founder (although, the founder\n"
- "can always re-enable it). Use \002LEVELS SET founder\002 to make a level\n"
- "founder only.\n"
- " \n"
- "\002LEVELS LIST\002 shows the current levels for each function or\n"
- "group of functions. \002LEVELS RESET\002 resets the levels to the\n"
- "default levels of a newly-created channel.\n"
- " \n"
- "For a list of the features and functions whose levels can be\n"
- "set, see \002HELP LEVELS DESC\002."), source.service->nick.c_str());
+ source.Reply(_(
+ "The \002LEVELS\002 command allows fine control over the meaning of "
+ "the numeric access levels used for channels. With this "
+ "command, you can define the access level required for most "
+ "of %s's functions. (The \002SET\032FOUNDER\002 and this command "
+ "are always restricted to the channel founder)."
+ "\n\n"
+ "\002LEVELS\032SET\002 allows the access level for a function or group of "
+ "functions to be changed. \002LEVELS\032DISABLE\002 (or \002DIS\002 for short) "
+ "disables an automatic feature or disallows access to a "
+ "function by anyone, INCLUDING the founder (although, the founder "
+ "can always re-enable it). Use \002LEVELS\032SET founder\002 to make a level "
+ "founder only."
+ "\n\n"
+ "\002LEVELS\032LIST\002 shows the current levels for each function or "
+ "group of functions. \002LEVELS\032RESET\002 resets the levels to the "
+ "default levels of a newly-created channel."
+ "\n\n"
+ "For a list of the features and functions whose levels can be "
+ "set, see \002HELP\032LEVELS\032DESC\002."
+ ),
+ source.service->nick.c_str());
}
return true;
}