summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-15 11:42:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-15 11:42:42 +0000
commitb1d06ea1d3a4a11a8253e0d81c832cb54c3c0946 (patch)
tree9de714767362b63ce90fdfad1ffe37d81437e221 /include
parente72a125ccd9ded9f986713b19b919f28fa71c035 (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')
-rw-r--r--include/configreader.h6
-rw-r--r--include/users.h14
2 files changed, 14 insertions, 6 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 499761449..514e5e9b3 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -151,9 +151,9 @@ struct InitialConfig
struct MultiConfig
{
const char* tag;
- char* items[12];
- char* items_default[12];
- int datatype[12];
+ char* items[13];
+ char* items_default[13];
+ int datatype[13];
MultiNotify init_function;
MultiValidator validation_function;
MultiNotify finish_function;
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()