]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_info/cmd_modules.cpp
Create the core_info module
[user/henk/code/inspircd.git] / src / coremods / core_info / cmd_modules.cpp
index 01774390d0ce98bcd41e316302459dd66e410bab..cee3708704ed04d5d6355db9da96931d32684891 100644 (file)
 
 
 #include "inspircd.h"
+#include "core_info.h"
 
-/** Handle /MODULES.
- */
-class CommandModules : public Command
+CommandModules::CommandModules(Module* parent)
+       : Command(parent, "MODULES", 0, 0)
 {
- public:
-       /** Constructor for modules.
-        */
-       CommandModules(Module* parent) : Command(parent,"MODULES",0,0)
-       {
-               Penalty = 4;
-               syntax = "[<servername>]";
-       }
-
-       /** Handle command.
-        * @param parameters The parameters to the command
-        * @param user The user issuing the command
-        * @return A value from CmdResult to indicate command success or failure.
-        */
-       CmdResult Handle(const std::vector<std::string>& parameters, User *user);
-       RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
-       {
-               if (parameters.size() >= 1)
-                       return ROUTE_UNICAST(parameters[0]);
-               return ROUTE_LOCALONLY;
-       }
-};
+       Penalty = 4;
+       syntax = "[<servername>]";
+}
 
 /** Handle /MODULES
  */
@@ -103,4 +84,9 @@ CmdResult CommandModules::Handle (const std::vector<std::string>& parameters, Us
        return CMD_SUCCESS;
 }
 
-COMMAND_INIT(CommandModules)
+RouteDescriptor CommandModules::GetRouting(User* user, const std::vector<std::string>& parameters)
+{
+       if (parameters.size() >= 1)
+               return ROUTE_UNICAST(parameters[0]);
+       return ROUTE_LOCALONLY;
+}