summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/treesocket1.cpp
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 23:32:41 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 23:32:41 +0000
commit8394be69a0e3b5fea617c69b69aa27daf547fc4e (patch)
treeccf40646d8ed2145d9c6a3693e073434fe33bc4c /src/modules/m_spanningtree/treesocket1.cpp
parentaa953912596e5fae066804ac6afbe9c44ceae50d (diff)
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
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp11
1 files changed, 5 insertions, 6 deletions
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<std::string> 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<std::string> &params)
/* Challenge response, store their challenge for our password */
std::map<std::string,std::string>::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);
}
-