summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/chanserv.example.conf11
-rw-r--r--include/regchannel.h4
-rw-r--r--modules/commands/cs_modes.cpp8
-rw-r--r--modules/commands/cs_set_opnotice.cpp93
4 files changed, 4 insertions, 112 deletions
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf
index 54132f268..cc2bbaef6 100644
--- a/data/chanserv.example.conf
+++ b/data/chanserv.example.conf
@@ -570,17 +570,6 @@ command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc";
command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc"; }
/*
- * cs_set_opnotice
- *
- * Provides the commands chanserv/set/opnotice and chanserv/saset/opnotice.
- *
- * Used for setting whether channel ops should be notified of mode changes made through ChanServ.
- */
-module { name = "cs_set_opnotice" }
-command { service = "ChanServ"; name = "SET OPNOTICE"; command = "chanserv/set/opnotice"; }
-command { service = "ChanServ"; name = "SASET OPNOTICE"; command = "chanserv/saset/opnotice"; permission = "chanserv/saset/opnotice"; }
-
-/*
* cs_set_peace
*
* Provides the commands chanserv/set/peace and chanserv/saset/peace.
diff --git a/include/regchannel.h b/include/regchannel.h
index 804412cc5..3add3000d 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -36,8 +36,6 @@ enum ChannelInfoFlag
CI_NO_EXPIRE,
/* Channel memo limit may not be changed */
CI_MEMO_HARDMAX,
- /* Send notice to channel on use of OP/DEOP */
- CI_OPNOTICE,
/* Stricter control of channel founder status */
CI_SECUREFOUNDER,
/* Sign kicks with the user who did the kick */
@@ -58,7 +56,7 @@ enum ChannelInfoFlag
const Anope::string ChannelInfoFlagStrings[] = {
"BEGIN", "KEEPTOPIC", "SECUREOPS", "PRIVATE", "TOPICLOCK", "RESTRICTED",
- "PEACE", "SECURE", "NO_EXPIRE", "MEMO_HARDMAX", "OPNOTICE", "SECUREFOUNDER",
+ "PEACE", "SECURE", "NO_EXPIRE", "MEMO_HARDMAX", "SECUREFOUNDER",
"SIGNKICK", "SIGNKICK_LEVEL", "SUSPENDED", "PERSIST", ""
};
diff --git a/modules/commands/cs_modes.cpp b/modules/commands/cs_modes.cpp
index 1fca13acd..e2b2f2516 100644
--- a/modules/commands/cs_modes.cpp
+++ b/modules/commands/cs_modes.cpp
@@ -15,7 +15,7 @@
class CommandModeBase : public Command
{
- void do_mode(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, ChannelAccess level, ChannelAccess levelself, ChannelInfoFlag notice)
+ void do_mode(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, ChannelAccess level, ChannelAccess levelself)
{
User *u = source.u;
User *u2 = finduser(nick);
@@ -48,8 +48,6 @@ class CommandModeBase : public Command
c->RemoveMode(NULL, cm, u2->nick);
Log(LOG_COMMAND, u, com, ci) << "for " << u2->nick;
- if (notice && ci->HasFlag(notice))
- ircdproto->SendMessage(ci->WhoSends(), c->name, "%s command used for %s by %s", com->name.c_str(), u2->nick.c_str(), u->nick.c_str());
}
}
@@ -97,7 +95,7 @@ class CommandCSOp : public CommandModeBase
{
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_OPDEOP, CA_OPDEOPME, CI_OPNOTICE);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_OPDEOP, CA_OPDEOPME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -126,7 +124,7 @@ class CommandCSDeOp : public CommandModeBase
{
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_OPDEOP, CA_OPDEOPME, CI_OPNOTICE);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_OPDEOP, CA_OPDEOPME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
diff --git a/modules/commands/cs_set_opnotice.cpp b/modules/commands/cs_set_opnotice.cpp
deleted file mode 100644
index ddb5beb58..000000000
--- a/modules/commands/cs_set_opnotice.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* ChanServ core functions
- *
- * (C) 2003-2011 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- */
-
-/*************************************************************************/
-
-#include "module.h"
-
-class CommandCSSetOpNotice : public Command
-{
- public:
- CommandCSSetOpNotice(Module *creator, const Anope::string &cname = "chanserv/set/opnotice") : Command(creator, cname, 2, 2)
- {
- this->SetDesc(_("Send a notice when OP/DEOP commands are used"));
- this->SetSyntax(_("\037channel\037 {ON | OFF}"));
- }
-
- void Execute(CommandSource &source, const std::vector<Anope::string> &params)
- {
- User *u = source.u;
- ChannelInfo *ci = cs_findchan(params[0]);
- if (ci == NULL)
- {
- source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str());
- return;
- }
-
- if (source.permission.empty() && !ci->AccessFor(u).HasPriv(CA_SET))
- {
- source.Reply(ACCESS_DENIED);
- return;
- }
-
- if (params[1].equals_ci("ON"))
- {
- ci->SetFlag(CI_OPNOTICE);
- source.Reply(_("Op-notice option for %s is now \002on\002."), ci->name.c_str());
- }
- else if (params[1].equals_ci("OFF"))
- {
- ci->UnsetFlag(CI_OPNOTICE);
- source.Reply(_("Op-notice option for %s is now \002off\002."), ci->name.c_str());
- }
- else
- this->OnSyntaxError(source, "OPNOTICE");
-
- return;
- }
-
- bool OnHelp(CommandSource &source, const Anope::string &)
- {
- this->SendSyntax(source);
- source.Reply(" ");
- source.Reply(_("Enables or disables the \002op-notice\002 option for a channel.\n"
- "When \002op-notice\002 is set, %s will send a notice to the\n"
- "channel whenever the \002OP\002 or \002DEOP\002 commands are used for a user\n"
- "in the channel."), this->name.c_str(), source.owner->nick.c_str());
- return true;
- }
-};
-
-class CommandCSSASetOpNotice : public CommandCSSetOpNotice
-{
- public:
- CommandCSSASetOpNotice(Module *creator) : CommandCSSetOpNotice(creator, "chanserv/saset/opnotice")
- {
- }
-};
-
-class CSSetOpNotice : public Module
-{
- CommandCSSetOpNotice commandcssetopnotice;
- CommandCSSASetOpNotice commandcssasetopnotice;
-
- public:
- CSSetOpNotice(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
- commandcssetopnotice(this), commandcssasetopnotice(this)
- {
- this->SetAuthor("Anope");
-
- ModuleManager::RegisterService(&commandcssetopnotice);
- ModuleManager::RegisterService(&commandcssasetopnotice);
- }
-};
-
-MODULE_INIT(CSSetOpNotice)