diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-17 13:27:21 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-17 13:27:21 +0200 |
commit | 9928fca4249ea40071f2ab631a92736ba28971b8 (patch) | |
tree | 914d25d8e499baa45d8c1bc1e058dd823e49dedd | |
parent | 7e47e4184196952d7bd2ed2c79232fc374f9e664 (diff) |
m_spanningtree Add a field to TreeServer for storing full version strings
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treeserver.h | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index a069de1d6..589e9b889 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -35,7 +35,9 @@ TreeServer::TreeServer() : Server(ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc) , Parent(NULL), Route(NULL) - , VersionString(ServerInstance->GetVersionString()), Socket(NULL), sid(ServerInstance->Config->GetSID()), ServerUser(ServerInstance->FakeClient) + , VersionString(ServerInstance->GetVersionString()) + , fullversion(ServerInstance->GetVersionString(true)) + , Socket(NULL), sid(ServerInstance->Config->GetSID()), ServerUser(ServerInstance->FakeClient) , age(ServerInstance->Time()), Warned(false), bursting(false), UserCount(ServerInstance->Users->local_users.size()) , OperCount(0), rtt(0), StartBurst(0), Hidden(false) { diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index ab47012b0..9218c02ce 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -43,6 +43,11 @@ class TreeServer : public Server TreeServer* Route; /* Route entry */ std::vector<TreeServer*> Children; /* List of child objects */ std::string VersionString; /* Version string or empty string */ + + /** Full version string including patch version and other info + */ + std::string fullversion; + TreeSocket* Socket; /* Socket used to communicate with this server */ time_t NextPing; /* After this time, the server should be PINGed*/ bool LastPingWasGood; /* True if the server responded to the last PING with a PONG */ @@ -96,6 +101,11 @@ class TreeServer : public Server */ const std::string& GetVersion(); + /** Get the full version string of this server + * @return The full version string of this server, including patch version and other info + */ + const std::string& GetFullVersion() const { return fullversion; } + /** Set time we are next due to ping this server */ void SetNextPingTime(time_t t); @@ -142,6 +152,11 @@ class TreeServer : public Server */ void SetVersion(const std::string &Version); + /** Set the full version string + * @param verstr The version string to set + */ + void SetFullVersion(const std::string& verstr) { fullversion = verstr; } + /** Return all child servers */ const ChildServers& GetChildren() const { return Children; } |