summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/inspircd.h15
-rw-r--r--include/modules.h2
-rw-r--r--src/coremods/core_ison.cpp18
-rw-r--r--src/coremods/core_reloadmodule.cpp19
-rw-r--r--src/coremods/core_stats.cpp19
-rw-r--r--src/coremods/core_userhost.cpp19
-rw-r--r--src/coremods/core_wallops.cpp19
7 files changed, 89 insertions, 22 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 90ee6ca8d..934f2f82b 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -574,21 +574,6 @@ class CoreExport InspIRCd
ENTRYPOINT;
-template<class Cmd>
-class CommandModule : public Module
-{
- Cmd cmd;
- public:
- CommandModule() : cmd(this)
- {
- }
-
- Version GetVersion() CXX11_OVERRIDE
- {
- return Version(cmd.name, VF_VENDOR|VF_CORE);
- }
-};
-
inline void stdalgo::culldeleter::operator()(classbase* item)
{
if (item)
diff --git a/include/modules.h b/include/modules.h
index db0bc341e..43ab2ae3a 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1186,5 +1186,3 @@ class CoreExport ModuleManager : public fakederef<ModuleManager>
return new y; \
} \
extern "C" DllExport const char inspircd_src_version[] = INSPIRCD_VERSION;
-
-#define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)
diff --git a/src/coremods/core_ison.cpp b/src/coremods/core_ison.cpp
index 0c98dfe56..3f6b1ac74 100644
--- a/src/coremods/core_ison.cpp
+++ b/src/coremods/core_ison.cpp
@@ -77,5 +77,21 @@ CmdResult CommandIson::HandleLocal(LocalUser* user, const Params& parameters)
return CMD_SUCCESS;
}
+class CoreModIson : public Module
+{
+ private:
+ CommandIson cmd;
+
+ public:
+ CoreModIson()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the ISON command", VF_CORE | VF_VENDOR);
+ }
+};
-COMMAND_INIT(CommandIson)
+MODULE_INIT(CoreModIson)
diff --git a/src/coremods/core_reloadmodule.cpp b/src/coremods/core_reloadmodule.cpp
index 383d574bf..ea5d40abd 100644
--- a/src/coremods/core_reloadmodule.cpp
+++ b/src/coremods/core_reloadmodule.cpp
@@ -765,4 +765,21 @@ CmdResult CommandReloadmodule::Handle(User* user, const Params& parameters)
}
}
-COMMAND_INIT(CommandReloadmodule)
+class CoreModReloadmodule : public Module
+{
+ private:
+ CommandReloadmodule cmd;
+
+ public:
+ CoreModReloadmodule()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the RELOADMODULE command", VF_CORE | VF_VENDOR);
+ }
+};
+
+MODULE_INIT(CoreModReloadmodule)
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index bb20dd761..06602b288 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -397,4 +397,21 @@ CmdResult CommandStats::Handle(User* user, const Params& parameters)
return CMD_SUCCESS;
}
-COMMAND_INIT(CommandStats)
+class CoreModStats : public Module
+{
+ private:
+ CommandStats cmd;
+
+ public:
+ CoreModStats()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the STATS command", VF_CORE | VF_VENDOR);
+ }
+};
+
+MODULE_INIT(CoreModStats)
diff --git a/src/coremods/core_userhost.cpp b/src/coremods/core_userhost.cpp
index 294f714b4..542c1831d 100644
--- a/src/coremods/core_userhost.cpp
+++ b/src/coremods/core_userhost.cpp
@@ -82,4 +82,21 @@ CmdResult CommandUserhost::Handle(User* user, const Params& parameters)
return CMD_SUCCESS;
}
-COMMAND_INIT(CommandUserhost)
+class CoreModUserhost : public Module
+{
+ private:
+ CommandUserhost cmd;
+
+ public:
+ CoreModUserhost()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the USERHOST command", VF_CORE | VF_VENDOR);
+ }
+};
+
+MODULE_INIT(CoreModUserhost)
diff --git a/src/coremods/core_wallops.cpp b/src/coremods/core_wallops.cpp
index 26a00a47d..6b055f874 100644
--- a/src/coremods/core_wallops.cpp
+++ b/src/coremods/core_wallops.cpp
@@ -69,4 +69,21 @@ CmdResult CommandWallops::Handle(User* user, const Params& parameters)
return CMD_SUCCESS;
}
-COMMAND_INIT(CommandWallops)
+class CoreModWallops : public Module
+{
+ private:
+ CommandWallops cmd;
+
+ public:
+ CoreModWallops()
+ : cmd(this)
+ {
+ }
+
+ Version GetVersion() CXX11_OVERRIDE
+ {
+ return Version("Provides the WALLOPS command", VF_CORE | VF_VENDOR);
+ }
+};
+
+MODULE_INIT(CoreModWallops)