summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/users.h2
-rw-r--r--src/users.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/users.h b/include/users.h
index 80fbf43e0..d24a93fca 100644
--- a/include/users.h
+++ b/include/users.h
@@ -880,7 +880,7 @@ namespace irc
/** Sets of time and users in whowas list
*/
- typedef std::map<time_t,irc::string> whowas_users_fifo;
+ typedef std::deque<std::pair<time_t,irc::string> > whowas_users_fifo;
/** Called every hour by the core to remove expired entries
*/
diff --git a/src/users.cpp b/src/users.cpp
index c8f5bf927..44947fa6c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -947,12 +947,12 @@ void userrec::AddToWhoWas()
irc::whowas::WhoWasGroup *a = new irc::whowas::WhoWasGroup(this);
n->push_back(a);
ServerInstance->whowas[this->nick] = n;
- ServerInstance->whowas_fifo[ServerInstance->Time()] = this->nick;
+ ServerInstance->whowas_fifo.push_back(std::make_pair(ServerInstance->Time(),this->nick));
if ((int)(ServerInstance->whowas.size()) > ServerInstance->Config->WhoWasMaxGroups)
{
ServerInstance->Log(DEBUG,"Maxgroups of %d reached deleting oldest group '%s'",ServerInstance->Config->WhoWasMaxGroups, ServerInstance->whowas_fifo.begin()->second.c_str());
ServerInstance->whowas.erase(ServerInstance->whowas_fifo.begin()->second);
- ServerInstance->whowas_fifo.erase(ServerInstance->whowas_fifo.begin());
+ ServerInstance->whowas_fifo.pop_front();
}
}
else