diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configreader.cpp | 8 | ||||
-rw-r--r-- | src/users.cpp | 14 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index bdc84de0b..56ea49289 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -612,11 +612,13 @@ void ServerConfig::Read(bool bail, userrec* user) {"connect", {"allow", "deny", "password", "timeout", "pingfreq", "flood", - "threshold", "sendq", "recvq", "localmax", "globalmax", NULL}, + "threshold", "sendq", "recvq", "localmax", "globalmax", "port", + NULL}, {"", "", "", "", "120", "", - "", "", "", "3", "3", NULL}, + "", "", "", "3", "3", "0", + NULL}, {DT_CHARPTR, DT_CHARPTR, DT_CHARPTR, DT_INTEGER, DT_INTEGER, DT_INTEGER, - DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER}, + DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER}, InitConnect, DoConnect, DoneConnect}, {"uline", 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; } |