From ee465c20b6841bce724fa5e1402b1c9ee60b788e Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 1 Aug 2009 21:22:50 +0000 Subject: Check that the block actually specifies a host before checking whether the user matches it. Allows for blocks on other criteria, like ports - fixes bug #797. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11449 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/users.cpp b/src/users.cpp index 58948e21f..2871653bb 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1865,7 +1865,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name) } /* check if host matches.. */ - if (!InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && + if (c->GetHost().length() && !InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && !InspIRCd::MatchCIDR(this->host, c->GetHost(), NULL)) { ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "No host match (for %s)", c->GetHost().c_str()); -- cgit v1.2.3