diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-28 14:22:05 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-28 14:22:05 +0000 |
commit | 774b4a74db29cfd0e69d2a3272b7a8663a17cc0e (patch) | |
tree | 7280fa8ee38604aa0203f2cb6d5577db70519d36 /src | |
parent | 6690e9ca3ae715940f9c467ea27cb70a3c16effe (diff) |
Tidyup and is now a vendor module.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6134 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 38 |
1 files 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<DNSBLConfEntry *>::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<DNSBLConfEntry *>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++) { @@ -367,4 +340,3 @@ extern "C" void * init_module( void ) { return new ModuleDNSBLFactory; } - |