diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-17 22:33:35 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-17 22:33:35 +0000 |
commit | 164e9d9171850877161ae057764ff8b579bedd36 (patch) | |
tree | 4e10fbe161453c16fbb25026cfc8caf1d22a7a69 /src/modules/m_spanningtree/utils.h | |
parent | 4d91c60d55e832c47253a586e9c9de219d24e851 (diff) |
Add <autoconnect> blocks [jackmcbarn]
Replaces <link:failover> and <link:autoconnect>
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11741 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/utils.h')
-rw-r--r-- | src/modules/m_spanningtree/utils.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 6ac657851..09c707131 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -59,6 +59,21 @@ typedef std::map<TreeServer*,TreeServer*> TreeServerList; */ typedef std::map<irc::string, Module*> hookmodules; +/** The Autoconnect class might as well be a struct, + * but this is C++ and we don't believe in structs (!). + * It holds the entire information of one <autoconnect> + * tag from the main config file. We maintain a list + * of them, and populate the list on rehash/load. + */ +class Autoconnect : public classbase +{ + public: + unsigned long Period; + std::string Server; + time_t NextConnectTime; + std::string FailOver; +}; + /** Contains helper functions and variables for this module, * and keeps them out of the global namespace */ @@ -122,6 +137,9 @@ class SpanningTreeUtilities : public classbase /** Holds the data from the <link> tags in the conf */ std::vector<Link> LinkBlocks; + /** Holds the data from the <autoconnect> tags in the conf + */ + std::vector<Autoconnect> AutoconnectBlocks; /** List of module pointers which can provide I/O abstraction */ @@ -209,7 +227,7 @@ class SpanningTreeUtilities : public classbase /** Attempt to connect to the failover link of link x */ - void DoFailOver(Link* x); + void DoFailOver(Autoconnect* x); /** Find a link tag from a server name */ |