summaryrefslogtreecommitdiff
path: root/src/modules/m_messageflood.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-12-19 15:24:02 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-12-19 15:24:02 +0100
commitc44433dad279aa8ad95fc936ce5d3c671fbf9aa3 (patch)
treeea03fa09e688a36f8e75f137954e60b762404b2a /src/modules/m_messageflood.cpp
parent6d25ad273c7fd1d21b9c392678f3472eb53c6e83 (diff)
parent7010a92426d2c3ab0cea5ba0d36a04bc6b52349f (diff)
Merge branch 'master+flatmap'
Diffstat (limited to 'src/modules/m_messageflood.cpp')
-rw-r--r--src/modules/m_messageflood.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp
index 3cebd2a5f..1faf3bfb9 100644
--- a/src/modules/m_messageflood.cpp
+++ b/src/modules/m_messageflood.cpp
@@ -34,7 +34,7 @@ class floodsettings
unsigned int secs;
unsigned int lines;
time_t reset;
- std::map<User*, unsigned int> counters;
+ insp::flat_map<User*, unsigned int> counters;
floodsettings(bool a, int b, int c) : ban(a), secs(b), lines(c)
{
@@ -54,11 +54,7 @@ class floodsettings
void clear(User* who)
{
- std::map<User*, unsigned int>::iterator iter = counters.find(who);
- if (iter != counters.end())
- {
- counters.erase(iter);
- }
+ counters.erase(who);
}
};