diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 15:43:08 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 15:43:08 +0200 |
commit | 792ba89c2ecd0db1e644405e16785f7092cd1c57 (patch) | |
tree | 60646b8664fffe3451d13d7bcd3edb17ffe6cd2a /include/commands/cmd_whowas.h | |
parent | 713fa43b98b5f4de918253f6fc735cd8542e25e3 (diff) |
core_whowas Rename and move WhoWasGroup to WhoWas::Entry
Diffstat (limited to 'include/commands/cmd_whowas.h')
-rw-r--r-- | include/commands/cmd_whowas.h | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index a17785c22..d443f172b 100644 --- a/include/commands/cmd_whowas.h +++ b/include/commands/cmd_whowas.h @@ -23,18 +23,48 @@ #include "modules.h" -/* Forward ref for typedefs */ -class WhoWasGroup; - namespace WhoWas { + /** One entry for a nick. There may be multiple entries for a nick. + */ + struct Entry + { + /** Real host + */ + const std::string host; + + /** Displayed host + */ + const std::string dhost; + + /** Ident + */ + const std::string ident; + + /** Server name + */ + const std::string server; + + /** Full name (GECOS) + */ + const std::string gecos; + + /** Signon time + */ + const time_t signon; + + /** Initialize this Entry with a user + */ + Entry(User* user); + }; + /** Everything known about one nick */ struct Nick : public intrusive_list_node<Nick> { /** A group of users related by nickname */ - typedef std::deque<WhoWasGroup*> List; + typedef std::deque<Entry*> List; /** Container where each element has information about one occurrence of this nick */ @@ -62,7 +92,7 @@ namespace WhoWas public: struct Stats { - /** Number of currently existing WhoWasGroup objects + /** Number of currently existing WhoWas::Entry objects */ size_t entrycount; }; @@ -166,32 +196,3 @@ class CommandWhowas : public Command */ CmdResult Handle(const std::vector<std::string>& parameters, User *user); }; - -/** Used to hold WHOWAS information - */ -class WhoWasGroup -{ - public: - /** Real host - */ - std::string host; - /** Displayed host - */ - std::string dhost; - /** Ident - */ - std::string ident; - /** Server name - */ - std::string server; - /** Fullname (GECOS) - */ - std::string gecos; - /** Signon time - */ - time_t signon; - - /** Initialize this WhoWasFroup with a user - */ - WhoWasGroup(User* user); -}; |