]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/utils.h
Fix m_spanningtree sending the wrong setter in S2S ADDLINE.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / utils.h
index 7d5ffa21629f05df95f6e0fda4c8e0e741f24b3d..5559b3459b5defe2b1942a618f6077acacd7b7c9 100644 (file)
@@ -50,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;
@@ -88,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;
@@ -129,24 +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);
-
        /** Read the spanningtree module's tags from the config file
         */
        void ReadConfiguration();
@@ -182,6 +173,11 @@ class SpanningTreeUtilities : public classbase
        /** Refresh the IP cache used for allowing inbound connections
         */
        void RefreshIPCache();
+
+       /** Recreate serverlist and sidlist, this is needed because of m_nationalchars changing
+        * national_case_insensitive_map which is used by the hash function
+        */
+       void Rehash();
 };
 
 #endif