diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 15:14:30 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-09 15:14:30 +0200 |
commit | eef472fb62c299d4900baf0339e0eaf08648dcf1 (patch) | |
tree | 0518ec5511f6fadbe50098e62560bb585819d2e2 /include | |
parent | 18d9adff0fd2ea811dbbf17814a4ba5e36ed2da4 (diff) |
core_whowas Change the FIFO to be an intrusive list
Diffstat (limited to 'include')
-rw-r--r-- | include/commands/cmd_whowas.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index 5c2bb62ee..021e9e3b7 100644 --- a/include/commands/cmd_whowas.h +++ b/include/commands/cmd_whowas.h @@ -34,7 +34,7 @@ namespace WhoWas { /** Everything known about one nick */ - struct Nick + struct Nick : public intrusive_list_node<Nick> { /** Container where each element has information about one occurrence of this nick */ @@ -56,16 +56,16 @@ namespace WhoWas */ ~Nick(); }; + + /** Order in which the users were added into the map, used to remove oldest nick + */ + typedef intrusive_list_tail<Nick> FIFO; } /** Sets of users in the whowas system */ typedef std::map<irc::string, WhoWas::Nick*> whowas_users; -/** Sets of time and users in whowas list - */ -typedef std::deque<std::pair<time_t,irc::string> > whowas_users_fifo; - /** Handle /WHOWAS. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work * the same way, however, they can be fully unloaded, where these @@ -80,7 +80,7 @@ class CommandWhowas : public Command /** List of nicknames in the order they were inserted into the map */ - whowas_users_fifo whowas_fifo; + WhoWas::FIFO whowas_fifo; public: /** Max number of WhoWas entries per user. |