From bf8f62c32d6c66e38c167e6ca0ac59d29db52326 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 24 Aug 2014 16:39:04 -0400 Subject: Change Channel::GetModeList to return a copy of the mode list, not a pair of lower/upper bound iterators. Sometimes when iterating the list, like in cs_mode, we can modify the contents of it, which combined with mlock always agressively trying to readd modes to it can do bad things. --- include/channels.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index cc30d2030..9bc6c27c6 100644 --- a/include/channels.h +++ b/include/channels.h @@ -242,9 +242,9 @@ class CoreExport Channel : public Base, public Extensible /** Get a list of modes on a channel * @param name A mode name to get the list of - * @return a pair of iterators for the beginning and end of the list + * @return a vector of the list mode entries */ - std::pair GetModeList(const Anope::string &name); + std::vector GetModeList(const Anope::string &name); /** Get a string of the modes set on this channel * @param complete Include mode parameters -- cgit