]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket1.cpp
Make ping warnings and lag check global across all servers on a network. This means...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket1.cpp
index 3e129a642b61c7660505c1024d5dc698a0252b0f..eed4383d028d8595dbee5bee9346b1205409a994 100644 (file)
@@ -37,8 +37,8 @@
  * most of the action, and append a few of our own values
  * to it.
  */
-TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, Module* HookMod)
-       : BufferedSocket(SI, host, port, listening, maxtime), Utils(Util), Hook(HookMod)
+TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string shost, int iport, bool listening, unsigned long maxtime, Module* HookMod)
+       : BufferedSocket(SI, shost, iport, listening, maxtime), Utils(Util), Hook(HookMod)
 {
        myhost = host;
        this->LinkState = LISTENER;
@@ -48,8 +48,8 @@ TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string ho
                BufferedSocketHookRequest(this, (Module*)Utils->Creator, Hook).Send();
 }
 
-TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, const std::string &ServerName, const std::string &bindto, Module* HookMod)
-       : BufferedSocket(SI, host, port, listening, maxtime, bindto), Utils(Util), Hook(HookMod)
+TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string shost, int iport, bool listening, unsigned long maxtime, const std::string &ServerName, const std::string &bindto, Module* HookMod)
+       : BufferedSocket(SI, shost, iport, listening, maxtime, bindto), Utils(Util), Hook(HookMod)
 {
        myhost = ServerName;
        theirchallenge.clear();
@@ -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
@@ -258,7 +258,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
  */
 bool TreeSocket::OnDataReady()
 {
-       char* data = this->Read();
+       const char* data = this->Read();
        /* Check that the data read is a valid pointer and it has some content */
        if (data && *data)
        {