]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/commands/cmd_whowas.h
core_whowas Store the nickname in WhoWas::Nick
[user/henk/code/inspircd.git] / include / commands / cmd_whowas.h
index 0a38b44f16071c6ad9bd3e066a2fa3dc3b2f87fa..5c2bb62ee881b056655df6c31924d4f281257400 100644 (file)
@@ -30,9 +30,37 @@ class WhoWasGroup;
  */
 typedef std::deque<WhoWasGroup*> whowas_set;
 
+namespace WhoWas
+{
+       /** Everything known about one nick
+        */
+       struct Nick
+       {
+               /** Container where each element has information about one occurrence of this nick
+                */
+               whowas_set entries;
+
+               /** Time this nick was added to the database
+                */
+               const time_t addtime;
+
+               /** Nickname whose information is stored in this class
+                */
+               const irc::string nick;
+
+               /** Constructor to initialize fields
+                */
+               Nick(const irc::string& nickname);
+
+               /** Destructor, deallocates all elements in the entries container
+                */
+               ~Nick();
+       };
+}
+
 /** Sets of users in the whowas system
  */
-typedef std::map<irc::string,whowas_set*> whowas_users;
+typedef std::map<irc::string, WhoWas::Nick*> whowas_users;
 
 /** Sets of time and users in whowas list
  */