diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-07 19:11:50 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-07 19:11:50 +0000 |
commit | 1e639377cbad496a0b5f7d969a88fb808508f811 (patch) | |
tree | 7369e1f51e3781e6e24e15463cdd88f00bdf033c /include | |
parent | 8dc8387e8cfb253029cf11ae2df252517da5d073 (diff) |
Whowas refactor - probably wont compile yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3523 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/typedefs.h | 3 | ||||
-rw-r--r-- | include/users.h | 25 |
2 files changed, 17 insertions, 11 deletions
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<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash; typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash; -typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache; -typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash; + typedef std::vector<std::string> servernamelist; typedef std::vector<ExtMode> 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<WhoWasGroup*> whowas_set; +typedef std::map<irc::string,whowas_set*> 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); |