diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp index a50787a17..83800e01d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -515,12 +515,13 @@ void AddWhoWas(userrec* u) } else { - if (iter->size() > 10) + whowas_set* group = (whowas_set*)iter->second; + if (group->size() > 10) { - iter->pop_front(); + group->pop_front(); } WhoWasGroup *a = new WhoWasGroup(u); - iter->push_back(a); + group->push_back(a); } } @@ -529,10 +530,10 @@ void MaintainWhoWas(time_t TIME) { for (whowas_users::iterator iter = whowas.begin(); iter != whowas.end(); iter++) { - whowas_set* n = (whowas_set*)iter; + whowas_set* n = (whowas_set*)iter->second; if (n->size()) { - while ((n->begin() != n->end()) && (n->begin()->signon < TIME - 259200)) // 3 days + while ((n->begin() != n->end()) && ((*n->begin())->signon < TIME - 259200)) // 3 days { WhoWasGroup *a = *(n->begin()); delete a; |