From 9d6626f70ce866e2e98ce7ce607695b14a8375b7 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 7 Sep 2012 12:04:25 -0400 Subject: Made session tracking ip based, not host based, and allow using CIDR to group multiple ips from one subnet to one session --- include/config.h | 3 +++ include/sockets.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') 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 -- cgit