From 774b4a74db29cfd0e69d2a3272b7a8663a17cc0e Mon Sep 17 00:00:00 2001 From: peavey Date: Thu, 28 Dec 2006 14:22:05 +0000 Subject: Tidyup and is now a vendor module. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6134 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_dnsbl.cpp | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 6338b3e89..03653350f 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -189,7 +189,7 @@ class ModuleDNSBL : public Module virtual Version GetVersion() { - return Version(2, 0, 0, 0, 0, API_VERSION); + return Version(2, 0, 0, 1, VF_VENDOR, API_VERSION); } void Implements(char* List) @@ -197,7 +197,8 @@ class ModuleDNSBL : public Module List[I_OnRehash] = List[I_OnUserRegister] = 1; } - + /** Clear entries and free the mem it was using + */ void ClearEntries() { std::vector::iterator i; @@ -206,12 +207,9 @@ class ModuleDNSBL : public Module DNSBLConfEntries.erase(i); delete *i; } - } - - /* - * Fill our conf vector with data + /** Fill our conf vector with data */ virtual void ReadConf() { @@ -265,8 +263,7 @@ class ModuleDNSBL : public Module delete MyConf; } - - + virtual void OnRehash(const std::string ¶meter) { ReadConf(); @@ -299,30 +296,6 @@ class ModuleDNSBL : public Module snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a); reversedip = std::string(reversedipbuf); -/* - this is satmd's old code - std::string reversedip; - std::string userip = user->GetIPString(); - std::string tempip = userip; - - // reversedip will created in there - while (tempip.length()>0) - { - unsigned int lastdot=tempip.rfind("."); - if (lastdot == std::string::npos) - { - reversedip+=tempip; - tempip.clear(); - } - else - { - reversedip += tempip.substr(lastdot+1,tempip.length()-lastdot+1); - reversedip += "."; - tempip.resize(lastdot); - } - } -*/ - // For each DNSBL, we will run through this lookup for (std::vector::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++) { @@ -367,4 +340,3 @@ extern "C" void * init_module( void ) { return new ModuleDNSBLFactory; } - -- cgit v1.2.3