X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Futils.h;h=a2f7212f6d0c7c4a65e2e04c419b859a215d1c13;hb=ea258053f694ff17980e2f39ea182f3a2de9ba5b;hp=3a419e2a40b304b4a58ad5e6f79a21dd3064b62e;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 3a419e2a4..a2f7212f6 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -25,7 +25,6 @@ #include "inspircd.h" #include "cachetimer.h" -/* Foward declarations */ class TreeServer; class TreeSocket; class Link; @@ -36,8 +35,7 @@ class CmdBuilder; extern SpanningTreeUtilities* Utils; -/* This hash_map holds the hash equivalent of the server - * tree, used for rapid linear lookups. +/** Associative container type, mapping server names/ids to TreeServers */ typedef TR1NS::unordered_map server_hash; @@ -120,7 +118,6 @@ class SpanningTreeUtilities : public classbase /** Send a message from this server to one other local or remote */ - bool DoOneToOne(const CmdBuilder& params, const std::string& target); void DoOneToOne(const CmdBuilder& params, Server* target); /** Send a message from this server to all but one other, local or remote @@ -137,13 +134,13 @@ class SpanningTreeUtilities : public classbase /** Handle nick collision */ - bool DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid); + bool DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid, const char* collidecmd); /** Compile a list of servers which contain members of channel c */ void GetListOfServersForChannel(Channel* c, TreeSocketSet& list, char status, const CUList& exempt_list); - /** Find a server by name + /** Find a server by name or SID */ TreeServer* FindServer(const std::string &ServerName); @@ -151,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 */