summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-12-14 16:52:24 -0500
committerAdam <Adam@anope.org>2015-12-14 16:52:24 -0500
commit6302f980fe6dad83aab7d2dc1046dadea5ffd939 (patch)
tree4c27d33f55fc32ce34827977932dac4b3e5ceedd /modules/commands
parent64dac60071fab652745a6e7a06cf6b7bdbbd3625 (diff)
New source tree structure for modules. From commands/cs_access => chanserv/access etc.
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/bs_assign.cpp281
-rw-r--r--modules/commands/bs_badwords.cpp465
-rw-r--r--modules/commands/bs_bot.cpp426
-rw-r--r--modules/commands/bs_botlist.cpp92
-rw-r--r--modules/commands/bs_control.cpp168
-rw-r--r--modules/commands/bs_info.cpp116
-rw-r--r--modules/commands/bs_kick.cpp1664
-rw-r--r--modules/commands/bs_set.cpp221
-rw-r--r--modules/commands/cs_access.cpp942
-rw-r--r--modules/commands/cs_akick.cpp718
-rw-r--r--modules/commands/cs_ban.cpp268
-rw-r--r--modules/commands/cs_clone.cpp221
-rw-r--r--modules/commands/cs_drop.cpp101
-rw-r--r--modules/commands/cs_enforce.cpp307
-rw-r--r--modules/commands/cs_entrymsg.cpp270
-rw-r--r--modules/commands/cs_flags.cpp530
-rw-r--r--modules/commands/cs_getkey.cpp75
-rw-r--r--modules/commands/cs_info.cpp97
-rw-r--r--modules/commands/cs_invite.cpp109
-rw-r--r--modules/commands/cs_kick.cpp152
-rw-r--r--modules/commands/cs_list.cpp263
-rw-r--r--modules/commands/cs_log.cpp448
-rw-r--r--modules/commands/cs_mode.cpp999
-rw-r--r--modules/commands/cs_register.cpp157
-rw-r--r--modules/commands/cs_seen.cpp477
-rw-r--r--modules/commands/cs_set.cpp1265
-rw-r--r--modules/commands/cs_set_misc.cpp211
-rw-r--r--modules/commands/cs_status.cpp115
-rw-r--r--modules/commands/cs_suspend.cpp339
-rw-r--r--modules/commands/cs_sync.cpp77
-rw-r--r--modules/commands/cs_topic.cpp276
-rw-r--r--modules/commands/cs_unban.cpp120
-rw-r--r--modules/commands/cs_updown.cpp261
-rw-r--r--modules/commands/cs_xop.cpp660
-rw-r--r--modules/commands/gl_global.cpp58
-rw-r--r--modules/commands/greet.cpp212
-rw-r--r--modules/commands/help.cpp197
-rw-r--r--modules/commands/hs_del.cpp109
-rw-r--r--modules/commands/hs_group.cpp117
-rw-r--r--modules/commands/hs_list.cpp159
-rw-r--r--modules/commands/hs_off.cpp60
-rw-r--r--modules/commands/hs_on.cpp70
-rw-r--r--modules/commands/hs_request.cpp414
-rw-r--r--modules/commands/hs_set.cpp216
-rw-r--r--modules/commands/ms_cancel.cpp91
-rw-r--r--modules/commands/ms_check.cpp80
-rw-r--r--modules/commands/ms_del.cpp148
-rw-r--r--modules/commands/ms_ignore.cpp147
-rw-r--r--modules/commands/ms_info.cpp203
-rw-r--r--modules/commands/ms_list.cpp163
-rw-r--r--modules/commands/ms_read.cpp203
-rw-r--r--modules/commands/ms_rsend.cpp105
-rw-r--r--modules/commands/ms_send.cpp81
-rw-r--r--modules/commands/ms_sendall.cpp60
-rw-r--r--modules/commands/ms_set.cpp314
-rw-r--r--modules/commands/ms_staff.cpp57
-rw-r--r--modules/commands/ns_access.cpp257
-rw-r--r--modules/commands/ns_ajoin.cpp381
-rw-r--r--modules/commands/ns_alist.cpp133
-rw-r--r--modules/commands/ns_cert.cpp364
-rw-r--r--modules/commands/ns_drop.cpp91
-rw-r--r--modules/commands/ns_getemail.cpp66
-rw-r--r--modules/commands/ns_getpass.cpp74
-rw-r--r--modules/commands/ns_group.cpp385
-rw-r--r--modules/commands/ns_identify.cpp125
-rw-r--r--modules/commands/ns_info.cpp281
-rw-r--r--modules/commands/ns_list.cpp290
-rw-r--r--modules/commands/ns_logout.cpp100
-rw-r--r--modules/commands/ns_recover.cpp262
-rw-r--r--modules/commands/ns_register.cpp426
-rw-r--r--modules/commands/ns_resetpass.cpp141
-rw-r--r--modules/commands/ns_set.cpp1244
-rw-r--r--modules/commands/ns_set_misc.cpp225
-rw-r--r--modules/commands/ns_status.cpp88
-rw-r--r--modules/commands/ns_suspend.cpp339
-rw-r--r--modules/commands/ns_update.cpp67
-rw-r--r--modules/commands/os_akill.cpp437
-rw-r--r--modules/commands/os_chankill.cpp113
-rw-r--r--modules/commands/os_config.cpp147
-rw-r--r--modules/commands/os_defcon.cpp619
-rw-r--r--modules/commands/os_dns.cpp1012
-rw-r--r--modules/commands/os_forbid.cpp577
-rw-r--r--modules/commands/os_ignore.cpp393
-rw-r--r--modules/commands/os_info.cpp260
-rw-r--r--modules/commands/os_jupe.cpp72
-rw-r--r--modules/commands/os_kick.cpp81
-rw-r--r--modules/commands/os_kill.cpp63
-rw-r--r--modules/commands/os_list.cpp238
-rw-r--r--modules/commands/os_login.cpp148
-rw-r--r--modules/commands/os_logsearch.cpp151
-rw-r--r--modules/commands/os_mode.cpp187
-rw-r--r--modules/commands/os_modinfo.cpp214
-rw-r--r--modules/commands/os_module.cpp179
-rw-r--r--modules/commands/os_news.cpp459
-rw-r--r--modules/commands/os_noop.cpp98
-rw-r--r--modules/commands/os_oline.cpp74
-rw-r--r--modules/commands/os_oper.cpp241
-rw-r--r--modules/commands/os_reload.cpp62
-rw-r--r--modules/commands/os_session.cpp768
-rw-r--r--modules/commands/os_set.cpp243
-rw-r--r--modules/commands/os_shutdown.cpp101
-rw-r--r--modules/commands/os_stats.cpp271
-rw-r--r--modules/commands/os_svs.cpp171
-rw-r--r--modules/commands/os_sxline.cpp673
-rw-r--r--modules/commands/os_update.cpp49
105 files changed, 0 insertions, 29595 deletions
diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp
deleted file mode 100644
index 840651dfc..000000000
--- a/modules/commands/bs_assign.cpp
+++ /dev/null
@@ -1,281 +0,0 @@
-/* BotServ core functions
- *
- * (C) 2003-2014 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"
-#include "modules/bs_info.h"
-
-class CommandBSAssign : public Command
-{
- public:
- CommandBSAssign(Module *creator) : Command(creator, "botserv/assign", 2, 2)
- {
- this->SetDesc(_("Assigns a bot to a channel"));
- this->SetSyntax(_("\037channel\037 \037nickname\037"));
- }
-
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
- {
- const Anope::string &chan = params[0];
- const Anope::string &nick = params[1];
-
- if (Anope::ReadOnly)
- {
- source.Reply(_("Sorry, bot assignment is temporarily disabled."));
- return;
- }
-
- ChanServ::Channel *ci = ChanServ::Find(chan);
- if (ci == NULL)
- {
- source.Reply(_("Channel \002{0}\002 isn't registered."), chan);
- return;
- }
-
- ServiceBot *bi = ServiceBot::Find(nick, true);
- if (!bi)
- {
- source.Reply(_("Bot \002{0}\002 does not exist."), nick);
- return;
- }
-
- ChanServ::AccessGroup access = source.AccessFor(ci);
- if (!access.HasPriv("ASSIGN") && !source.HasPriv("botserv/administration"))
- {
- source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "ASSIGN", ci->GetName());
- return;
- }
-
- if (ci->HasFieldS("BS_NOBOT"))
- {
- source.Reply(_("Access denied. \002{0}\002 may not have a bot assigned to it because a Services Operator has disallowed it."), ci->GetName());
- return;
- }
-
- if (bi->bi->GetOperOnly() && !source.HasPriv("botserv/administration"))
- {
- source.Reply(_("Access denied. Bot \002{0}\002 is for operators only."), bi->nick);
- return;
- }
-
- if (ci->GetBot() == bi)
- {
- source.Reply(_("Bot \002{0}\002 is already assigned to \002{1}\002."), ci->GetBot()->nick, ci->GetName());
- return;
- }
-
- bool override = !access.HasPriv("ASSIGN");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << bi->nick;
-
- bi->Assign(source.GetUser(), ci);
- source.Reply(_("Bot \002{0}\002 has been assigned to \002{1}\002."), bi->nick, ci->GetName());
- }
-
- bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
- {
- source.Reply(_("Assigns the bot \037nickname\037 to \037channel\037."
- " You can then configure the bot for the channel so it fits your needs.\n"
- "\n"
- "Use of this command requires the \002{0}\002 privilege on \037channel\037."
- "\n"
- "Example:\n"
- " {command} #anope Botox\n"
- " Assigns the bot Botox to #anope.\n"),
- "ASSIGN", "command"_kw = source.command);
- return true;
- }
-};
-
-class CommandBSUnassign : public Command
-{
- public:
- CommandBSUnassign(Module *creator) : Command(creator, "botserv/unassign", 1, 1)
- {
- this->SetDesc(_("Unassigns a bot from a channel"));
- this->SetSyntax(_("\037channel\037"));
- }
-
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
- {
- const Anope::string &chan = params[0];
-
- if (Anope::ReadOnly)
- {
- source.Reply(_("Sorry, bot assignment is temporarily disabled."));
- return;
- }
-
- ChanServ::Channel *ci = ChanServ::Find(chan);
- if (ci == NULL)
- {
- source.Reply(_("Channel \002{0}\002 isn't registered."), chan);
- return;
- }
-
- ChanServ::AccessGroup access = source.AccessFor(ci);
- if (!source.HasPriv("botserv/administration") && !access.HasPriv("ASSIGN"))
- {
- source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "ASSIGN", ci->GetName());
- return;
- }
-
- if (!ci->GetBot())
- {
- source.Reply(_("There is no bot assigned to \002{0}\002."), ci->GetName());
- return;
- }
-
- if (ci->HasFieldS("PERSIST") && !ModeManager::FindChannelModeByName("PERM"))
- {
- source.Reply(_("You cannot unassign bots while persist is set on the channel."));
- return;
- }
-
- bool override = !access.HasPriv("ASSIGN");
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << ci->GetBot()->nick;
-
- ServiceBot *bi = ci->GetBot();
- bi->UnAssign(source.GetUser(), ci);
- source.Reply(_("Bot \002{0}\002 has been unassigned from \002{1}\002."), bi->nick, ci->GetName());
- }
-
- bool OnHelp(CommandSource &source, const Anope::string &subcommand) override
- {
- source.Reply(_("Unassigns a bot from \037channel\037."
- "Bot configuration is kept, so you will always be able to reassign a bot later without losing your settings.\n"
- "\n"
- "Use of this command requires the \002{0}\002 privilege on \037channel\037."
- "\n"
- "Example:\n"
- " {command} #anope\n"
- " Unassigns the current bot from #anope.\n"),
- "ASSIGN", "command"_kw = source.command);
- return true;
- }
-};
-
-class CommandBSSetNoBot : public Command
-{
- public:
- CommandBSSetNoBot(Module *creator, const Anope::string &sname = "botserv/set/nobot") : Command(creator, sname, 2, 2)
- {
- this->SetDesc(_("Prevent a bot from being assigned to a channel"));
- this->SetSyntax(_("\037channel\037 {\037ON|OFF\037}"));
- }
-
- void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
- {
- const Anope::string &chan = params[0];
- const Anope::string &value = params[1];
-
- ChanServ::Channel *ci = ChanServ::Find(chan);
- if (ci == NULL)
- {
- source.Reply(_("Channel \002{0}\002 isn't registered."), chan);
- return;
- }
-
- if (value.equals_ci("ON"))
- {
- Log(LOG_ADMIN, source, this, ci) << "to enable nobot";
-
- ci->SetS<bool>("BS_NOBOT", true);
- if (ci->GetBot())
- ci->GetBot()->UnAssign(source.GetUser(), ci);
- source.Reply(_("No-bot mode is now \002on\002 for \002{0}\002."), ci->GetName());
- }
- else if (value.equals_ci("OFF"))
- {
- Log(LOG_ADMIN, source, this, ci) << "to disable nobot";
-
- ci->UnsetS<bool>("BS_NOBOT");
- source.Reply(_("No-bot mode is now \002off\002 for \002{0}\002."), ci->GetName());
- }
- else
- this->OnSyntaxError(source, source.command);
- }
-
- bool OnHelp(CommandSource &source, const Anope::string &) override
- {
- source.Reply(_("If no-bot is set on a channel, then the channel will be unabled to have a bot assigned to it."
- " If a bot is already assigned to the channel, it is unassigned automatically when no-bot is enabled."
- "\n"
- "Example:\n"
- " {command} #anope on\n"
-