summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby <robby@chat.be>2012-05-20 04:14:26 -0400
committerAdam <Adam@anope.org>2012-05-20 04:14:26 -0400
commit1f73e27870d4d08b5c5d1644b817437ece3bc65a (patch)
tree8157e454df4f3fc047c53689c846f33812f0959e
parent699087b2bf6d47a871285b7442526a0dfd156d20 (diff)
Updated help messages for ns_list, cs_list, cs_entrymsg, and cs_info. Also fixed logging for cs_entrymsg.
-rw-r--r--data/example.conf4
-rw-r--r--modules/commands/cs_access.cpp2
-rw-r--r--modules/commands/cs_entrymsg.cpp39
-rw-r--r--modules/commands/cs_info.cpp9
-rw-r--r--modules/commands/cs_list.cpp28
-rw-r--r--modules/commands/ns_list.cpp21
6 files changed, 75 insertions, 28 deletions
diff --git a/data/example.conf b/data/example.conf
index 8c1dc1d93..7521256e8 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -753,7 +753,7 @@ log
* memoserv/sendall memoserv/staff
*
* nickserv/getpass nickserv/sendpass nickserv/getemail nickserv/suspend
- * nickserv/resetpass nickserv/release
+ * nickserv/resetpass nickserv/release nickserv/list
*
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet
* nickserv/saset/icq nickserv/saset/kill nickserv/saset/language nickserv/saset/message
@@ -798,7 +798,7 @@ opertype
inherits = "Helper, Another Helper"
/* What commands (see above) this opertype may use */
- commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/sendpass nickserv/resetpass nickserv/suspend operserv/mode operserv/chankill operserv/szline operserv/akill operserv/session operserv/modlist operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
+ commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/list nickserv/sendpass nickserv/resetpass nickserv/suspend operserv/mode operserv/chankill operserv/szline operserv/akill operserv/session operserv/modlist operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
/* What privs (see above) this opertype has */
privs = "chanserv/auspex chanserv/no-register-limit memoserv/* nickserv/auspex nickserv/confirm"
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index 30c291da3..2eed525a4 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -440,7 +440,7 @@ class CommandCSAccess : public Command
this->SetSyntax(_("\037channel\037 DEL {\037mask\037 | \037entry-num\037 | \037list\037}"));
this->SetSyntax(_("\037channel\037 LIST [\037mask\037 | \037list\037]"));
this->SetSyntax(_("\037channel\037 VIEW [\037mask\037 | \037list\037]"));
- this->SetSyntax(_("\037channel\037 CLEAR\002"));
+ this->SetSyntax(_("\037channel\037 CLEAR"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp
index 6ae59862f..0e2fd675e 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/commands/cs_entrymsg.cpp
@@ -127,6 +127,8 @@ class CommandEntryMessage : public Command
void DoAdd(CommandSource &source, ChannelInfo *ci, const Anope::string &message)
{
+ User *u = source.u;
+
EntryMessageList *messages = ci->GetExt<EntryMessageList *>("cs_entrymsg");
if (messages == NULL)
{
@@ -139,12 +141,15 @@ class CommandEntryMessage : public Command
else
{
(*messages)->push_back(EntryMsg(ci, source.u->nick, message));
+ Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << "to add a message";
source.Reply(_("Entry message added to \002%s\002"), ci->name.c_str());
}
}
void DoDel(CommandSource &source, ChannelInfo *ci, const Anope::string &message)
{
+ User *u = source.u;
+
EntryMessageList *messages = ci->GetExt<EntryMessageList *>("cs_entrymsg");
if (messages == NULL)
{
@@ -166,6 +171,7 @@ class CommandEntryMessage : public Command
(*messages)->erase((*messages)->begin() + i - 1);
if ((*messages)->empty())
ci->Shrink("cs_entrymsg");
+ Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << "to remove a message";
source.Reply(_("Entry message \002%i\002 for \002%s\002 deleted."), i, ci->name.c_str());
}
else
@@ -180,7 +186,10 @@ class CommandEntryMessage : public Command
void DoClear(CommandSource &source, ChannelInfo *ci)
{
+ User *u = source.u;
+
ci->Shrink("cs_entrymsg");
+ Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << "to remove all messages";
source.Reply(_("Entry messages for \002%s\002 have been cleared."), ci->name.c_str());
}
@@ -188,7 +197,10 @@ class CommandEntryMessage : public Command
CommandEntryMessage(Module *creator) : Command(creator, "chanserv/entrymsg", 2, 3)
{
this->SetDesc(_("Manage the channel's entry messages"));
- this->SetSyntax(_("\037channel\037 {ADD|DEL|LIST|CLEAR} [\037message\037|\037num\037]"));
+ this->SetSyntax(_("\037channel\037 ADD \037message\037"));
+ this->SetSyntax(_("\037channel\037 DEL \037num\037"));
+ this->SetSyntax(_("\037channel\037 LIST"));
+ this->SetSyntax(_("\037channel\037 CLEAR"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
@@ -204,27 +216,18 @@ class CommandEntryMessage : public Command
if (IsFounder(u, ci) || u->HasCommand("chanserv/set"))
{
- bool success = true;
if (params[1].equals_ci("LIST"))
this->DoList(source, ci);
else if (params[1].equals_ci("CLEAR"))
this->DoClear(source, ci);
else if (params.size() < 3)
- {
- success = false;
this->OnSyntaxError(source, "");
- }
else if (params[1].equals_ci("ADD"))
this->DoAdd(source, ci, params[2]);
else if (params[1].equals_ci("DEL"))
this->DoDel(source, ci, params[2]);
else
- {
- success = false;
this->OnSyntaxError(source, "");
- }
- if (success)
- Log(IsFounder(u, ci) ? LOG_COMMAND : LOG_OVERRIDE, u, this, ci) << " to " << params[1] << " a message";
}
else
source.Reply(ACCESS_DENIED);
@@ -237,6 +240,22 @@ class CommandEntryMessage : public Command
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_("Controls what messages will be sent to users when they join the channel."));
+ source.Reply(" ");
+ source.Reply(_("The \002ENTRYMSG ADD\002 command adds the given message to\n"
+ "the list of messages to be shown to users when they join\n"
+ "the channel."));
+ source.Reply(" ");
+ source.Reply(_("The \002ENTRYMSG DEL\002 command removes the given message from\n"
+ "the list of messages to be shown to users when they join\n"
+ "the channel. You can remove the message by specifying its number\n"
+ "which you can get by listing the messages as explained below."));
+ source.Reply(" ");
+ source.Reply(_("The \002ENTRYMSG LIST\002 command displays a listing of messages\n"
+ "to be shown to users when they join the channel."));
+ source.Reply(" ");
+ source.Reply(_("The \002ENTRYMSG CLEAR\002 command clears all entries from\n"
+ "the list of messages to be shown to users when they join\n"
+ "the channel, effectively disabling entry messages."));
return true;
}
};
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 47ba4d3b0..cee3c8251 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -127,10 +127,11 @@ class CommandCSInfo : public Command
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_("Lists information about the named registered channel,\n"
- "including its founder, time of registration, last time\n"
- "used, description, and mode lock, if any. If \002ALL\002 is\n"
- "specified, the entry message and successor will also\n"
- "be displayed."));
+ "including its founder, time of registration, and last\n"
+ "time used. If the user issuing the command has the\n"
+ "appropriate access for it, then the description, successor,\n"
+ "last topic set, settings and expiration time will also\n"
+ "be displayed when applicable."));
return true;
}
};
diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp
index 8385fc38b..8bc0de8d9 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/commands/cs_list.cpp
@@ -20,7 +20,7 @@ class CommandCSList : public Command
{
this->SetFlag(CFLAG_STRIP_CHANNEL);
this->SetDesc(_("Lists all registered channels matching the given pattern"));
- this->SetSyntax(_("\037pattern\037"));
+ this->SetSyntax(_("\037pattern\037 [SUSPENDED] [NOEXPIRE]"));
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
@@ -122,9 +122,31 @@ class CommandCSList : public Command
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_("Lists all registered channels matching the given pattern.\n"
- "(Channels with the \002PRIVATE\002 option set are not listed.)\n"
+ "Channels with the \002PRIVATE\002 option set will only be\n"
+ "displayed to Services Operators with the proper access.\n"
+ "Channels with the \002NOEXPIRE\002 option set will have\n"
+ "a \002!\002 prefixed to the channel for Services Operators to see.\n"
+ " \n"
"Note that a preceding '#' specifies a range, channel names\n"
- "are to be written without '#'."));
+ "are to be written without '#'.\n"
+ " \n"
+ "If the SUSPENDED or NOEXPIRE options are given, only channels\n"
+ "which, respectively, are SUSPENDED or have the NOEXPIRE\n"
+ "flag set will be displayed. If multiple options are given,\n"
+ "all channels matching at least one option will be displayed.\n"
+ "Note that these options are limited to \037Services Operators\037.\n"
+ " \n"
+ "Examples:\n"
+ " \n"
+ " \002LIST *anope*\002\n"
+ " Lists all registered channels with \002anope\002 in their\n"
+ " names (case insensitive).\n"
+ " \n"
+ " \002LIST * NOEXPIRE\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).\n"));
if (!Config->RegexEngine.empty())
source.Reply(" \n"
"Regex matches are also supported using the %s engine.\n"
diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp
index 2c27f4d47..25766ef1e 100644
--- a/modules/commands/ns_list.cpp
+++ b/modules/commands/ns_list.cpp
@@ -29,7 +29,7 @@ class CommandNSList : public Command
Anope::string pattern = params[0];
const NickCore *mync;
unsigned nnicks;
- bool is_servadmin = u->IsServicesOper();
+ bool is_servadmin = u->HasCommand("nickserv/list");
int count = 0, from = 0, to = 0;
bool suspended, nsnoexpire, unconfirmed;
@@ -135,16 +135,18 @@ class CommandNSList : public Command
source.Reply(" ");
source.Reply(_("Lists all registered nicknames which match the given\n"
"pattern, in \037nick!user@host\037 format. Nicks with the \002PRIVATE\002\n"
- "option set will only be displayed to Services Operators. Nicks\n"
- "with the \002NOEXPIRE\002 option set will have a \002!\002 appended to\n"
- "the nickname for Services Operators.\n"
+ "option set will only be displayed to Services Operators with the\n"
+ "proper access. Nicks with the \002NOEXPIRE\002 option set will have\n"
+ "a \002!\002 prefixed to the nickname for Services Operators to see.\n"
" \n"
- "If the SUSPENDED, NOEXPIRE or UNCONFIRMED options are given, only\n"
+ "Note that a preceding '#' specifies a range.\n"
+ " \n"
+ "If the SUSPENDED, UNCONFIRMED or NOEXPIRE options are given, only\n"
"nicks which, respectively, are SUSPENDED, UNCONFIRMED or have the\n"
"NOEXPIRE flag set will be displayed. If multiple options are\n"
"given, all nicks matching at least one option will be displayed.\n"
- "These options are limited to \037Services Operators\037. \n"
- "\n"
+ "Note that these options are limited to \037Services Operators\037.\n"
+ " \n"
"Examples:\n"
" \n"
" \002LIST *!joeuser@foo.com\002\n"
@@ -155,7 +157,10 @@ class CommandNSList : public Command
" names (case insensitive).\n"
" \n"
" \002LIST * NOEXPIRE\002\n"
- " Lists all registered nicks which have been set to not expire.\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).\n"));
if (!Config->RegexEngine.empty())
source.Reply(" \n"
"Regex matches are also supported using the %s engine.\n"