summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/typedefs.h3
-rw-r--r--include/users.h25
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);