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 /include/users.h | |
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 'include/users.h')
-rw-r--r-- | include/users.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/users.h b/include/users.h index d9a5168cc..80d9fb00c 100644 --- a/include/users.h +++ b/include/users.h @@ -116,6 +116,9 @@ class ConnectClass : public classbase /** Global max when connecting by this connection class */ unsigned long maxglobal; + /** Port number this connect class applies to + */ + int port; public: @@ -138,15 +141,15 @@ public: */ ConnectClass(unsigned int timeout, unsigned int fld, const std::string &hst, unsigned int ping, const std::string &pas, unsigned int thres, unsigned long sendq, unsigned long recvq, - unsigned long maxl, unsigned long maxg) : + unsigned long maxl, unsigned long maxg, int p = 0) : type(CC_ALLOW), registration_timeout(timeout), flood(fld), host(hst), pingtime(ping), pass(pas), - threshold(thres), sendqmax(sendq), recvqmax(recvq), maxlocal(maxl), maxglobal(maxg) { } + threshold(thres), sendqmax(sendq), recvqmax(recvq), maxlocal(maxl), maxglobal(maxg), port(p) { } /** Create a new connect class to DENY connections * @param hst The IP mask to deny */ ConnectClass(const std::string &hst) : type(CC_DENY), registration_timeout(0), flood(0), host(hst), pingtime(0), - pass(""), threshold(0), sendqmax(0), recvqmax(0), maxlocal(0), maxglobal(0) { } + pass(""), threshold(0), sendqmax(0), recvqmax(0), maxlocal(0), maxglobal(0), port(0) { } /** Returns the type, CC_ALLOW or CC_DENY */ @@ -176,6 +179,11 @@ public: return host; } + int GetPort() + { + return port; + } + /** Returns the ping frequency */ unsigned int GetPingTime() |