summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h3
-rw-r--r--src/modules.cpp5
-rw-r--r--src/modules/m_spanningtree.cpp6
3 files changed, 11 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h
index 452ec72d5..77f986f0d 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1113,6 +1113,9 @@ class Server : public classbase
* This method sends a server notice to all opers with the usermode +s.
*/
virtual void SendOpers(std::string s);
+ /** Returns the version string of this server
+ */
+ std::string GetVersion();
/** Writes a log string.
* This method writes a line of text to the log. If the level given is lower than the
* level given in the configuration, this command has no effect.
diff --git a/src/modules.cpp b/src/modules.cpp
index e2c131780..93f05cdf1 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -326,6 +326,11 @@ ServerConfig* Server::GetConfig()
return Config;
}
+std::string Server::GetVersion()
+{
+ return ServerInstance->GetVersionString();
+}
+
void Server::DelSocket(InspSocket* sock)
{
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 1ef31221e..1476b81b7 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -173,7 +173,7 @@ class TreeServer
ServerDesc = "";
VersionString = "";
UserCount = OperCount = 0;
- VersionString = GetVersionString();
+ VersionString = Srv->GetVersion();
}
/* We use this constructor only to create the 'root' item, TreeRoot, which
@@ -185,7 +185,7 @@ class TreeServer
Parent = NULL;
VersionString = "";
UserCount = OperCount = 0;
- VersionString = GetVersionString();
+ VersionString = Srv->GetVersion();
Route = NULL;
AddHashEntry();
}
@@ -1099,7 +1099,7 @@ class TreeSocket : public InspSocket
Srv->SendOpers("*** Bursting to \2"+s->GetName()+"\2.");
this->WriteLine("BURST");
/* send our version string */
- this->WriteLine(":"+Srv->GetServerName()+" VERSION :"+GetVersionString());
+ this->WriteLine(":"+Srv->GetServerName()+" VERSION :"+Srv->GetVersion());
/* Send server tree */
this->SendServers(TreeRoot,s,1);
/* Send users and their oper status */