summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 16:56:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 16:56:03 +0000
commite91d5023f3ace4bb80d197621d6dc20b6e293641 (patch)
tree7d117cc7908bbf5fb0dd18167369f5ff302317c4 /src/modules
parent94288cdc2efb02eab9f27b3225adad839a7f2b58 (diff)
Removal of Server::Log -- not much ever used it anyway with the ability to use log(). log() macro still exists, and calls InspIRCd::Log()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4845 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp4
-rw-r--r--src/modules/extra/m_mysql.cpp14
-rw-r--r--src/modules/extra/m_sqllog.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp6
-rw-r--r--src/modules/m_banexception.cpp1
-rw-r--r--src/modules/m_chanprotect.cpp2
-rw-r--r--src/modules/m_cloaking.cpp2
-rw-r--r--src/modules/m_filter.cpp6
-rw-r--r--src/modules/m_foobar.cpp9
-rw-r--r--src/modules/m_ident.cpp8
-rw-r--r--src/modules/m_inviteexception.cpp1
-rw-r--r--src/modules/m_samode.cpp4
13 files changed, 26 insertions, 41 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index 891b550ff..0f52c6aa4 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -71,7 +71,7 @@ class ModuleFilterPCRE : public Module
FilterPCREException e;
throw(e);
}
- Srv->Log(DEFAULT,std::string("m_filter_pcre: read configuration from ")+filterfile);
+ log(DEFAULT,"m_filter_pcre: read configuration from "+filterfile);
filters.clear();
for (int index = 0; index < MyConf->Enumerate("keyword"); index++)
@@ -172,7 +172,7 @@ class ModuleFilterPCRE : public Module
// bail if the user forgot to create a config file
throw(e);
}
- Srv->Log(DEFAULT,std::string("m_filter_pcre: read configuration from ")+filterfile);
+ log(DEFAULT,"m_filter_pcre: read configuration from "+filterfile);
filters.clear();
for (int index = 0; index < MyConf->Enumerate("keyword"); index++)
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index eeb803d5a..a6fa7ab8e 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -603,11 +603,11 @@ void ConnectDatabases(Server* Srv)
i->second->SetEnable(true);
if (i->second->Connect())
{
- Srv->Log(DEFAULT,"SQL: Successfully connected database "+i->second->GetHost());
+ log(DEFAULT,"SQL: Successfully connected database "+i->second->GetHost());
}
else
{
- Srv->Log(DEFAULT,"SQL: Failed to connect database "+i->second->GetHost()+": Error: "+i->second->GetError());
+ log(DEFAULT,"SQL: Failed to connect database "+i->second->GetHost()+": Error: "+i->second->GetError());
i->second->SetEnable(false);
}
}
@@ -616,9 +616,9 @@ void ConnectDatabases(Server* Srv)
void LoadDatabases(ConfigReader* ThisConf, Server* Srv)
{
- Srv->Log(DEFAULT,"SQL: Loading database settings");
+ log(DEFAULT,"SQL: Loading database settings");
Connections.clear();
- Srv->Log(DEBUG,"Cleared connections");
+ log(DEBUG,"Cleared connections");
for (int j =0; j < ThisConf->Enumerate("database"); j++)
{
std::string db = ThisConf->ReadValue("database","name",j);
@@ -626,13 +626,13 @@ void LoadDatabases(ConfigReader* ThisConf, Server* Srv)
std::string pass = ThisConf->ReadValue("database","password",j);
std::string host = ThisConf->ReadValue("database","hostname",j);
std::string id = ThisConf->ReadValue("database","id",j);
- Srv->Log(DEBUG,"Read database settings");
+ log(DEBUG,"Read database settings");
if ((db != "") && (host != "") && (user != "") && (id != "") && (pass != ""))
{
SQLConnection* ThisSQL = new SQLConnection(host,user,pass,db,id);
- Srv->Log(DEFAULT,"Loaded database: "+ThisSQL->GetHost());
+ log(DEFAULT,"Loaded database: "+ThisSQL->GetHost());
Connections[id] = ThisSQL;
- Srv->Log(DEBUG,"Pushed back connection");
+ log(DEBUG,"Pushed back connection");
}
}
ConnectDatabases(Srv);
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index 5fcc30cc4..a7d73af18 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -281,7 +281,7 @@ class ModuleSQLLog : public Module
DELETE(Conf);
SQLModule = Srv->FindFeature("SQL");
if (!SQLModule)
- Srv->Log(DEFAULT,"WARNING: m_sqllog.so could not initialize because an SQL module is not loaded. Load the module and rehash your server.");
+ log(DEFAULT,"WARNING: m_sqllog.so could not initialize because an SQL module is not loaded. Load the module and rehash your server.");
return (SQLModule);
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 30ece8f60..9bb92fd61 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -369,9 +369,6 @@ class ModuleSSLGnuTLS : public Module
// As above
readresult = length;
}
-
- log(DEBUG, "m_ssl_gnutls.so: OnRawSocketRead: Passing %d bytes up to insp:", length);
- Srv->Log(DEBUG, std::string(buffer, readresult));
}
}
else if(session->status == ISSL_CLOSING)
@@ -421,10 +418,7 @@ class ModuleSSLGnuTLS : public Module
count = session->outbuf.size();
if(session->status == ISSL_HANDSHAKEN)
- {
- log(DEBUG, "m_ssl_gnutls.so: OnRawSocketWrite: Trying to write %d bytes:", count);
- Srv->Log(DEBUG, session->outbuf);
-
+ {
int ret = gnutls_record_send(session->sess, sendbuffer, count);
if(ret == 0)
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index c0f02f322..f9f38fc17 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -367,9 +367,6 @@ class ModuleSSLOpenSSL : public Module
session->inbufoffset = 0;
}
- log(DEBUG, "m_ssl_openssl.so: OnRawSocketRead: Passing %d bytes up to insp:", count);
- Srv->Log(DEBUG, std::string(buffer, readresult));
-
return 1;
}
else
@@ -436,9 +433,6 @@ class ModuleSSLOpenSSL : public Module
int DoWrite(issl_session* session)
{
- log(DEBUG, "m_ssl_openssl.so: DoWrite: Trying to write %d bytes:", session->outbuf.size());
- Srv->Log(DEBUG, session->outbuf);
-
int ret = SSL_write(session->sess, session->outbuf.data(), session->outbuf.size());
if(ret == 0)
diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp
index a530ea49b..bd549860f 100644
--- a/src/modules/m_banexception.cpp
+++ b/src/modules/m_banexception.cpp
@@ -57,7 +57,6 @@ public:
{
modelist* list;
chan->GetExt(be->GetInfoKey(), list);
- Srv->Log(DEBUG, std::string(user->nick)+" is trying to join "+std::string(chan->name)+", checking for ban exceptions");
if(list)
{
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 41b78f98b..21c3ee681 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -323,7 +323,7 @@ class ModuleChanProtect : public Module
user->WriteServ("MODE %s +q %s",channel->name,user->nick);
if (user->Extend("cm_founder_"+std::string(channel->name),fakevalue))
{
- Srv->Log(DEBUG,"Marked user "+std::string(user->nick)+" as founder for "+std::string(channel->name));
+ log(DEBUG,"Marked user "+std::string(user->nick)+" as founder for "+std::string(channel->name));
}
}
}
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 5a0e28bb5..92fac501e 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -348,7 +348,7 @@ class CloakUser : public ModeHandler
// else, they have an ip
b = std::string(ra) + "." + prefix + ".cloak";
}
- Srv->Log(DEBUG,"cloak: allocated "+b);
+ log(DEBUG,"cloak: allocated "+b);
dest->ChangeDisplayedHost(b.c_str());
}
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 13e68f943..6b0efe5cc 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -110,9 +110,7 @@ class ModuleFilter : public Module
ServerInstance->WriteOpers(std::string("FILTER: ")+user->nick+" had their notice filtered, target was "+target+": "+f->reason);
user->WriteServ("NOTICE "+std::string(user->nick)+" :Your notice has been filtered and opers notified: "+f->reason);
}
- Srv->Log(DEFAULT,std::string("FILTER: ")+std::string(user->nick)+
- std::string(" had their notice filtered, target was ")+
- target+": "+f->reason+" Action: "+f->action);
+ log(DEFAULT,"FILTER: "+std::string(user->nick)+std::string(" had their notice filtered, target was ")+target+": "+f->reason+" Action: "+f->action);
if (f->action == "kill")
{
@@ -155,7 +153,7 @@ class ModuleFilter : public Module
x->action = do_action;
filters[pattern] = x;
}
- Srv->Log(DEFAULT,std::string("m_filter: read configuration from ")+filterfile);
+ log(DEFAULT,"m_filter: read configuration from "+filterfile);
DELETE(Conf);
DELETE(MyConf);
}
diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp
index 6db01bc03..93b1848fe 100644
--- a/src/modules/m_foobar.cpp
+++ b/src/modules/m_foobar.cpp
@@ -20,6 +20,7 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include "helperfuncs.h"
+#include "inspircd.h"
/* $ModDesc: A dummy module for testing */
@@ -67,7 +68,7 @@ class ModuleFoobar : public Module
// method called when a user connects
std::string b = user->nick;
- Srv->Log(DEBUG,"Foobar: User connecting: " + b);
+ log(DEBUG,"Foobar: User connecting: "+b);
}
virtual void OnUserQuit(userrec* user, const std::string &reason)
@@ -75,7 +76,7 @@ class ModuleFoobar : public Module
// method called when a user disconnects
std::string b = user->nick;
- Srv->Log(DEBUG,"Foobar: User quitting: " + b);
+ log(DEBUG,"Foobar: User quitting: "+b);
}
virtual void OnUserJoin(userrec* user, chanrec* channel)
@@ -84,7 +85,7 @@ class ModuleFoobar : public Module
std::string c = channel->name;
std::string b = user->nick;
- Srv->Log(DEBUG,"Foobar: User " + b + " joined " + c);
+ log(DEBUG,"Foobar: User "+b+" joined "+c);
}
virtual void OnUserPart(userrec* user, chanrec* channel, const std::string &partreason)
@@ -93,7 +94,7 @@ class ModuleFoobar : public Module
std::string c = channel->name;
std::string b = user->nick;
- Srv->Log(DEBUG,"Foobar: User " + b + " parted " + c);
+ log(DEBUG,"Foobar: User "+b+" parted "+c);
}
};
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index d40bf045b..3d924bb0f 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -47,7 +47,7 @@ class RFC1413 : public InspSocket
RFC1413(InspIRCd* SI, userrec* user, int maxtime, Server* S) : InspSocket(SI, user->GetIPString(), 113, false, maxtime), Srv(S), u(user), ufd(user->fd)
{
- Srv->Log(DEBUG,"Ident: associated.");
+ log(DEBUG,"Ident: associated.");
}
virtual void OnTimeout()
@@ -88,7 +88,7 @@ class RFC1413 : public InspSocket
if (u && (fd_ref_table[ufd] == u))
{
strlcpy(u->ident,section,IDENTMAX);
- Srv->Log(DEBUG,"IDENT SET: "+std::string(u->ident));
+ log(DEBUG,"IDENT SET: "+std::string(u->ident));
u->WriteServ("NOTICE "+std::string(u->nick)+" :*** Found your ident: "+std::string(u->ident));
}
}
@@ -145,7 +145,7 @@ class RFC1413 : public InspSocket
themlen = sizeof(sock_them);
if ((getsockname(this->u->fd,(sockaddr*)&sock_us,&uslen) || getpeername(this->u->fd, (sockaddr*)&sock_them, &themlen)))
{
- Srv->Log(DEBUG,"Ident: failed to get socket names, bailing");
+ log(DEBUG,"Ident: failed to get socket names, bailing");
return false;
}
else
@@ -157,7 +157,7 @@ class RFC1413 : public InspSocket
snprintf(ident_request,127,"%d,%d\r\n",ntohs(sock_them.sin_port),ntohs(sock_us.sin_port));
#endif
this->Write(ident_request);
- Srv->Log(DEBUG,"Sent ident request, waiting for reply");
+ log(DEBUG,"Sent ident request, waiting for reply");
return true;
}
}
diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp
index 5cfee76da..dabdc2829 100644
--- a/src/modules/m_inviteexception.cpp
+++ b/src/modules/m_inviteexception.cpp
@@ -56,7 +56,6 @@ public:
{
modelist* list;
chan->GetExt(ie->GetInfoKey(), list);
- Srv->Log(DEBUG, std::string(user->nick)+" is trying to join "+std::string(chan->name)+", checking for invite exceptions");
if (list)
{
for (modelist::iterator it = list->begin(); it != list->end(); it++)
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 104e5da33..0a60862af 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -55,12 +55,12 @@ class cmd_samode : public command_t
* Handles an SAMODE request. Notifies all +s users.
*/
std::string result;
- Srv->Log(DEBUG,"SAMODE: Being handled");
+ log(DEBUG,"SAMODE: Being handled");
userrec* n = new userrec(ServerInstance);
n->fd = FD_MAGIC_NUMBER;
Srv->SendMode(parameters,pcnt,n);
delete n;
- Srv->Log(DEBUG,"SAMODE: Modechange handled");
+ log(DEBUG,"SAMODE: Modechange handled");
result = std::string(user->nick);
result.append(" used SAMODE");
for (int n = 0; n < pcnt; n++)