summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-09-23 14:19:06 +0100
committerPeter Powell <petpow@saberuk.com>2018-09-23 14:19:06 +0100
commitcae87fa047bafedc665d07929b47eaa707ff5f42 (patch)
treec03f926496ac49d01efff18b662ca5ccac6645c2
parent876b1ae4e280e99f24d37da4b819f108ddb3f1e3 (diff)
Switch all core modules still using COMMAND_INIT to MODULE_INIT.
-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)