diff options
author | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 16:47:10 +0000 |
---|---|---|
committer | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-22 16:47:10 +0000 |
commit | da074814501f23680b579feb1ad649c86e8a1348 (patch) | |
tree | 708a5e282425443c3351c0664ed0fa4c2a235eab /src/modules/m_spanningtree | |
parent | 07e1c65d9e6419df30a316a3b1f33434ab59f16f (diff) |
Convert remaining InspIRCd::Log() calls to new logging system
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/fjoin.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/fmode.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/hmac.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/resolvers.h | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/server.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 6 |
12 files changed, 20 insertions, 20 deletions
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index 0b6c4430a..a4fe5836a 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -79,7 +79,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p if (!TS) { - Instance->Log(DEFAULT,"*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped."); + Instance->Logs->Log("m_spanningtree",DEFAULT,"*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped."); Instance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FJOIN with a TS of zero. Total craq. Command was dropped.", source.c_str()); return true; } @@ -148,7 +148,7 @@ bool TreeSocket::ForceJoin(const std::string &source, std::deque<std::string> &p } else { - Instance->Log(SPARSE,"Warning! Invalid user %s in FJOIN to channel %s IGNORED", usr, channel.c_str()); + Instance->Logs->Log("m_spanningtree",SPARSE,"Warning! Invalid user %s in FJOIN to channel %s IGNORED", usr, channel.c_str()); continue; } } diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp index a6fbab164..260b4523c 100644 --- a/src/modules/m_spanningtree/fmode.cpp +++ b/src/modules/m_spanningtree/fmode.cpp @@ -90,7 +90,7 @@ bool TreeSocket::ForceMode(const std::string &source, std::deque<std::string> &p if (!TS) { - Instance->Log(DEFAULT,"*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropped."); + Instance->Logs->Log("m_spanningtree",DEFAULT,"*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropped."); Instance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FMODE with a TS of zero. Total craq. Mode was dropped.", sourceserv.c_str()); return true; } @@ -100,7 +100,7 @@ bool TreeSocket::ForceMode(const std::string &source, std::deque<std::string> &p if (TS <= ourTS) { if ((TS < ourTS) && (!dst)) - Instance->Log(DEFAULT,"*** BUG *** Channel TS sent in FMODE to %s is %lu which is not equal to %lu!", params[0].c_str(), TS, ourTS); + Instance->Logs->Log("m_spanningtree",DEFAULT,"*** BUG *** Channel TS sent in FMODE to %s is %lu which is not equal to %lu!", params[0].c_str(), TS, ourTS); if (smode) { diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp index 6632ea907..e01760dac 100644 --- a/src/modules/m_spanningtree/hmac.cpp +++ b/src/modules/m_spanningtree/hmac.cpp @@ -90,7 +90,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string return "HMAC-SHA256:"+ hmac; } else if (!challenge.empty() && !sha256) - Instance->Log(DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!"); + Instance->Logs->Log("m_spanningtree",DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!"); return password; } diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 062aed855..c2e365c35 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -188,7 +188,7 @@ void TreeSocket::SendChannelModes(TreeServer* Current) std::deque<std::string> list; std::string n = this->Instance->Config->GetSID(); const char* sn = n.c_str(); - Instance->Log(DEBUG,"Sending channels and modes, %d to send", this->Instance->chanlist->size()); + Instance->Logs->Log("m_spanningtree",DEBUG,"Sending channels and modes, %d to send", this->Instance->chanlist->size()); for (chan_hash::iterator c = this->Instance->chanlist->begin(); c != this->Instance->chanlist->end(); c++) { SendFJoins(Current, c->second); diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index de7142bea..d303ef322 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -66,7 +66,7 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const char* c else translate_to = TR_TEXT; - ServerInstance->Log(DEBUG,"TRANSLATION: %s - type is %d", parameters[j], translate_to); + ServerInstance->Logs->Log("m_spanningtree",DEBUG,"TRANSLATION: %s - type is %d", parameters[j], translate_to); ServerInstance->Parser->TranslateUIDs(translate_to, parameters[j], target); if (j == (pcnt - 1)) diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h index 6ca6a5746..54fd9c481 100644 --- a/src/modules/m_spanningtree/resolvers.h +++ b/src/modules/m_spanningtree/resolvers.h @@ -55,7 +55,7 @@ class SecurityIPResolver : public Resolver ServerInstance->AddResolver(res, cached); return; } - ServerInstance->Log(DEFAULT,"Could not resolve IP associated with Link '%s': %s",MyLink.Name.c_str(),errormessage.c_str()); + ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Could not resolve IP associated with Link '%s': %s",MyLink.Name.c_str(),errormessage.c_str()); } }; diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index cbbc7190a..d98d73050 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -212,7 +212,7 @@ bool TreeSocket::Inbound_Server(std::deque<std::string> ¶ms) if ((x->Name == servername) && ((ComparePass(this->MakePass(x->RecvPass,this->GetOurChallenge()),password) || x->RecvPass == password && (this->GetTheirChallenge().empty())))) { /* Check for fully initialized instances of the server by id */ - Instance->Log(DEBUG,"Looking for dupe SID %s", sid.c_str()); + Instance->Logs->Log("m_spanningtree",DEBUG,"Looking for dupe SID %s", sid.c_str()); TreeServer* CheckDupeSID = Utils->FindServerID(sid); if (CheckDupeSID) { diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 5c85e5e5d..db26b3f88 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -77,7 +77,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::str gettimeofday(&t, NULL); long ts = (t.tv_sec * 1000) + (t.tv_usec / 1000); this->StartBurst = ts; - Instance->Log(DEBUG, "Started bursting at time %lu", ts); + Instance->Logs->Log("m_spanningtree",DEBUG, "Started bursting at time %lu", ts); /* find the 'route' for this server (e.g. the one directly connected * to the local server, which we can use to reach it) @@ -156,7 +156,7 @@ void TreeServer::FinishBurst() void TreeServer::SetID(const std::string &id) { - ServerInstance->Log(DEBUG, "Setting SID to " + id); + ServerInstance->Logs->Log("m_spanningtree",DEBUG, "Setting SID to " + id); sid = id; server_hash::iterator iter = Utils->sidlist.find(sid); if (iter == Utils->sidlist.end()) diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 34b8e112d..eed4383d0 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -245,7 +245,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason) this->Instance->SNO->WriteToSnoMask('l',"Netsplit complete, lost \002%d\002 users on \002%d\002 servers.", num_lost_users, num_lost_servers); } else - Instance->Log(DEFAULT,"Squit from unknown server"); + Instance->Logs->Log("m_spanningtree",DEFAULT,"Squit from unknown server"); } /** This function is called when we receive data from a remote diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 76920d6e6..023fa0ac8 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -34,7 +34,7 @@ static std::map<std::string, std::string> warned; /* Server names that hav int TreeSocket::WriteLine(std::string line) { - Instance->Log(DEBUG, "S[%d] O %s", this->GetFd(), line.c_str()); + Instance->Logs->Log("m_spanningtree",DEBUG, "S[%d] O %s", this->GetFd(), line.c_str()); line.append("\r\n"); return this->Write(line); } @@ -73,7 +73,7 @@ bool TreeSocket::ProcessLine(std::string &line) if (line.empty()) return true; - Instance->Log(DEBUG, "S[%d] I %s", this->GetFd(), line.c_str()); + Instance->Logs->Log("m_spanningtree",DEBUG, "S[%d] I %s", this->GetFd(), line.c_str()); this->Split(line.c_str(),params); @@ -268,7 +268,7 @@ bool TreeSocket::ProcessLine(std::string &line) if ((!route_back_again) || (route_back_again->GetSocket() != this)) { if (route_back_again) - Instance->Log(DEBUG,"Protocol violation: Fake direction in command '%s' from connection '%s'",line.c_str(),this->GetName().c_str()); + Instance->Logs->Log("m_spanningtree",DEBUG,"Protocol violation: Fake direction in command '%s' from connection '%s'",line.c_str(),this->GetName().c_str()); return true; } /* Fix by brain: @@ -308,7 +308,7 @@ bool TreeSocket::ProcessLine(std::string &line) { if (warned.find(x->server) == warned.end()) { - Instance->Log(DEFAULT,"WARNING: I revceived modes '%s' from another server '%s'. This is not compliant with InspIRCd. Please check that server for bugs.", params[1].c_str(), x->server); + Instance->Logs->Log("m_spanningtree",DEFAULT,"WARNING: I revceived modes '%s' from another server '%s'. This is not compliant with InspIRCd. Please check that server for bugs.", params[1].c_str(), x->server); Instance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending nonstandard modes: '%s MODE %s' where FMODE should be used, and may cause desyncs.", x->server, x->nick, params[1].c_str()); warned[x->server] = x->nick; } diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 0768ec16f..62059f99c 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -84,7 +84,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa /* * Nick collision. */ - Instance->Log(DEBUG,"*** Collision on %s", tempnick); + Instance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s", tempnick); int collide = this->DoCollision(iter->second, age_t, params[5].c_str(), params[7].c_str(), params[0].c_str()); if (collide == 2) diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index fb4a81ba1..7480923b6 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -433,12 +433,12 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind) TreeSocket* listener = new TreeSocket(this, ServerInstance, IP.c_str(), portno, true, 10, transport.empty() ? NULL : hooks[transport.c_str()]); if (listener->GetState() == I_LISTENING) { - ServerInstance->Log(DEFAULT,"m_spanningtree: Binding server port %s:%d successful!", IP.c_str(), portno); + ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"m_spanningtree: Binding server port %s:%d successful!", IP.c_str(), portno); Bindings.push_back(listener); } else { - ServerInstance->Log(DEFAULT,"m_spanningtree: Warning: Failed to bind server port: %s:%d: %s",IP.c_str(), portno, strerror(errno)); + ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"m_spanningtree: Warning: Failed to bind server port: %s:%d: %s",IP.c_str(), portno, strerror(errno)); listener->Close(); } } @@ -588,7 +588,7 @@ void SpanningTreeUtilities::DoFailOver(Link* x) TreeServer* CheckDupe = this->FindServer(x->FailOver.c_str()); if (CheckDupe) { - ServerInstance->Log(DEBUG,"Skipping existing failover: %s", x->FailOver.c_str()); + ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Skipping existing failover: %s", x->FailOver.c_str()); } else { |