summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-25 16:21:21 -0400
committerAdam <Adam@anope.org>2011-09-10 01:58:38 -0400
commitf025d1b495cee3aadb6b7b45652d1cab3b7b7b6d (patch)
tree02df5a3f12104996af87d1b6c5ec9db9d45b6bde /modules/commands
parent8c4417cad180f3c5448c5b7509b1bf2235e3077e (diff)
Made service_reference type safe
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/bs_assign.cpp2
-rw-r--r--modules/commands/bs_badwords.cpp1
-rw-r--r--modules/commands/bs_bot.cpp1
-rw-r--r--modules/commands/bs_botlist.cpp1
-rw-r--r--modules/commands/bs_control.cpp2
-rw-r--r--modules/commands/bs_info.cpp1
-rw-r--r--modules/commands/bs_kick.cpp1
-rw-r--r--modules/commands/bs_set.cpp1
-rw-r--r--modules/commands/cs_access.cpp3
-rw-r--r--modules/commands/cs_akick.cpp1
-rw-r--r--modules/commands/cs_appendtopic.cpp1
-rw-r--r--modules/commands/cs_ban.cpp1
-rw-r--r--modules/commands/cs_clearusers.cpp1
-rw-r--r--modules/commands/cs_clone.cpp1
-rw-r--r--modules/commands/cs_drop.cpp1
-rw-r--r--modules/commands/cs_enforce.cpp1
-rw-r--r--modules/commands/cs_entrymsg.cpp1
-rw-r--r--modules/commands/cs_flags.cpp2
-rw-r--r--modules/commands/cs_getkey.cpp1
-rw-r--r--modules/commands/cs_info.cpp2
-rw-r--r--modules/commands/cs_invite.cpp1
-rw-r--r--modules/commands/cs_kick.cpp1
-rw-r--r--modules/commands/cs_list.cpp1
-rw-r--r--modules/commands/cs_mode.cpp1
-rw-r--r--modules/commands/cs_modes.cpp33
-rw-r--r--modules/commands/cs_register.cpp1
-rw-r--r--modules/commands/cs_saset.cpp1
-rw-r--r--modules/commands/cs_saset_noexpire.cpp1
-rw-r--r--modules/commands/cs_seen.cpp2
-rw-r--r--modules/commands/cs_set.cpp1
-rw-r--r--modules/commands/cs_set_bantype.cpp2
-rw-r--r--modules/commands/cs_set_description.cpp2
-rw-r--r--modules/commands/cs_set_founder.cpp2
-rw-r--r--modules/commands/cs_set_keeptopic.cpp2
-rw-r--r--modules/commands/cs_set_misc.cpp2
-rw-r--r--modules/commands/cs_set_peace.cpp2
-rw-r--r--modules/commands/cs_set_persist.cpp2
-rw-r--r--modules/commands/cs_set_private.cpp2
-rw-r--r--modules/commands/cs_set_restricted.cpp2
-rw-r--r--modules/commands/cs_set_secure.cpp2
-rw-r--r--modules/commands/cs_set_securefounder.cpp2
-rw-r--r--modules/commands/cs_set_secureops.cpp2
-rw-r--r--modules/commands/cs_set_signkick.cpp2
-rw-r--r--modules/commands/cs_set_successor.cpp2
-rw-r--r--modules/commands/cs_set_topiclock.cpp2
-rw-r--r--modules/commands/cs_suspend.cpp2
-rw-r--r--modules/commands/cs_sync.cpp1
-rw-r--r--modules/commands/cs_tban.cpp1
-rw-r--r--modules/commands/cs_topic.cpp1
-rw-r--r--modules/commands/cs_unban.cpp1
-rw-r--r--modules/commands/cs_updown.cpp2
-rw-r--r--modules/commands/cs_xop.cpp6
-rw-r--r--modules/commands/gl_global.cpp1
-rw-r--r--modules/commands/help.cpp1
-rw-r--r--modules/commands/hs_del.cpp2
-rw-r--r--modules/commands/hs_group.cpp1
-rw-r--r--modules/commands/hs_list.cpp1
-rw-r--r--modules/commands/hs_off.cpp1
-rw-r--r--modules/commands/hs_on.cpp1
-rw-r--r--modules/commands/hs_request.cpp4
-rw-r--r--modules/commands/hs_set.cpp2
-rw-r--r--modules/commands/ms_cancel.cpp1
-rw-r--r--modules/commands/ms_check.cpp1
-rw-r--r--modules/commands/ms_del.cpp1
-rw-r--r--modules/commands/ms_ignore.cpp1
-rw-r--r--modules/commands/ms_info.cpp1
-rw-r--r--modules/commands/ms_list.cpp1
-rw-r--r--modules/commands/ms_read.cpp1
-rw-r--r--modules/commands/ms_rsend.cpp1
-rw-r--r--modules/commands/ms_send.cpp1
-rw-r--r--modules/commands/ms_sendall.cpp1
-rw-r--r--modules/commands/ms_set.cpp1
-rw-r--r--modules/commands/ms_staff.cpp1
-rw-r--r--modules/commands/ns_access.cpp1
-rw-r--r--modules/commands/ns_ajoin.cpp1
-rw-r--r--modules/commands/ns_alist.cpp1
-rw-r--r--modules/commands/ns_cert.cpp1
-rw-r--r--modules/commands/ns_drop.cpp1
-rw-r--r--modules/commands/ns_getemail.cpp1
-rw-r--r--modules/commands/ns_getpass.cpp1
-rw-r--r--modules/commands/ns_ghost.cpp1
-rw-r--r--modules/commands/ns_group.cpp3
-rw-r--r--modules/commands/ns_identify.cpp1
-rw-r--r--modules/commands/ns_info.cpp1
-rw-r--r--modules/commands/ns_list.cpp1
-rw-r--r--modules/commands/ns_logout.cpp1
-rw-r--r--modules/commands/ns_recover.cpp1
-rw-r--r--modules/commands/ns_register.cpp3
-rw-r--r--modules/commands/ns_release.cpp1
-rw-r--r--modules/commands/ns_resetpass.cpp1
-rw-r--r--modules/commands/ns_saset.cpp3
-rw-r--r--modules/commands/ns_saset_noexpire.cpp1
-rw-r--r--modules/commands/ns_sendpass.cpp1
-rw-r--r--modules/commands/ns_set.cpp3
-rw-r--r--modules/commands/ns_set_autoop.cpp2
-rw-r--r--modules/commands/ns_set_email.cpp2
-rw-r--r--modules/commands/ns_set_greet.cpp2
-rw-r--r--modules/commands/ns_set_hide.cpp2
-rw-r--r--modules/commands/ns_set_kill.cpp2
-rw-r--r--modules/commands/ns_set_language.cpp2
-rw-r--r--modules/commands/ns_set_message.cpp2
-rw-r--r--modules/commands/ns_set_misc.cpp2
-rw-r--r--modules/commands/ns_set_private.cpp2
-rw-r--r--modules/commands/ns_set_secure.cpp2
-rw-r--r--modules/commands/ns_status.cpp1
-rw-r--r--modules/commands/ns_suspend.cpp2
-rw-r--r--modules/commands/ns_update.cpp1
-rw-r--r--modules/commands/os_akill.cpp1
-rw-r--r--modules/commands/os_chankill.cpp1
-rw-r--r--modules/commands/os_config.cpp1
-rw-r--r--modules/commands/os_defcon.cpp1
-rw-r--r--modules/commands/os_forbid.cpp2
-rw-r--r--modules/commands/os_forbid.h4
-rw-r--r--modules/commands/os_ignore.cpp2
-rw-r--r--modules/commands/os_ignore.h4
-rw-r--r--modules/commands/os_jupe.cpp1
-rw-r--r--modules/commands/os_kick.cpp1
-rw-r--r--modules/commands/os_kill.cpp1
-rw-r--r--modules/commands/os_list.cpp2
-rw-r--r--modules/commands/os_login.cpp1
-rw-r--r--modules/commands/os_mode.cpp2
-rw-r--r--modules/commands/os_modinfo.cpp17
-rw-r--r--modules/commands/os_module.cpp3
-rw-r--r--modules/commands/os_news.cpp4
-rw-r--r--modules/commands/os_news.h4
-rw-r--r--modules/commands/os_noop.cpp1
-rw-r--r--modules/commands/os_oline.cpp1
-rw-r--r--modules/commands/os_oper.cpp1
-rw-r--r--modules/commands/os_reload.cpp1
-rw-r--r--modules/commands/os_session.cpp3
-rw-r--r--modules/commands/os_session.h4
-rw-r--r--modules/commands/os_set.cpp1
-rw-r--r--modules/commands/os_shutdown.cpp3
-rw-r--r--modules/commands/os_stats.cpp1
-rw-r--r--modules/commands/os_svsnick.cpp1
-rw-r--r--modules/commands/os_sxline.cpp15
-rw-r--r--modules/commands/os_update.cpp1
137 files changed, 35 insertions, 242 deletions
diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp
index fcaca4bac..13f3e4403 100644
--- a/modules/commands/bs_assign.cpp
+++ b/modules/commands/bs_assign.cpp
@@ -160,8 +160,6 @@ class BSAssign : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsassign);
- ModuleManager::RegisterService(&commandbsunassign);
}
};
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp
index c2ca13723..15298d5eb 100644
--- a/modules/commands/bs_badwords.cpp
+++ b/modules/commands/bs_badwords.cpp
@@ -324,7 +324,6 @@ class BSBadwords : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsbadwords);
}
};
diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp
index e4f88856f..3f6ee872a 100644
--- a/modules/commands/bs_bot.cpp
+++ b/modules/commands/bs_bot.cpp
@@ -407,7 +407,6 @@ class BSBot : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsbot);
}
};
diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp
index b614c0689..03e0c16b8 100644
--- a/modules/commands/bs_botlist.cpp
+++ b/modules/commands/bs_botlist.cpp
@@ -84,7 +84,6 @@ class BSBotList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsbotlist);
}
};
diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp
index a798c6171..b464a4520 100644
--- a/modules/commands/bs_control.cpp
+++ b/modules/commands/bs_control.cpp
@@ -150,8 +150,6 @@ class BSControl : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbssay);
- ModuleManager::RegisterService(&commandbsact);
}
};
diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp
index 3f1b107f2..d6668184d 100644
--- a/modules/commands/bs_info.cpp
+++ b/modules/commands/bs_info.cpp
@@ -237,7 +237,6 @@ class BSInfo : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsinfo);
}
};
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp
index 0612c7e40..107e78d64 100644
--- a/modules/commands/bs_kick.cpp
+++ b/modules/commands/bs_kick.cpp
@@ -739,7 +739,6 @@ class BSKick : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbskick);
ModuleManager::Attach(I_OnPrivmsg, this);
}
diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp
index 46e4236b1..be699c3e8 100644
--- a/modules/commands/bs_set.cpp
+++ b/modules/commands/bs_set.cpp
@@ -302,7 +302,6 @@ class BSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandbsset);
}
};
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp
index ae1e03fbf..2dd7da51c 100644
--- a/modules/commands/cs_access.cpp
+++ b/modules/commands/cs_access.cpp
@@ -882,9 +882,6 @@ class CSAccess : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&accessprovider);
- ModuleManager::RegisterService(&commandcsaccess);
- ModuleManager::RegisterService(&commandcslevels);
Implementation i[] = { I_OnReload, I_OnChanRegistered, I_OnCreateChan, I_OnGroupCheckPriv };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp
index 11b4da62c..594544e22 100644
--- a/modules/commands/cs_akick.cpp
+++ b/modules/commands/cs_akick.cpp
@@ -557,7 +557,6 @@ class CSAKick : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsakick);
}
};
diff --git a/modules/commands/cs_appendtopic.cpp b/modules/commands/cs_appendtopic.cpp
index 63fb0a785..bc4db7cba 100644
--- a/modules/commands/cs_appendtopic.cpp
+++ b/modules/commands/cs_appendtopic.cpp
@@ -110,7 +110,6 @@ class CSAppendTopic : public Module
{
this->SetAuthor("SGR");
- ModuleManager::RegisterService(&commandcsappendtopic);
}
};
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp
index de506e3fe..0aae3f9bd 100644
--- a/modules/commands/cs_ban.cpp
+++ b/modules/commands/cs_ban.cpp
@@ -102,7 +102,6 @@ class CSBan : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsban);
}
};
diff --git a/modules/commands/cs_clearusers.cpp b/modules/commands/cs_clearusers.cpp
index 91dc68cc2..e8f47bac4 100644
--- a/modules/commands/cs_clearusers.cpp
+++ b/modules/commands/cs_clearusers.cpp
@@ -76,7 +76,6 @@ class CSClearUsers : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsclearusers);
}
};
diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp
index dff50f9ce..8a242c532 100644
--- a/modules/commands/cs_clone.cpp
+++ b/modules/commands/cs_clone.cpp
@@ -186,7 +186,6 @@ class CSClone : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsclone);
}
};
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp
index a42c8e58e..7056f5c35 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/commands/cs_drop.cpp
@@ -93,7 +93,6 @@ class CSDrop : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsdrop);
}
};
diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp
index 267a0a850..78a2a9950 100644
--- a/modules/commands/cs_enforce.cpp
+++ b/modules/commands/cs_enforce.cpp
@@ -208,7 +208,6 @@ class CSEnforce : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsenforce);
}
};
diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp
index 71e0eea9c..05b97e027 100644
--- a/modules/commands/cs_entrymsg.cpp
+++ b/modules/commands/cs_entrymsg.cpp
@@ -168,7 +168,6 @@ class CSEntryMessage : public Module
Implementation i[] = { I_OnJoinChannel, I_OnReload, I_OnDatabaseReadMetadata, I_OnDatabaseWriteMetadata };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&commandentrymsg);
this->OnReload();
}
diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp
index a8d44aeea..8bec73ae0 100644
--- a/modules/commands/cs_flags.cpp
+++ b/modules/commands/cs_flags.cpp
@@ -427,8 +427,6 @@ class CSFlags : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&accessprovider);
- ModuleManager::RegisterService(&commandcsflags);
Implementation i[] = { I_OnReload };
ModuleManager::Attach(i, this, 1);
diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp
index e2f3c7531..cfb148134 100644
--- a/modules/commands/cs_getkey.cpp
+++ b/modules/commands/cs_getkey.cpp
@@ -73,7 +73,6 @@ class CSGetKey : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsgetkey);
}
};
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 5cc100c78..54f14cd0c 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -78,7 +78,6 @@ class CommandCSInfo : public Command
Anope::string optbuf;
CheckOptStr(optbuf, CI_KEEPTOPIC, _("Topic Retention"), ci, u->Account());
- CheckOptStr(optbuf, CI_OPNOTICE, _("OP Notice"), ci, u->Account());
CheckOptStr(optbuf, CI_PEACE, _("Peace"), ci, u->Account());
CheckOptStr(optbuf, CI_PRIVATE, _("Private"), ci, u->Account());
CheckOptStr(optbuf, CI_RESTRICTED, _("Restricted Access"), ci, u->Account());
@@ -135,7 +134,6 @@ class CSInfo : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsinfo);
}
};
diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp
index 9773ba332..f6ed44685 100644
--- a/modules/commands/cs_invite.cpp
+++ b/modules/commands/cs_invite.cpp
@@ -95,7 +95,6 @@ class CSInvite : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsinvite);
}
};
diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp
index 312bb0859..b9c0f7b41 100644
--- a/modules/commands/cs_kick.cpp
+++ b/modules/commands/cs_kick.cpp
@@ -84,7 +84,6 @@ class CSKick : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcskick);
}
};
diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp
index 92b5c702f..29a4309b2 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/commands/cs_list.cpp
@@ -129,7 +129,6 @@ class CSList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcslist);
}
};
diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp
index 7c98292d3..3e4ed784c 100644
--- a/modules/commands/cs_mode.cpp
+++ b/modules/commands/cs_mode.cpp
@@ -365,7 +365,6 @@ class CSMode : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsmode);
}
};
diff --git a/modules/commands/cs_modes.cpp b/modules/commands/cs_modes.cpp
index e2b2f2516..fb2fcb727 100644
--- a/modules/commands/cs_modes.cpp
+++ b/modules/commands/cs_modes.cpp
@@ -61,17 +61,16 @@ class CommandModeBase : public Command
* @param set Is the mode being set or removed
* @param level The acecss level required to set this mode on someone else
* @param levelself The access level required to set this mode on yourself
- * @param notice Flag required on a channel to send a notice
*/
- void do_util(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, ChannelAccess level, ChannelAccess levelself, ChannelInfoFlag notice)
+ void do_util(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, ChannelAccess level, ChannelAccess levelself)
{
User *u = source.u;
if (chan.empty())
for (UChannelList::iterator it = u->chans.begin(); it != u->chans.end(); ++it)
- do_mode(source, com, cm, (*it)->chan->name, u->nick, set, level, levelself, notice);
+ do_mode(source, com, cm, (*it)->chan->name, u->nick, set, level, levelself);
else
- do_mode(source, com, cm, chan, !nick.empty() ? nick : u->nick, set, level, levelself, notice);
+ do_mode(source, com, cm, chan, !nick.empty() ? nick : u->nick, set, level, levelself);
return;
}
@@ -153,7 +152,7 @@ class CommandCSVoice : public CommandModeBase
{
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_VOICE, CA_VOICEME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_VOICE, CA_VOICEME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -183,7 +182,7 @@ class CommandCSDeVoice : public CommandModeBase
{
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_VOICE, CA_VOICEME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_VOICE, CA_VOICEME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -216,7 +215,7 @@ class CommandCSHalfOp : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_HALFOP, CA_HALFOPME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_HALFOP, CA_HALFOPME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -248,7 +247,7 @@ class CommandCSDeHalfOp : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_HALFOP, CA_HALFOPME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_HALFOP, CA_HALFOPME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -281,7 +280,7 @@ class CommandCSProtect : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_PROTECT, CA_PROTECTME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_PROTECT, CA_PROTECTME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -313,7 +312,7 @@ class CommandCSDeProtect : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_PROTECT, CA_PROTECTME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_PROTECT, CA_PROTECTME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -344,7 +343,7 @@ class CommandCSOwner : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_OWNER, CA_OWNERME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", true, CA_OWNER, CA_OWNERME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -375,7 +374,7 @@ class CommandCSDeOwner : public CommandModeBase
if (!cm)
return;
- return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_OWNER, CA_OWNERME, CI_BEGIN);
+ return do_util(source, this, cm, !params.empty() ? params[0] : "", params.size() > 1 ? params[1] : "", false, CA_OWNER, CA_OWNERME);
}
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
@@ -412,17 +411,7 @@ class CSModes : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsop);
- ModuleManager::RegisterService(&commandcsdeop);
- ModuleManager::RegisterService(&commandcsvoice);
- ModuleManager::RegisterService(&commandcsdevoice);
- ModuleManager::RegisterService(&commandcsowner);
- ModuleManager::RegisterService(&commandcsdeowner);
- ModuleManager::RegisterService(&commandcsprotect);
- ModuleManager::RegisterService(&commandcsdeprotect);
- ModuleManager::RegisterService(&commandcshalfop);
- ModuleManager::RegisterService(&commandcsdehalfop);
}
};
diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp
index 632cbced7..e9344d362 100644
--- a/modules/commands/cs_register.cpp
+++ b/modules/commands/cs_register.cpp
@@ -182,7 +182,6 @@ class CSRegister : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsregister);
ModuleManager::Attach(I_OnDelChan, this);
}
diff --git a/modules/commands/cs_saset.cpp b/modules/commands/cs_saset.cpp
index 699c5bc2c..7049c2723 100644
--- a/modules/commands/cs_saset.cpp
+++ b/modules/commands/cs_saset.cpp
@@ -67,7 +67,6 @@ class CSSASet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssaset);
}
};
diff --git a/modules/commands/cs_saset_noexpire.cpp b/modules/commands/cs_saset_noexpire.cpp
index 91ca8ecd9..1f645304a 100644
--- a/modules/commands/cs_saset_noexpire.cpp
+++ b/modules/commands/cs_saset_noexpire.cpp
@@ -74,7 +74,6 @@ class CSSetNoexpire : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssasetnoexpire);
}
};
diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp
index 8b7c8061f..d466acca4 100644
--- a/modules/commands/cs_seen.cpp
+++ b/modules/commands/cs_seen.cpp
@@ -294,8 +294,6 @@ class CSSeen : public Module
I_OnDatabaseWrite };
ModuleManager::Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- ModuleManager::RegisterService(&commandseen);
- ModuleManager::RegisterService(&commandosseen);
OnReload();
}
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp
index 65719ce91..d2bb3464a 100644
--- a/modules/commands/cs_set.cpp
+++ b/modules/commands/cs_set.cpp
@@ -67,7 +67,6 @@ class CSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsset);
}
};
diff --git a/modules/commands/cs_set_bantype.cpp b/modules/commands/cs_set_bantype.cpp
index 7d7fea56e..468a3cb86 100644
--- a/modules/commands/cs_set_bantype.cpp
+++ b/modules/commands/cs_set_bantype.cpp
@@ -90,8 +90,6 @@ class CSSetBanType : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetbantype);
- ModuleManager::RegisterService(&commandcssasetbantype);
}
};
diff --git a/modules/commands/cs_set_description.cpp b/modules/commands/cs_set_description.cpp
index 3a1341f1a..acd30e68b 100644
--- a/modules/commands/cs_set_description.cpp
+++ b/modules/commands/cs_set_description.cpp
@@ -81,8 +81,6 @@ class CSSetDescription : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetdescription);
- ModuleManager::RegisterService(&commandcssasetdescription);
}
};
diff --git a/modules/commands/cs_set_founder.cpp b/modules/commands/cs_set_founder.cpp
index 7587b36b8..ac7ece637 100644
--- a/modules/commands/cs_set_founder.cpp
+++ b/modules/commands/cs_set_founder.cpp
@@ -97,8 +97,6 @@ class CSSetFounder : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetfounder);
- ModuleManager::RegisterService(&commandcssasetfounder);
}
};
diff --git a/modules/commands/cs_set_keeptopic.cpp b/modules/commands/cs_set_keeptopic.cpp
index d0c5e5bd6..58c88a73c 100644
--- a/modules/commands/cs_set_keeptopic.cpp
+++ b/modules/commands/cs_set_keeptopic.cpp
@@ -86,8 +86,6 @@ class CSSetKeepTopic : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetkeeptopic);
- ModuleManager::RegisterService(&commandcssasetkeeptopic);
}
};
diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp
index 37a8dda4e..a64bbf6ea 100644
--- a/modules/commands/cs_set_misc.cpp
+++ b/modules/commands/cs_set_misc.cpp
@@ -67,8 +67,6 @@ class CSSetMisc : public Module
Implementation i[] = { I_OnChanInfo, I_OnDatabaseWriteMetadata, I_OnDatabaseReadMetadata };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&this->commandcssetmisc);
- ModuleManager::RegisterService(&this->commandcssasetmisc);
}
void OnChanInfo(CommandSource &source, ChannelInfo *ci, bool ShowHidden)
diff --git a/modules/commands/cs_set_peace.cpp b/modules/commands/cs_set_peace.cpp
index f64c06c7e..a5bdd7cd5 100644
--- a/modules/commands/cs_set_peace.cpp
+++ b/modules/commands/cs_set_peace.cpp
@@ -85,8 +85,6 @@ class CSSetPeace : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetpeace);
- ModuleManager::RegisterService(&commandcssasetpeace);
}
};
diff --git a/modules/commands/cs_set_persist.cpp b/modules/commands/cs_set_persist.cpp
index 8b13ae200..000389ef1 100644
--- a/modules/commands/cs_set_persist.cpp
+++ b/modules/commands/cs_set_persist.cpp
@@ -172,8 +172,6 @@ class CSSetPersist : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetpeace);
- ModuleManager::RegisterService(&commandcssasetpeace);
}
};
diff --git a/modules/commands/cs_set_private.cpp b/modules/commands/cs_set_private.cpp
index 1e6129a09..39fd8b414 100644
--- a/modules/commands/cs_set_private.cpp
+++ b/modules/commands/cs_set_private.cpp
@@ -85,8 +85,6 @@ class CSSetPrivate : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetprivate);
- ModuleManager::RegisterService(&commandcssasetprivate);
}
};
diff --git a/modules/commands/cs_set_restricted.cpp b/modules/commands/cs_set_restricted.cpp
index b37ae8de4..bc04297f1 100644
--- a/modules/commands/cs_set_restricted.cpp
+++ b/modules/commands/cs_set_restricted.cpp
@@ -83,8 +83,6 @@ class CSSetRestricted : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetrestricted);
- ModuleManager::RegisterService(&commandcssasetrestricted);
}
};
diff --git a/modules/commands/cs_set_secure.cpp b/modules/commands/cs_set_secure.cpp
index 7b5eb2ce6..63671588b 100644
--- a/modules/commands/cs_set_secure.cpp
+++ b/modules/commands/cs_set_secure.cpp
@@ -86,8 +86,6 @@ class CSSetSecure : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetsecure);
- ModuleManager::RegisterService(&commandcssasetsecure);
}
};
diff --git a/modules/commands/cs_set_securefounder.cpp b/modules/commands/cs_set_securefounder.cpp
index 584380244..746555814 100644
--- a/modules/commands/cs_set_securefounder.cpp
+++ b/modules/commands/cs_set_securefounder.cpp
@@ -87,8 +87,6 @@ class CSSetSecureFounder : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetsecurefounder);
- ModuleManager::RegisterService(&commandcssasetsecurefounder);
}
};
diff --git a/modules/commands/cs_set_secureops.cpp b/modules/commands/cs_set_secureops.cpp
index d19107607..3dcc7b301 100644
--- a/modules/commands/cs_set_secureops.cpp
+++ b/modules/commands/cs_set_secureops.cpp
@@ -84,8 +84,6 @@ class CSSetSecureOps : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetsecureops);
- ModuleManager::RegisterService(&commandcssasetsecureops);
}
};
diff --git a/modules/commands/cs_set_signkick.cpp b/modules/commands/cs_set_signkick.cpp
index 1d4508418..3a4177b83 100644
--- a/modules/commands/cs_set_signkick.cpp
+++ b/modules/commands/cs_set_signkick.cpp
@@ -96,8 +96,6 @@ class CSSetSignKick : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetsignkick);
- ModuleManager::RegisterService(&commandcssasetsignkick);
}
};
diff --git a/modules/commands/cs_set_successor.cpp b/modules/commands/cs_set_successor.cpp
index eec276226..efd09bb6d 100644
--- a/modules/commands/cs_set_successor.cpp
+++ b/modules/commands/cs_set_successor.cpp
@@ -111,8 +111,6 @@ class CSSetSuccessor : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssetsuccessor);
- ModuleManager::RegisterService(&commandcssasetsuccessor);
}
};
diff --git a/modules/commands/cs_set_topiclock.cpp b/modules/commands/cs_set_topiclock.cpp
index 500e3db76..02f9151a0 100644
--- a/modules/commands/cs_set_topiclock.cpp
+++ b/modules/commands/cs_set_topiclock.cpp
@@ -84,8 +84,6 @@ class CSSetTopicLock : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssettopiclock);
- ModuleManager::RegisterService(&commandcssasettopiclock);
}
};
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp
index d1bd7b72a..d9f846d71 100644
--- a/modules/commands/cs_suspend.cpp
+++ b/modules/commands/cs_suspend.cpp
@@ -150,8 +150,6 @@ class CSSuspend : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssuspend);
- ModuleManager::RegisterService(&commandcsunsuspend);
}
};
diff --git a/modules/commands/cs_sync.cpp b/modules/commands/cs_sync.cpp
index 5c5c51fee..72964b786 100644
--- a/modules/commands/cs_sync.cpp
+++ b/modules/commands/cs_sync.cpp
@@ -59,7 +59,6 @@ class CSSync : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcssync);
}
};
diff --git a/modules/commands/cs_tban.cpp b/modules/commands/cs_tban.cpp
index 6bc682efe..0e7b8978e 100644
--- a/modules/commands/cs_tban.cpp
+++ b/modules/commands/cs_tban.cpp
@@ -109,7 +109,6 @@ class CSTBan : public Module
me = this;
- ModuleManager::RegisterService(&commandcstban);
}
};
diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp
index 49f6e8a13..a55c969f7 100644
--- a/modules/commands/cs_topic.cpp
+++ b/modules/commands/cs_topic.cpp
@@ -77,7 +77,6 @@ class CSTopic : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcstopic);
}
};
diff --git a/modules/commands/cs_unban.cpp b/modules/commands/cs_unban.cpp
index b4d09068c..c78b3a7d1 100644
--- a/modules/commands/cs_unban.cpp
+++ b/modules/commands/cs_unban.cpp
@@ -87,7 +87,6 @@ class CSUnban : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsunban);
}
};
diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp
index a3848c393..94a0d45d5 100644
--- a/modules/commands/cs_updown.cpp
+++ b/modules/commands/cs_updown.cpp
@@ -122,8 +122,6 @@ class CSUpDown : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandcsup);
- ModuleManager::RegisterService(&commandcsdown);
}
};
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp
index 1ea99541e..27f200b9b 100644
--- a/modules/commands/cs_xop.cpp
+++ b/modules/commands/cs_xop.cpp
@@ -868,12 +868,6 @@ class CSXOP : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&accessprovider);
- ModuleManager::RegisterService(&commandcssop);
- ModuleManager::RegisterService(&commandcsaop);
- ModuleManager::RegisterService(&commandcsqop);
- ModuleManager::RegisterService(&commandcsvop);
- ModuleManager::RegisterService(&commandcshop);
}
};
diff --git a/modules/commands/gl_global.cpp b/modules/commands/gl_global.cpp
index 80c42e017..b9b64f137 100644
--- a/modules/commands/gl_global.cpp
+++ b/modules/commands/gl_global.cpp
@@ -57,7 +57,6 @@ class GLGlobal : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandglglobal);
}
};
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp
index 2a4f25b6c..bde3b5762 100644
--- a/modules/commands/help.cpp
+++ b/modules/commands/help.cpp
@@ -123,7 +123,6 @@ class Help : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhelp);
}
};
diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp
index 541986aff..b4cde4f92 100644
--- a/modules/commands/hs_del.cpp
+++ b/modules/commands/hs_del.cpp
@@ -99,8 +99,6 @@ class HSDel : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhsdel);
- ModuleManager::RegisterService(&commandhsdelall);
}
};
diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp
index 8d6fbd630..c41d9de3b 100644
--- a/modules/commands/hs_group.cpp
+++ b/modules/commands/hs_group.cpp
@@ -73,7 +73,6 @@ class HSGroup : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhsgroup);
}
};
diff --git a/modules/commands/hs_list.cpp b/modules/commands/hs_list.cpp
index 589eef3e1..785db9e5c 100644
--- a/modules/commands/hs_list.cpp
+++ b/modules/commands/hs_list.cpp
@@ -130,7 +130,6 @@ class HSList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhslist);
}
};
diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp
index a3f11c2bd..789a711a9 100644
--- a/modules/commands/hs_off.cpp
+++ b/modules/commands/hs_off.cpp
@@ -60,7 +60,6 @@ class HSOff : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhsoff);
}
};
diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp
index 0ba124ba1..c4f22d64c 100644
--- a/modules/commands/hs_on.cpp
+++ b/modules/commands/hs_on.cpp
@@ -70,7 +70,6 @@ class HSOn : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhson);
}
};
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp
index 75bb7994d..3d330bc2a 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/commands/hs_request.cpp
@@ -306,10 +306,6 @@ class HSRequest : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhsrequest);
- ModuleManager::RegisterService(&commandhsactive);
- ModuleManager::RegisterService(&commandhsreject);
- ModuleManager::RegisterService(&commandhswaiting);
Implementation i[] = { I_OnDelNick, I_OnDatabaseRead, I_OnDatabaseWrite, I_OnReload };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp
index 44a501cc1..1d6991202 100644
--- a/modules/commands/hs_set.cpp
+++ b/modules/commands/hs_set.cpp
@@ -216,8 +216,6 @@ class HSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandhsset);
- ModuleManager::RegisterService(&commandhssetall);
}
};
diff --git a/modules/commands/ms_cancel.cpp b/modules/commands/ms_cancel.cpp
index e5beffa10..2d4374278 100644
--- a/modules/commands/ms_cancel.cpp
+++ b/modules/commands/ms_cancel.cpp
@@ -70,7 +70,6 @@ class MSCancel : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmscancel);
}
};
diff --git a/modules/commands/ms_check.cpp b/modules/commands/ms_check.cpp
index 3019e270f..a230eb749 100644
--- a/modules/commands/ms_check.cpp
+++ b/modules/commands/ms_check.cpp
@@ -82,7 +82,6 @@ class MSCheck : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmscheck);
}
};
diff --git a/modules/commands/ms_del.cpp b/modules/commands/ms_del.cpp
index b67fbc0cc..8f75b0da9 100644
--- a/modules/commands/ms_del.cpp
+++ b/modules/commands/ms_del.cpp
@@ -156,7 +156,6 @@ class MSDel : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsdel);
}
};
diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp
index 76075b299..b0c6cfd4f 100644
--- a/modules/commands/ms_ignore.cpp
+++ b/modules/commands/ms_ignore.cpp
@@ -104,7 +104,6 @@ class MSIgnore : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsignore);
}
};
diff --git a/modules/commands/ms_info.cpp b/modules/commands/ms_info.cpp
index 9562b63e4..741be799a 100644
--- a/modules/commands/ms_info.cpp
+++ b/modules/commands/ms_info.cpp
@@ -212,7 +212,6 @@ class MSInfo : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsinfo);
}
};
diff --git a/modules/commands/ms_list.cpp b/modules/commands/ms_list.cpp
index c0b5f910c..e6d7a691d 100644
--- a/modules/commands/ms_list.cpp
+++ b/modules/commands/ms_list.cpp
@@ -161,7 +161,6 @@ class MSList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmslist);
}
};
diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp
index 1221c5cc2..87a5cb648 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/commands/ms_read.cpp
@@ -189,7 +189,6 @@ class MSRead : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsread);
}
};
diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp
index 37c633e02..9dcb7033c 100644
--- a/modules/commands/ms_rsend.cpp
+++ b/modules/commands/ms_rsend.cpp
@@ -99,7 +99,6 @@ class MSRSend : public Module
if (!Config->MSMemoReceipt)
throw ModuleException("Invalid value for memoreceipt");
- ModuleManager::RegisterService(&commandmsrsend);
}
};
diff --git a/modules/commands/ms_send.cpp b/modules/commands/ms_send.cpp
index 9397e7ad7..c9a70af10 100644
--- a/modules/commands/ms_send.cpp
+++ b/modules/commands/ms_send.cpp
@@ -63,7 +63,6 @@ class MSSend : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmssend);
}
};
diff --git a/modules/commands/ms_sendall.cpp b/modules/commands/ms_sendall.cpp
index 7af5ac7af..e72c14dbd 100644
--- a/modules/commands/ms_sendall.cpp
+++ b/modules/commands/ms_sendall.cpp
@@ -67,7 +67,6 @@ class MSSendAll : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmssendall);
}
};
diff --git a/modules/commands/ms_set.cpp b/modules/commands/ms_set.cpp
index 02eb971ad..a4fef31a8 100644
--- a/modules/commands/ms_set.cpp
+++ b/modules/commands/ms_set.cpp
@@ -305,7 +305,6 @@ class MSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsset);
}
};
diff --git a/modules/commands/ms_staff.cpp b/modules/commands/ms_staff.cpp
index 6264dbea4..090f67cfc 100644
--- a/modules/commands/ms_staff.cpp
+++ b/modules/commands/ms_staff.cpp
@@ -64,7 +64,6 @@ class MSStaff : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandmsstaff);
}
};
diff --git a/modules/commands/ns_access.cpp b/modules/commands/ns_access.cpp
index df9ae6eed..366681b09 100644
--- a/modules/commands/ns_access.cpp
+++ b/modules/commands/ns_access.cpp
@@ -188,7 +188,6 @@ class NSAccess : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsaccess);
}
};
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp
index 050470ec4..ca7b656a6 100644
--- a/modules/commands/ns_ajoin.cpp
+++ b/modules/commands/ns_ajoin.cpp
@@ -120,7 +120,6 @@ class NSAJoin : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsajoin);
Implementation i[] = { I_OnNickIdentify, I_OnDatabaseWriteMetadata, I_OnDatabaseReadMetadata };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp
index 179fa745a..84af7cadd 100644
--- a/modules/commands/ns_alist.cpp
+++ b/modules/commands/ns_alist.cpp
@@ -95,7 +95,6 @@ class NSAList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsalist);
}
};
diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp
index f442fe14a..88e0144a3 100644
--- a/modules/commands/ns_cert.cpp
+++ b/modules/commands/ns_cert.cpp
@@ -214,7 +214,6 @@ class NSCert : public Module
Implementation i[] = { I_OnFingerprint };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&commandnscert);
}
void OnFingerprint(User *u)
diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp
index 7960652ff..84e72c3cc 100644
--- a/modules/commands/ns_drop.cpp
+++ b/modules/commands/ns_drop.cpp
@@ -123,7 +123,6 @@ class NSDrop : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsdrop);
}
};
diff --git a/modules/commands/ns_getemail.cpp b/modules/commands/ns_getemail.cpp
index fa27e5174..ab19cbf0e 100644
--- a/modules/commands/ns_getemail.cpp
+++ b/modules/commands/ns_getemail.cpp
@@ -75,7 +75,6 @@ class NSGetEMail : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsgetemail);
}
};
diff --git a/modules/commands/ns_getpass.cpp b/modules/commands/ns_getpass.cpp
index 9ebea5263..0e266f9a8 100644
--- a/modules/commands/ns_getpass.cpp
+++ b/modules/commands/ns_getpass.cpp
@@ -72,7 +72,6 @@ class NSGetPass : public Module
if (enc_decrypt(tmp_pass, tmp_pass) == -1)
throw ModuleException("Incompatible with the encryption module being used");
- ModuleManager::RegisterService(&commandnsgetpass);
}
};
diff --git a/modules/commands/ns_ghost.cpp b/modules/commands/ns_ghost.cpp
index 37dcef9c7..db4ff1dcd 100644
--- a/modules/commands/ns_ghost.cpp
+++ b/modules/commands/ns_ghost.cpp
@@ -115,7 +115,6 @@ class NSGhost : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsghost);
}
};
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index 2e23e1f51..b41cad09d 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -296,9 +296,6 @@ class NSGroup : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsgroup);
- ModuleManager::RegisterService(&commandnsungroup);
- ModuleManager::RegisterService(&commandnsglist);
}
};
diff --git a/modules/commands/ns_identify.cpp b/modules/commands/ns_identify.cpp
index b0a375cd2..2daa39df2 100644
--- a/modules/commands/ns_identify.cpp
+++ b/modules/commands/ns_identify.cpp
@@ -86,7 +86,6 @@ class NSIdentify : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsidentify);
}
};
diff --git a/modules/commands/ns_info.cpp b/modules/commands/ns_info.cpp
index e40f80f77..8940bfaa7 100644
--- a/modules/commands/ns_info.cpp
+++ b/modules/commands/ns_info.cpp
@@ -171,7 +171,6 @@ class NSInfo : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsinfo);
}
};
diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp
index 96049ba02..e46be55e7 100644
--- a/modules/commands/ns_list.cpp
+++ b/modules/commands/ns_list.cpp
@@ -162,7 +162,6 @@ class NSList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnslist);
}
};
diff --git a/modules/commands/ns_logout.cpp b/modules/commands/ns_logout.cpp
index 923ea7867..63798cdcb 100644
--- a/modules/commands/ns_logout.cpp
+++ b/modules/commands/ns_logout.cpp
@@ -90,7 +90,6 @@ class NSLogout : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnslogout);
}
};
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp
index e6352fb7c..f1a22129d 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/commands/ns_recover.cpp
@@ -133,7 +133,6 @@ class NSRecover : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsrecover);
}
};
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 9e30167d8..aced3046e 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -315,9 +315,6 @@ class NSRegister : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsregister);
- ModuleManager::RegisterService(&commandnsconfirm);
- ModuleManager::RegisterService(&commandnsrsend);
}
};
diff --git a/modules/commands/ns_release.cpp b/modules/commands/ns_release.cpp
index 20a3e295c..eb8a42729 100644
--- a/modules/commands/ns_release.cpp
+++ b/modules/commands/ns_release.cpp
@@ -103,7 +103,6 @@ class NSRelease : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsrelease);
}
};
diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp
index 400be41f9..153691cdf 100644
--- a/modules/commands/ns_resetpass.cpp
+++ b/modules/commands/ns_resetpass.cpp
@@ -69,7 +69,6 @@ class NSResetPass : public Module
if (!Config->UseMail)
throw ModuleException("Not using mail.");
- ModuleManager::RegisterService(&commandnsresetpass);
ModuleManager::Attach(I_OnPreCommand, this);
}
diff --git a/modules/commands/ns_saset.cpp b/modules/commands/ns_saset.cpp
index a4aa2f422..d8305e43a 100644
--- a/modules/commands/ns_saset.cpp
+++ b/modules/commands/ns_saset.cpp
@@ -164,9 +164,6 @@ class NSSASet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssaset);
- ModuleManager::RegisterService(&commandnssasetdisplay);
- ModuleManager::RegisterService(&commandnssasetpassword);
}
};
diff --git a/modules/commands/ns_saset_noexpire.cpp b/modules/commands/ns_saset_noexpire.cpp
index 1bff9b461..e960f4030 100644
--- a/modules/commands/ns_saset_noexpire.cpp
+++ b/modules/commands/ns_saset_noexpire.cpp
@@ -69,7 +69,6 @@ class NSSASetNoexpire : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssasetnoexpire);
}
};
diff --git a/modules/commands/ns_sendpass.cpp b/modules/commands/ns_sendpass.cpp
index 5195ac727..0aa81b9a7 100644
--- a/modules/commands/ns_sendpass.cpp
+++ b/modules/commands/ns_sendpass.cpp
@@ -83,7 +83,6 @@ class NSSendPass : public Module
if (enc_decrypt(tmp_pass, tmp_pass) == -1)
throw ModuleException("Incompatible with the encryption module being used");
- ModuleManager::RegisterService(&commandnssendpass);
}
};
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp
index ad7acb5a4..11334565f 100644
--- a/modules/commands/ns_set.cpp
+++ b/modules/commands/ns_set.cpp
@@ -149,9 +149,6 @@ class NSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsset);
- ModuleManager::RegisterService(&commandnssetdisplay);
- ModuleManager::RegisterService(&commandnssetpassword);
}
};
diff --git a/modules/commands/ns_set_autoop.cpp b/modules/commands/ns_set_autoop.cpp
index ff178141f..b332ac485 100644
--- a/modules/commands/ns_set_autoop.cpp
+++ b/modules/commands/ns_set_autoop.cpp
@@ -99,8 +99,6 @@ class NSSetAutoOp : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetautoop);
- ModuleManager::RegisterService(&commandnssasetautoop);
}
};
diff --git a/modules/commands/ns_set_email.cpp b/modules/commands/ns_set_email.cpp
index 0df8584b7..175ed5b9e 100644
--- a/modules/commands/ns_set_email.cpp
+++ b/modules/commands/ns_set_email.cpp
@@ -156,8 +156,6 @@ class NSSetEmail : public Module
ModuleManager::Attach(I_OnPreCommand, this);
- ModuleManager::RegisterService(&commandnssetemail);
- ModuleManager::RegisterService(&commandnssasetemail);
}
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params)
diff --git a/modules/commands/ns_set_greet.cpp b/modules/commands/ns_set_greet.cpp
index 03bcd3834..811303796 100644
--- a/modules/commands/ns_set_greet.cpp
+++ b/modules/commands/ns_set_greet.cpp
@@ -100,8 +100,6 @@ class NSSetGreet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetgreet);
- ModuleManager::RegisterService(&commandnssasetgreet);
}
};
diff --git a/modules/commands/ns_set_hide.cpp b/modules/commands/ns_set_hide.cpp
index e0fb0e85e..1bad2d6bb 100644
--- a/modules/commands/ns_set_hide.cpp
+++ b/modules/commands/ns_set_hide.cpp
@@ -141,8 +141,6 @@ class NSSetHide : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssethide);
- ModuleManager::RegisterService(&commandnssasethide);
}
};
diff --git a/modules/commands/ns_set_kill.cpp b/modules/commands/ns_set_kill.cpp
index f57a93893..ed15d57f4 100644
--- a/modules/commands/ns_set_kill.cpp
+++ b/modules/commands/ns_set_kill.cpp
@@ -141,8 +141,6 @@ class NSSetKill : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetkill);
- ModuleManager::RegisterService(&commandnssasetkill);
}
};
diff --git a/modules/commands/ns_set_language.cpp b/modules/commands/ns_set_language.cpp
index 9af0753f1..de3785593 100644
--- a/modules/commands/ns_set_language.cpp
+++ b/modules/commands/ns_set_language.cpp
@@ -121,8 +121,6 @@ class NSSetLanguage : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetlanguage);
- ModuleManager::RegisterService(&commandnssasetlanguage);
}
};
diff --git a/modules/commands/ns_set_message.cpp b/modules/commands/ns_set_message.cpp
index 677002c78..ea77f5013 100644
--- a/modules/commands/ns_set_message.cpp
+++ b/modules/commands/ns_set_message.cpp
@@ -106,8 +106,6 @@ class NSSetMessage : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetmessage);
- ModuleManager::RegisterService(&commandnssasetmessage);
}
};
diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp
index 769dff9de..c511159d2 100644
--- a/modules/commands/ns_set_misc.cpp
+++ b/modules/commands/ns_set_misc.cpp
@@ -78,8 +78,6 @@ class NSSetMisc : public Module
Implementation i[] = { I_OnNickInfo, I_OnDatabaseWriteMetadata, I_OnDatabaseReadMetadata };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&this->commandnssetmisc);
- ModuleManager::RegisterService(&this->commandnssasetmisc);
}
void OnNickInfo(CommandSource &source, NickAlias *na, bool ShowHidden)
diff --git a/modules/commands/ns_set_private.cpp b/modules/commands/ns_set_private.cpp
index 63fec57d6..bbbefa615 100644
--- a/modules/commands/ns_set_private.cpp
+++ b/modules/commands/ns_set_private.cpp
@@ -106,8 +106,6 @@ class NSSetPrivate : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetprivate);
- ModuleManager::RegisterService(&commandnssasetprivate);
}
};
diff --git a/modules/commands/ns_set_secure.cpp b/modules/commands/ns_set_secure.cpp
index 31314a5a5..904ae6b0b 100644
--- a/modules/commands/ns_set_secure.cpp
+++ b/modules/commands/ns_set_secure.cpp
@@ -106,8 +106,6 @@ class NSSetSecure : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssetsecure);
- ModuleManager::RegisterService(&commandnssasetsecure);
}
};
diff --git a/modules/commands/ns_status.cpp b/modules/commands/ns_status.cpp
index 9d8b58fcb..e5878cd90 100644
--- a/modules/commands/ns_status.cpp
+++ b/modules/commands/ns_status.cpp
@@ -87,7 +87,6 @@ class NSStatus : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsstatus);
}
};
diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp
index 50cf039ce..c4934788a 100644
--- a/modules/commands/ns_suspend.cpp
+++ b/modules/commands/ns_suspend.cpp
@@ -152,8 +152,6 @@ class NSSuspend : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnssuspend);
- ModuleManager::RegisterService(&commandnsunsuspend);
}
};
diff --git a/modules/commands/ns_update.cpp b/modules/commands/ns_update.cpp
index d870e3532..1c40d8e5a 100644
--- a/modules/commands/ns_update.cpp
+++ b/modules/commands/ns_update.cpp
@@ -63,7 +63,6 @@ class NSUpdate : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandnsupdate);
}
};
diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp
index 296819ca7..99aa60089 100644
--- a/modules/commands/os_akill.cpp
+++ b/modules/commands/os_akill.cpp
@@ -460,7 +460,6 @@ class OSAKill : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosakill);
}
};
diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp
index 9ce895c59..9e6d29dbd 100644
--- a/modules/commands/os_chankill.cpp
+++ b/modules/commands/os_chankill.cpp
@@ -113,7 +113,6 @@ class OSChanKill : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoschankill);
}
};
diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp
index 1d1fead33..4955aa473 100644
--- a/modules/commands/os_config.cpp
+++ b/modules/commands/os_config.cpp
@@ -210,7 +210,6 @@ class OSConfig : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosconfig);
}
};
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp
index f5c28d38f..47851bd89 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/commands/os_defcon.cpp
@@ -342,7 +342,6 @@ class OSDefcon : public Module
Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelCreate };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&commandosdefcon);
try
{
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp
index ffa5503e7..f4ce7b0c8 100644
--- a/modules/commands/os_forbid.cpp
+++ b/modules/commands/os_forbid.cpp
@@ -217,9 +217,7 @@ class OSForbid : public Module
Implementation i[] = { I_OnUserConnect, I_OnUserNickChange, I_OnJoinChannel, I_OnPreCommand, I_OnDatabaseWrite, I_OnDatabaseRead };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&this->forbidService);
- ModuleManager::RegisterService(&commandosforbid);
}
void OnUserConnect(dynamic_reference<User> &u, bool &exempt)
diff --git a/modules/commands/os_forbid.h b/modules/commands/os_forbid.h
index b91aa3be8..d7b6e1467 100644
--- a/modules/commands/os_forbid.h
+++ b/modules/commands/os_forbid.h
@@ -19,10 +19,10 @@ struct ForbidData
ForbidType type;
};
-class ForbidService : public Service
+class ForbidService : public Service<ForbidService>
{
public:
- ForbidService(Module *m) : Service(m, "forbid") { }
+ ForbidService(Module *m) : Service<ForbidService>(m, "forbid") { }
virtual void AddForbid(ForbidData *d) = 0;
diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp
index 9f50ec967..46286786f 100644
--- a/modules/commands/os_ignore.cpp
+++ b/modules/commands/os_ignore.cpp
@@ -291,12 +291,10 @@ class OSIgnore : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosignore);
Implementation i[] = { I_OnDatabaseRead, I_OnDatabaseWrite, I_OnBotPrivmsg };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&this->osignoreservice);
}
EventReturn OnDatabaseRead(const std::vector<Anope::string> &params)
diff --git a/modules/commands/os_ignore.h b/modules/commands/os_ignore.h
index 056161a79..daa8e1863 100644
--- a/modules/commands/os_ignore.h
+++ b/modules/commands/os_ignore.h
@@ -18,12 +18,12 @@ struct IgnoreData
time_t time; /* When do we stop ignoring them? */
};
-class IgnoreService : public Service
+class IgnoreService : public Service<IgnoreService>
{
protected:
std::list<IgnoreData> ignores;
- IgnoreService(Module *c, const Anope::string &n) : Service(c, n) { }
+ IgnoreService(Module *c, const Anope::string &n) : Service<IgnoreService>(c, n) { }
public:
virtual void AddIgnore(const Anope::string &mask, const Anope::string &creator, const Anope::string &reason, time_t delta = Anope::CurTime) = 0;
diff --git a/modules/commands/os_jupe.cpp b/modules/commands/os_jupe.cpp
index b11b975d8..54834a0a6 100644
--- a/modules/commands/os_jupe.cpp
+++ b/modules/commands/os_jupe.cpp
@@ -72,7 +72,6 @@ class OSJupe : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosjupe);
}
};
diff --git a/modules/commands/os_kick.cpp b/modules/commands/os_kick.cpp
index 341ea1ee6..95229c386 100644
--- a/modules/commands/os_kick.cpp
+++ b/modules/commands/os_kick.cpp
@@ -76,7 +76,6 @@ class OSKick : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoskick);
}
};
diff --git a/modules/commands/os_kill.cpp b/modules/commands/os_kill.cpp
index 11a0636ef..5fceb70e6 100644
--- a/modules/commands/os_kill.cpp
+++ b/modules/commands/os_kill.cpp
@@ -65,7 +65,6 @@ class OSKill : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoskill);
}
};
diff --git a/modules/commands/os_list.cpp b/modules/commands/os_list.cpp
index 9a582f97b..45179a427 100644
--- a/modules/commands/os_list.cpp
+++ b/modules/commands/os_list.cpp
@@ -179,8 +179,6 @@ class OSList : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoschanlist);
- ModuleManager::RegisterService(&commandosuserlist);
}
};
diff --git a/modules/commands/os_login.cpp b/modules/commands/os_login.cpp
index 94a82e334..57c172f7f 100644
--- a/modules/commands/os_login.cpp
+++ b/modules/commands/os_login.cpp
@@ -70,7 +70,6 @@ class OSLogin : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoslogin);
ModuleManager::Attach(I_IsServicesOper, this);
}
diff --git a/modules/commands/os_mode.cpp b/modules/commands/os_mode.cpp
index b3e62ca25..4b548da75 100644
--- a/modules/commands/os_mode.cpp
+++ b/modules/commands/os_mode.cpp
@@ -101,8 +101,6 @@ class OSMode : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosmode);
- ModuleManager::RegisterService(&commandosumode);
}
};
diff --git a/modules/commands/os_modinfo.cpp b/modules/commands/os_modinfo.cpp
index 38d9cf905..e687c9982 100644
--- a/modules/commands/os_modinfo.cpp
+++ b/modules/commands/os_modinfo.cpp
@@ -31,13 +31,14 @@ class CommandOSModInfo : public Command
{
source.Reply(_("Module: \002%s\002 Version: \002%s\002 Author: \002%s\002 loaded: \002%s\002"), m->name.c_str(), !m->version.empty() ? m->version.c_str() : "?", !m->author.empty() ? m->author.c_str() : "?", do_strftime(m->created).c_str());
- std::vector<Anope::string> services = ModuleManager::GetServiceKeys();
- for (unsigned i = 0; i < services.size(); ++i)
+ std::vector<Anope::string> servicekeys = Service<Command>::GetServiceKeys();
+ for (unsigned i = 0; i < servicekeys.size(); ++i)
{
- Service *s = ModuleManager::GetService(services[i]);
- if (!s || s->owner != m)
+ Command *c = Service<Command>::FindService(servicekeys[i]);
+ if (!c || c->owner != m)
continue;
- source.Reply(_(" Providing service: \002%s\002"), s->name.c_str());
+
+ source.Reply(_(" Providing service: \002%s\002"), c->name.c_str());
for (botinfo_map::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
@@ -47,9 +48,9 @@ class CommandOSModInfo : public Command
{
const Anope::string &c_name = cit->first;
const CommandInfo &info = cit->second;
- if (info.name != s->name)
+ if (info.name != c->name)
continue;
- source.Reply(_(" Command \002%s\002 on \002%s\002 is linked to \002%s\002"), c_name.c_str(), bi->nick.c_str(), s->name.c_str());
+ source.Reply(_(" Command \002%s\002 on \002%s\002 is linked to \002%s\002"), c_name.c_str(), bi->nick.c_str(), c->name.c_str());
}
}
}
@@ -237,8 +238,6 @@ class OSModInfo : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosmodinfo);
- ModuleManager::RegisterService(&commandosmodlist);
}
};
diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp
index 750a29bfa..7f9f1d990 100644
--- a/modules/commands/os_module.cpp
+++ b/modules/commands/os_module.cpp
@@ -196,9 +196,6 @@ class OSModule : public Module
this->SetAuthor("Anope");
this->SetPermanent(true);
- ModuleManager::RegisterService(&commandosmodload);
- ModuleManager::RegisterService(&commandosmodreload);
- ModuleManager::RegisterService(&commandosmodunload);
}
};
diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp
index 9c9aae0a4..227bc9380 100644
--- a/modules/commands/os_news.cpp
+++ b/modules/commands/os_news.cpp
@@ -376,14 +376,10 @@ class OSNews : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandoslogonnews);
- ModuleManager::RegisterService(&commandosopernews);
- ModuleManager::RegisterService(&commandosrandomnews);
Implementation i[] = { I_OnUserModeSet, I_OnUserConnect, I_OnDatabaseRead, I_OnDatabaseWrite };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&this->newsservice);
}
void OnUserModeSet(User *u, UserModeName Name)
diff --git a/modules/commands/os_news.h b/modules/commands/os_news.h
index c55f56d42..484c8403e 100644
--- a/modules/commands/os_news.h
+++ b/modules/commands/os_news.h
@@ -23,10 +23,10 @@ struct NewsItem
time_t time;
};
-class NewsService : public Service
+class NewsService : public Service<NewsService>
{
public:
- NewsService(Module *m) : Service(m, "news") { }
+ NewsService(Module *m) : Service<NewsService>(m, "news") { }
virtual void AddNewsItem(NewsItem *n) = 0;
diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp
index 2eec522a3..6167710d1 100644
--- a/modules/commands/os_noop.cpp
+++ b/modules/commands/os_noop.cpp
@@ -87,7 +87,6 @@ class OSNOOP : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosnoop);
}
};
diff --git a/modules/commands/os_oline.cpp b/modules/commands/os_oline.cpp
index adebc52a1..cf4686d08 100644
--- a/modules/commands/os_oline.cpp
+++ b/modules/commands/os_oline.cpp
@@ -76,7 +76,6 @@ class OSOLine : public Module
if (!ircd || !ircd->omode)
throw ModuleException("Your IRCd does not support OMODE.");
- ModuleManager::RegisterService(&commandosoline);
}
};
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp
index 0ef032f15..e65cb98eb 100644
--- a/modules/commands/os_oper.cpp
+++ b/modules/commands/os_oper.cpp
@@ -178,7 +178,6 @@ class OSOper : public Module
Implementation i[] = { I_OnDatabaseWrite, I_OnDatabaseRead };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
- ModuleManager::RegisterService(&commandosoper);
}
void OnDatabaseWrite(void (*Write)(const Anope::string &))
diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp
index d4d8eac7c..48ff74d45 100644
--- a/modules/commands/os_reload.cpp
+++ b/modules/commands/os_reload.cpp
@@ -65,7 +65,6 @@ class OSReload : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosreload);
}
};
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp
index 427e4021e..a8808420c 100644
--- a/modules/commands/os_session.cpp
+++ b/modules/commands/os_session.cpp
@@ -728,10 +728,7 @@ class OSSession : public Module
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
ModuleManager::SetPriority(this, PRIORITY_FIRST);
- ModuleManager::RegisterService(&commandossession);
- ModuleManager::RegisterService(&commandosexception);
- ModuleManager::RegisterService(&this->ss);
}
void OnUserConnect(dynamic_reference<User> &user, bool &exempt)
diff --git a/modules/commands/os_session.h b/modules/commands/os_session.h
index faab37934..e47fb3c51 100644
--- a/modules/commands/os_session.h
+++ b/modules/commands/os_session.h
@@ -1,13 +1,13 @@
#ifndef OS_SESSION_H
#define OS_SESSION_H
-class SessionService : public Service
+class SessionService : public Service<SessionService>
{
public:
typedef Anope::map<Session *> SessionMap;
typedef std::vector<Exception *> ExceptionVector;
- SessionService(Module *m) : Service(m, "session") { }
+ SessionService(Module *m) : Service<SessionService>(m, "session") { }
virtual void AddException(Exception *e) = 0;
diff --git a/modules/commands/os_set.cpp b/modules/commands/os_set.cpp
index 340b463ea..20df33c78 100644
--- a/modules/commands/os_set.cpp
+++ b/modules/commands/os_set.cpp
@@ -254,7 +254,6 @@ class OSSet : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosset);
}
};
diff --git a/modules/commands/os_shutdown.cpp b/modules/commands/os_shutdown.cpp
index bc3a19353..efc55c0be 100644
--- a/modules/commands/os_shutdown.cpp
+++ b/modules/commands/os_shutdown.cpp
@@ -108,9 +108,6 @@ class OSShutdown : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosquit);
- ModuleManager::RegisterService(&commandosrestart);
- ModuleManager::RegisterService(&commandosshutdown);
}
};
diff --git a/modules/commands/os_stats.cpp b/modules/commands/os_stats.cpp
index 0cebe7645..813e59f5f 100644
--- a/modules/commands/os_stats.cpp
+++ b/modules/commands/os_stats.cpp
@@ -197,7 +197,6 @@ class OSStats : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosstats);
}
};
diff --git a/modules/commands/os_svsnick.cpp b/modules/commands/os_svsnick.cpp
index dc7c77a6c..65aad5094 100644
--- a/modules/commands/os_svsnick.cpp
+++ b/modules/commands/os_svsnick.cpp
@@ -85,7 +85,6 @@ class OSSVSNick : public Module
if (!ircd || !ircd->svsnick)
throw ModuleException("Your IRCd does not support SVSNICK");
- ModuleManager::RegisterService(&commandossvsnick);
}
};
diff --git a/modules/commands/os_sxline.cpp b/modules/commands/os_sxline.cpp
index c1d620914..80ad9db8c 100644
--- a/modules/commands/os_sxline.cpp
+++ b/modules/commands/os_sxline.cpp
@@ -320,8 +320,11 @@ class CommandOSSNLine : public CommandOSSXLineBase
void OnAdd(CommandSource &source, const std::vector<Anope::string> &params)
{
- if (!this->xlm())
+ if (!this->xlm() ||! ircd->snline)
+ {
+ source.Reply(_("Your IRCd does not support SNLINE"));
return;
+ }
User *u = source.u;
unsigned last_param = 2;
@@ -491,8 +494,11 @@ class CommandOSSQLine : public CommandOSSXLineBase
void OnAdd(CommandSource &source, const std::vector<Anope::string> &params)
{
- if (!this->xlm())
+ if (!this->xlm() ||! ircd->sqline)
+ {
+ source.Reply(_("Your IRCd does not support SQLINE"));
return;
+ }
User *u = source.u;
unsigned last_param = 2;
@@ -643,11 +649,6 @@ class OSSXLine : public Module
commandossnline(this), commandossqline(this)
{
this->SetAuthor("Anope");
-
- if (ircd && ircd->snline)
- ModuleManager::RegisterService(&commandossnline);
- if (ircd && ircd->sqline)
- ModuleManager::RegisterService(&commandossqline);
}
};
diff --git a/modules/commands/os_update.cpp b/modules/commands/os_update.cpp
index 776835cf7..eb74a2618 100644
--- a/modules/commands/os_update.cpp
+++ b/modules/commands/os_update.cpp
@@ -49,7 +49,6 @@ class OSUpdate : public Module
{
this->SetAuthor("Anope");
- ModuleManager::RegisterService(&commandosupdate);
}
};