]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/servercommand.h
Amend OnPostCommand to specify whether the command is loopcalled.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / servercommand.h
index 524520a88aa0f2a2157ceec48cb348b7b8b8988b..6ea5a92511d077a499277664b5a53159b92e927a 100644 (file)
@@ -38,8 +38,12 @@ class ServerCommand : public CommandBase
  public:
        ServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0);
 
-       virtual CmdResult Handle(User* user, std::vector<std::string>& parameters) = 0;
-       virtual RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+       /** Register this object in the ServerCommandManager
+        */
+       void RegisterService() CXX11_OVERRIDE;
+
+       virtual CmdResult Handle(User* user, Params& parameters) = 0;
+       RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
 
        /**
         * Extract the TS from a string.
@@ -61,7 +65,7 @@ class UserOnlyServerCommand : public ServerCommand
        UserOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0)
                : ServerCommand(Creator, Name, MinPara, MaxPara) { }
 
-       CmdResult Handle(User* user, std::vector<std::string>& parameters)
+       CmdResult Handle(User* user, Params& parameters) CXX11_OVERRIDE
        {
                RemoteUser* remoteuser = IS_REMOTE(user);
                if (!remoteuser)
@@ -80,7 +84,7 @@ class ServerOnlyServerCommand : public ServerCommand
        ServerOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0)
                : ServerCommand(Creator, Name, MinPara, MaxPara) { }
 
-       CmdResult Handle(User* user, std::vector<std::string>& parameters)
+       CmdResult Handle(User* user, CommandBase::Params& parameters) CXX11_OVERRIDE
        {
                if (!IS_SERVER(user))
                        throw ProtocolException("Invalid source");