summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-01 21:22:50 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-08-01 21:22:50 +0000
commitee465c20b6841bce724fa5e1402b1c9ee60b788e (patch)
tree3d0b39465c7ef975958a5d834947ac858777e40c /src/users.cpp
parent60a68720211304bb62936be68e8ad40f58ca8a85 (diff)
Check that the <connect> block actually specifies a host before checking whether the user matches it. Allows for <connect> 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
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp2
1 files changed, 1 insertions, 1 deletions
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());