]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_info/cmd_admin.cpp
Create the core_oper module
[user/henk/code/inspircd.git] / src / coremods / core_info / cmd_admin.cpp
index 1f694bf2e7a41d34bd8afec2216c53ac32f270fe..4832f22b6623a64c59041bc9ab915e149b13ffec 100644 (file)
 
 
 #include "inspircd.h"
+#include "core_info.h"
 
-/** Handle /ADMIN.
- */
-class CommandAdmin : public Command
+CommandAdmin::CommandAdmin(Module* parent)
+       : Command(parent, "ADMIN", 0, 0)
 {
- public:
-       /** Constructor for admin.
-        */
-       CommandAdmin(Module* parent) : Command(parent,"ADMIN",0,0)
-       {
-               Penalty = 2;
-               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() > 0)
-                       return ROUTE_UNICAST(parameters[0]);
-               return ROUTE_LOCALONLY;
-       }
-};
+       Penalty = 2;
+       syntax = "[<servername>]";
+}
 
 /** Handle /ADMIN
  */
@@ -65,4 +46,9 @@ CmdResult CommandAdmin::Handle (const std::vector<std::string>& parameters, User
        return CMD_SUCCESS;
 }
 
-COMMAND_INIT(CommandAdmin)
+RouteDescriptor CommandAdmin::GetRouting(User* user, const std::vector<std::string>& parameters)
+{
+       if (parameters.size() > 0)
+               return ROUTE_UNICAST(parameters[0]);
+       return ROUTE_LOCALONLY;
+}