diff options
author | Adam <Adam@anope.org> | 2011-06-05 18:18:50 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-06-05 18:18:50 -0400 |
commit | a087e7f6643cc31246e7d7d4555d2dc8c0c485ad (patch) | |
tree | fa9d56018ad703382e7c12a9f8542219c0071284 /modules/core/bs_main.cpp | |
parent | 3ad93a31c91ae096d5e53deb7dd64586fa935244 (diff) |
Fixed clearing bandata
Diffstat (limited to 'modules/core/bs_main.cpp')
-rw-r--r-- | modules/core/bs_main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/core/bs_main.cpp b/modules/core/bs_main.cpp index 159adde93..442d522db 100644 --- a/modules/core/bs_main.cpp +++ b/modules/core/bs_main.cpp @@ -124,13 +124,15 @@ class BanDataPurger : public CallBack std::map<Anope::string, BanData> bandata; if (c->GetExtRegular("bs_main_bandata", bandata)) { - for (std::map<Anope::string, BanData>::iterator it2 = bandata.begin(), it2_end = bandata.end(); it2 != it2_end; ++it2) + for (std::map<Anope::string, BanData>::iterator it2 = bandata.begin(), it2_end = bandata.end(); it2 != it2_end;) { + const Anope::string &user = it->first; BanData *bd = &it2->second; + ++it2; if (Anope::CurTime - bd->last_use > Config->BSKeepData) { - bandata.erase(it2); + bandata.erase(user); continue; } } |