diff options
-rw-r--r-- | include/commands/cmd_whowas.h | 6 | ||||
-rw-r--r-- | src/coremods/core_whowas.cpp | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index 5993500f6..5c2bb62ee 100644 --- a/include/commands/cmd_whowas.h +++ b/include/commands/cmd_whowas.h @@ -44,9 +44,13 @@ namespace WhoWas */ const time_t addtime; + /** Nickname whose information is stored in this class + */ + const irc::string nick; + /** Constructor to initialize fields */ - Nick(); + Nick(const irc::string& nickname); /** Destructor, deallocates all elements in the entries container */ diff --git a/src/coremods/core_whowas.cpp b/src/coremods/core_whowas.cpp index 4308195ec..53b25eb7c 100644 --- a/src/coremods/core_whowas.cpp +++ b/src/coremods/core_whowas.cpp @@ -104,7 +104,7 @@ void CommandWhowas::AddToWhoWas(User* user) if (ret.second) // If inserted { // This nick is new, create a list for it and add the first record to it - WhoWas::Nick* nick = new WhoWas::Nick; + WhoWas::Nick* nick = new WhoWas::Nick(ret.first->first); nick->entries.push_back(new WhoWasGroup(user)); ret.first->second = nick; @@ -209,8 +209,9 @@ WhoWasGroup::WhoWasGroup(User* user) : host(user->host), dhost(user->dhost), ide { } -WhoWas::Nick::Nick() +WhoWas::Nick::Nick(const irc::string& nickname) : addtime(ServerInstance->Time()) + , nick(nickname) { } |