summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-23 16:40:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-23 16:40:09 +0000
commitde3978c580edabe667d0845ed6027c9ff25e461b (patch)
tree1d49d99735e1b3ef50a5b42bee950e534ccabdf0 /src/modules/m_dnsbl.cpp
parente04f190f6377e76d2f3c5b0ece40507f19531ae7 (diff)
Fix bug in m_dnsbl, a condition is always matched because someone was using unsigned int to check a return val that can be -1 *slap w00t*
Change around the way exit codes are formed so that we can return a sensible exit code that reflects why inspircd exited git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6076 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index b4d993703..cf089584d 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -71,7 +71,8 @@ class DNSBLResolver : public Resolver
while(tmp.length()>0)
{
std::string octet;
- unsigned int lastdot = tmp.rfind(".");
+ /* Fix by brain, npos is -1, so unsigned int will never match */
+ std::string::size_type lastdot = tmp.rfind(".");
if (lastdot == std::string::npos)
{