summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-09 15:03:21 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-09 15:03:21 +0200
commit76ed8299e9b9158cbb1cfa487effc6448f5b2268 (patch)
tree56a3f683d470d67dd9e7e5a2b2f8434f70820971
parent3a67168036e1d8e0406c66c3ccf37812228a9524 (diff)
core_whowas Store time added in WhoWas::Nick
-rw-r--r--include/commands/cmd_whowas.h8
-rw-r--r--src/coremods/core_whowas.cpp5
2 files changed, 13 insertions, 0 deletions
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h
index 2a3fa896c..5993500f6 100644
--- a/include/commands/cmd_whowas.h
+++ b/include/commands/cmd_whowas.h
@@ -40,6 +40,14 @@ namespace WhoWas
*/
whowas_set entries;
+ /** Time this nick was added to the database
+ */
+ const time_t addtime;
+
+ /** Constructor to initialize fields
+ */
+ Nick();
+
/** Destructor, deallocates all elements in the entries container
*/
~Nick();
diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp
index 0a418df3e..4308195ec 100644
--- a/src/coremods/core_whowas.cpp
+++ b/src/coremods/core_whowas.cpp
@@ -209,6 +209,11 @@ WhoWasGroup::WhoWasGroup(User* user) : host(user->host), dhost(user->dhost), ide
{
}
+WhoWas::Nick::Nick()
+ : addtime(ServerInstance->Time())
+{
+}
+
WhoWas::Nick::~Nick()
{
stdalgo::delete_all(entries);