summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-09-07 12:04:25 -0400
committerAdam <Adam@anope.org>2012-09-07 12:04:25 -0400
commit9d6626f70ce866e2e98ce7ce607695b14a8375b7 (patch)
treef9cf4e1bb295d4707be097898c4544101fcd7340 /include
parent5c07863ad503edfc8deb1dee38e6222602db54fd (diff)
Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session
Diffstat (limited to 'include')
-rw-r--r--include/config.h3
-rw-r--r--include/sockets.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 775f03aa8..d9ec11abd 100644
--- a/include/config.h
+++ b/include/config.h
@@ -659,6 +659,9 @@ class CoreExport ServerConfig
unsigned MaxSessionLimit;
/* How long session akills should last */
time_t SessionAutoKillExpiry;
+ /* Number of bits to use when comparing session IPs */
+ unsigned SessionIPv4CIDR;
+ unsigned SessionIPv6CIDR;
/* Reason to use for session kills */
Anope::string SessionLimitExceeded;
/* Optional second reason */
diff --git a/include/sockets.h b/include/sockets.h
index 8b669bbde..6b1fca441 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -90,6 +90,7 @@ class CoreExport cidr
cidr(const Anope::string &ip, unsigned char len);
Anope::string mask() const;
bool match(sockaddrs &other);
+ bool operator<(const cidr &other) const;
};
class SocketException : public CoreException