From b1d06ea1d3a4a11a8253e0d81c832cb54c3c0946 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 15 Apr 2007 11:42:42 +0000 Subject: 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 --- include/users.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/users.h') 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() -- cgit v1.2.3