diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-13 00:45:37 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-11-13 00:45:37 +0000 |
commit | 41f62a2a3badd6b7dbffb4fdb995c41ef709462c (patch) | |
tree | b87fbf24939d47fe28a066716e0a61682f2d8f87 /include | |
parent | f09dc35b5b03eb19e70333fbb8e5fe6f92c7edee (diff) |
add <whowas> config option to control whowas behaviour. *may break*
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5731 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/configreader.h | 13 | ||||
-rw-r--r-- | include/inspircd.h | 4 | ||||
-rw-r--r-- | include/users.h | 9 |
3 files changed, 26 insertions, 0 deletions
diff --git a/include/configreader.h b/include/configreader.h index e6591e7a8..516c6a6ed 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -120,6 +120,19 @@ class ServerConfig : public Extensible */ ConfigDataHash config_data; + /** Max number of WhoWas entries per user. + */ + int WhoWasGroupSize; + + /** Max number of cumulative user-entries in WhoWas. + * When max reached and added to, push out oldest entry FIFO style. + */ + int WhoWasMaxGroups; + + /** Max seconds a user is kept in WhoWas before being pruned. + */ + int WhoWasMaxKeep; + /** Holds the server name of the local server * as defined by the administrator. */ diff --git a/include/inspircd.h b/include/inspircd.h index baa1fb589..7fecf22ae 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -401,6 +401,10 @@ class InspIRCd : public classbase */ irc::whowas::whowas_users whowas; + /** Whowas container, contains a map of time_t to users tracked by WHOWAS + */ + irc::whowas::whowas_users_fifo whowas_fifo; + /** DNS class, provides resolver facilities to the core and modules */ DNS* Res; diff --git a/include/users.h b/include/users.h index 018336e77..ce8f4eb28 100644 --- a/include/users.h +++ b/include/users.h @@ -828,9 +828,18 @@ namespace irc */ typedef std::map<irc::string,whowas_set*> whowas_users; + /** Sets of time and users in whowas list + */ + typedef std::map<time_t, irc::string> whowas_users_fifo; + /** Called every hour by the core to remove expired entries */ void MaintainWhoWas(InspIRCd* ServerInstance, time_t TIME); + + /** Prune for WhoWasGroupSize, WhoWasMaxGroups and + * WhoWasMaxKeep on rehash + */ + void PruneWhoWas(InspIRCd* ServerInstance, time_t TIME); }; }; |