From 8394be69a0e3b5fea617c69b69aa27daf547fc4e Mon Sep 17 00:00:00 2001 From: om Date: Tue, 28 Aug 2007 23:32:41 +0000 Subject: Move everything module-related out of InspIRCd and into ModuleManager, there is a ModuleManager instantiated as InspIRCd::Modules. Several of the function names have changed slightly as well. e.g. Instance->FindModule(m_foobar.so); is now Instance->Modules->Find(m_foobar.so); All modules in the core distribution should also be updated in line with these changes. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7985 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/modules/m_spanningtree/treesocket1.cpp') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index fcfb21f68..8a413ab8d 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -125,7 +125,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string * Note: If m_sha256.so is not loaded, we MUST fall back to plaintext with no * HMAC challenge/response. */ - Module* sha256 = Instance->FindModule("m_sha256.so"); + Module* sha256 = Instance->Modules->Find("m_sha256.so"); if (Utils->ChallengeResponse && sha256 && !challenge.empty()) { /* XXX: This is how HMAC is supposed to be done: @@ -279,9 +279,9 @@ std::string TreeSocket::MyCapabilities() { std::vector modlist; std::string capabilities; - for (int i = 0; i <= this->Instance->GetModuleCount(); i++) + for (int i = 0; i <= this->Instance->Modules->GetCount(); i++) { - if (this->Instance->modules[i]->GetVersion().Flags & VF_COMMON) + if (this->Instance->Modules->modules[i]->GetVersion().Flags & VF_COMMON) modlist.push_back(this->Instance->Config->module_names[i]); } sort(modlist.begin(),modlist.end()); @@ -365,7 +365,7 @@ void TreeSocket::SendCapabilities() #endif std::string extra; /* Do we have sha256 available? If so, we send a challenge */ - if (Utils->ChallengeResponse && (Instance->FindModule("m_sha256.so"))) + if (Utils->ChallengeResponse && (Instance->Modules->Find("m_sha256.so"))) { this->SetOurChallenge(RandString(20)); extra = " CHALLENGE=" + this->GetOurChallenge(); @@ -495,7 +495,7 @@ bool TreeSocket::Capab(const std::deque ¶ms) /* Challenge response, store their challenge for our password */ std::map::iterator n = this->CapKeys.find("CHALLENGE"); - if (Utils->ChallengeResponse && (n != this->CapKeys.end()) && (Instance->FindModule("m_sha256.so"))) + if (Utils->ChallengeResponse && (n != this->CapKeys.end()) && (Instance->Modules->Find("m_sha256.so"))) { /* Challenge-response is on now */ this->SetTheirChallenge(n->second); @@ -1400,4 +1400,3 @@ bool TreeSocket::OnDataReady() */ return (data && !*data); } - -- cgit v1.3.1-10-gc9f91