From 1e639377cbad496a0b5f7d969a88fb808508f811 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 7 Mar 2006 19:11:50 +0000 Subject: Whowas refactor - probably wont compile yet git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3523 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/typedefs.h | 3 +-- include/users.h | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/typedefs.h b/include/typedefs.h index 2fe74c8af..1bb65bebe 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -19,8 +19,7 @@ typedef nspace::hash_map, irc::StrHashComp> user_hash; typedef nspace::hash_map, irc::StrHashComp> chan_hash; -typedef nspace::hash_map, irc::InAddr_HashComp> address_cache; -typedef nspace::hash_map, irc::StrHashComp> whowas_hash; + typedef std::vector servernamelist; typedef std::vector ExtModeList; typedef ExtModeList::iterator ExtModeListIter; diff --git a/include/users.h b/include/users.h index b56af6606..71563abfa 100644 --- a/include/users.h +++ b/include/users.h @@ -340,25 +340,32 @@ class userrec : public connection #endif }; -/** A lightweight userrec used by WHOWAS - */ -class WhoWasUser +class WhoWasGroup { public: - char nick[NICKMAX]; - char ident[IDENTMAX+1]; - char dhost[64]; - char host[64]; - char fullname[MAXGECOS+1]; - char server[256]; + char* host; + char* dhost; + char* ident; + char* server; + char* gecos; time_t signon; + + WhoWasGroup(userrec* user); + ~WhoWasGroup(); }; +typedef std::deque whowas_set; +typedef std::map whowas_users; + +/** A lightweight userrec used by WHOWAS + */ + void AddOper(userrec* user); void DeleteOper(userrec* user); void kill_link(userrec *user,const char* r); void kill_link_silent(userrec *user,const char* r); void AddWhoWas(userrec* u); +void MaintainWhoWas(time_t TIME); void AddClient(int socket, int port, bool iscached, in_addr ip4); void FullConnectUser(userrec* user, CullList* Goners); userrec* ReHashNick(char* Old, char* New); -- cgit v1.2.3