summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-09-29 12:02:41 +0100
committerSadie Powell <sadie@witchery.services>2020-09-29 12:02:41 +0100
commitf5a716a70b4620d0610c69cbdcd2859199568755 (patch)
treed17a43a9a4ffddfb9801d16482e022d632536060
parent9bc09ed02e504139cdcb7343d54aa5103b851b16 (diff)
Fix the dnsbl module config not being checked case insensitively.
-rw-r--r--src/modules/m_dnsbl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 32e05aebd..267bb892e 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -253,17 +253,16 @@ class ModuleDNSBL : public Module, public Stats::EventListener
*/
DNSBLConfEntry::EnumBanaction str2banaction(const std::string &action)
{
- if(action.compare("KILL")==0)
+ if (stdalgo::string::equalsci(action, "kill"))
return DNSBLConfEntry::I_KILL;
- if(action.compare("KLINE")==0)
+ if (stdalgo::string::equalsci(action, "kline"))
return DNSBLConfEntry::I_KLINE;
- if(action.compare("ZLINE")==0)
+ if (stdalgo::string::equalsci(action, "zline"))
return DNSBLConfEntry::I_ZLINE;
- if(action.compare("GLINE")==0)
+ if (stdalgo::string::equalsci(action, "gline"))
return DNSBLConfEntry::I_GLINE;
- if(action.compare("MARK")==0)
+ if (stdalgo::string::equalsci(action, "mark"))
return DNSBLConfEntry::I_MARK;
-
return DNSBLConfEntry::I_UNKNOWN;
}
public: