]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/utils.h
Use CommandBase::Params instead of std::vector<std::string>.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / utils.h
index 3c54e93acc6e150b5dc14e3c2e90298b065e7c4a..495b0941401fe4c1a869e4354adc68d3029f05c4 100644 (file)
@@ -48,7 +48,7 @@ class SpanningTreeUtilities : public classbase
 
  public:
        typedef std::set<TreeSocket*> TreeSocketSet;
-       typedef std::map<TreeSocket*, std::pair<std::string, int> > TimeoutList;
+       typedef std::map<TreeSocket*, std::pair<std::string, unsigned int> > TimeoutList;
 
        /** Creator module
         */
@@ -75,7 +75,7 @@ class SpanningTreeUtilities : public classbase
        /* Number of seconds that a server can go without ping
         * before opers are warned of high latency.
         */
-       int PingWarnTime;
+       unsigned int PingWarnTime;
        /** This variable represents the root of the server tree
         */
        TreeServer *TreeRoot;
@@ -100,7 +100,7 @@ class SpanningTreeUtilities : public classbase
 
        /** Ping frequency of server to server links
         */
-       int PingFreq;
+       unsigned int PingFreq;
 
        /** Initialise utility class
         */
@@ -108,13 +108,13 @@ class SpanningTreeUtilities : public classbase
 
        /** Prepare for class destruction
         */
-       CullResult cull();
+       CullResult cull() CXX11_OVERRIDE;
 
        /** Destroy class and free listeners etc
         */
        ~SpanningTreeUtilities();
 
-       void RouteCommand(TreeServer* origin, CommandBase* cmd, const parameterlist& parameters, User* user);
+       void RouteCommand(TreeServer* origin, CommandBase* cmd, const CommandBase::Params& parameters, User* user);
 
        /** Send a message from this server to one other local or remote
         */
@@ -148,9 +148,10 @@ class SpanningTreeUtilities : public classbase
         */
        TreeServer* FindServerID(const std::string &id);
 
-       /** Find a route to a server by name
+       /** Find a server based on a target string.
+        * @param target Target string where a command should be routed to. May be a server name, a sid, a nickname or a uuid.
         */
-       TreeServer* BestRouteTo(const std::string &ServerName);
+       TreeServer* FindRouteTarget(const std::string& target);
 
        /** Find a server by glob mask
         */