summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ldapauth.cpp2
-rw-r--r--src/modules/extra/m_mssql.cpp18
-rw-r--r--src/modules/extra/m_pgsql.cpp8
-rw-r--r--src/modules/extra/m_regex_pcre.cpp2
-rw-r--r--src/modules/extra/m_sqlite3.cpp2
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp16
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp20
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_blockcaps.cpp4
-rw-r--r--src/modules/m_cgiirc.cpp6
-rw-r--r--src/modules/m_chanlog.cpp4
-rw-r--r--src/modules/m_connectban.cpp2
-rw-r--r--src/modules/m_dnsbl.cpp2
-rw-r--r--src/modules/m_filter.cpp16
-rw-r--r--src/modules/m_httpd.cpp2
-rw-r--r--src/modules/m_httpd_acl.cpp16
-rw-r--r--src/modules/m_httpd_config.cpp2
-rw-r--r--src/modules/m_httpd_stats.cpp2
-rw-r--r--src/modules/m_ident.cpp20
-rw-r--r--src/modules/m_nationalchars.cpp4
-rw-r--r--src/modules/m_operlog.cpp2
-rw-r--r--src/modules/m_permchannels.cpp12
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_ripemd160.cpp6
-rw-r--r--src/modules/m_sasl.cpp6
-rw-r--r--src/modules/m_spanningtree/compat.cpp4
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp6
-rw-r--r--src/modules/m_spanningtree/fmode.cpp2
-rw-r--r--src/modules/m_spanningtree/hmac.cpp2
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/override_map.cpp4
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp4
-rw-r--r--src/modules/m_spanningtree/resolvers.cpp2
-rw-r--r--src/modules/m_spanningtree/server.cpp2
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp4
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp4
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp12
-rw-r--r--src/modules/m_spanningtree/uid.cpp4
-rw-r--r--src/modules/m_spanningtree/utils.cpp8
-rw-r--r--src/modules/m_sqloper.cpp12
-rw-r--r--src/modules/m_topiclock.cpp2
-rw-r--r--src/modules/m_xline_db.cpp22
42 files changed, 137 insertions, 137 deletions
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 0eb182228..5ae6594b3 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -378,7 +378,7 @@ public:
attr_value.bv_val = const_cast<char*>(val.c_str());
attr_value.bv_len = val.length();
- ServerInstance->Logs->Log("m_ldapauth", DEBUG, "LDAP compare: %s=%s", attr.c_str(), val.c_str());
+ ServerInstance->Logs->Log("m_ldapauth", LOG_DEBUG, "LDAP compare: %s=%s", attr.c_str(), val.c_str());
authed = (ldap_compare_ext_s(conn, DN, attr.c_str(), &attr_value, NULL, NULL) == LDAP_COMPARE_TRUE);
diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp
index 3ba398783..f9c3ea590 100644
--- a/src/modules/extra/m_mssql.cpp
+++ b/src/modules/extra/m_mssql.cpp
@@ -254,7 +254,7 @@ class SQLConn : public classbase
if (tds_process_simple_query(sock) != TDS_SUCCEED)
{
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -262,7 +262,7 @@ class SQLConn : public classbase
else
{
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -270,7 +270,7 @@ class SQLConn : public classbase
else
{
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
+ ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
LoggingMutex->Unlock();
CloseDB();
}
@@ -429,7 +429,7 @@ class SQLConn : public classbase
char* msquery = strdup(req->query.q.data());
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql",DEBUG,"doing Query: %s",msquery);
+ ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"doing Query: %s",msquery);
LoggingMutex->Unlock();
if (tds_submit_query(sock, msquery) != TDS_SUCCEED)
{
@@ -445,8 +445,8 @@ class SQLConn : public classbase
int tds_res;
while (tds_process_tokens(sock, &tds_res, NULL, TDS_TOKEN_RESULTS) == TDS_SUCCEED)
{
- //ServerInstance->Logs->Log("m_mssql",DEBUG,"<******> result type: %d", tds_res);
- //ServerInstance->Logs->Log("m_mssql",DEBUG,"AFFECTED ROWS: %d", sock->rows_affected);
+ //ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"<******> result type: %d", tds_res);
+ //ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"AFFECTED ROWS: %d", sock->rows_affected);
switch (tds_res)
{
case TDS_ROWFMT_RESULT:
@@ -512,7 +512,7 @@ class SQLConn : public classbase
{
SQLConn* sc = (SQLConn*)pContext->parent;
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql", DEBUG, "Message for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
+ ServerInstance->Logs->Log("m_mssql", LOG_DEBUG, "Message for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
LoggingMutex->Unlock();
return 0;
}
@@ -521,7 +521,7 @@ class SQLConn : public classbase
{
SQLConn* sc = (SQLConn*)pContext->parent;
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql", DEFAULT, "Error for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
+ ServerInstance->Logs->Log("m_mssql", LOG_DEFAULT, "Error for DB with id: %s -> %s", sc->host.id.c_str(), pMessage->message);
LoggingMutex->Unlock();
return 0;
}
@@ -749,7 +749,7 @@ class ModuleMsSQL : public Module
if (HasHost(hi))
{
LoggingMutex->Lock();
- ServerInstance->Logs->Log("m_mssql",DEFAULT, "WARNING: A MsSQL connection with id: %s already exists. Aborting database open attempt.", hi.id.c_str());
+ ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: A MsSQL connection with id: %s already exists. Aborting database open attempt.", hi.id.c_str());
LoggingMutex->Unlock();
return;
}
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 84f159be1..ea94834f3 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -152,7 +152,7 @@ class SQLConn : public SQLProvider, public EventHandler
{
if (!DoConnect())
{
- ServerInstance->Logs->Log("m_pgsql",DEFAULT, "WARNING: Could not connect to database " + tag->getString("id"));
+ ServerInstance->Logs->Log("m_pgsql",LOG_DEFAULT, "WARNING: Could not connect to database " + tag->getString("id"));
DelayReconnect();
}
}
@@ -244,7 +244,7 @@ class SQLConn : public SQLProvider, public EventHandler
if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_WRITE | FD_WANT_NO_READ))
{
- ServerInstance->Logs->Log("m_pgsql",DEBUG, "BUG: Couldn't add pgsql socket to socket engine");
+ ServerInstance->Logs->Log("m_pgsql",LOG_DEBUG, "BUG: Couldn't add pgsql socket to socket engine");
return false;
}
@@ -417,7 +417,7 @@ restart:
int error;
PQescapeStringConn(sql, buffer, parm.c_str(), parm.length(), &error);
if (error)
- ServerInstance->Logs->Log("m_pgsql", DEBUG, "BUG: Apparently PQescapeStringConn() failed");
+ ServerInstance->Logs->Log("m_pgsql", LOG_DEBUG, "BUG: Apparently PQescapeStringConn() failed");
#else
PQescapeString (buffer, parm.c_str(), parm.length());
#endif
@@ -452,7 +452,7 @@ restart:
int error;
PQescapeStringConn(sql, buffer, parm.c_str(), parm.length(), &error);
if (error)
- ServerInstance->Logs->Log("m_pgsql", DEBUG, "BUG: Apparently PQescapeStringConn() failed");
+ ServerInstance->Logs->Log("m_pgsql", LOG_DEBUG, "BUG: Apparently PQescapeStringConn() failed");
#else
PQescapeString (buffer, parm.c_str(), parm.length());
#endif
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index a23092879..e9d9aba8a 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -52,7 +52,7 @@ class PCRERegex : public Regex
regex = pcre_compile(rx.c_str(), 0, &error, &erroffset, NULL);
if (!regex)
{
- ServerInstance->Logs->Log("REGEX", DEBUG, "pcre_compile failed: /%s/ [%d] %s", rx.c_str(), erroffset, error);
+ ServerInstance->Logs->Log("REGEX", LOG_DEBUG, "pcre_compile failed: /%s/ [%d] %s", rx.c_str(), erroffset, error);
throw PCREException(rx, error, erroffset);
}
}
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index 171c11f03..40f44557a 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -85,7 +85,7 @@ class SQLConn : public SQLProvider
std::string host = tag->getString("hostname");
if (sqlite3_open_v2(host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0) != SQLITE_OK)
{
- ServerInstance->Logs->Log("m_sqlite3",DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
+ ServerInstance->Logs->Log("m_sqlite3",LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
conn = NULL;
}
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 67a0dd24f..31beb258f 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -258,7 +258,7 @@ class ModuleSSLGnuTLS : public Module
continue;
const std::string& portid = port->bind_desc;
- ServerInstance->Logs->Log("m_ssl_gnutls", DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %s", portid.c_str());
+ ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %s", portid.c_str());
if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
{
@@ -337,13 +337,13 @@ class ModuleSSLGnuTLS : public Module
ret = gnutls_certificate_allocate_credentials(&x509_cred);
cred_alloc = (ret >= 0);
if (!cred_alloc)
- ServerInstance->Logs->Log("m_ssl_gnutls",DEBUG, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
if((ret =gnutls_certificate_set_x509_trust_file(x509_cred, cafile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
- ServerInstance->Logs->Log("m_ssl_gnutls",DEBUG, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
if((ret = gnutls_certificate_set_x509_crl_file (x509_cred, crlfile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
- ServerInstance->Logs->Log("m_ssl_gnutls",DEBUG, "m_ssl_gnutls.so: Failed to set X.509 CRL file '%s': %s", crlfile.c_str(), gnutls_strerror(ret));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 CRL file '%s': %s", crlfile.c_str(), gnutls_strerror(ret));
FileReader reader;
@@ -392,13 +392,13 @@ class ModuleSSLGnuTLS : public Module
if ((ret = gnutls_priority_init(&priority, priocstr, &prioerror)) < 0)
{
// gnutls did not understand the user supplied string, log and fall back to the default priorities
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to set priorities to \"%s\": %s Syntax error at position %u, falling back to default (NORMAL)", priorities.c_str(), gnutls_strerror(ret), (unsigned int) (prioerror - priocstr));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: Failed to set priorities to \"%s\": %s Syntax error at position %u, falling back to default (NORMAL)", priorities.c_str(), gnutls_strerror(ret), (unsigned int) (prioerror - priocstr));
gnutls_priority_init(&priority, "NORMAL", NULL);
}
#else
if (priorities != "NORMAL")
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: You've set <gnutls:priority> to a value other than the default, but this is only supported with GnuTLS v2.1.7 or newer. Your GnuTLS version is older than that so the option will have no effect.");
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: You've set <gnutls:priority> to a value other than the default, but this is only supported with GnuTLS v2.1.7 or newer. Your GnuTLS version is older than that so the option will have no effect.");
#endif
#if(GNUTLS_VERSION_MAJOR < 2 || ( GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 12 ) )
@@ -409,7 +409,7 @@ class ModuleSSLGnuTLS : public Module
ret = gnutls_dh_params_init(&dh_params);
dh_alloc = (ret >= 0);
if (!dh_alloc)
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters: %s", gnutls_strerror(ret));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters: %s", gnutls_strerror(ret));
// This may be on a large (once a day or week) timer eventually.
GenerateDHParams();
@@ -428,7 +428,7 @@ class ModuleSSLGnuTLS : public Module
int ret;
if((ret = gnutls_dh_params_generate2(dh_params, dh_bits)) < 0)
- ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to generate DH parameters (%d bits): %s", dh_bits, gnutls_strerror(ret));
+ ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: Failed to generate DH parameters (%d bits): %s", dh_bits, gnutls_strerror(ret));
}
~ModuleSSLGnuTLS()
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 258a6a840..427439eb3 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -171,7 +171,7 @@ class ModuleSSLOpenSSL : public Module
continue;
const std::string& portid = port->bind_desc;
- ServerInstance->Logs->Log("m_ssl_openssl", DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %s", portid.c_str());
+ ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %s", portid.c_str());
if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
{
@@ -219,7 +219,7 @@ class ModuleSSLOpenSSL : public Module
{
if ((!SSL_CTX_set_cipher_list(ctx, ciphers.c_str())) || (!SSL_CTX_set_cipher_list(clictx, ciphers.c_str())))
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Can't set cipher list to %s.", ciphers.c_str());
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't set cipher list to %s.", ciphers.c_str());
ERR_print_errors_cb(error_callback, this);
}
}
@@ -229,20 +229,20 @@ class ModuleSSLOpenSSL : public Module
*/
if ((!SSL_CTX_use_certificate_chain_file(ctx, certfile.c_str())) || (!SSL_CTX_use_certificate_chain_file(clictx, certfile.c_str())))
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Can't read certificate file %s. %s", certfile.c_str(), strerror(errno));
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read certificate file %s. %s", certfile.c_str(), strerror(errno));
ERR_print_errors_cb(error_callback, this);
}
if (((!SSL_CTX_use_PrivateKey_file(ctx, keyfile.c_str(), SSL_FILETYPE_PEM))) || (!SSL_CTX_use_PrivateKey_file(clictx, keyfile.c_str(), SSL_FILETYPE_PEM)))
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Can't read key file %s. %s", keyfile.c_str(), strerror(errno));
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read key file %s. %s", keyfile.c_str(), strerror(errno));
ERR_print_errors_cb(error_callback, this);
}
/* Load the CAs we trust*/
if (((!SSL_CTX_load_verify_locations(ctx, cafile.c_str(), 0))) || (!SSL_CTX_load_verify_locations(clictx, cafile.c_str(), 0)))
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Can't read CA list from %s. This is only a problem if you want to verify client certificates, otherwise it's safe to ignore this message. Error: %s", cafile.c_str(), strerror(errno));
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read CA list from %s. This is only a problem if you want to verify client certificates, otherwise it's safe to ignore this message. Error: %s", cafile.c_str(), strerror(errno));
ERR_print_errors_cb(error_callback, this);
}
@@ -251,7 +251,7 @@ class ModuleSSLOpenSSL : public Module
if (dhpfile == NULL)
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so Couldn't open DH file %s: %s", dhfile.c_str(), strerror(errno));
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so Couldn't open DH file %s: %s", dhfile.c_str(), strerror(errno));
throw ModuleException("Couldn't open DH file " + dhfile + ": " + strerror(errno));
}
else
@@ -259,7 +259,7 @@ class ModuleSSLOpenSSL : public Module
ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL);
if ((SSL_CTX_set_tmp_dh(ctx, ret) < 0) || (SSL_CTX_set_tmp_dh(clictx, ret) < 0))
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters %s. SSL errors follow:", dhfile.c_str());
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters %s. SSL errors follow:", dhfile.c_str());
ERR_print_errors_cb(error_callback, this);
}
}
@@ -343,7 +343,7 @@ class ModuleSSLOpenSSL : public Module
if (SSL_set_fd(session->sess, fd) == 0)
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
return;
}
@@ -368,7 +368,7 @@ class ModuleSSLOpenSSL : public Module
if (SSL_set_fd(session->sess, fd) == 0)
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
return;
}
@@ -649,7 +649,7 @@ class ModuleSSLOpenSSL : public Module
static int error_callback(const char *str, size_t len, void *u)
{
- ServerInstance->Logs->Log("m_ssl_openssl",DEFAULT, "SSL error: " + std::string(str, len - 1));
+ ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "SSL error: " + std::string(str, len - 1));
//
// XXX: Remove this line, it causes valgrind warnings...
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index ffd47d793..8fda26ba6 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -342,7 +342,7 @@ class ModuleBanRedirect : public Module
{
/* XXX is this the best place to do this? */
if (!ServerInstance->Modes->DelModeWatcher(&re))
- ServerInstance->Logs->Log("m_banredirect.so", DEBUG, "Failed to delete modewatcher!");
+ ServerInstance->Logs->Log("m_banredirect.so", LOG_DEBUG, "Failed to delete modewatcher!");
}
virtual Version GetVersion()
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp
index 8371dd106..cd02fffe2 100644
--- a/src/modules/m_blockcaps.cpp
+++ b/src/modules/m_blockcaps.cpp
@@ -121,12 +121,12 @@ public:
capsmap[(unsigned char)*n] = 1;
if (percent < 1 || percent > 100)
{
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "<blockcaps:percent> out of range, setting to default of 100.");
+ ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "<blockcaps:percent> out of range, setting to default of 100.");
percent = 100;
}
if (minlen < 1 || minlen > MAXBUF-1)
{
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "<blockcaps:minlen> out of range, setting to default of 1.");
+ ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "<blockcaps:minlen> out of range, setting to default of 1.");
minlen = 1;
}
}
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 39833f1a0..7259f9459 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -255,7 +255,7 @@ public:
{
if (type == "webirc" && password.empty())
{
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str());
+ ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str());
}
else
{
@@ -271,7 +271,7 @@ public:
else
{
cgitype = PASS;
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "m_cgiirc.so: Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
+ ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
}
cmd.Hosts.push_back(CGIhost(hostmask, cgitype, password));
@@ -279,7 +279,7 @@ public:
}
else
{
- ServerInstance->Logs->Log("CONFIG",DEFAULT, "m_cgiirc.so: Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
+ ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
continue;
}
}
diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp
index 418175da3..4bfce2108 100644
--- a/src/modules/m_chanlog.cpp
+++ b/src/modules/m_chanlog.cpp
@@ -54,14 +54,14 @@ class ModuleChanLog : public Module
if (channel.empty() || snomasks.empty())
{
- ServerInstance->Logs->Log("m_chanlog", DEFAULT, "Malformed chanlog tag, ignoring");
+ ServerInstance->Logs->Log("m_chanlog", LOG_DEFAULT, "Malformed chanlog tag, ignoring");
continue;
}
for (std::string::const_iterator it = snomasks.begin(); it != snomasks.end(); it++)
{
logstreams.insert(std::make_pair(*it, channel));
- ServerInstance->Logs->Log("m_chanlog", DEFAULT, "Logging %c to %s", *it, channel.c_str());
+ ServerInstance->Logs->Log("m_chanlog", LOG_DEFAULT, "Logging %c to %s", *it, channel.c_str());
}
}
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp
index de69ab7ed..e6bfdda1f 100644
--- a/src/modules/m_connectban.cpp
+++ b/src/modules/m_connectban.cpp
@@ -114,7 +114,7 @@ class ModuleConnectBan : public Module
virtual void OnGarbageCollect()
{
- ServerInstance->Logs->Log("m_connectban",DEBUG, "Clearing map.");
+ ServerInstance->Logs->Log("m_connectban",LOG_DEBUG, "Clearing map.");
connects.clear();
}
};
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 72414b7a5..8429eb21b 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -356,7 +356,7 @@ class ModuleDNSBL : public Module
return;
}
else
- ServerInstance->Logs->Log("m_dnsbl", DEBUG, "User has no connect class in OnSetUserIP");
+ ServerInstance->Logs->Log("m_dnsbl", LOG_DEBUG, "User has no connect class in OnSetUserIP");
unsigned char a, b, c, d;
char reversedipbuf[128];
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index ffa94fea8..7e7ded306 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -369,7 +369,7 @@ ModResult ModuleFilter::OnUserPreNotice(User* user,void* dest,int target_type, s
delete gl;
}
- ServerInstance->Logs->Log("FILTER",DEFAULT,"FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
+ ServerInstance->Logs->Log("FILTER",LOG_DEFAULT,"FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;
@@ -539,7 +539,7 @@ void ModuleFilter::OnDecodeMetaData(Extensible* target, const std::string &extna
}
catch (ModuleException& e)
{
- ServerInstance->Logs->Log("m_filter", DEBUG, "Error when unserializing filter: " + std::string(e.GetReason()));
+ ServerInstance->Logs->Log("m_filter", LOG_DEBUG, "Error when unserializing filter: " + std::string(e.GetReason()));
}
}
}
@@ -571,13 +571,13 @@ FilterResult* ModuleFilter::FilterMatch(User* user, const std::string &text, int
InspIRCd::StripColor(stripped_text);
}
- //ServerInstance->Logs->Log("m_filter", DEBUG, "Match '%s' against '%s'", text.c_str(), index->freeform.c_str());
+ //ServerInstance->Logs->Log("m_filter", LOG_DEBUG, "Match '%s' against '%s'", text.c_str(), index->freeform.c_str());
if (index->regex->Matches(filter->flag_strip_color ? stripped_text : text))
{
- //ServerInstance->Logs->Log("m_filter", DEBUG, "MATCH");
+ //ServerInstance->Logs->Log("m_filter", LOG_DEBUG, "MATCH");
return &*index;
}
- //ServerInstance->Logs->Log("m_filter", DEBUG, "NO MATCH");
+ //ServerInstance->Logs->Log("m_filter", LOG_DEBUG, "NO MATCH");
}
return NULL;
}
@@ -612,7 +612,7 @@ std::pair<bool, std::string> ModuleFilter::AddFilter(const std::string &freeform
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_filter", DEFAULT, "Error in regular expression '%s': %s", freeform.c_str(), e.GetReason());
+ ServerInstance->Logs->Log("m_filter", LOG_DEFAULT, "Error in regular expression '%s': %s", freeform.c_str(), e.GetReason());
return std::make_pair(false, e.GetReason());
}
return std::make_pair(true, "");
@@ -672,11 +672,11 @@ void ModuleFilter::ReadFilters()
try
{
filters.push_back(ImplFilter(this, reason, fa, gline_time, pattern, flgs));
- ServerInstance->Logs->Log("m_filter", DEFAULT, "Regular expression %s loaded.", pattern.c_str());
+ ServerInstance->Logs->Log("m_filter", LOG_DEFAULT, "Regular expression %s loaded.", pattern.c_str());
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_filter", DEFAULT, "Error in regular expression '%s': %s", pattern.c_str(), e.GetReason());
+ ServerInstance->Logs->Log("m_filter", LOG_DEFAULT, "Error in regular expression '%s': %s", pattern.c_str(), e.GetReason());
}
}
}
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 6462ee1f4..46f0d6907 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -216,7 +216,7 @@ class HttpServerSocket : public BufferedSocket
if (reqbuffer.length() >= 8192)
{
- ServerInstance->Logs->Log("m_httpd",DEBUG, "m_httpd dropped connection due to an oversized request buffer");
+ ServerInstance->Logs->Log("m_httpd",LOG_DEBUG, "m_httpd dropped connection due to an oversized request buffer");
reqbuffer.clear();
SetError("Buffer");
}
diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp
index cddbce2f6..70c36a154 100644
--- a/src/modules/m_httpd_acl.cpp
+++ b/src/modules/m_httpd_acl.cpp
@@ -82,7 +82,7 @@ class ModuleHTTPAccessList : public Module
}
}
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "Read ACL: path=%s pass=%s whitelist=%s blacklist=%s", path.c_str(),
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "Read ACL: path=%s pass=%s whitelist=%s blacklist=%s", path.c_str(),
password.c_str(), whitelist.c_str(), blacklist.c_str());
acl_list.push_back(HTTPACL(path, username, password, whitelist, blacklist));
@@ -98,7 +98,7 @@ class ModuleHTTPAccessList : public Module
void BlockAccess(HTTPRequest* http, int returnval, const std::string &extraheaderkey = "", const std::string &extraheaderval="")
{
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "BlockAccess (%d)", returnval);
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "BlockAccess (%d)", returnval);
std::stringstream data("Access to this resource is denied by an access control list. Please contact your IRC administrator.");
HTTPDocumentResponse response(this, *http, &data, returnval);
@@ -112,7 +112,7 @@ class ModuleHTTPAccessList : public Module
{
if (event.id == "httpd_acl")
{
- ServerInstance->Logs->Log("m_http_stats", DEBUG,"Handling httpd acl event");
+ ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd acl event");
HTTPRequest* http = (HTTPRequest*)&event;
for (std::vector<HTTPACL>::const_iterator this_acl = acl_list.begin(); this_acl != acl_list.end(); ++this_acl)
@@ -129,7 +129,7 @@ class ModuleHTTPAccessList : public Module
{
if (InspIRCd::Match(http->GetIP(), entry, ascii_case_insensitive_map))
{
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "Denying access to blacklisted resource %s (matched by pattern %s) from ip %s (matched by entry %s)",
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "Denying access to blacklisted resource %s (matched by pattern %s) from ip %s (matched by entry %s)",
http->GetURI().c_str(), this_acl->path.c_str(), http->GetIP().c_str(), entry.c_str());
BlockAccess(http, 403);
return;
@@ -151,7 +151,7 @@ class ModuleHTTPAccessList : public Module
if (!allow_access)
{
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "Denying access to whitelisted resource %s (matched by pattern %s) from ip %s (Not in whitelist)",
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "Denying access to whitelisted resource %s (matched by pattern %s) from ip %s (Not in whitelist)",
http->GetURI().c_str(), this_acl->path.c_str(), http->GetIP().c_str());
BlockAccess(http, 403);
return;
@@ -160,7 +160,7 @@ class ModuleHTTPAccessList : public Module
if (!this_acl->password.empty() && !this_acl->username.empty())
{
/* Password auth, first look to see if we have a basic authentication header */
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "Checking HTTP auth password for resource %s (matched by pattern %s) from ip %s, against username %s",
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "Checking HTTP auth password for resource %s (matched by pattern %s) from ip %s, against username %s",
http->GetURI().c_str(), this_acl->path.c_str(), http->GetIP().c_str(), this_acl->username.c_str());
if (http->headers->IsSet("Authorization"))
@@ -179,7 +179,7 @@ class ModuleHTTPAccessList : public Module
sep.GetToken(base64);
std::string userpass = Base64ToBin(base64);
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "HTTP authorization: %s (%s)", userpass.c_str(), base64.c_str());
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "HTTP authorization: %s (%s)", userpass.c_str(), base64.c_str());
irc::sepstream userpasspair(userpass, ':');
if (userpasspair.GetToken(user))
@@ -189,7 +189,7 @@ class ModuleHTTPAccessList : public Module
/* Access granted if username and password are correct */
if (user == this_acl->username && pass == this_acl->password)
{
- ServerInstance->Logs->Log("m_httpd_acl", DEBUG, "HTTP authorization: password and username match");
+ ServerInstance->Logs->Log("m_httpd_acl", LOG_DEBUG, "HTTP authorization: password and username match");
return;
}
else
diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp
index a28db34ab..88594e2fe 100644
--- a/src/modules/m_httpd_config.cpp
+++ b/src/modules/m_httpd_config.cpp
@@ -73,7 +73,7 @@ class ModuleHttpConfig : public Module
if (event.id == "httpd_url")
{
- ServerInstance->Logs->Log("m_http_stats", DEBUG,"Handling httpd event");
+ ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd event");
HTTPRequest* http = (HTTPRequest*)&event;
if ((http->GetURI() == "/config") || (http->GetURI() == "/config/"))
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 691fa8163..2eb9f7cb7 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -97,7 +97,7 @@ class ModuleHttpStats : public Module
if (event.id == "httpd_url")
{
- ServerInstance->Logs->Log("m_http_stats", DEBUG,"Handling httpd event");
+ ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd event");
HTTPRequest* http = (HTTPRequest*)&event;
if ((http->GetURI() == "/stats") || (http->GetURI() == "/stats/"))
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 6653cf6c3..f38ad2241 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -144,7 +144,7 @@ class IdentRequestSocket : public EventHandler
virtual void OnConnected()
{
- ServerInstance->Logs->Log("m_ident",DEBUG,"OnConnected()");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"OnConnected()");
ServerInstance->SE->ChangeEventMask(this, FD_WANT_POLL_READ | FD_WANT_NO_WRITE);
char req[32];
@@ -179,7 +179,7 @@ class IdentRequestSocket : public EventHandler
break;
case EVENT_ERROR:
/* fd error event, ohshi- */
- ServerInstance->Logs->Log("m_ident",DEBUG,"EVENT_ERROR");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"EVENT_ERROR");
/* We *must* Close() here immediately or we get a
* huge storm of EVENT_ERROR events!
*/
@@ -196,7 +196,7 @@ class IdentRequestSocket : public EventHandler
*/
if (GetFd() > -1)
{
- ServerInstance->Logs->Log("m_ident",DEBUG,"Close ident socket %d", GetFd());
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"Close ident socket %d", GetFd());
ServerInstance->SE->DelFd(this);
ServerInstance->SE->Close(GetFd());
this->SetFd(-1);
@@ -228,7 +228,7 @@ class IdentRequestSocket : public EventHandler
if (recvresult < 3)
return;
- ServerInstance->Logs->Log("m_ident",DEBUG,"ReadResponse()");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"ReadResponse()");
/* Truncate at the first null character, but first make sure
* there is at least one null char (at the end of the buffer).
@@ -316,7 +316,7 @@ class ModuleIdent : public Module
}
catch (ModuleException &e)
{
- ServerInstance->Logs->Log("m_ident",DEBUG,"Ident exception: %s", e.GetReason());
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"Ident exception: %s", e.GetReason());
}
}
@@ -330,11 +330,11 @@ class ModuleIdent : public Module
IdentRequestSocket *isock = ext.get(user);
if (!isock)
{
- ServerInstance->Logs->Log("m_ident",DEBUG, "No ident socket :(");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "No ident socket :(");
return MOD_RES_PASSTHRU;
}
- ServerInstance->Logs->Log("m_ident",DEBUG, "Has ident_socket");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Has ident_socket");
time_t compare = isock->age;
compare += RequestTimeout;
@@ -344,16 +344,16 @@ class ModuleIdent : public Module
{
/* Ident timeout */
user->WriteServ("NOTICE Auth :*** Ident request timed out.");
- ServerInstance->Logs->Log("m_ident",DEBUG, "Timeout");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Timeout");
}
else if (!isock->HasResult())
{
// time still good, no result yet... hold the registration
- ServerInstance->Logs->Log("m_ident",DEBUG, "No result yet");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "No result yet");
return MOD_RES_DENY;
}
- ServerInstance->Logs->Log("m_ident",DEBUG, "Yay, result!");
+ ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Yay, result!");
/* wooo, got a result (it will be good, or bad) */
if (isock->result.empty())
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index b59d278db..f4cd13a85 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -305,7 +305,7 @@ class ModuleNationalChars : public Module
std::ifstream ifs(filename.c_str());
if (ifs.fail())
{
- ServerInstance->Logs->Log("m_nationalchars",DEFAULT,"loadtables() called for missing file: %s", filename.c_str());
+ ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for missing file: %s", filename.c_str());
return;
}
@@ -320,7 +320,7 @@ class ModuleNationalChars : public Module
{
if (loadtable(ifs, tables[n], 255) && (n < faillimit))
{
- ServerInstance->Logs->Log("m_nationalchars",DEFAULT,"loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1);
+ ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1);
return;
}
}
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index 03984618b..b39c4fe58 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -61,7 +61,7 @@ class ModuleOperLog : public Module
if (!parameters.empty())
line = irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined();
std::string msg = "[" + user->GetFullRealHost() + "] " + command + " " + line;
- ServerInstance->Logs->Log("m_operlog", DEFAULT, "OPERLOG: " + msg);
+ ServerInstance->Logs->Log("m_operlog", LOG_DEFAULT, "OPERLOG: " + msg);
if (tosnomask)
ServerInstance->SNO->WriteGlobalSno('r', msg);
}
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index b12b9bbeb..27026bde9 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -44,7 +44,7 @@ static bool WriteDatabase()
f = fopen(tempname.c_str(), "w");
if (!f)
{
- ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot create database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot create database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot create new db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -95,7 +95,7 @@ static bool WriteDatabase()
write_error |= fclose(f);
if (write_error)
{
- ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot write to new database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot write to new database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -103,7 +103,7 @@ static bool WriteDatabase()
#ifdef _WIN32
if (remove(permchannelsconf.c_str()))
{
- ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot remove old database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot remove old database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno);
return false;
}
@@ -111,7 +111,7 @@ static bool WriteDatabase()
// Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
if (rename(tempname.c_str(), permchannelsconf.c_str()) < 0)
{
- ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot move new to old database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot move new to old database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -229,7 +229,7 @@ public:
if (channel.empty())
{
- ServerInstance->Logs->Log("m_permchannels", DEBUG, "Malformed permchannels tag with empty channel name.");
+ ServerInstance->Logs->Log("m_permchannels", LOG_DEBUG, "Malformed permchannels tag with empty channel name.");
continue;
}
@@ -250,7 +250,7 @@ public:
*/
c->topicset = 42;
}
- ServerInstance->Logs->Log("m_permchannels", DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str());
+ ServerInstance->Logs->Log("m_permchannels", LOG_DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str());
if (modes.empty())
continue;
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index e2acb6af1..4d59c34ba 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -121,7 +121,7 @@ class ModuleRedirect : public Module
if (UseUsermode)
{
/* Log noting that this breaks compatability. */
- ServerInstance->Logs->Log("m_redirect", DEFAULT, "REDIRECT: Enabled usermode +L. This breaks linking with servers that do not have this enabled. This is disabled by default in the 2.0 branch but will be enabled in the next version.");
+ ServerInstance->Logs->Log("m_redirect", LOG_DEFAULT, "REDIRECT: Enabled usermode +L. This breaks linking with servers that do not have this enabled. This is disabled by default in the 2.0 branch but will be enabled in the next version.");
/* Try to add the usermode */
ServerInstance->Modules->AddService(re_u);
diff --git a/src/modules/m_ripemd160.cpp b/src/modules/m_ripemd160.cpp
index 9cbd0c69b..e487d6e30 100644
--- a/src/modules/m_ripemd160.cpp
+++ b/src/modules/m_ripemd160.cpp
@@ -164,7 +164,7 @@ class RIProv : public HashProvider
{
if (key)
{
- ServerInstance->Logs->Log("m_ripemd160.so", DEBUG, "initialize with custom mdbuf");
+ ServerInstance->Logs->Log("m_ripemd160.so", LOG_DEBUG, "initialize with custom mdbuf");
MDbuf[0] = key[0];
MDbuf[1] = key[1];
MDbuf[2] = key[2];
@@ -173,7 +173,7 @@ class RIProv : public HashProvider
}
else
{
- ServerInstance->Logs->Log("m_ripemd160.so", DEBUG, "initialize with default mdbuf");
+ ServerInstance->Logs->Log("m_ripemd160.so", LOG_DEBUG, "initialize with default mdbuf");
MDbuf[0] = 0x67452301UL;
MDbuf[1] = 0xefcdab89UL;
MDbuf[2] = 0x98badcfeUL;
@@ -414,7 +414,7 @@ class RIProv : public HashProvider
byte *RMD(byte *message, dword length, unsigned int* key)
{
- ServerInstance->Logs->Log("m_ripemd160", DEBUG, "RMD: '%s' length=%u", (const char*)message, length);
+ ServerInstance->Logs->Log("m_ripemd160", LOG_DEBUG, "RMD: '%s' length=%u", (const char*)message, length);
dword MDbuf[RMDsize/32]; /* contains (A, B, C, D(E)) */
static byte hashcode[RMDsize/8]; /* for final hash-value */
dword X[16]; /* current 16-word chunk */
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 0f2f9022e..ff007f799 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -112,7 +112,7 @@ class SaslAuthenticator
case SASL_DONE:
break;
default:
- ServerInstance->Logs->Log("m_sasl", DEFAULT, "WTF: SaslState is not a known state (%d)", this->state);
+ ServerInstance->Logs->Log("m_sasl", LOG_DEFAULT, "WTF: SaslState is not a known state (%d)", this->state);
break;
}
@@ -220,7 +220,7 @@ class CommandSASL : public Command
User* target = ServerInstance->FindNick(parameters[1]);
if ((!target) || (IS_SERVER(target)))
{
- ServerInstance->Logs->Log("m_sasl", DEBUG,"User not found in sasl ENCAP event: %s", parameters[1].c_str());
+ ServerInstance->Logs->Log("m_sasl", LOG_DEBUG,"User not found in sasl ENCAP event: %s", parameters[1].c_str());
return CMD_FAILURE;
}
@@ -266,7 +266,7 @@ class ModuleSASL : public Module
ServerInstance->Modules->AddServices(providelist, 3);
if (!ServerInstance->Modules->Find("m_services_account.so") || !ServerInstance->Modules->Find("m_cap.so"))
- ServerInstance->Logs->Log("m_sasl", DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
+ ServerInstance->Logs->Log("m_sasl", LOG_DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
}
void OnRehash(User*)
diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp
index 92f2bc8f4..32bdb3df8 100644
--- a/src/modules/m_spanningtree/compat.cpp
+++ b/src/modules/m_spanningtree/compat.cpp
@@ -29,7 +29,7 @@ void TreeSocket::WriteLine(std::string line)
{
if (line[0] != ':')
{
- ServerInstance->Logs->Log("m_spanningtree", DEFAULT, "Sending line without server prefix!");
+ ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Sending line without server prefix!");
line = ":" + ServerInstance->Config->GetSID() + " " + line;
}
if (proto_version != ProtocolVersion)
@@ -42,7 +42,7 @@ void TreeSocket::WriteLine(std::string line)
}
}
- ServerInstance->Logs->Log("m_spanningtree", RAWIO, "S[%d] O %s", this->GetFd(), line.c_str());
+ ServerInstance->Logs->Log("m_spanningtree", LOG_RAWIO, "S[%d] O %s", this->GetFd(), line.c_str());
this->WriteData(line);
this->WriteData(newline);
}
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index a90c62924..29ee9244c 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -70,7 +70,7 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
if (!TS)
{
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
ServerInstance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FJOIN with a TS of zero. Total craq. Command was dropped.", srcuser->server.c_str());
return CMD_INVALID;
}
@@ -152,7 +152,7 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
ModeHandler *mh = ServerInstance->Modes->FindMode(*unparsedmodes, MODETYPE_CHANNEL);
if (!mh)
{
- ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Unrecognised mode %c, dropping link", *unparsedmodes);
+ ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Unrecognised mode %c, dropping link", *unparsedmodes);
return CMD_INVALID;
}
@@ -181,7 +181,7 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
}
else
{
- ServerInstance->Logs->Log("m_spanningtree",SPARSE, "Ignored nonexistant user %s in fjoin to %s (probably quit?)", usr, channel.c_str());
+ ServerInstance->Logs->Log("m_spanningtree",LOG_SPARSE, "Ignored nonexistant user %s in fjoin to %s (probably quit?)", usr, channel.c_str());
continue;
}
}
diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp
index c1e452db6..5dd77c360 100644
--- a/src/modules/m_spanningtree/fmode.cpp
+++ b/src/modules/m_spanningtree/fmode.cpp
@@ -72,7 +72,7 @@ CmdResult CommandFMode::Handle(const std::vector<std::string>& params, User *who
if (!TS)
{
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
ServerInstance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FMODE with a TS of zero. Total craq. Mode was dropped.", sourceserv.c_str());
return CMD_INVALID;
}
diff --git a/src/modules/m_spanningtree/hmac.cpp b/src/modules/m_spanningtree/hmac.cpp
index 65b3a5997..8dc18cbbd 100644
--- a/src/modules/m_spanningtree/hmac.cpp
+++ b/src/modules/m_spanningtree/hmac.cpp
@@ -65,7 +65,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
return "AUTH:" + BinToBase64(sha256->hmac(password, challenge));
if (!challenge.empty() && !sha256)
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_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/main.cpp b/src/modules/m_spanningtree/main.cpp
index efd899c44..9aee4a4ce 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -758,7 +758,7 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
if (loopCall)
return; // Don't generate a REHASH here if we're in the middle of processing a message that generated this one
- ServerInstance->Logs->Log("remoterehash", DEBUG, "called with param %s", parameter.c_str());
+ ServerInstance->Logs->Log("remoterehash", LOG_DEBUG, "called with param %s", parameter.c_str());
// Send out to other servers
if (!parameter.empty() && parameter[0] != '-')
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index 69f088f65..5c69aef16 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -38,7 +38,7 @@ const std::string ModuleSpanningTree::MapOperInfo(TreeServer* Current)
void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int &line, char* names, int &maxnamew, char* stats)
{
- ServerInstance->Logs->Log("map",DEBUG,"ShowMap depth %d on line %d", depth, line);
+ ServerInstance->Logs->Log("map",LOG_DEBUG,"ShowMap depth %d on line %d", depth, line);
float percent;
if (ServerInstance->Users->clientlist->size() == 0)
@@ -174,7 +174,7 @@ bool ModuleSpanningTree::HandleMap(const std::vector<std::string>& parameters, U
float avg_users = totusers * 1.0 / line;
- ServerInstance->Logs->Log("map",DEBUG,"local");
+ ServerInstance->Logs->Log("map",LOG_DEBUG,"local");
for (int t = 0; t < line; t++)
{
// terminate the string at maxnamew characters
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index 471bbfcb9..b91435eee 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -73,7 +73,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
TreeServer* sdest = FindServer(routing.serverdest);
if (!sdest)
{
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Trying to route ENCAP to nonexistant server %s",
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Trying to route ENCAP to nonexistant server %s",
routing.serverdest.c_str());
return;
}
@@ -88,7 +88,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
if (!(ver.Flags & (VF_COMMON | VF_CORE)) && srcmodule != Creator)
{
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Routed command %s from non-VF_COMMON module %s",
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Routed command %s from non-VF_COMMON module %s",
command.c_str(), srcmodule->ModuleSourceFile.c_str());
return;
}
diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp
index d7c4c5227..671300111 100644
--- a/src/modules/m_spanningtree/resolvers.cpp
+++ b/src/modules/m_spanningtree/resolvers.cpp
@@ -107,6 +107,6 @@ void SecurityIPResolver::OnError(ResolverError e, const std::string &errormessag
ServerInstance->AddResolver(res, cached);
return;
}
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Could not resolve IP associated with Link '%s': %s",
+ ServerInstance->Logs->Log("m_spanningtree",LOG_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 e6cec5cb4..d266b31f4 100644
--- a/src/modules/m_spanningtree/server.cpp
+++ b/src/modules/m_spanningtree/server.cpp
@@ -237,7 +237,7 @@ bool TreeSocket::Inbound_Server(parameterlist &params)
}
/* Check for fully initialized instances of the server by id */
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Looking for dupe SID %s", sid.c_str());
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"Looking for dupe SID %s", sid.c_str());
CheckDupe = Utils->FindServerID(sid);
if (CheckDupe)
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 493b05ebf..6213483ee 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -70,7 +70,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, std::string Name, std::strin
long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000);
this->StartBurst = ts;
- ServerInstance->Logs->Log("m_spanningtree",DEBUG, "Started bursting at time %lu", ts);
+ ServerInstance->Logs->Log("m_spanningtree",LOG_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)
@@ -158,7 +158,7 @@ void TreeServer::FinishBurst()
void TreeServer::SetID(const std::string &id)
{
- ServerInstance->Logs->Log("m_spanningtree",DEBUG, "Setting SID to " + id);
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG, "Setting SID to " + id);
sid = id;
Utils->sidlist[sid] = this;
}
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 6582ba060..26171ee72 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -158,7 +158,7 @@ void TreeSocket::SendError(const std::string &errormessage)
void TreeSocket::SquitServer(std::string &from, TreeServer* Current, int& num_lost_servers, int& num_lost_users)
{
std::string servername = Current->GetName();
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"SquitServer for %s from %s",
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"SquitServer for %s from %s",
servername.c_str(), from.c_str());
/* recursively squit the servers attached to 'Current'.
* We're going backwards so we don't remove users
@@ -220,7 +220,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
}
}
else
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Squit from unknown server");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_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 bcf4cee12..e2eb31f0d 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -84,7 +84,7 @@ void TreeSocket::ProcessLine(std::string &line)
std::string command;
parameterlist params;
- ServerInstance->Logs->Log("m_spanningtree", RAWIO, "S[%d] I %s", this->GetFd(), line.c_str());
+ ServerInstance->Logs->Log("m_spanningtree", LOG_RAWIO, "S[%d] I %s", this->GetFd(), line.c_str());
Split(line, prefix, command, params);
@@ -259,7 +259,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
}
else
{
- ServerInstance->Logs->Log("m_spanningtree", DEBUG, "Command '%s' from unknown prefix '%s'! Dropping entire command.",
+ ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Command '%s' from unknown prefix '%s'! Dropping entire command.",
command.c_str(), prefix.c_str());
return;
}
@@ -290,7 +290,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
if ((!route_back_again) || (route_back_again->GetSocket() != this))
{
if (route_back_again)
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"Protocol violation: Fake direction '%s' from connection '%s'",
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"Protocol violation: Fake direction '%s' from connection '%s'",
prefix.c_str(),linkID.c_str());
return;
}
@@ -459,7 +459,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
if (!cmd)
{
irc::stringjoiner pmlist(" ", params, 0, params.size() - 1);
- ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Unrecognised S2S command :%s %s %s",
+ ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Unrecognised S2S command :%s %s %s",
who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str());
SendError("Unrecognised command '" + command + "' -- possibly loaded mismatched modules");
return;
@@ -468,7 +468,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
if (params.size() < cmd->min_params)
{
irc::stringjoiner pmlist(" ", params, 0, params.size() - 1);
- ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Insufficient parameters for S2S command :%s %s %s",
+ ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Insufficient parameters for S2S command :%s %s %s",
who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str());
SendError("Insufficient parameters for command '" + command + "'");
return;
@@ -487,7 +487,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
if (res == CMD_INVALID)
{
irc::stringjoiner pmlist(" ", params, 0, params.size() - 1);
- ServerInstance->Logs->Log("m_spanningtree", SPARSE, "Error handling S2S command :%s %s %s",
+ ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Error handling S2S command :%s %s %s",
who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str());
SendError("Error handling '" + command + "' -- possibly loaded mismatched modules");
}
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 3f73d8ee8..d6bded5e5 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -65,7 +65,7 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
* Nick collision.
*/
int collide = sock->DoCollision(iter->second, age_t, params[5], params[6], params[0]);
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s, collide=%d", params[2].c_str(), collide);
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"*** Collision on %s, collide=%d", params[2].c_str(), collide);
if (collide != 1)
{
@@ -88,7 +88,7 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
}
catch (...)
{
- ServerInstance->Logs->Log("m_spanningtree", DEFAULT, "Duplicate UUID %s in client introduction", params[0].c_str());
+ ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Duplicate UUID %s in client introduction", params[0].c_str());
return CMD_INVALID;
}
(*(ServerInstance->Users->clientlist))[params[2]] = _new;
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 13d188432..1517ac1b9 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -132,7 +132,7 @@ TreeServer* SpanningTreeUtilities::FindServerID(const std::string &id)
SpanningTreeUtilities::SpanningTreeUtilities(ModuleSpanningTree* C) : Creator(C)
{
- ServerInstance->Logs->Log("m_spanningtree",DEBUG,"***** Using SID for hash: %s *****", ServerInstance->Config->GetSID().c_str());
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"***** Using SID for hash: %s *****", ServerInstance->Config->GetSID().c_str());
this->TreeRoot = new TreeServer(this, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc, ServerInstance->Config->GetSID());
this->ReadConfiguration();
@@ -298,7 +298,7 @@ void SpanningTreeUtilities::RefreshIPCache()
Link* L = *i;
if (!L->Port)
{
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"m_spanningtree: Ignoring a link block without a port.");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"m_spanningtree: Ignoring a link block without a port.");
/* Invalid link block */
continue;
}
@@ -389,11 +389,11 @@ void SpanningTreeUtilities::ReadConfiguration()
if (L->IPAddr.empty())
{
L->IPAddr = "*";
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want.");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want.");
}
if (!L->Port)
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no port defined, you will not be able to /connect it.");
+ ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no port defined, you will not be able to /connect it.");
L->Fingerprint.erase(std::remove(L->Fingerprint.begin(), L->Fingerprint.end(), ':'), L->Fingerprint.end());
LinkBlocks.push_back(L);
diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp
index 4e8126dbf..881b8d6d2 100644
--- a/src/modules/m_sqloper.cpp
+++ b/src/modules/m_sqloper.cpp
@@ -48,7 +48,7 @@ class OpMeQuery : public SQLQuery
void OnResult(SQLResult& res)
{
- ServerInstance->Logs->Log("m_sqloper",DEBUG, "SQLOPER: result for %s", uid.c_str());
+ ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: result for %s", uid.c_str());
User* user = ServerInstance->FindNick(uid);
if (!user)
return;
@@ -60,14 +60,14 @@ class OpMeQuery : public SQLQuery
if (OperUser(user, row[0], row[1]))
return;
}
- ServerInstance->Logs->Log("m_sqloper",DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
+ ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
// nobody succeeded... fall back to OPER
fallback();
}
void OnError(SQLerror& error)
{
- ServerInstance->Logs->Log("m_sqloper",DEFAULT, "SQLOPER: query failed (%s)", error.Str());
+ ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: query failed (%s)", error.Str());
fallback();
}
@@ -88,7 +88,7 @@ class OpMeQuery : public SQLQuery
}
else
{
- ServerInstance->Logs->Log("m_sqloper",SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
+ ServerInstance->Logs->Log("m_sqloper",LOG_SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
}
}
@@ -97,7 +97,7 @@ class OpMeQuery : public SQLQuery
OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + type);
if (iter == ServerInstance->Config->oper_blocks.end())
{
- ServerInstance->Logs->Log("m_sqloper",DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
+ ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
return false;
}
OperInfo* ifo = iter->second;
@@ -159,7 +159,7 @@ public:
/* Query is in progress, it will re-invoke OPER if needed */
return MOD_RES_DENY;
}
- ServerInstance->Logs->Log("m_sqloper",DEFAULT, "SQLOPER: database not present");
+ ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: database not present");
}
return MOD_RES_PASSTHRU;
}
diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp
index 3e8a846e7..3194f6e9b 100644
--- a/src/modules/m_topiclock.cpp
+++ b/src/modules/m_topiclock.cpp
@@ -47,7 +47,7 @@ class CommandSVSTOPIC : public Command
time_t topicts = ConvToInt(parameters[1]);
if (!topicts)
{
- ServerInstance->Logs->Log("m_topiclock", DEFAULT, "Received SVSTOPIC with a 0 topicts, dropped.");
+ ServerInstance->Logs->Log("m_topiclock", LOG_DEFAULT, "Received SVSTOPIC with a 0 topicts, dropped.");
return CMD_INVALID;
}
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index ced9bfd93..0c23527ee 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -93,17 +93,17 @@ class ModuleXLineDB : public Module
* Technically, that means that this can block, but I have *never* seen that.
* -- w00t
*/
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Opening temporary database");
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Opening temporary database");
std::string xlinenewdbpath = xlinedbpath + ".new";
f = fopen(xlinenewdbpath.c_str(), "w");
if (!f)
{
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot create new db: %s (%d)", strerror(errno), errno);
return false;
}
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Opened. Writing..");
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Opened. Writing..");
/*
* Now, much as I hate writing semi-unportable formats, additional
@@ -130,14 +130,14 @@ class ModuleXLineDB : public Module
}
}
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Finished writing XLines. Checking for error..");
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Finished writing XLines. Checking for error..");
int write_error = 0;
write_error = ferror(f);
write_error |= fclose(f);
if (write_error)
{
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot write to new database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot write to new database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -145,7 +145,7 @@ class ModuleXLineDB : public Module
#ifdef _WIN32
if (remove(xlinedbpath.c_str()))
{
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot remove old database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot remove old database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno);
return false;
}
@@ -153,7 +153,7 @@ class ModuleXLineDB : public Module
// Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0)
{
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -177,7 +177,7 @@ class ModuleXLineDB : public Module
else
{
/* this might be slightly more problematic. */
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot read database! %s (%d)", strerror(errno), errno);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot read database! %s (%d)", strerror(errno), errno);
ServerInstance->SNO->WriteToSnoMask('a', "database: cannot read db: %s (%d)", strerror(errno), errno);
return false;
}
@@ -209,18 +209,18 @@ class ModuleXLineDB : public Module
items++;
}
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Processing %s", linebuf);
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Processing %s", linebuf);
if (command_p[0] == "VERSION")
{
if (command_p[1] == "1")
{
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Reading db version %s", command_p[1].c_str());
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Reading db version %s", command_p[1].c_str());
}
else
{
fclose(f);
- ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: I got database version %s - I don't understand it", command_p[1].c_str());
+ ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: I got database version %s - I don't understand it", command_p[1].c_str());
ServerInstance->SNO->WriteToSnoMask('a', "database: I got a database version (%s) I don't understand", command_p[1].c_str());
return false;
}