summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp9
1 files changed, 5 insertions, 4 deletions
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);