diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-15 11:42:42 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-15 11:42:42 +0000 |
commit | b1d06ea1d3a4a11a8253e0d81c832cb54c3c0946 (patch) | |
tree | 9de714767362b63ce90fdfad1ffe37d81437e221 /src/users.cpp | |
parent | e72a125ccd9ded9f986713b19b919f28fa71c035 (diff) |
Feature request outlined in bug #257, allow connect/allow lines by port
Needs QA test
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6798 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 1f8a62eec..43ca8ec9f 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1811,8 +1811,18 @@ ConnectClass* userrec::GetClass() { for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) { - if ((match(this->GetIPString(),i->GetHost().c_str(),true)) || (match(this->host,i->GetHost().c_str()))) - return &(*i); + if (((match(this->GetIPString(),i->GetHost().c_str(),true)) || (match(this->host,i->GetHost().c_str())))) + { + if (i->GetPort()) + { + if (this->GetPort() == i->GetPort()) + return &(*i); + else + return NULL; + } + else + return &(*i); + } } return NULL; } |