summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-25 03:05:00 -0400
committerAdam <Adam@anope.org>2011-09-10 01:58:38 -0400
commit8c4417cad180f3c5448c5b7509b1bf2235e3077e (patch)
tree5bae0349730cae12f07e252d6d8b027bed74faf7 /modules
parentd4db2b84f250b98ec3422f2be9951f567e6dc97e (diff)
Removed opnotice
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/cs_modes.cpp8
-rw-r--r--modules/commands/cs_set_opnotice.cpp93
2 files changed, 3 insertions, 98 deletions
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)