]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/utils.h
Make VF_OPTCOMMON module mismatches a fatal link error by default
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / utils.h
index 1022c179663924117991ccd53c7e8cfe90e9e49f..6ac6578511e13bbc5daa5aa8403d713868e80a37 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -26,7 +26,7 @@ class SpanningTreeUtilities;
 /* This hash_map holds the hash equivalent of the server
  * tree, used for rapid linear lookups.
  */
-#ifdef WINDOWS
+#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED)
        typedef nspace::hash_map<std::string, TreeServer*, nspace::hash_compare<std::string, std::less<std::string> > > server_hash;
 #else
        #ifdef HASHCOMP_DEPRECATED
@@ -49,7 +49,7 @@ class ServerSocketListener : public ListenSocketBase
                this->Utils = u;
        }
 
-       virtual void OnAcceptReady(const std::string &ipconnectedto, int nfd, const std::string &incomingip);
+       virtual void OnAcceptReady(int nfd);
 };
 
 typedef std::map<TreeServer*,TreeServer*> TreeServerList;
@@ -83,6 +83,10 @@ class SpanningTreeUtilities : public classbase
         */
        bool AnnounceTSChange;
 
+       /** Allow modules marked as VF_OPTCOMMON to be mismatched when linking
+        */
+       bool AllowOptCommon;
+
        /** Make snomasks +CQ quiet during bursts and splits
         */
        bool quiet_bursts;
@@ -97,6 +101,9 @@ class SpanningTreeUtilities : public classbase
        /** This variable represents the root of the server tree
         */
        TreeServer *TreeRoot;
+       /** Represents the server whose command we are processing
+        */
+       FakeUser *ServerUser;
        /** IPs allowed to link to us
         */
        std::vector<std::string> ValidIPs;
@@ -109,6 +116,9 @@ class SpanningTreeUtilities : public classbase
        /** 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;
        /** Holds the data from the <link> tags in the conf
         */
        std::vector<Link> LinkBlocks;
@@ -143,27 +153,27 @@ 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, std::deque<std::string> &params, std::string target);
+       bool DoOneToOne(const std::string &prefix, const std::string &command, 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, std::deque<std::string> &params, std::string omit);
+       bool DoOneToAllButSender(const std::string &prefix, const std::string &command, parameterlist &params, std::string omit);
 
        /** Send a message from this server to all but one other, local or remote
         */
-       bool DoOneToAllButSender(const char* prefix, const char* command, std::deque<std::string> &params, std::string omit);
+       bool DoOneToAllButSender(const char* prefix, const char* command, parameterlist &params, std::string omit);
 
        /** Send a message from this server to all others
         */
-       bool DoOneToMany(const std::string &prefix, const std::string &command, std::deque<std::string> &params);
+       bool DoOneToMany(const std::string &prefix, const std::string &command, parameterlist &params);
 
        /** Send a message from this server to all others
         */
-       bool DoOneToMany(const char* prefix, const char* command, std::deque<std::string> &params);
+       bool DoOneToMany(const char* prefix, const char* command, 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, std::deque<std::string> &params);
+       bool DoOneToAllButSenderRaw(const std::string &data, const std::string &omit, const std::string &prefix, const irc::string &command, parameterlist &params);
 
        /** Read the spanningtree module's tags from the config file
         */