summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/listmode.h2
-rw-r--r--src/listmode.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/listmode.h b/include/listmode.h
index 04044948c..94af1d524 100644
--- a/include/listmode.h
+++ b/include/listmode.h
@@ -37,7 +37,7 @@ class CoreExport ListModeBase : public ModeHandler
/** Items stored in the channel's list
*/
- typedef std::list<ListItem> ModeList;
+ typedef std::vector<ListItem> ModeList;
private:
class ChanData
diff --git a/src/listmode.cpp b/src/listmode.cpp
index 19f2d6061..1147a4ef2 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -32,9 +32,9 @@ void ListModeBase::DisplayList(User* user, Channel* channel)
ChanData* cd = extItem.get(channel);
if (cd)
{
- for (ModeList::reverse_iterator it = cd->list.rbegin(); it != cd->list.rend(); ++it)
+ for (ModeList::const_iterator it = cd->list.begin(); it != cd->list.end(); ++it)
{
- user->WriteNumeric(listnumeric, "%s %s %s %lu", channel->name.c_str(), it->mask.c_str(), (!it->setter.empty() ? it->setter.c_str() : ServerInstance->Config->ServerName.c_str()), (unsigned long) it->time);
+ user->WriteNumeric(listnumeric, "%s %s %s %lu", channel->name.c_str(), it->mask.c_str(), it->setter.c_str(), (unsigned long) it->time);
}
}
user->WriteNumeric(endoflistnumeric, "%s :%s", channel->name.c_str(), endofliststring.c_str());
@@ -192,7 +192,7 @@ ModeAction ListModeBase::OnModeChange(User* source, User*, Channel* channel, std
{
if (parameter == it->mask)
{
- cd->list.erase(it);
+ stdalgo::vector::swaperase(cd->list, it);
return MODEACTION_ALLOW;
}
}