From fca345d6b5bc453d3e0b914a1c7a1865991ea220 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 10 Aug 2006 16:16:40 +0000 Subject: Server::GetAdmin, Server::GetServerDescription, Server::GetNetworkName --- *REMOVED* git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4843 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_botmode.cpp | 6 +++++- src/modules/m_cloaking.cpp | 4 +++- src/modules/m_httpd_stats.cpp | 4 ++-- src/modules/m_spanningtree.cpp | 6 +++--- 4 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 1d3d22575..0f402a1ed 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -21,10 +21,14 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" +#include "helperfuncs.h" +#include "configreader.h" #include "inspircd.h" /* $ModDesc: Provides support for unreal-style umode +B */ +extern InspIRCd* ServerInstance; + class BotMode : public ModeHandler { public: @@ -89,7 +93,7 @@ class ModuleBotMode : public Module { if (dst->IsModeSet('B')) { - src->WriteServ("335 "+std::string(src->nick)+" "+std::string(dst->nick)+" :is a \2bot\2 on "+Srv->GetNetworkName()); + src->WriteServ("335 "+std::string(src->nick)+" "+std::string(dst->nick)+" :is a \2bot\2 on "+ServerInstance->Config->Network); } } diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index b8164d9ba..5a0e28bb5 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -35,6 +35,7 @@ #ifdef HAS_STDINT #include #endif +#include "configreader.h" #include "inspircd.h" #include "users.h" #include "channels.h" @@ -42,6 +43,7 @@ /* $ModDesc: Provides masking of user hostnames */ +extern InspIRCd* ServerInstance; /* The four core functions - F1 is optimized somewhat */ @@ -382,7 +384,7 @@ class CloakUser : public ModeHandler prefix = Conf.ReadValue("cloak","prefix",0); if (prefix == "") { - prefix = Srv->GetNetworkName(); + prefix = ServerInstance->Config->Network; } if (!key1 && !key2 && !key3 && !key4) { diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index a8f66b6a7..8b2ce75f5 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -106,9 +106,9 @@ class ModuleHttpStats : public Module data << ""; data << ""; - data << "InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")"; + data << "InspIRCd server statisitics for " << Srv->GetServerName() << " (" << ServerInstance->Config->ServerDesc << ")"; data << ""; - data << "

InspIRCd server statisitics for " << Srv->GetServerName() << " (" << Srv->GetServerDescription() << ")

"; + data << "

InspIRCd server statisitics for " << Srv->GetServerName() << " (" << ServerInstance->Config->ServerDesc << ")

"; data << "
"; data << "

Totals

"; diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 19a217178..bc8e94b1d 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -756,7 +756,7 @@ class TreeSocket : public InspSocket } } /* found who we're supposed to be connecting to, send the neccessary gubbins. */ - this->WriteLine("SERVER "+Srv->GetServerName()+" "+x->SendPass+" 0 :"+Srv->GetServerDescription()); + this->WriteLine("SERVER "+Srv->GetServerName()+" "+x->SendPass+" 0 :"+ServerInstance->Config->ServerDesc); return true; } } @@ -2548,7 +2548,7 @@ class TreeSocket : public InspSocket this->InboundDescription = description; // this is good. Send our details: Our server name and description and hopcount of 0, // along with the sendpass from this block. - this->WriteLine("SERVER "+Srv->GetServerName()+" "+x->SendPass+" 0 :"+Srv->GetServerDescription()); + this->WriteLine("SERVER "+Srv->GetServerName()+" "+x->SendPass+" 0 :"+ServerInstance->Config->ServerDesc); // move to the next state, we are now waiting for THEM. this->LinkState = WAIT_AUTH_2; return true; @@ -3432,7 +3432,7 @@ class ModuleSpanningTree : public Module Bindings.clear(); // Create the root of the tree - TreeRoot = new TreeServer(Srv->GetServerName(),Srv->GetServerDescription()); + TreeRoot = new TreeServer(ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc); ReadConfiguration(true); -- cgit v1.2.3