]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/utils.h
m_spanningtree Do pointer comparison before deleting one of the pointers in TreeSocke...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / utils.h
index a82b9eb911fa3132f94876f5f241f697068091f9..a0543b6bd30ae0d3e12b8d23b9d7b9cd2eccfa8a 100644 (file)
@@ -36,14 +36,10 @@ class SpanningTreeUtilities;
 /* This hash_map holds the hash equivalent of the server
  * tree, used for rapid linear lookups.
  */
-#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED)
-       typedef nspace::hash_map<std::string, TreeServer*, nspace::hash_compare<std::string, std::less<std::string> > > server_hash;
+#ifdef HASHMAP_DEPRECATED
+       typedef nspace::hash_map<std::string, TreeServer*, nspace::insensitive, irc::StrHashComp> server_hash;
 #else
-       #ifdef HASHCOMP_DEPRECATED
-               typedef nspace::hash_map<std::string, TreeServer*, nspace::insensitive, irc::StrHashComp> server_hash;
-       #else
-               typedef nspace::hash_map<std::string, TreeServer*, nspace::hash<std::string>, irc::StrHashComp> server_hash;
-       #endif
+       typedef nspace::hash_map<std::string, TreeServer*, nspace::hash<std::string>, irc::StrHashComp> server_hash;
 #endif
 
 typedef std::map<TreeServer*,TreeServer*> TreeServerList;
@@ -54,6 +50,8 @@ typedef std::map<TreeServer*,TreeServer*> TreeServerList;
 class SpanningTreeUtilities : public classbase
 {
  public:
+       typedef std::map<TreeSocket*, std::pair<std::string, int> > TimeoutList;
+
        /** Creator module
         */
        ModuleSpanningTree* Creator;
@@ -92,12 +90,9 @@ class SpanningTreeUtilities : public classbase
        /** Hash of currently known server ids
         */
        server_hash sidlist;
-       /** Hash of servers currently bursting but not initialized as connected
-        */
-       std::map<irc::string,TreeSocket*> burstingserverlist;
        /** List of all outgoing sockets and their timeouts
         */
-       std::map<TreeSocket*, std::pair<std::string, int> > timeoutlist;
+       TimeoutList timeoutlist;
        /** Holds the data from the <link> tags in the conf
         */
        std::vector<reference<Link> > LinkBlocks;
@@ -133,28 +128,16 @@ class SpanningTreeUtilities : public classbase
 
        /** Send a message from this server to one other local or remote
         */
-       bool DoOneToOne(const std::string &prefix, const std::string &command, const parameterlist &params, std::string target);
-
-       /** Send a message from this server to all but one other, local or remote
-        */
-       bool DoOneToAllButSender(const std::string &prefix, const std::string &command, const parameterlist &params, std::string omit);
+       bool DoOneToOne(const std::string &prefix, const std::string &command, const parameterlist &params, const std::string& target);
 
        /** Send a message from this server to all but one other, local or remote
         */
-       bool DoOneToAllButSender(const char* prefix, const char* command, const parameterlist &params, std::string omit);
+       bool DoOneToAllButSender(const std::string &prefix, const std::string &command, const parameterlist &params, const std::string& omit);
 
        /** Send a message from this server to all others
         */
        bool DoOneToMany(const std::string &prefix, const std::string &command, const parameterlist &params);
 
-       /** Send a message from this server to all others
-        */
-       bool DoOneToMany(const char* prefix, const char* command, const parameterlist &params);
-
-       /** Send a message from this server to all others, without doing any processing on the command (e.g. send it as-is with colons and all)
-        */
-       bool DoOneToAllButSenderRaw(const std::string &data, const std::string &omit, const std::string &prefix, const irc::string &command, const parameterlist &params);
-
        /** Read the spanningtree module's tags from the config file
         */
        void ReadConfiguration();
@@ -183,10 +166,6 @@ class SpanningTreeUtilities : public classbase
         */
        TreeServer* FindServerMask(const std::string &ServerName);
 
-       /** Returns true if this is a server name we recognise
-        */
-       bool IsServer(const std::string &ServerName);
-
        /** Find a link tag from a server name
         */
        Link* FindLink(const std::string& name);