X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_proxyscan.cpp;h=6b2c489f8433f652f4e109a847b69ce33cb74d0b;hb=ccd95e668a3bcbd26c4cd2984cdd8809347f9815;hp=da635d185be58a4e528a389d92d7ef88a2995950;hpb=53afaa7cadcdf222dcf761441727305f79b4c557;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_proxyscan.cpp b/src/modules/m_proxyscan.cpp index da635d185..6b2c489f8 100644 --- a/src/modules/m_proxyscan.cpp +++ b/src/modules/m_proxyscan.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -76,12 +76,12 @@ class ProxySocket : public EventHandler int rlen; bool done; public: - ProxySocket(InspIRCd *Server, User* u, const std::string &bindip, int port, char *cstr, int clen, char *rstr, int rlen) + ProxySocket(InspIRCd *Server, User* u, const std::string &bindip, int port, const char *cstr, int mclen, const char *rstr, int mrlen) { user = u; ServerInstance = Server; - this->clen = clen; - this->rlen = rlen; + this->clen = mclen; + this->rlen = mrlen; int i; @@ -189,7 +189,7 @@ class ProxySocket : public EventHandler virtual void OnConnected() { - ServerInstance->Log(DEBUG,"OnConnected()"); + ServerInstance->Logs->Log("m_proxyscan",DEBUG,"OnConnected()"); /* Both sockaddr_in and sockaddr_in6 can be safely casted to sockaddr, especially since the * only members we use are in a part of the struct that should always be identical (at the @@ -212,10 +212,10 @@ class ProxySocket : public EventHandler /* Send failed if we didnt write the whole ident request -- * might as well give up if this happens! */ - ServerInstance->Log(DEBUG, "Sending"); + ServerInstance->Logs->Log("m_proxyscan",DEBUG, "Sending"); if (ServerInstance->SE->Send(this, this->challenge, this->clen, 0) < this->clen) { - ServerInstance->Log(DEBUG, "Send incomplete"); + ServerInstance->Logs->Log("m_proxyscan",DEBUG, "Send incomplete"); done = true; } } @@ -234,7 +234,7 @@ class ProxySocket : public EventHandler break; case EVENT_ERROR: /* fd error event, ohshi- */ - ServerInstance->Log(DEBUG,"EVENT_ERROR"); + ServerInstance->Logs->Log("m_proxyscan",DEBUG,"EVENT_ERROR"); /* We *must* Close() here immediately or we get a * huge storm of EVENT_ERROR events! */ @@ -251,7 +251,7 @@ class ProxySocket : public EventHandler */ if (GetFd() > -1) { - ServerInstance->Log(DEBUG,"Close ident socket %d", GetFd()); + ServerInstance->Logs->Log("m_proxyscan",DEBUG,"Close ident socket %d", GetFd()); ServerInstance->SE->DelFd(this); ServerInstance->SE->Close(GetFd()); ServerInstance->SE->Shutdown(GetFd(), SHUT_WR); @@ -272,7 +272,7 @@ class ProxySocket : public EventHandler char ibuf[MAXBUF]; int recvresult = ServerInstance->SE->Recv(this, ibuf, MAXBUF-1, 0); - ServerInstance->Log(DEBUG,"ReadResponse(): %s -- %d", ibuf, recvresult); + ServerInstance->Logs->Log("m_proxyscan",DEBUG,"ReadResponse(): %s -- %d", ibuf, recvresult); bool match = true; int i; @@ -281,7 +281,7 @@ class ProxySocket : public EventHandler { if (this->response[i] != ibuf[i]) { - ServerInstance->Log(DEBUG, "No match at pos %d: %c ne %c", i, this->response[i], ibuf[i]); + ServerInstance->Logs->Log("m_proxyscan",DEBUG, "No match at pos %d: %c ne %c", i, this->response[i], ibuf[i]); /* no match */ match = false; } @@ -360,7 +360,7 @@ class ModuleProxy : public Module } catch (ModuleException &e) { - ServerInstance->Log(DEBUG,"Proxy exception: %s", e.GetReason()); + ServerInstance->Logs->Log("m_proxyscan",DEBUG,"Proxy exception: %s", e.GetReason()); return 0; } @@ -384,7 +384,7 @@ class ModuleProxy : public Module p->Close(); delete p; user->Shrink("proxy_socket"); - ServerInstance->Log(DEBUG, "Removed proxy socket from %s", user->nick); + ServerInstance->Logs->Log("m_proxyscan",DEBUG, "Removed proxy socket from %s", user->nick); } } };