From de25d946733f774e3a5b53a58438a9c92af0acbe Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 3 Oct 2009 01:52:59 +0000 Subject: Get rid of a bunch of memory-wasting C-style strings git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_dnsbl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_dnsbl.cpp') diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index cb32ede78..73d5316b5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -125,7 +125,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_KLINE: { - KLine* kl = new KLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + KLine* kl = new KLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(kl,NULL)) { @@ -139,7 +139,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_GLINE: { - GLine* gl = new GLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + GLine* gl = new GLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(gl,NULL)) { @@ -153,7 +153,7 @@ class DNSBLResolver : public Resolver } case DNSBLConfEntry::I_ZLINE: { - ZLine* zl = new ZLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName, reason.c_str(), + ZLine* zl = new ZLine(ServerInstance->Time(), ConfEntry->duration, ServerInstance->Config->ServerName.c_str(), reason.c_str(), them->GetIPString()); if (ServerInstance->XLines->AddLine(zl,NULL)) { @@ -378,12 +378,12 @@ class ModuleDNSBL : public Module total_hits += (*i)->stats_hits; total_misses += (*i)->stats_misses; - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " + + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS DNSbl \"" + (*i)->name + "\" had " + ConvToStr((*i)->stats_hits) + " hits and " + ConvToStr((*i)->stats_misses) + " misses"); } - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits)); - results.push_back(std::string(ServerInstance->Config->ServerName) + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses)); + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS Total hits: " + ConvToStr(total_hits)); + results.push_back(std::string(ServerInstance->Config->ServerName.c_str()) + " 304 " + user->nick + " :DNSBLSTATS Total misses: " + ConvToStr(total_misses)); return MOD_RES_PASSTHRU; } -- cgit v1.2.3