summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/modules/m_dnsbl.cpp9
2 files changed, 5 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index a8b76b182..c66b6730a 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -573,7 +573,6 @@ void ServerConfig::Read(bool bail, userrec* user)
{
static char debug[MAXBUF]; /* Temporary buffer for debugging value */
static char maxkeep[MAXBUF]; /* Temporary buffer for WhoWasMaxKeep value */
- static char somax[MAXBUF]; /* Temporary buffer for SOMAXCONN default */
int rem = 0, add = 0; /* Number of modules added, number of modules removed */
std::ostringstream errstr; /* String stream containing the error output */
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 351ef688f..03b691ece 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -94,11 +94,12 @@ class DNSBLResolver : public Resolver
if (bitmask != 0)
{
std::string reason = ConfEntry->reason;
-
- std::string::size_type pos;
- while ((pos = reason.find("%ip%")) != std::string::npos)
+ std::string::size_type x = reason.find("%ip%");
+ while (x != std::string::npos)
{
- reason.replace(pos, 4, them->GetIPString());
+ reason.erase(x, 4);
+ reason.insert(x, "%ip%");
+ x = reason.find("%ip%");
}
ServerInstance->WriteOpers("*** Connecting user %s detected as being on a DNS blacklist (%s) with result %d", them->GetFullRealHost(), ConfEntry->name.c_str(), bitmask);